Some bugs related to the Armitage model.
To Whom It May Concern,
I've noticed two bugs (requiring 3 fixes) within the new Armitage workflow.
The first bug:
- Line 60 in the "parameterize_IVD" function: If a user provides "logHenry","MP","MW", but no "gswat" within "tcdata", then line 71 will introduce "logWSol", which will later break the code.
Solution: Line 71 in the "parameterize_IVD" function should look like:
tcdata[, c("logHenry","gswat","MP","MW") :=
- The above fix needs a change in the "parameterize_armitage" function.
Solution: Line 61 in the function "parameterize_armitage" should be:
p_Armitage_output[is.na(gswat_n), "gswat_n" := gswat + log10(MW*convert_units("g", "mg"))]
The second bug:
The second bug is related to the "armitage_eval" function. If pKa_Accept is a (single value) numeric, the line 760 will not work.
Solution: Above line 760 add:
tcdata[,'pKa_Accept':=as.character(pKa_Accept)]
Also, change line 568 to:
if(!all(c("sarea", "v_total", "v_working", "cell_yield") %in% names(tcdata)) |
Otherwise, if tcdata has columns "sarea", "v_total", "v_working", "cell_yield", and any additional column, the if statement will branch incorrectly.