computeTm {crosshybDetector} | R Documentation |
Computes the melting temperature (Tm) using the basic formula:
Tm= (wA+xT) * 2 + (yG+zC) * 4
where w,x,y,z are the number of the bases A,T,G,C in the sequence, respectively (from Marmur,J., and Doty,P. (1962) J Mol Biol 5:109-118).
computeTm(seqs, plot = FALSE)
seqs |
a vector of nucleotide sequences |
plot |
if TRUE, plot the histogram of Tm |
A vector with the same lenght of 'seqs' with the computed Tm
Paolo Uva
Marmur,J., and Doty,P. (1962) J Mol Biol 5:109-118
# Create a vector of 1000 random sequences of 30bp code <- c("a", "c", "g", "t") sequences <- vector("character", 1000) for (i in 1:1000){ sequences[i] <- paste(sample(code,30,replace=TRUE), collapse="") } # Compute the Tm and plot the corresponding histogram tm <- computeTm(sequences, plot=TRUE) table(tm)