R/main.R
, R/feature_groups.R
, R/feature_groups-set.R
, and 7 more
pred-tox.Rd
Functions to predict toxicities from SMILES and/or SIRIUS+CSI:FingerID
fingerprints using the
MS2Tox package.
# S4 method for class 'featureGroups'
calculateTox(fGroups, featureAnn)
# S4 method for class 'featureGroupsSet'
calculateTox(fGroups, featureAnn)
# S4 method for class 'compounds'
predictTox(
obj,
LC50Mode = "static",
concUnit = "ugL",
updateScore = FALSE,
scoreWeight = 1,
parallel = TRUE
)
# S4 method for class 'featureGroupsScreening'
predictTox(obj, LC50Mode = "static", concUnit = "ugL")
# S4 method for class 'featureGroupsScreening'
calculateTox(fGroups, featureAnn = NULL)
# S4 method for class 'featureGroupsScreeningSet'
predictTox(obj, ...)
# S4 method for class 'featureGroupsScreeningSet'
calculateTox(fGroups, featureAnn = NULL)
# S4 method for class 'compoundsSet'
predictTox(obj, ...)
# S4 method for class 'compoundsSIRIUS'
predictTox(obj, type = "FP", LC50Mode = "static", concUnit = "ugL")
# S4 method for class 'formulasSet'
predictTox(obj, ...)
# S4 method for class 'formulasSIRIUS'
predictTox(obj, LC50Mode = "static", concUnit = "ugL")
For predictTox
methods for feature annotations: The featureGroups
object for
which the annotations were performed.
For calculateTox
: The featureGroups
object for which toxicities should be assigned.
A featureAnnotations
object (e.g. formulasSIRIUS
or
compounds
) which contains toxicities. Optional if calculateTox
is called on suspect
screening results (i.e. featureGroupsScreening
method).
The workflow object for which predictions should be performed, e.g. feature groups with screening
results (featureGroupsScreening
) or compound annotations (compounds
).
The mode used for predictions: should be "static"
or "flow"
.
The concentration unit for calculated toxicities. Can be molar based ("nM"
, "uM"
,
"mM"
, "M"
) or mass based ("ngL"
, "ugL"
, "mgL"
, "gL"
). Furthermore, can be
prefixed with "log "
for logarithmic concentrations (e.g. "log mM"
).
If updateScore=TRUE
then the annotation score
column is updated
by adding normalized values of the response factor (weighted by scoreWeight). Currently, this
only makes sense for annotations performed with MetFrag
!
If set to TRUE
then code is executed in parallel through the futures package. Please
see the parallelization section in the handbook for more details.
Further arguments passed to the non-sets workflow method.
Which types of predictions should be performed: should be "FP"
(SIRIUS+CSI:FingerID
fingerprints), "SMILES"
or "both"
. Only relevant for compoundsSIRIUS
method.
predictTox
returns an object amended with LC 50 values (LC50_SMILES
/LC50_SIRFP
columns).
calculateTox
returns a featureGroups
based object amended with toxicity values for each
feature group (accessed with the toxicities
method).
The MS2Tox R package predicts toxicities from SMILES and/or
MS/MS fingerprints obtained with SIRIUS+CSI:FingerID
. The predictTox
method functions interface with
this package to predict toxicities, which can then be assigned to feature groups with the calculateTox
method
function.
The rcdk package and OpenBabel tool are used
internally to calculate molecular weights. Please make sure that OpenBabel
is installed.
The toxicities are predicted with the predictTox
generic functions,
which accepts the following input:
Suspect screening results. The SMILES data is used to predict toxicities for suspect hits.
Formula annotation data obtained with "sirius"
algorithm (generateFormulasSIRIUS
). The
predictions are performed for each formula candidate using SIRIUS+CSI:FingerID
fingerprints. For this
reason, the getFingerprint
argument must be set to TRUE
when generating the formula data.
Compound annotation data obtained with the "sirius"
algorithm (generateCompoundsSIRIUS
).
The predictions are performed for each annotation candidate using its SMILES and/or
SIRIUS+CSI:FingerID
fingerprints. The predictions are performed on a per formula basis, hence,
toxicities for isomers will be equal.
Compound annotation data obtained with algorithms other than "sirius"
. The toxicities are predicted
from SMILES data.
When SMILES data is used then predictions of toxicities are generally more accurate. However,
calculations with SIRIUS+CSI:FingerID
fingerprints are faster and only require the formula and MS/MS
spectrum, i.e. not the full structure. Hence, calculations with SMILES are mostly useful in
suspect screening workflows, or with high confidence compound annotation data, whereas MS/MS fingerprints are
suitable with unknowns.
For annotation data the calculations are performed for all candidates. This can especially lead to long
running calculations when SMILES data is used. Hence, it is strongly recommended to first
prioritize the annotation results, e.g. with the topMost
argument to the
filter method.
When toxicities are predicted from SIRIUS+CSI:FingerID
fingerprints then only formula and MS/MS
spectra are used, even if compound annotations are used for input. The major difference is that with formula
annotation input all formula candidates for which a fingerprint could be generated are considered, whereas
with compound annotations only candidate formulae are considered for which also a structure could be assigned.
Hence, the formula annotation input could be more comprehensive, whereas predictions from structure annotations
could lead to more representative results as only formulae are considered for which at least one structure could be
assigned.
The calculateTox
generic function is used to assign toxicities for each
feature using the toxicities discussed in the previous section. The function takes toxicities from suspect
screening results and/or feature annotation data. If multiple toxicities were predicted for the same feature
group, for instance when multiple annotation candidates or suspect hits for this feature group are present, then a
toxicities is assigned for all toxicities. These values can later be easily aggregated with e.g. the
as.data.table function.
OBoyle2011patRoon
rcdk1
Peets2022patRoon