Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanding the oligo melting temperature calculations #237

Open
BjornFJohansson opened this issue Jun 25, 2024 · 5 comments
Open

Expanding the oligo melting temperature calculations #237

BjornFJohansson opened this issue Jun 25, 2024 · 5 comments

Comments

@BjornFJohansson
Copy link
Owner

BjornFJohansson commented Jun 25, 2024

As per the 4th Pydna meeting, it was generally agreed that Pydna and tools that depend on it would benefit from being able to simulate modern commercial Tm calculators offline.

I have compiled data around this here

The NEB.ipynb notebook contain attempts to replicate the NEB Tm calculator simply by selecting parameters in the biopython Tm module. This was successful for the standard Taq polymerase with the buffer composition stated by NEB.

I was not able to guess the result for the Q5 polymerase. A contributing factor is the secrecy of the buffer composition.

The NEB logics seems contained in the file NEB/NEB_website/NEB Tm Calculator_files/main-3d92a74abb.js

I formatted the code with an online js formatter in the file main-3d92a74abb_formatted.js.

The variables below seem important, but I was not able to follow the logics.

r.TmCalc.prototype.nnBr
r.TmCalc.prototype.nnSa
r.TmCalc.prototype.nnde
r.TmCalc.prototype.nndhds
r.TmCalc.prototype.nnloop
r.TmCalc.prototype.nnbulge
r.TmCalc.prototype.nntmm
r.TmCalc.prototype.R=1.987,
r.TmCalc.prototype.dSBr
r.TmCalc.prototype.dSSa
r.TmCalc.prototype.dHBr
r.TmCalc.prototype.dHSa
r.TmCalc.prototype.init
r.TmCalc.prototype.saltCorrect
r.TmCalc.prototype.setCt
r.TmCalc.prototype.setMonosalt
r.TmCalc.prototype.setDisalt
r.TmCalc.prototype.setDMSO
r.TmCalc.prototype.buildPairMap

Some other people have worked on similar issues here and here

I think this is worth spending some time, since interestingly, the Thermofisher Tm calculator here gives similar, but not identical results and claims to use similar but not identical thermodynamic data.

@manulera
Copy link
Collaborator

@BjornFJohansson @hiyama341 , it would be great if you could provide:

  • The place where you could see the javascript code
  • An example request to the endpoint

@BjornFJohansson
Copy link
Owner Author

Nearest Neighbor Method explained: https://youtu.be/0iRg2P7KzHo

@BjornFJohansson
Copy link
Owner Author

BjornFJohansson commented Jun 28, 2024

Minimal example extracted from teemi. The results are identical to the web interface.

import json
import requests

# NEB example primers:
primers = """\
AGCGGATAACAATTTCACACAGGA
GTAAAACGACGGCCAGT
AGCGGATAACAATTTCAC
AGCGGATAAGGGCAATTTCAC
GTAAAACGACGGCCA""".splitlines()

conc=0.5
prodcode="q5-0"
url = "https://tmapi.neb.com/tm/batch"

for primer in primers:
    seqpairs = [[primers]]
    input_ = {"seqpairs": seqpairs, "conc": conc, "prodcode": prodcode}
    headers = {"content-type": "application/json"}
    res = requests.post(url, data=json.dumps(input_), headers=headers)
    r = json.loads(res.content)
    
    if r["success"]:
        for row in r["data"]:
            print(row["tm1"])
    else:
        print("request failed")
        print(r["error"][0])
        
# Result  
# 66
# 62
# 57
# 65
# 59

@MarkusPiotrowski
Copy link

I had settings for Biopython's MeltingTemp to simulate Q5 and Phusion Tm calculations on the NEB website some time ago (at that time, calculations for Q5 and Phusion gave different results), but obviously they changed some settings in their calculator.

@BjornFJohansson
Copy link
Owner Author

Yes, I get wildly different results right now. I would like to mimic the behaviour of the NEB calculator, the source code is not easy to follow though.

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

No branches or pull requests

3 participants