tcplVarMat | R Documentation |
tcplVarMat
creates chemical by assay matrices.
tcplVarMat(
dsstox_substance_id = NULL,
aeid = NULL,
add.vars = NULL,
flag = TRUE
)
dsstox_substance_id |
Integer, chemical ID values to subset on |
aeid |
Integer, assay endpoint ID values to subset on |
add.vars |
Character, mc4 or mc5 field(s) not included in the standard list to add additional matrices |
flag |
Integer or Logical of length 1, passed to
|
The tcplVarMat
function is used to create chemical by assay matrices
for different parameters. The standard list of matrices returned includes:
"ac50" – The active concentration at 50 the winning model.
"ac50_verbose" – The AC50 for the winning model, with text describing some situations.
"acc" – The active concentration at user-defined cutoff for the winning model.
"acc_verbose" – The ACC for the winning model, with text describing some situations.
"mc_hitc" – The hit-call for the winning model in multiple-concentration (mc) screening.
"sc_hitc" – The hit-call in single concentration (sc) screening.
tcplVarMat
produces matrices of combined sc-mc output. For the ac50
and acc matrices specifically, values are inserted in place to show complete
views of what was tested and what the results were. ac50 and acc values are:
set to 1e6 when the chemical is tested but negative in mc. In _verbose matrices, these are indicated as "MC neg".
set to 1e7 when the chemical is not tested in mc but was screened in sc with a positive hitcall for the same aeid. In _verbose matrices, these are indicated as "SC pos, No MC".
set to 1e8 when the chemical is not tested in mc but was screened in sc with a negative hitcall for the same aeid. In _verbose matrices, these are indicated as "SC neg, No MC"
not changed when chemical is tested in mc and positive, or not tested in either mc or sc
sc and mc data both are currently required to be included for these calculations. As a result, the "API" driver is not currently supported since it does not return sc data.
To add additional matrices, the 'add.vars' parameter can be used to specify the fields from the mc4 or mc5 tables to create matrices for.
When more than one sample is included for a chemical/assay pair,
tcplVarMat
aggregates multiple samples to a chemical level call
utilizing tcplSubsetChid
. The input
for the tcplVarMat
'flag' parameter is passed to the
tcplSubsetChid
call and used to parse down the data to create the
matrices.
A list of chemical by assay matrices (data.tables) where the rows are given by the dsstox_substance_id and corresponding chnm (chemical name) columns and the colnames are given by assay endpoint name (aenm).
tcplSubsetChid
## Not run:
## Demonstrate the returned values.
varmat <- tcplVarMat()
## Other changes can be made
aeids <- c(80)
dtxsid <- c("DTXSID4034653", "DTXSID2032683", "DTXSID6032358",
"DTXSID0032651", "DTXSID8034401")
varmat <- tcplVarMat(aeid = aeids, dsstox_substance_id = dtxsid)
varmat <- tcplVarMat(aeid = aeids, add.vars = c("m4id", "resp_max", "max_med"))
## To save output to file
library(writexl)
write_xlsx(varmat, path = "varmat_output.xlsx")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.