screenSuspects | R Documentation |
Utilities to screen for analytes with known or suspected identity.
screenSuspects(
fGroups,
suspects,
rtWindow = 12,
mzWindow = 0.005,
adduct = NULL,
skipInvalid = TRUE,
prefCalcChemProps = TRUE,
neutralChemProps = FALSE,
onlyHits = FALSE,
...
)
## S4 method for signature 'featureGroups'
screenSuspects(
fGroups,
suspects,
rtWindow,
mzWindow,
adduct,
skipInvalid,
prefCalcChemProps,
neutralChemProps,
onlyHits
)
## S4 method for signature 'featureGroupsScreening'
screenSuspects(
fGroups,
suspects,
rtWindow,
mzWindow,
adduct,
skipInvalid,
onlyHits,
amend = FALSE
)
numericIDLevel(level)
genIDLevelRulesFile(out, inLevels = NULL, exLevels = NULL)
## S4 method for signature 'featureGroupsSet'
screenSuspects(
fGroups,
suspects,
rtWindow,
mzWindow,
adduct,
skipInvalid,
prefCalcChemProps,
neutralChemProps,
onlyHits
)
## S4 method for signature 'featureGroupsScreeningSet'
screenSuspects(
fGroups,
suspects,
rtWindow,
mzWindow,
adduct,
skipInvalid,
prefCalcChemProps,
neutralChemProps,
onlyHits,
amend = FALSE
)
fGroups |
The |
suspects |
A Can also be a |
rtWindow , mzWindow |
The retention time window (in seconds) and m/z window that will be used for matching a suspect (+/- feature data). |
adduct |
An |
skipInvalid |
If set to |
prefCalcChemProps |
If |
neutralChemProps |
If |
onlyHits |
If |
... |
Further arguments specified to the methods. |
amend |
If |
level |
The identification level to be converted. |
out |
The file path to the target file. |
inLevels , exLevels |
A regular expression for the
identification levels to include or exclude, respectively. For instance,
|
Besides 'full non-target analysis', where compounds may be identified with little to no prior knowledge, a common strategy is to screen for compounds with known or suspected identity. This may be a generally favorable approach if possible, as it can significantly reduce the load on data interpretation.
screenSuspects
is used to perform suspect screening. The input featureGroups
object
will be screened for suspects by m/z values and optionally retention times. Afterwards, any feature groups
not matched may be kept or removed, depending whether a full non-target analysis is desired.
numericIDLevel
Extracts the numeric part of a given
identification level (e.g. "3a"
becomes ‘3’).
genIDLevelRulesFile
Generates a template YAML file that is
used to configure the rules for automatic estimation of identification
levels. This file can then be used as input for
annotateSuspects
.
screenSuspects
returns a featureGroupsScreening
object, which is a copy of the input
fGroups
object amended with additional screening information.
In a sets workflow, screenSuspects
performs suspect screening
for each set separately, and the screening results are combined afterwards. The sets
column in the
screenInfo
data marks in which sets the suspect hit was found.
the suspects
argument for screenSuspects
should be a data.frame
with the following mandatory and optional columns:
name
The suspect name. Must be file-compatible. (mandatory)
rt
The retention time (in seconds) for the suspect. If specified the suspect will only be matched if
its retention matches the experimental value (tolerance defined by the rtWindow
argument).
(optional)
neutralMass
,formula
,SMILES
,InChI
The neutral monoisotopic mass, chemical formula,
SMILES or InChI for the suspect. (data from one of these columns are mandatory in case no value from the
mz
column is available for a suspect)
mz
The ionized m/z of the suspect. (mandatory unless it can be calculated from one of
the aforementioned columns)
adduct
A character
that can be converted with as.adduct
. Can be used to
automatically calculate values for the mz
column. (mandatory unless data from the mz
column
is available, the adduct
argument is set or fGroups
has adduct annotations)
fragments_mz
,fragments_formula
One or more MS/MS fragments (specified as m/z or
formulae, respectively). Multiple values can be specified by separating them with a semicolon (;
). This data
is used by annotateSuspects
to report detected MS/MS fragments and calculate identification levels.
(optional)
How the mass of a suspect is matched with the mass of a feature depends on the available data:
If the suspect has data from the mz
column of the suspect list, then this data is matched with the
detected feature m/z.
Otherwise, if the suspect has data in the adduct
column of the suspect list, this data is used to
calculate its mz
value, which is then used like above.
In the last case, the neutral mass of the suspect is matched with the neutral mass of the feature. Hence,
either the adduct
argument needs to be specified, or the featureGroups
input object must have adduct
annotations.
Chemical properties such as SMILES, InChIKey and formula in the suspect list are automatically validated and calculated if missing/invalid.
The internal validation/calculation process performs the following steps:
Validation of SMILES, InChI, InChIKey and formula data (if present). Invalid
entries will be set to NA
.
If neutralChemProps=TRUE
then chemical data (SMILES, formulae etc.) is neutralized by
(de-)protonation (using the --neutralized
option of OpenBabel
). An additional column
molNeutralized
is added to mark those molecules that were neutralized. Note that neutralization requires
either SMILES or InChI data to be available.
The SMILES and InChI data are used to calculate missing or invalid SMILES,
InChI, InChIKey and formula data. If prefCalcChemProps=TRUE
then existing
InChIKey and formula data is overwritten by calculated values whenever possible.
The chemical formulae which were not calculated are verified and normalized. This process may be time
consuming, and is potentially largely avoided by setting prefCalcChemProps=TRUE
.
Neutral masses are calculated for missing values (prefCalcChemProps=FALSE
) or whenever possible
(prefCalcChemProps=TRUE
).
Note that calculation of formulae for molecules that are isotopically labelled is currently only supported for deuterium (2H) elements.
This functionality relies heavily on OpenBabel, please make sure it is installed.
Both screenSuspects
may use the suspect names to base file names used for reporting, logging etc.
Therefore, it is important that these are file-compatible names. For this purpose, screenSuspects
will
automatically try to convert long, non-unique and/or otherwise incompatible suspect names.
OBoyle2011patRoon
featureGroupsScreening
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.