Trees | Indices | Help |
---|
|
1 """Code to interact with the primersearch program from EMBOSS. 2 """ 3 46 """Represent the input file into the primersearch program. 7 8 This makes it easy to add primer information and write it out to the 9 simple primer file format. 10 """ 132615 output = "" 16 for name, primer1, primer2 in self.primer_info: 17 output += "%s %s %s\n" % (name, primer1, primer2) 18 return output1922 """Add primer information to the record. 23 """ 24 self.primer_info.append((primer_name, first_primer_seq, 25 second_primer_seq))28 """Represent the information from a primersearch job. 29 30 amplifiers is a dictionary where the keys are the primer names and 31 the values are a list of PrimerSearchAmplifier objects. 32 """35 4244 """Get output from primersearch into a PrimerSearchOutputRecord 45 """ 46 record = OutputRecord() 47 48 for line in handle: 49 if not line.strip(): 50 continue 51 elif line.startswith("Primer name"): 52 name = line.split()[-1] 53 record.amplifiers[name] = [] 54 elif line.startswith("Amplimer"): 55 amplifier = Amplifier() 56 record.amplifiers[name].append(amplifier) 57 elif line.startswith("\tSequence: "): 58 amplifier.hit_info = line.replace("\tSequence: ", "") 59 elif line.startswith("\tAmplimer length: "): 60 length = line.split()[-2] 61 amplifier.length = int(length) 62 else: 63 amplifier.hit_info += line 64 65 for name in record.amplifiers: 66 for amplifier in record.amplifiers[name]: 67 amplifier.hit_info = amplifier.hit_info.rstrip() 68 69 return record70
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Dec 16 11:27:19 2009 | http://epydoc.sourceforge.net |