comparison design_primers.py @ 6:f201e8c6e004 draft default tip

Uploaded
author ben-warren
date Mon, 07 Jul 2014 19:28:17 -0400
parents b321e0517be3
children
comparison
equal deleted inserted replaced
5:b321e0517be3 6:f201e8c6e004
157 for primerset in result: 157 for primerset in result:
158 amp_start=int(primerset['PRIMER_LEFT'].split(',')[0]) 158 amp_start=int(primerset['PRIMER_LEFT'].split(',')[0])
159 amp_end=int(primerset['PRIMER_RIGHT'].split(',')[0]) 159 amp_end=int(primerset['PRIMER_RIGHT'].split(',')[0])
160 ref_melt_Tm=0 160 ref_melt_Tm=0
161 var_melt_Tm=0 161 var_melt_Tm=0
162 diff_melt=0
162 if my_args.run_uMelt: 163 if my_args.run_uMelt:
163 try: 164 try:
164 ref_melt_Tm=umelts.getTm(umelts.getmelt(amp_seq.tostring()[amp_start:amp_end+1])) 165 ref_melt_Tm=umelts.getTm(umelts.getmelt(amp_seq.tostring()[amp_start:amp_end+1]))
165 var_melt_Tm=umelts.getTm(umelts.getmelt(mutamp_seq.tostring()[amp_start:amp_end+1])) 166 var_melt_Tm=umelts.getTm(umelts.getmelt(mutamp_seq.tostring()[amp_start:amp_end+1]))
167 diff_melt=abs(ref_melt_Tm - var_melt_Tm)
166 except: 168 except:
167 ref_melt_Tm=0 ##preferably something more informative? 169 ref_melt_Tm="NA" ##preferably something more informative?
168 var_melt_Tm=0 ##exception handling to be added 170 var_melt_Tm="NA" ##exception handling to be added
171 diff_melt="NA"
169 reference_seq=target_feat.qualifiers['Reference_seq'][0] 172 reference_seq=target_feat.qualifiers['Reference_seq'][0]
170 if target_feat.qualifiers.has_key('Variant_seq'): 173 if target_feat.qualifiers.has_key('Variant_seq'):
171 variant_seq=target_feat.qualifiers['Variant_seq'][0] 174 variant_seq=target_feat.qualifiers['Variant_seq'][0]
172 else: 175 else:
173 variant_seq="NA" 176 variant_seq="NA"
174 print mytarget.id, featLocation + 1 ,reference_seq, variant_seq,amp_end-amp_start,primerset['PRIMER_LEFT_SEQUENCE'],primerset['PRIMER_RIGHT_SEQUENCE'], ref_melt_Tm,var_melt_Tm,abs(ref_melt_Tm-var_melt_Tm)#, amp_seq.tostring()[amp_start:amp_end+1], mutamp_seq.tostring()[amp_start:amp_end+1] 177 print mytarget.id, featLocation + 1 ,reference_seq, variant_seq,amp_end-amp_start,primerset['PRIMER_LEFT_SEQUENCE'],primerset['PRIMER_RIGHT_SEQUENCE'], ref_melt_Tm,var_melt_Tm,diff_melt#, amp_seq.tostring()[amp_start:amp_end+1], mutamp_seq.tostring()[amp_start:amp_end+1]
175 178
176 my_args.gff_file.close() 179 my_args.gff_file.close()
177 my_args.in_file.close() 180 my_args.in_file.close()
178 181