Created
June 11, 2018 09:01
-
-
Save goraj/fbd77a008045d83a4c74580559f93b65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ic50_in_nM_to_pic50(nM): | |
try: | |
return 9.0 - math.log10(float(nM)) | |
except Exception as e: | |
return 0.0 | |
def ic50_in_uM_to_pic50(uM): | |
nM = uM * 1000 | |
return ic50_in_nM_to_pic50(nM) | |
def Ki_in_nM_to_pic50(nM): | |
# correct according to Kalliokoski et al. using factor 2 | |
return ic50_in_nM_to_pic50(float(nM) * 2.0) | |
def Ki_in_uM_to_pic50(uM): | |
nM = uM * 1000 | |
# correct according to Kalliokoski et al. using factor 2 | |
return ic50_in_nM_to_pic50(float(nM) * 2.0) | |
def pKi_to_pic50(pKi): | |
# convert pKi to nM | |
Ki_in_nM = 10.0**(9-float(pKi)) | |
# correct according to Kalliokoski et al. using factor 2 | |
return Ki_in_nM_to_pic50(Ki_in_nM * 2.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment