Skip to main content

OGS-Bio-Tm (v0.2.0)

License: MIT Python 3.9+ Code Style: PEP8

OGS-Bio-Tm is an open-source, zero-dependency Python library providing a Calibrated Dual-Frame Thermodynamic Engine specifically engineered for high-throughput TaqMan Non-MGB (Standard Dual-Labeled Hydrolysis Probe) Real-Time PCR assay design and legacy protocol migration.

Developed as the core computational engine of the Open Gen Solution (OGS) bioinformatics platform at the University of Medicine and Pharmacy at Ho Chi Minh City (UMP), ogs-bio-tm v0.2.0 bridges the longstanding gap between legacy industry-standard commercial software (Applied Biosystems Primer Express 3.0) and modern empirical physical nucleic acid thermodynamics (SantaLucia 1998 and Owczarzy 2004/2008).


Key Architectural Innovations in v0.2.0

  1. Analytical De-obfuscation of Primer Express 3.0 (mode="pe_legacy") Rather than relying on black-box heuristics, ogs-bio-tm analytically resolves the exact mathematical identity linking the proprietary Primer Express 3.0 Non-MGB calculation engine to the classical Nearest-Neighbor formulation of Breslauer et al. (1986) and Rychlik et al. (1990):

    • Effective Entropy Offset: dS_const = -51.39 cal/(K*mol) = dS_init (-10.8) + R * ln(C_eff / 4) at an effective reference strand concentration C_eff = 5.39 nM.
    • Monovalent Salt Term: Salt_const = -21.7 °C = 16.6 * log10([Na+_eff]) at [Na+_eff] = 49.3 mM.
    • IEEE-754 / Banker's Rounding Synchronization: A calibrated Kelvin offset of 273.2 K (273.15 + 0.05 K) paired with exact decimal round-half-to-even (ROUND_HALF_EVEN) achieves 0.00 °C Mean Absolute Error (MAE) across thousands of Primer Express 3.0 reference primer and TaqMan Non-MGB probe designs.
  2. Empirical Physical Reference Frame (mode="physical_nn") Implements the unified Nearest-Neighbor parameters of SantaLucia (1998) coupled with the GC-dependent monovalent (Na+) and divalent (Mg2+, dNTP chelation) ion corrections of Owczarzy et al. (2004, 2008), validated against UV-melting gold-standard duplex datasets.

  3. Smooth Sigmoid Length Transition (length_mode="smooth_transition") Eliminates the artificial step discontinuity at the 50 bp boundary between oligonucleotide Nearest-Neighbor modeling and macroscopic amplicon %GC modeling via a continuous logistic interpolation across the 45-60 bp transition window.

  4. Strict Input Validation & IUPAC Degenerate Base Resolution Enforces deterministic ValueError exception handling for malformed or non-DNA sequences while optionally supporting thermodynamic averaging across all 15 IUPAC nucleotide codes (allow_iupac=True).


Installation

Install from PyPI:

pip install ogs-bio-tm

Or install directly from the source repository for development and unit testing:

git clone https://github.com/kimtranquan/ogs-bio-tm.git
cd ogs-bio-tm
pip install -e ".[dev]"
pytest

Quick Start Usage

1. Dual-Frame Melting Temperature (Tm) Calculation

from ogs_bio_tm.calculator import PrimerExpressNonMGB

calc = PrimerExpressNonMGB()

# TaqMan Non-MGB Probe (28 bp) targeting Mycoplasma pneumoniae 23S rRNA
probe_seq = "ACCTCGATGTCGACTCATCTCATCCTCG"

# Frame 1: Exact Primer Express 3.0 Legacy Compatibility (69.1 °C -> 69 °C in PE table)
tm_pe = calc.calculate_tm(probe_seq, mode="pe_legacy")
print(f"PE 3.0 Legacy Tm: {tm_pe} °C")

# Frame 2: Physical Nearest-Neighbor (SantaLucia 1998 + Owczarzy 2008 Mg2+/dNTP correction)
tm_phys = calc.calculate_tm(
    probe_seq,
    conc_oligo_nm=250.0,
    conc_na_mm=50.0,
    conc_mg_mm=3.0,
    conc_dntp_mm=0.8,
    mode="physical_nn",
)
print(f"Physical Empirical Tm: {tm_phys} °C")

2. Smooth Sigmoid Transition Across the 45-60 bp Window

long_oligo = "CAGGCTGATACTGCCCAAGAGTTCATATCGTTTGGCACCTCGATGTCGACTCAT"  # 54 bp

res_smooth = calc.evaluate_sequence(
    long_oligo,
    mode="physical_nn",
    length_mode="smooth_transition",
)
print(f"Length: {res_smooth.length} bp | Regime: {res_smooth.length_regime}")
print(f"Sigmoid Weight (alpha): {res_smooth.transition_weight_alpha} | Tm: {res_smooth.tm_celsius} °C")

3. Automated TaqMan Non-MGB Trio Quality Control

trio_report = calc.design_taqman_non_mgb_trio(
    fwd_seq="AGAGTTCATATCGACGGCAGTGT",
    rev_seq="GCCGAACCCTTCGAACCT",
    probe_seq="ACCTCGATGTCGACTCATCTCATCCTCG",
)
print(trio_report)

Citation

If you use ogs-bio-tm in your research or diagnostic assay design pipeline, please cite:

Kim, Q.T.; Huynh, T.M. OGS-Bio-Tm v0.2.0: A Calibrated Dual-Frame Thermodynamic Engine for Automated TaqMan Non-MGB Assay Design. Biology 2026, Submitted.


License

This project is licensed under the MIT License.

Metadata

Release files for ogs-bio-tm 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ogs-bio-tm 0.2.0
File Size Uploaded Provenance Actions
ogs_bio_tm-0.2.0.tar.gz 17.6 kB Without provenance Details for ogs_bio_tm-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ogs-bio-tm 0.2.0
File Interpreter ABI Platform Actions
ogs_bio_tm-0.2.0-py3-none-any.whl Python 3 none any Details for ogs_bio_tm-0.2.0-py3-none-any.whl

Total release size: 30.8 kB

Release files / ogs_bio_tm-0.2.0.tar.gz

Download URL ogs_bio_tm-0.2.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6cb77146676060eab7d01d76582bf9155b45363916ac6e3f250846ed96c23152
BLAKE2b-256 checksum
How to use checksums
768559b4397b86a97441958221f8ef979714cc34f07bed75c8ca21d561dedab9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / ogs_bio_tm-0.2.0-py3-none-any.whl

Download URL ogs_bio_tm-0.2.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfc36124f14b2589d48652cc40886236eabe849b127044d86d13d6b590f27e46
BLAKE2b-256 checksum
How to use checksums
54215bc46bf005f8c248b9c5ee3af72cefbd356f107a600183136a9de703603d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for ogs-bio-tm 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page