R/components-tps.R
componentsTPs-class.Rd
This class is derived from components
and is used to store components that result from linking feature
groups that are (predicted to be) parents with feature groups that (are predicted to be) transformation products. For
more details, see generateComponentsTPs
.
# S4 method for class 'componentsTPs'
as.data.table(x)
# S4 method for class 'componentsTPs'
filter(
obj,
...,
retDirMatch = FALSE,
minSpecSim = NULL,
minSpecSimPrec = NULL,
minSpecSimBoth = NULL,
minFragMatches = NULL,
minNLMatches = NULL,
formulas = NULL,
verbose = TRUE,
negate = FALSE
)
# S4 method for class 'componentsTPs'
plotGraph(obj, onlyLinked = TRUE, width = NULL, height = NULL)
A componentsTPs
object.
Further arguments passed to the base filter method
.
If set to TRUE
, only keep TPs for which the retention time direction (retDir
, see
Details in componentsTPs) matches with the observed direction. TPs will never be removed if the
expected/observed direction is 0 (i.e. unknown or not significantly different than the parent).
The minimum spectral similarity of a TP compared to its parent
(0-1). The minSpecSimPrec
and minSpecSimBoth
apply to binned data that is shifted with the
"precursor"
and "both"
method, respectively (see MS spectral similarity
parameters for more details). Set to NULL
to ignore.
Minimum number of parent/TP fragment and neutral loss matches, respectively. Set
to NULL
to ignore. See the Linking parents and transformation products
section in
generateComponentsTPs
for more details.
A formulas
object. The formula annotation data in this object is to verify if elemental
additions/subtractions from metabolic logic reactions are possible (hence, it only works with data from
generateTPsLogic
). To verify elemental additions, only TPs with at least one candidate formula that
has these elements are kept. Similarly, for elemental subtractions, any of the parent candidate formulae must
contain the subtraction elements. Note that TPs are currently not filtered if either the parent or the TP has no
formula annotations. Set to NULL
to ignore.
If TRUE
then filters are applied in opposite manner.
If TRUE
then only components with links are plotted.
Passed to visNetwork
.
filter
returns a filtered componentsTPs
object.
plotGraph
returns the result of visNetwork
.
as.data.table(componentsTPs)
: Returns all component data as a data.table
.
filter(componentsTPs)
: Provides various rule based filtering options to clean and prioritize TP data.
plotGraph(componentsTPs)
: Plots an interactive network graph for linked components. Components are linked with each
other if one or more transformation products overlap. The graph is constructed with the igraph package
and rendered with visNetwork.
fromTPs
A logical
that is TRUE
when the componentization was performed with
transformationProducts
data.
The intensity values for components (used by plotSpectrum
) are set
to a dummy value (1) as no single intensity value exists for this kind of
components.
componentsTPs
igraph2
components
for other relevant methods and generateComponents