bhklab / PharmacoGx

R package to analyze large-scale pharmacogenomic datasets.
http://pharmacodb.pmgenomics.ca
GNU General Public License v3.0
65 stars 26 forks source link

computeIC50 function gives unexpected result #139

Closed cscheeder closed 1 year ago

cscheeder commented 1 year ago

The computeIC50 function gives unexpected results as it returns a fixed concentration value that matches one of the input concentrations (i.e. experimental conditions). Also the results from computeIC50 and computeICn with n = 50 differ.

concentrations <- rev(1/2^seq(0,8) * 1)
viabilities <-  c(99.2, 98.4, 96.9, 93.9, 88.2, 77.8, 60, 33.3, 0)

print(PharmacoGx::computeIC50(concentration = concentrations, viability = viabilities))
print(PharmacoGx::computeICn(concentration = concentrations, viability = viabilities,n=50))

this seems to give the expected result:
print(PharmacoGx::computeICn(concentration = concentrations, viability = viabilities,n=0.5))
sessionInfo()