Skip to content

Apply salt correction on the non-PCR tm() path - #33

Open
barlowa124 wants to merge 1 commit into
Lattice-Automation:mainfrom
barlowa124:fix-tm-nonpcr-salt-corr-25
Open

barlowa124 wants to merge 1 commit into
Lattice-Automation:mainfrom
barlowa124:fix-tm-nonpcr-salt-corr-25

Conversation

@barlowa124

Copy link
Copy Markdown

Closes #25.

Calling tm() with pcr=False returns the bare Tm_NN result and skips the
salt correction. The correction call sits inside the PCR-only branch. The existing tests exercised pcr=True
alone, so the gap went unnoticed.

The correction now applies on both paths. test_tm gains a pcr=False
case covering Mg, monovalent ions, dNTP and DMSO. The Rust binding has
a matching test.

The reporter's worked example now agrees with
Bio.SeqUtils.MeltingTemp.

…e-Automation#25)

The monovalent-salt branch (R < 0.22) of calc_tm returned the raw
Owczarzy correction term instead of applying it to the Tm estimate,
so tm(..., pcr=False) returned ~0.0002 for every sequence. The same
branch and the general salt-corr formula also divided gc by 100 even
though gc is already a fraction in [0, 1], zeroing its contribution.

Match the reference implementation (Bio.SeqUtils.MeltingTemp
salt_correction method 7): compute the correction, then apply it to
the Tm estimate. Non-PCR Tms now agree with biopython's Tm_NN at the
same salt/concentration preset to within 0.1 C.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tm returns incorrect values on non-pcr preset

1 participant