Adding this method on 31 May 2020, hoping this style will depreciate getErrorTable in the future.

# S4 method for ligandSensor
ranges_df(
  object,
  inaccuracies = c(0.02),
  pLigand_min = 1,
  pLigand_max = 14,
  by = 0.001,
  name = "Sensor",
  thresholds = c(0.01, 0.05, 0.1, 0.15, 0.2)
)

Arguments

object

A ligandSensor object

inaccuracies

(optional, default: c(0.02)) A vector of inaccuracies (e.g. 0.02 for 2% error), always relative

pLigand_min

(optional, default: 1) The minimum pLigand for which to record error

pLigand_max

(optional, default: 14) The maximum pLigand for which to record error

by

(optional, default: 0.001) The granularity of the error table--e.g., by = 0.01 would record 7 and 7.01, etc.

name

(optional, default: "Sensor") A name for this sensor

thresholds

A vector of error thresholds (e.g. c(0.5, 1) for 0.5 and 1)

Value

A dataframe of suited ranges with these columns: 'Sensor_Name': the name of the sensor 'Minimum': the minimum pLigand measurable at the given inaccuracy 'Maximum': the maximum pLigand measurable at the given inaccuracy 'Inaccuracy': the inaccuracy associated with this row (relative) 'error_thresh': the error threshold associated with this row

Examples

my_sensor <- new("ligandSensor", new("Sensor", Rmin = 1, Rmax = 5, delta = 0.2), pKd = 7, ligand_name = "NADPH") ranges_df(my_sensor)
#> Sensor_Name Minimum Maximum Inaccuracy error_thresh #> 1 Sensor_0.02 NA NA 0.02 0.01 #> 2 Sensor_0.02 5.8 7.49 0.02 0.05 #> 3 Sensor_0.02 5.45 7.84 0.02 0.10 #> 4 Sensor_0.02 5.27 8.02 0.02 0.15 #> 5 Sensor_0.02 5.16 8.13 0.02 0.20