There is a simple formula to calculate the melting temperature of the given Nucleotide Sequence :
- If you have a sequence that is less than 14 nucleotides, then you can use the formula :
Melting temperature(°C) = (nA+nT) * 2 + (nG+nC) * 4
- If you have a sequence that is greater than 14 nucleotides, then you can use the formula :
Melting temperature(°C) = 64.9 + 41 * (nG+nC-16.4)/(nA+nT+nG+nC)
- nA : Number of adenine bases in the sequence
- nT : Number of thymine bases in the sequence
- nC : Number of cytosine bases in the sequence
- nG : Number of guanine bases in the sequence
This formula works pretty well in scripting languages like Perl.
I'm not aware of a package with the formula, but you can use the the Wallace rule for an approximation in short sequences (primers):
Tm = 2°C(A+T) + 4°C(G+C)
Or the Howley formula for longer sequences:
Tm = 81.5 + 0.4m1(%GC) – 500/L + 16.6 log[M]
where L refers to the length of the oligonucleotide, and [M] is the concentration of monovalent cations.
If you know python (or can manage to read it reasonably well), then you can translate this function into R: http://biopython.org/DIST/docs/api/Bio.SeqUtils.MeltingTemp-pysrc.html#Tm_staluc
It's not a very lengthy function, and would probably not take very long.
Once upon a time I wrote a simple Perl script that will do this. Similar to the Python script suggested by 'George' this script uses a nearest neighbor approach. The nearest neighbor and thermodynamic calculations are done essentially as described by Breslauer et al., (1986) Proc. Nat. Acad. Sci. 83:3746-50 but using the thermodynamic data values published by Sugimoto et al., (1996) Nucl. Acids Res. 24:4501-4505. It assumes that the sequences are not symmetric and contain at least one G or C. The minimum length for the query sequence is 8.
Converting it to R should not be too painful hopefully.