inc/oligoTm.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double oligoTm (char *dna, double DNA_nM, double K_mM)
double oligoDg (char *dna)
double longSeqTm (char *s, int start, int len, double salt_conc)
double seqTm (char *seq, double dna_conc, double salt_conc)


Function Documentation

double longSeqTm ( char *  s,
int  start,
int  len,
double  salt_conc 
)

Definition at line 282 of file oligoTm.c.

References errAbort().

Referenced by seqTm().

00284                                             :1390 (1962) as presented in
00285  * Sambrook, Fritsch and Maniatis, Molecular Cloning, p 11.46 (1989, CSHL
00286  * Press).
00287  *
00288  * Tm = 81.5 + 16.6(log10([Na+])) + .41*(%GC) - 600/length
00289  *
00290  * Where [Na+] is the molar sodium concentration, (%GC) is the percent of Gs
00291  * and Cs in the sequence, and length is the length of the sequence.
00292  *
00293  * A similar formula is used by the prime primer selection program in GCG
00294  * (http://www.gcg.com), which instead uses 675.0 / length in the last term
00295  * (after F. Baldino, Jr, M.-F. Chesselet, and M.E.  Lewis, Methods in
00296  * Enzymology 168:766 (1989) eqn (1) on page 766 without the mismatch and
00297  * formamide terms).  The formulas here and in Baldino et al. assume Na+ rather
00298  * than K+.  According to J.G. Wetmur, Critical Reviews in BioChem. and
00299  * Mol. Bio. 26:227 (1991) 50 mM K+ should be equivalent in these formulae to .2
00300  * M Na+.
00301  *
00302  * This function takes salt_conc to be the millimolar (mM) concentration,
00303  * since mM is the usual units in PCR applications.  */
00304 {
00305   int GC_count = 0;
00306   char *p, *end;
00307 
00308   if(start + len > strlen(s) || start < 0 || len <= 0) 
00309         errAbort("bad input to longSeqTm");
00310   end = &s[start + len];
00311   /* Length <= 0 is nonsensical. */
00312   for (p = &s[start]; p < end; p++) {
00313     if ('G' == *p || 'g' == *p || 'C' == *p || 'c' == *p)
00314       GC_count++;
00315   }
00316 
00317   return
00318     81.5
00319     + (16.6 * log10(salt_conc / 1000.0))
00320     + (41.0 * (((double) GC_count) / len))
00321     - (600.0 / len);
00322 
00323 }

Here is the call graph for this function:

Here is the caller graph for this function:

double oligoDg ( char *  dna  ) 

Definition at line 246 of file oligoTm.c.

References cloneString(), errAbort(), freeMem(), and STATE.

00251 {
00252     register int dg = 0;
00253     register char c;
00254     char *dupe = cloneString(dna);
00255     char *s = dupe;
00256 
00257     /* Use a finite-state machine (DFA) to calculate dg s. */
00258     c = *s; s++;
00259     if (c == 'A') goto A_STATE;
00260     else if (c == 'G') goto G_STATE;
00261     else if (c == 'T') goto T_STATE;
00262     else if (c == 'C') goto C_STATE;
00263     else if (c == 'N') goto N_STATE;
00264     else goto ERROR;
00265     STATE(A);
00266     STATE(T);
00267     STATE(G);
00268     STATE(C);
00269     STATE(N);
00270 
00271     DONE:  /* dg is now computed for the given sequence. */
00272     freeMem(dupe);
00273     return dg / 1000.0;
00274 
00275     ERROR:
00276     freeMem(dupe);
00277     errAbort("Not a valid oligo in oligoDg.");
00278     return 0;
00279 }

Here is the call graph for this function:

double oligoTm ( char *  dna,
double  DNA_nM,
double  K_mM 
)

Definition at line 183 of file oligoTm.c.

References cloneString(), ds, errAbort(), freeMem(), STATE, and touppers().

Referenced by seqTm().

00190 {
00191     register int dh = 0, ds = 108;
00192     register char c;
00193     char *dupe = cloneString(dna);
00194     char *s = dupe;
00195     double delta_H, delta_S;
00196 
00197     touppers(s);
00198     /* Use a finite-state machine (DFA) to calucluate dh and ds for s. */
00199     c = *s; s++;
00200     if (c == 'A') goto A_STATE;
00201     else if (c == 'G') goto G_STATE;
00202     else if (c == 'T') goto T_STATE;
00203     else if (c == 'C') goto C_STATE;
00204     else if (c == 'N') goto N_STATE;
00205     else goto ERROR;
00206     STATE(A);
00207     STATE(T);
00208     STATE(G);
00209     STATE(C);
00210     STATE(N);
00211 
00212     DONE:  /* dh and ds are now computed for the given sequence. */
00213     delta_H = dh * -100.0;  /* 
00214                              * Nearest-neighbor thermodynamic values for dh
00215                              * are given in 100 cal/mol of interaction.
00216                              */
00217     delta_S = ds * -0.1;     /*
00218                               * Nearest-neighbor thermodynamic values for ds
00219                               * are in in .1 cal/K per mol of interaction.
00220                               */
00221 
00222     /* 
00223      * See Rychlik, Spencer, Roads, Nucleic Acids Research, vol 18, no 21,
00224      * page 6410, eqn (ii).
00225      */
00226     freeMem(dupe);
00227     return delta_H / (delta_S + 1.987 * log(DNA_nM/4000000000.0))
00228         - 273.15 + 16.6 * log10(K_mM/1000.0);
00229 
00230     ERROR:  /* 
00231           * length of s was less than 2 or there was an illegal character in
00232           * s.
00233           */
00234     freeMem(dupe);
00235     errAbort("Not a valid oligo in oligoTm.");
00236     return 0;
00237 }

Here is the call graph for this function:

Here is the caller graph for this function:

double seqTm ( char *  seq,
double  dna_conc,
double  salt_conc 
)

Definition at line 325 of file oligoTm.c.

References longSeqTm(), and oligoTm().

00328 {
00329   int len = strlen(seq);
00330   return (len > 36)
00331     ? longSeqTm(seq, 0, len, salt_conc) : oligoTm(seq, dna_conc, salt_conc);
00332 }

Here is the call graph for this function:


Generated on Tue Dec 25 19:09:12 2007 for blat by  doxygen 1.5.2