# reading a input csv file with fragments
# replacing NA, and subsetting the dataframe to only give what we need
get.hydrolysisrate <- function (inputcsvfile = "test.csv", sigma.selection = "A", MCS.cuttoff=0, regression.method = "SVR", outputtype = CSV or R dataframe, ...){ # Calling the helper function to autofill a dataframe which will become test set for our QSARs qsardataframe <- fillqsardataframe (inputcsvfile, sigma.selection = "A", ...)
# Evaluating if the autofilled dataframe does in fact have sigma value higher than the user specified cutoff if (qsardataframe$meta1mcs || meta2mcs || r1taftmcs.... < MCS.cuttoff) { stop ("qsar evaluation terminated since one of the fragments has mcs tanimoto coefficient value below the user specified MCS cuttoff value") }
# Evaluating if the autofilled dataframe does in fact have sigma value higher than the user specified cutoff if (qsardataframe$ortho1mcs || ortho2mcs ||...... < onlyortho.cuttoff) { stop ("qsar evaluation terminated since ortho fragments have mcs tanimoto coefficient value below the user specified MCS cuttoff value") }
# Based on functional group label in qsardataframe, subsetting the master sheet to only keep those variables necassary for a particular qsar if (qsardataframe$funcgroup == "carbamate") { # subset the dataframe to only keep variables used for carbamates and assign it as test set } else if (qsardataframe$funcgroup == "acidester") { # subset the dataframe to only keep variables used for carboxylic acid esters and assign it as test set } else { stop ("given file doesnt contain a functional group with available QSAR model") }
if (regression.method =="SVR") { # support vector regression using e1071 library # call AD function } else if (regression.method == "pls") { # partial least squares using pls library # call AD function } else if (regression.method == "RF") { # random forest regression using randomforest library # call AD function } else if (regression.method == "MLR") { # multiple linear regression using base R linear model functions # call AD function } else { stop ("Specify valid regression.method") }
```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.