tm_gc: Calculate the melting temperature using empirical formulas...

View source: R/tm_gc.R

tm_gcR Documentation

Calculate the melting temperature using empirical formulas based on GC content

Description

Calculate the melting temperature using empirical formulas based on GC content with different options. The function returns a list of sequences with updated Tm attributes and calculation options.

Usage

tm_gc(
  gr_seq,
  ambiguous = FALSE,
  userset = NULL,
  variant = c("Primer3Plus", "Chester1993", "QuikChange", "Schildkraut1965",
    "Wetmur1991_MELTING", "Wetmur1991_RNA", "Wetmur1991_RNA/DNA", "vonAhsen2001"),
  Na = 50,
  K = 0,
  Tris = 0,
  Mg = 0,
  dNTPs = 0,
  salt_method = NULL,
  mismatch = TRUE,
  DMSO = 0,
  formamide_unit = list(value = 0, unit = "percent"),
  dmso_factor = 0.75,
  formamide_factor = 0.65
)

Arguments

gr_seq

Sequence(s) in 5' to 3' direction, as the GRanges that to_genomic_ranges returns. A character vector of sequences, a path to a FASTA file, or genomic coordinate strings are also accepted and converted for you. To pair a sequence with a complement of your own, build the object explicitly: to_genomic_ranges(seq, complement_seq = cmp).

ambiguous

Logical. If TRUE, ambiguous bases are taken into account when computing the G and C content. The function handles various ambiguous bases (S, W, M, K, R, Y, V, H, D, B) by proportionally distributing their contribution to GC content based on their possible nucleotide compositions.

userset

A vector of four coefficient values. Usersets override value sets.

variant

Empirical constants coefficient with 8 variants: - Chester1993: Tm = 69.3 + 0.41(Percentage_GC) - 650/N - QuikChange: Tm = 81.5 + 0.41(Percentage_GC) - 675/N - Percentage_mismatch - Schildkraut1965: Tm = 81.5 + 0.41( - Wetmur1991_MELTING: Tm = 81.5 + 0.41( - Wetmur1991_RNA: Tm = 78 + 0.7( - Wetmur1991_RNA/DNA: Tm = 67 + 0.8( - Primer3Plus: Tm = 81.5 + 0.41( - vonAhsen2001: Tm = 77.1 + 0.41(

Salt correction is applied only for variants that include it in the formula (via salt_correct()). Chester1993 and QuikChange use no salt term. D is the mismatch penalty (typically 1): Tm decreases by D x ( Use X (or .) in the sequence to mark mismatch positions.

Na

Millimolar concentration of sodium ions. Default: 50

K

Millimolar concentration of potassium ions. Default: 0

Tris

Millimolar concentration of Tris buffer. Default: 0

Mg

Millimolar concentration of magnesium ions. Default: 0

dNTPs

Millimolar concentration of deoxynucleotide triphosphates. Default: 0

salt_method

Salt correction method: - NULL (default): the correction that belongs to the formula, i.e. the one published with variant, or "Schildkraut2010" when userset is supplied. - NA or "none": no salt correction at all. - "Schildkraut2010": Schildkraut & Lifson 1965 - "Wetmur1991": Wetmur 1991 - "SantaLucia1996": SantaLucia 1996 - "SantaLucia1998-1": SantaLucia 1998 (Method 1)

With a built-in variant the salt term is part of the published formula rather than a free choice, so naming a different one is ignored with a warning: the result would otherwise be labelled with one method and computed with another. Supply userset to choose the correction yourself. Dropping it with NA is not a substitution and is honoured on either path.

"SantaLucia1998-2", "Owczarzy2004" and "Owczarzy2008" are not available for this function. The first corrects the entropy of a nearest-neighbor model, which a GC-content formula does not have. The other two correct the reciprocal of the melting temperature in kelvin, referenced to the same duplex in 1 M Na+, and carry a duplex-length term of their own, which these formulas already have. All three are available in tm_nn.

mismatch

Logical. If TRUE (default), every 'X' in the sequence is counted as a mismatch

DMSO

Percent DMSO concentration in the reaction mixture. Default: 0

formamide_unit

Formamide concentration as 'list(value, unit)'. Default: list(value = 0, unit = "percent") - value: Numeric value of formamide concentration - unit: Either "percent" or "molar"

dmso_factor

Coefficient of Tm decreases per percent DMSO. Default: 0.75 (von Ahsen et al. 2001) Other published values are 0.5, 0.6 and 0.675.

formamide_factor

Coefficient of Tm decrease per percent formamide. Default: 0.65 Several papers report factors between 0.6 and 0.72.

Value

Returns a list with two components: - Tm: A list of sequences with updated Tm attributes - Options: A list containing calculation parameters and method information

Author(s)

Junhui Li

References

Marmur J, Doty P. Determination of the base composition of deoxyribonucleic acid from its thermal denaturation temperature. Journal of Molecular Biology, 1962, 5(1):109-118.

Schildkraut C, Lifson S. Dependence of the melting temperature of DNA on salt concentration. Biopolymers, 1965, 3(2):195-208.

Wetmur JG. DNA Probes: Applications of the Principles of Nucleic Acid Hybridization. CRC Critical Reviews in Biochemistry, 1991, 26(3-4):33.

Untergasser A, Cutcutache I, Koressaar T, et al. Primer3–new capabilities and interfaces. Nucleic Acids Research, 2012, 40(15):e115-e115.

von Ahsen N, Wittwer CT, Schutz E, et al. Oligonucleotide melting temperatures under PCR conditions: deoxynucleotide Triphosphate and Dimethyl sulfoxide concentrations with comparison to alternative empirical formulas. Clin Chem 2001, 47:1956-1961.

Examples


# Example with multiple sequences
input_seq <- c("ATCGTGCGTAGCAGTACGATCAGTAG", "ATCGTGCGTAGCAGTACGATCAGTAG")
gr_seq <- to_genomic_ranges(input_seq)
out <- tm_gc(gr_seq, ambiguous = TRUE, variant = "Primer3Plus", Na = 50, mismatch = TRUE)
out
out$options


TmCalculator documentation built on Oct. 5, 2026, 5:08 p.m.