annotate SAINT_preprocessing_v6.py @ 13:13383ba55336 draft

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