def __init__( self, record, template=None, forward_primer=None, reverse_primer=None, saltc=None, forward_primer_concentration=None, reverse_primer_concentration=None, *args, **kwargs): #Dseqrecord.__init__(self,record,*args,**kwargs) super(Amplicon, self).__init__(record, *args, **kwargs) self.template = template self.forward_primer = forward_primer self.reverse_primer = reverse_primer self.fwd_primer = self.forward_primer self.rev_primer = self.reverse_primer self.forward_primer_concentration = forward_primer_concentration self.reverse_primer_concentration = reverse_primer_concentration self.saltc = saltc self.tmf = Tm_staluc(str(self.forward_primer.footprint),dnac=50, saltc=self.saltc) self.tmr = Tm_staluc(str(self.reverse_primer.footprint),dnac=50, saltc=self.saltc) self.tmf_dbd = tmbresluc(str(self.forward_primer.footprint),primerc=self.forward_primer_concentration) self.tmr_dbd = tmbresluc(str(self.reverse_primer.footprint),primerc=self.reverse_primer_concentration)
def GC_TM_calc(tmp_seq, loc, GC_comb, disRC): from Bio.Seq import Seq from Bio.SeqUtils import GC from Bio.SeqUtils.MeltingTemp import Tm_staluc global TM_Min, TM_Max [GC_Min, GC_Max] = GC_comb.split('-') if disRC == 'False': gc = GC(tmp_seq) tm = Tm_staluc(tmp_seq, rna=0) thermo = [round(gc, 2), round(tm, 2), tmp_seq] elif disRC == 'True': tmp_seqd = str(Seq(tmp_seq).reverse_complement()) gc = GC(tmp_seqd) tm = Tm_staluc(tmp_seqd, rna=0) thermo = [round(gc, 2), round(tm, 2), tmp_seq] if (int(thermo[0]) >= int(GC_Min)) and (int(thermo[0]) <= int(GC_Max)): if (int(thermo[1]) >= TM_Min) and (int(thermo[1]) <= TM_Max): thermo.append('P') return thermo else: thermo.append('F-Tm') return thermo else: thermo.append('F-GC') return thermo
def nearest_neighbour(self, sequence): """Calculate Tm with rule. See http://www.basic.northwestern.edu/biotools/oligocalc.html""" tm_nn = Tm_staluc(sequence, dnac=self.primer_conc, saltc=self.natrium_conc) return round(tm_nn, 1)
def calGcTm(tmp_seq, loc): from Bio.SeqUtils import GC from Bio.SeqUtils.MeltingTemp import Tm_staluc global TM_Min, TM_Max, bp_len [GC_Min, GC_Max] = GC_limit.split('-') gc = GC(tmp_seq) tm = Tm_staluc(tmp_seq, rna=0) thermo = [round(gc, 0), round(tm, 0), tmp_seq] if (int(thermo[0]) >= int(GC_Min)) and (int(thermo[0]) <= int(GC_Max)): if (int(thermo[1]) >= TM_Min) and (int(thermo[1]) <= TM_Max): thermo.append('P') return thermo else: thermo.append('F-Tm') return thermo else: thermo.append('F-GC') return thermo
def tm(self): return round(Tm_staluc(str(self.seq()), 50, 1000*float(self.cfragment.construct.settings.na_salt)),2)
def fullTm(self): return Tm_staluc(self.bottomPrimer())
def bottomTm(self): return Tm_staluc(self.rightHalf())
def topTm(self): return Tm_staluc(self.leftHalf())