annotate SAINT_preprocessing_v6.py @ 8:30d53a378141 draft

Uploaded
author bornea
date Tue, 10 Nov 2015 13:15:26 -0500
parents
children 13383ba55336
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
30d53a378141 Uploaded
bornea
parents:
diff changeset
1 #######################################################################################
30d53a378141 Uploaded
bornea
parents:
diff changeset
2 # Python-code: SAINT pre-processing from Scaffold "Samples Report" output
30d53a378141 Uploaded
bornea
parents:
diff changeset
3 # Author: Brent Kuenzi
30d53a378141 Uploaded
bornea
parents:
diff changeset
4 #######################################################################################
30d53a378141 Uploaded
bornea
parents:
diff changeset
5 # This program reads in a raw Scaffold "Samples Report" output and a user generated
30d53a378141 Uploaded
bornea
parents:
diff changeset
6 # bait file and autoformats it into prey and interaction files for SAINTexpress
30d53a378141 Uploaded
bornea
parents:
diff changeset
7 # analysis
30d53a378141 Uploaded
bornea
parents:
diff changeset
8 #######################################################################################
30d53a378141 Uploaded
bornea
parents:
diff changeset
9 import sys
30d53a378141 Uploaded
bornea
parents:
diff changeset
10 import urllib2
30d53a378141 Uploaded
bornea
parents:
diff changeset
11 import os.path
30d53a378141 Uploaded
bornea
parents:
diff changeset
12 #######################################################################################
30d53a378141 Uploaded
bornea
parents:
diff changeset
13 ## REQUIRED INPUT ##
30d53a378141 Uploaded
bornea
parents:
diff changeset
14
30d53a378141 Uploaded
bornea
parents:
diff changeset
15 # 1) infile: Scaffold "Samples Report" output
30d53a378141 Uploaded
bornea
parents:
diff changeset
16 # 2) baitfile: SAINT formatted bait file generated in Galaxy
30d53a378141 Uploaded
bornea
parents:
diff changeset
17 # 3) prey: Y or N for generating a prey file (requires internet connection)
30d53a378141 Uploaded
bornea
parents:
diff changeset
18 #######################################################################################
30d53a378141 Uploaded
bornea
parents:
diff changeset
19 infile = sys.argv[1] #Scaffold "Samples Report" output
30d53a378141 Uploaded
bornea
parents:
diff changeset
20 prey = sys.argv[2] # Y or N
30d53a378141 Uploaded
bornea
parents:
diff changeset
21 fasta_db = sys.argv[3]
30d53a378141 Uploaded
bornea
parents:
diff changeset
22 tool_path = sys.argv[8]
30d53a378141 Uploaded
bornea
parents:
diff changeset
23 if fasta_db == "None":
30d53a378141 Uploaded
bornea
parents:
diff changeset
24 fasta_db = str(tool_path) + "/SwissProt_HUMAN_2014_08.fasta"
30d53a378141 Uploaded
bornea
parents:
diff changeset
25 make_bait= sys.argv[5]
30d53a378141 Uploaded
bornea
parents:
diff changeset
26
30d53a378141 Uploaded
bornea
parents:
diff changeset
27
30d53a378141 Uploaded
bornea
parents:
diff changeset
28 baits = make_bait.split()
30d53a378141 Uploaded
bornea
parents:
diff changeset
29 i = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
30 bait_file_tmp = open("bait.txt", "wr")
30d53a378141 Uploaded
bornea
parents:
diff changeset
31 order = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
32 bait_cache = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
33
30d53a378141 Uploaded
bornea
parents:
diff changeset
34 while i < len(baits):
30d53a378141 Uploaded
bornea
parents:
diff changeset
35 if baits[i+2] == "true":
30d53a378141 Uploaded
bornea
parents:
diff changeset
36 T_C = "C"
30d53a378141 Uploaded
bornea
parents:
diff changeset
37 else:
30d53a378141 Uploaded
bornea
parents:
diff changeset
38 T_C = "T"
30d53a378141 Uploaded
bornea
parents:
diff changeset
39 line1 = baits[i] + "\t" + baits[i+1] + "\t" + T_C + "\n"
30d53a378141 Uploaded
bornea
parents:
diff changeset
40 q = open(infile,"r")
30d53a378141 Uploaded
bornea
parents:
diff changeset
41 for line2 in q:
30d53a378141 Uploaded
bornea
parents:
diff changeset
42 line2 = line2.strip()
30d53a378141 Uploaded
bornea
parents:
diff changeset
43 temp = line2.split('\t')
30d53a378141 Uploaded
bornea
parents:
diff changeset
44 if "Quantitative Variance" in str(temp):
30d53a378141 Uploaded
bornea
parents:
diff changeset
45 if baits[i] in temp:
30d53a378141 Uploaded
bornea
parents:
diff changeset
46 number_bait = temp.index(str(baits[i]))
30d53a378141 Uploaded
bornea
parents:
diff changeset
47 number_bait = number_bait - 9
30d53a378141 Uploaded
bornea
parents:
diff changeset
48 bait_cache.append((number_bait, str(line1)))
30d53a378141 Uploaded
bornea
parents:
diff changeset
49 else:
30d53a378141 Uploaded
bornea
parents:
diff changeset
50 print "Error: bad bait " + str(baits[i])
30d53a378141 Uploaded
bornea
parents:
diff changeset
51 sys.exit()
30d53a378141 Uploaded
bornea
parents:
diff changeset
52 else:
30d53a378141 Uploaded
bornea
parents:
diff changeset
53 pass
30d53a378141 Uploaded
bornea
parents:
diff changeset
54 i = i + 3
30d53a378141 Uploaded
bornea
parents:
diff changeset
55
30d53a378141 Uploaded
bornea
parents:
diff changeset
56 bait_cache.sort()
30d53a378141 Uploaded
bornea
parents:
diff changeset
57 for line in bait_cache:
30d53a378141 Uploaded
bornea
parents:
diff changeset
58 bait_file_tmp.write(line[1])
30d53a378141 Uploaded
bornea
parents:
diff changeset
59
30d53a378141 Uploaded
bornea
parents:
diff changeset
60 bait_file_tmp.close()
30d53a378141 Uploaded
bornea
parents:
diff changeset
61 baitfile = "bait.txt"
30d53a378141 Uploaded
bornea
parents:
diff changeset
62
30d53a378141 Uploaded
bornea
parents:
diff changeset
63 class ReturnValue1(object):
30d53a378141 Uploaded
bornea
parents:
diff changeset
64 def __init__(self, sequence, gene):
30d53a378141 Uploaded
bornea
parents:
diff changeset
65 self.seqlength = sequence
30d53a378141 Uploaded
bornea
parents:
diff changeset
66 self.genename = gene
30d53a378141 Uploaded
bornea
parents:
diff changeset
67 class ReturnValue2(object):
30d53a378141 Uploaded
bornea
parents:
diff changeset
68 def __init__(self, getdata, getproteins, getheader):
30d53a378141 Uploaded
bornea
parents:
diff changeset
69 self.data = getdata
30d53a378141 Uploaded
bornea
parents:
diff changeset
70 self.proteins = getproteins
30d53a378141 Uploaded
bornea
parents:
diff changeset
71 self.header = getheader
30d53a378141 Uploaded
bornea
parents:
diff changeset
72
30d53a378141 Uploaded
bornea
parents:
diff changeset
73 def main(scaffold_input, baitfile):
30d53a378141 Uploaded
bornea
parents:
diff changeset
74 bait_check(baitfile, scaffold_input)
30d53a378141 Uploaded
bornea
parents:
diff changeset
75 make_inter(scaffold_input)
30d53a378141 Uploaded
bornea
parents:
diff changeset
76 if prey == 'true':
30d53a378141 Uploaded
bornea
parents:
diff changeset
77 make_prey(scaffold_input)
30d53a378141 Uploaded
bornea
parents:
diff changeset
78 no_error_inter(scaffold_input)
30d53a378141 Uploaded
bornea
parents:
diff changeset
79 os.rename('prey.txt', sys.argv[5])
30d53a378141 Uploaded
bornea
parents:
diff changeset
80 elif prey == 'false':
30d53a378141 Uploaded
bornea
parents:
diff changeset
81 if os.path.isfile('error proteins.txt') == True:
30d53a378141 Uploaded
bornea
parents:
diff changeset
82 no_error_inter(scaffold_input)
30d53a378141 Uploaded
bornea
parents:
diff changeset
83 pass
30d53a378141 Uploaded
bornea
parents:
diff changeset
84 elif prey != 'true' or 'false':
30d53a378141 Uploaded
bornea
parents:
diff changeset
85 sys.exit("Invalid Prey Argument: Y or N")
30d53a378141 Uploaded
bornea
parents:
diff changeset
86
30d53a378141 Uploaded
bornea
parents:
diff changeset
87 def get_info(uniprot_accession_in): # get aa lengths and gene name
30d53a378141 Uploaded
bornea
parents:
diff changeset
88 error = open('error proteins.txt', 'a+')
30d53a378141 Uploaded
bornea
parents:
diff changeset
89 # while True:
30d53a378141 Uploaded
bornea
parents:
diff changeset
90 # i = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
91 # try:
30d53a378141 Uploaded
bornea
parents:
diff changeset
92 # data = urllib2.urlopen("http://www.uniprot.org/uniprot/" + uniprot_accession_in + ".fasta")
30d53a378141 Uploaded
bornea
parents:
diff changeset
93 # break
30d53a378141 Uploaded
bornea
parents:
diff changeset
94 # except urllib2.HTTPError, err:
30d53a378141 Uploaded
bornea
parents:
diff changeset
95 # i = i + 1
30d53a378141 Uploaded
bornea
parents:
diff changeset
96 # if i == 50:
30d53a378141 Uploaded
bornea
parents:
diff changeset
97 # sys.exit("More than 50 errors. Check your file or try again later.")
30d53a378141 Uploaded
bornea
parents:
diff changeset
98 # if err.code == 404:
30d53a378141 Uploaded
bornea
parents:
diff changeset
99 # error.write(uniprot_accession_in + '\t' + "Invalid URL. Check protein" + '\n')
30d53a378141 Uploaded
bornea
parents:
diff changeset
100 # seqlength = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
101 # genename = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
102 # return ReturnValue1(seqlength, genename)
30d53a378141 Uploaded
bornea
parents:
diff changeset
103 # elif err.code == 302:
30d53a378141 Uploaded
bornea
parents:
diff changeset
104 # sys.exit("Request timed out. Check connection and try again.")
30d53a378141 Uploaded
bornea
parents:
diff changeset
105 # else:
30d53a378141 Uploaded
bornea
parents:
diff changeset
106 # sys.exit("Uniprot had some other error")
30d53a378141 Uploaded
bornea
parents:
diff changeset
107 # lines = data.readlines()
30d53a378141 Uploaded
bornea
parents:
diff changeset
108 # if lines == []:
30d53a378141 Uploaded
bornea
parents:
diff changeset
109 # error.write(uniprot_accession_in + '\t' + "Blank Fasta" + '\n')
30d53a378141 Uploaded
bornea
parents:
diff changeset
110 # error.close
30d53a378141 Uploaded
bornea
parents:
diff changeset
111 # seqlength = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
112 # genename = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
113 # return ReturnValue1(seqlength, genename)
30d53a378141 Uploaded
bornea
parents:
diff changeset
114 # if lines != []:
30d53a378141 Uploaded
bornea
parents:
diff changeset
115 # seqlength = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
116 # header = lines[0]
30d53a378141 Uploaded
bornea
parents:
diff changeset
117 # for line in lines[1:]:
30d53a378141 Uploaded
bornea
parents:
diff changeset
118 # line = line.replace("\n","") # strip \n or else it gets counted in the length
30d53a378141 Uploaded
bornea
parents:
diff changeset
119 # seqlength += len(line)
30d53a378141 Uploaded
bornea
parents:
diff changeset
120 # if 'GN=' in header:
30d53a378141 Uploaded
bornea
parents:
diff changeset
121 # lst = header.split('GN=')
30d53a378141 Uploaded
bornea
parents:
diff changeset
122 # lst2 = lst[1].split(' ')
30d53a378141 Uploaded
bornea
parents:
diff changeset
123 # genename = lst2[0]
30d53a378141 Uploaded
bornea
parents:
diff changeset
124 # error.close
30d53a378141 Uploaded
bornea
parents:
diff changeset
125 # return ReturnValue1(seqlength, genename)
30d53a378141 Uploaded
bornea
parents:
diff changeset
126 # if 'GN=' not in header:
30d53a378141 Uploaded
bornea
parents:
diff changeset
127 # genename = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
128 # error.close
30d53a378141 Uploaded
bornea
parents:
diff changeset
129 # return ReturnValue1(seqlength, genename)
30d53a378141 Uploaded
bornea
parents:
diff changeset
130 data = open(fasta_db,'r')
30d53a378141 Uploaded
bornea
parents:
diff changeset
131 lines = data.readlines()
30d53a378141 Uploaded
bornea
parents:
diff changeset
132 db_len = len(lines)
30d53a378141 Uploaded
bornea
parents:
diff changeset
133 seqlength = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
134 count = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
135 for i in lines:
30d53a378141 Uploaded
bornea
parents:
diff changeset
136 if ">sp" in i:
30d53a378141 Uploaded
bornea
parents:
diff changeset
137 if uniprot_accession_in == i.split("|")[1]:
30d53a378141 Uploaded
bornea
parents:
diff changeset
138 match = count+1
30d53a378141 Uploaded
bornea
parents:
diff changeset
139 if 'GN=' in i:
30d53a378141 Uploaded
bornea
parents:
diff changeset
140 lst = i.split('GN=')
30d53a378141 Uploaded
bornea
parents:
diff changeset
141 lst2 = lst[1].split(' ')
30d53a378141 Uploaded
bornea
parents:
diff changeset
142 genename = lst2[0]
30d53a378141 Uploaded
bornea
parents:
diff changeset
143 if 'GN=' not in i:
30d53a378141 Uploaded
bornea
parents:
diff changeset
144 genename = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
145 while ">sp" not in lines[match]:
30d53a378141 Uploaded
bornea
parents:
diff changeset
146 if match <= db_len:
30d53a378141 Uploaded
bornea
parents:
diff changeset
147 seqlength = seqlength + len(lines[match].strip())
30d53a378141 Uploaded
bornea
parents:
diff changeset
148 match = match + 1
30d53a378141 Uploaded
bornea
parents:
diff changeset
149 else:
30d53a378141 Uploaded
bornea
parents:
diff changeset
150 break
30d53a378141 Uploaded
bornea
parents:
diff changeset
151 return ReturnValue1(seqlength, genename)
30d53a378141 Uploaded
bornea
parents:
diff changeset
152 count = count + 1
30d53a378141 Uploaded
bornea
parents:
diff changeset
153
30d53a378141 Uploaded
bornea
parents:
diff changeset
154
30d53a378141 Uploaded
bornea
parents:
diff changeset
155 if seqlength == 0:
30d53a378141 Uploaded
bornea
parents:
diff changeset
156 error.write(uniprot_accession_in + '\t' + "Uniprot not in Fasta" + '\n')
30d53a378141 Uploaded
bornea
parents:
diff changeset
157 error.close
30d53a378141 Uploaded
bornea
parents:
diff changeset
158 seqlength = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
159 genename = 'NA'
30d53a378141 Uploaded
bornea
parents:
diff changeset
160 return ReturnValue1(seqlength, genename)
30d53a378141 Uploaded
bornea
parents:
diff changeset
161
30d53a378141 Uploaded
bornea
parents:
diff changeset
162 def readtab(infile):
30d53a378141 Uploaded
bornea
parents:
diff changeset
163 with open(infile,'r') as x: # read in tab-delim text
30d53a378141 Uploaded
bornea
parents:
diff changeset
164 output = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
165 for line in x:
30d53a378141 Uploaded
bornea
parents:
diff changeset
166 line = line.strip()
30d53a378141 Uploaded
bornea
parents:
diff changeset
167 temp = line.split('\t')
30d53a378141 Uploaded
bornea
parents:
diff changeset
168 output.append(temp)
30d53a378141 Uploaded
bornea
parents:
diff changeset
169 return output
30d53a378141 Uploaded
bornea
parents:
diff changeset
170 def read_scaffold(scaffold_input): # Get data, proteins and header from scaffold output
30d53a378141 Uploaded
bornea
parents:
diff changeset
171 dupes = readtab(scaffold_input)
30d53a378141 Uploaded
bornea
parents:
diff changeset
172 cnt = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
173 for i in dupes:
30d53a378141 Uploaded
bornea
parents:
diff changeset
174 cnt += 1
30d53a378141 Uploaded
bornea
parents:
diff changeset
175 if i[0] == '#': # finds the start of second header
30d53a378141 Uploaded
bornea
parents:
diff changeset
176 header_start = cnt-1
30d53a378141 Uploaded
bornea
parents:
diff changeset
177 header = dupes[header_start]
30d53a378141 Uploaded
bornea
parents:
diff changeset
178 prot_start = header.index("Accession Number")
30d53a378141 Uploaded
bornea
parents:
diff changeset
179 data = dupes[header_start+1:len(dupes)-2] # cut off blank line and END OF FILE
30d53a378141 Uploaded
bornea
parents:
diff changeset
180 proteins = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
181 for i in data:
30d53a378141 Uploaded
bornea
parents:
diff changeset
182 i[4] = i[4].split()[0] # removes the (+##) that sometimes is attached
30d53a378141 Uploaded
bornea
parents:
diff changeset
183 for protein in data:
30d53a378141 Uploaded
bornea
parents:
diff changeset
184 proteins.append(protein[prot_start])
30d53a378141 Uploaded
bornea
parents:
diff changeset
185 return ReturnValue2(data, proteins, header)
30d53a378141 Uploaded
bornea
parents:
diff changeset
186 def make_inter(scaffold_input):
30d53a378141 Uploaded
bornea
parents:
diff changeset
187 bait = readtab(baitfile)
30d53a378141 Uploaded
bornea
parents:
diff changeset
188 data = read_scaffold(scaffold_input).data
30d53a378141 Uploaded
bornea
parents:
diff changeset
189 header = read_scaffold(scaffold_input).header
30d53a378141 Uploaded
bornea
parents:
diff changeset
190 proteins = read_scaffold(scaffold_input).proteins
30d53a378141 Uploaded
bornea
parents:
diff changeset
191 bait_index = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
192 for i in bait:
30d53a378141 Uploaded
bornea
parents:
diff changeset
193 bait_index.append(header.index(i[0])) # Find just the baits defined in bait file
30d53a378141 Uploaded
bornea
parents:
diff changeset
194 with open('inter.txt', 'w') as y:
30d53a378141 Uploaded
bornea
parents:
diff changeset
195 a = 0; l=0
30d53a378141 Uploaded
bornea
parents:
diff changeset
196 for bb in bait:
30d53a378141 Uploaded
bornea
parents:
diff changeset
197 for lst in data:
30d53a378141 Uploaded
bornea
parents:
diff changeset
198 y.write(header[bait_index[l]] + '\t' + bb[1] + '\t' + proteins[a] + '\t' + lst[bait_index[l]] + '\n')
30d53a378141 Uploaded
bornea
parents:
diff changeset
199 a+=1
30d53a378141 Uploaded
bornea
parents:
diff changeset
200 if a == len(proteins):
30d53a378141 Uploaded
bornea
parents:
diff changeset
201 a = 0; l+=1
30d53a378141 Uploaded
bornea
parents:
diff changeset
202 def make_prey(scaffold_input):
30d53a378141 Uploaded
bornea
parents:
diff changeset
203 proteins = read_scaffold(scaffold_input).proteins
30d53a378141 Uploaded
bornea
parents:
diff changeset
204 output_file = open("prey.txt",'w')
30d53a378141 Uploaded
bornea
parents:
diff changeset
205 for a in proteins:
30d53a378141 Uploaded
bornea
parents:
diff changeset
206 a = a.replace("\n","") # remove \n for input into function
30d53a378141 Uploaded
bornea
parents:
diff changeset
207 a = a.replace("\r","") # ditto for \r
30d53a378141 Uploaded
bornea
parents:
diff changeset
208 seq = get_info(a).seqlength
30d53a378141 Uploaded
bornea
parents:
diff changeset
209 GN = get_info(a).genename
30d53a378141 Uploaded
bornea
parents:
diff changeset
210 if seq != 'NA':
30d53a378141 Uploaded
bornea
parents:
diff changeset
211 output_file.write(a+"\t"+str(seq)+ "\t" + str(GN) + "\n")
30d53a378141 Uploaded
bornea
parents:
diff changeset
212 output_file.close()
30d53a378141 Uploaded
bornea
parents:
diff changeset
213 def no_error_inter(scaffold_input): # remake inter file without protein errors from Uniprot
30d53a378141 Uploaded
bornea
parents:
diff changeset
214 err = readtab("error proteins.txt")
30d53a378141 Uploaded
bornea
parents:
diff changeset
215 bait = readtab(baitfile)
30d53a378141 Uploaded
bornea
parents:
diff changeset
216 data = read_scaffold(scaffold_input).data
30d53a378141 Uploaded
bornea
parents:
diff changeset
217 header = read_scaffold(scaffold_input).header
30d53a378141 Uploaded
bornea
parents:
diff changeset
218 bait_index = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
219 for i in bait:
30d53a378141 Uploaded
bornea
parents:
diff changeset
220 bait_index.append(header.index(i[0]))
30d53a378141 Uploaded
bornea
parents:
diff changeset
221 proteins = read_scaffold(scaffold_input).proteins
30d53a378141 Uploaded
bornea
parents:
diff changeset
222 errors = []
30d53a378141 Uploaded
bornea
parents:
diff changeset
223 for e in err:
30d53a378141 Uploaded
bornea
parents:
diff changeset
224 errors.append(e[0])
30d53a378141 Uploaded
bornea
parents:
diff changeset
225 with open('inter.txt', 'w') as y:
30d53a378141 Uploaded
bornea
parents:
diff changeset
226 l = 0; a = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
227 for bb in bait:
30d53a378141 Uploaded
bornea
parents:
diff changeset
228 for lst in data:
30d53a378141 Uploaded
bornea
parents:
diff changeset
229 if proteins[a] not in errors:
30d53a378141 Uploaded
bornea
parents:
diff changeset
230 y.write(header[bait_index[l]] + '\t' + bb[1] + '\t' + proteins[a] + '\t' + lst[bait_index[l]] + '\n')
30d53a378141 Uploaded
bornea
parents:
diff changeset
231 a+=1
30d53a378141 Uploaded
bornea
parents:
diff changeset
232 if a == len(proteins):
30d53a378141 Uploaded
bornea
parents:
diff changeset
233 l += 1; a = 0
30d53a378141 Uploaded
bornea
parents:
diff changeset
234 def bait_check(bait, scaffold_input): # check that bait names share header titles
30d53a378141 Uploaded
bornea
parents:
diff changeset
235 bait_in = readtab(bait)
30d53a378141 Uploaded
bornea
parents:
diff changeset
236 header = read_scaffold(scaffold_input).header
30d53a378141 Uploaded
bornea
parents:
diff changeset
237 for i in bait_in:
30d53a378141 Uploaded
bornea
parents:
diff changeset
238 if i[0] not in header:
30d53a378141 Uploaded
bornea
parents:
diff changeset
239 sys.exit("Bait must share header titles with Scaffold output")
30d53a378141 Uploaded
bornea
parents:
diff changeset
240
30d53a378141 Uploaded
bornea
parents:
diff changeset
241 if __name__ == '__main__':
30d53a378141 Uploaded
bornea
parents:
diff changeset
242 main(infile, baitfile)
30d53a378141 Uploaded
bornea
parents:
diff changeset
243
30d53a378141 Uploaded
bornea
parents:
diff changeset
244 os.rename('inter.txt', sys.argv[4])
30d53a378141 Uploaded
bornea
parents:
diff changeset
245 os.rename("bait.txt", sys.argv[7])