MeltingTemperatureCalculator
in package
implements
MeltingTemperatureInterface
Migrated from biotools' Service/MeltingTemperatureManager.php. calculateMinimumTm()/ calculateMaximumTm() resolve a degenerate primer into its two extreme single-symbol readings - every ambiguous base collapsed to "A" (weak, A/T-like) or "G" (strong, C/G-like) depending on whether it could possibly BE an A/T or is guaranteed C/G/S - then apply the classic Wallace-style count formula (2 degrees per weak base + 4 per strong base under 14 bases, the empirical long- primer formula from 14 bases up). calculateNearestNeighborTm() is SantaLucia (1998)'s unified nearest-neighbor thermodynamics : Tm = dH / (dS + R ln(Ct/x)), x = 4 for two complementary strands at equal concentration, x = 1 (plus a -1.4 e.u. symmetry term) for a self-complementary primer, whose two strands are the same molecule. Mg2+ is converted into its sodium equivalent, [Na+] + 120 x sqrt([Mg2+]) in mM (von Ahsen et al., Clin Chem 2001), then corrects the entropy by 0.368 x (N - 1) x ln[Na+] (SantaLucia 1998) ; the results agree with Biopython's Tm_NN (DNA_NN3, saltcorr=5). The legacy biotools version used Ct/2 and 140 x [Mg2+]. Unlike it, which returned a sentinel array of nulls plus a message for a degenerate primer, this throws - the nearest-neighbor method has no defined thermodynamic parameters for an ambiguous base pair, so there is no result to return. A primer may be written in lower case.
Class MeltingTemperatureCalculator
Tags
Table of Contents
Interfaces
- MeltingTemperatureInterface
- Interface MeltingTemperatureInterface
Constants
- LONG_PRIMER_THRESHOLD : mixed = 14
Properties
- $enthalpyValues : array<string, float>
- $entropyValues : array<string, float>
Methods
- __construct() : mixed
- MeltingTemperatureCalculator constructor.
- calculateGcPercent() : float
- calculateMaximumTm() : float
- The highest melting temperature a degenerate primer could have, resolving every ambiguous symbol to its strongest-pairing possibility. Equals calculateMinimumTm() when the primer has no degenerate symbol.
- calculateMinimumTm() : float
- The lowest melting temperature a degenerate primer could have, resolving every ambiguous symbol to its weakest-pairing possibility. Equals calculateMaximumTm() when the primer has no degenerate symbol.
- calculateNearestNeighborTm() : NearestNeighborTmResult
- Nearest-neighbor thermodynamics (SantaLucia 1998), Mg2+ converted into its sodium equivalent (von Ahsen et al. 2001), a self-complementary primer handled as such.
- asDna() : string
- Upper-cases a primer and reads U as T, as calculateGcPercent() does : the basic Tm counts weak and strong bases, and U is a weak one.
- calculateBasicTm() : float
- toStrongestReading() : string
- Collapses only a symbol that can only be A or T(=W) to "A", leaving every other symbol - including one that could possibly be C or G - as "G" - the strongest-pairing reading a degenerate primer can have.
- toWeakestReading() : string
- Collapses every symbol that could possibly be A or T to "A", leaving only a symbol that can only be C, G or S(=C/G) as "G" - the weakest-pairing reading a degenerate primer can have.
Constants
LONG_PRIMER_THRESHOLD
private
mixed
LONG_PRIMER_THRESHOLD
= 14
Properties
$enthalpyValues
private
array<string, float>
$enthalpyValues
$entropyValues
private
array<string, float>
$entropyValues
Methods
__construct()
MeltingTemperatureCalculator constructor.
public
__construct(TmBaseStackingApiAdapter $oTmBaseStackingApi) : mixed
Parameters
- $oTmBaseStackingApi : TmBaseStackingApiAdapter
calculateGcPercent()
public
calculateGcPercent(string $sPrimer) : float
Parameters
- $sPrimer : string
Return values
floatcalculateMaximumTm()
The highest melting temperature a degenerate primer could have, resolving every ambiguous symbol to its strongest-pairing possibility. Equals calculateMinimumTm() when the primer has no degenerate symbol.
public
calculateMaximumTm(string $sPrimer) : float
Parameters
- $sPrimer : string
Return values
floatcalculateMinimumTm()
The lowest melting temperature a degenerate primer could have, resolving every ambiguous symbol to its weakest-pairing possibility. Equals calculateMaximumTm() when the primer has no degenerate symbol.
public
calculateMinimumTm(string $sPrimer) : float
Parameters
- $sPrimer : string
Return values
floatcalculateNearestNeighborTm()
Nearest-neighbor thermodynamics (SantaLucia 1998), Mg2+ converted into its sodium equivalent (von Ahsen et al. 2001), a self-complementary primer handled as such.
public
calculateNearestNeighborTm(string $sPrimer, float $iPrimerConcentration, float $iSaltConcentration, float $iMagnesiumConcentration) : NearestNeighborTmResult
Parameters
- $sPrimer : string
- $iPrimerConcentration : float
-
Total strand concentration, nM
- $iSaltConcentration : float
-
Monovalent cations (Na+, K+), mM
- $iMagnesiumConcentration : float
-
Free Mg2+, mM
Return values
NearestNeighborTmResultasDna()
Upper-cases a primer and reads U as T, as calculateGcPercent() does : the basic Tm counts weak and strong bases, and U is a weak one.
private
asDna(string $sPrimer) : string
Parameters
- $sPrimer : string
Return values
stringcalculateBasicTm()
private
calculateBasicTm(string $sNormalizedPrimer) : float
Parameters
- $sNormalizedPrimer : string
-
Every symbol already collapsed to "A" or "G"
Return values
floattoStrongestReading()
Collapses only a symbol that can only be A or T(=W) to "A", leaving every other symbol - including one that could possibly be C or G - as "G" - the strongest-pairing reading a degenerate primer can have.
private
toStrongestReading(string $sPrimer) : string
Parameters
- $sPrimer : string
Return values
stringtoWeakestReading()
Collapses every symbol that could possibly be A or T to "A", leaving only a symbol that can only be C, G or S(=C/G) as "G" - the weakest-pairing reading a degenerate primer can have.
private
toWeakestReading(string $sPrimer) : string
Parameters
- $sPrimer : string