Components based on parent and transformation product (TP) linkage.
Source:R/components-tps.R
componentsTPs-class.RdThis 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.
Usage
# S4 method for class 'componentsTPs'
as.data.table(x, candidates = FALSE)
# S4 method for class 'componentsTPs'
filter(
obj,
...,
retDirMatch = FALSE,
minSpecSim = NULL,
minSpecSimPrec = NULL,
minSpecSimBoth = NULL,
minTotFragMatches = NULL,
minTotNLMatches = NULL,
minFragMatches = NULL,
minNLMatches = NULL,
formulas = NULL,
verbose = TRUE,
negate = FALSE
)
# S4 method for class 'componentsTPs'
plotGraph(obj, onlyLinked = TRUE, width = NULL, height = NULL)Arguments
- x, obj
A
componentsTPsobject.- candidates
If
TRUEthen candidate specific tables are merged in the result table. SeegenerateComponentsTPs(Result columnssection) for more details.- ..., verbose
Further arguments passed to the base
filter method.- retDirMatch
If set to
TRUE, only keep TPs for which the retention order direction from feature group data matches that of the expected values from TP data (retDirandTP_retDircolumns). TPs will never be removed if either of the directions is 0 (i.e. unknown or not significantly different than the parent).- minSpecSim, minSpecSimPrec, minSpecSimBoth
The minimum spectral similarity of a TP compared to its parent (0-1). The
minSpecSimPrecandminSpecSimBothapply to binned data that is shifted with the"precursor"and"both"method, respectively (see MS spectral similarity parameters for more details). Set toNULLto ignore.- minTotFragMatches, minTotNLMatches, minFragMatches, minNLMatches
Minimum number of (total) parent/TP fragment and neutral loss matches. Set to
NULLto ignore. See theResult columnssection ingenerateComponentsTPsfor more details.- formulas
A
formulasobject. 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 fromgenerateTPsLogic). 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 toNULLto ignore.- negate
If
TRUEthen filters are applied in opposite manner.- onlyLinked
If
TRUEthen only components with links are plotted.- width, height
Passed to
visNetwork.
Methods (by generic)
as.data.table(componentsTPs): Returns all component data as adata.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.
Slots
fromTPsA
logicalthat isTRUEwhen the componentization was performed withtransformationProductsdata (i.e. the TPs argument was notNULL).parentsFromScreeningA
logicalthat isTRUEwhen the parents were obtained from screening data.TPsFromScreeningA
logicalthat isTRUEwhen the TPs were obtained from screening data.
Note
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.
References
Antonov M, Csárdi G, Horvát S, Müller K, Nepusz T, Noom D, Salmon M, Traag V, Welles BF, Zanini F (2023).
“igraph enables fast and robust network analysis across programming languages.”
arXiv preprint arXiv:2311.10260.
doi:10.48550/arXiv.2311.10260
.
Csárdi G, Nepusz T (2006).
“The igraph software package for complex network research.”
InterJournal, Complex Systems, 1695.
https://igraph.org.
Csárdi G, Nepusz T, Traag V, Horvát S, Zanini F, Noom D, Müller K, Schoch D, Salmon M (2026).
igraph: Network Analysis and Visualization in R.
doi:10.5281/zenodo.7682609
.
R package version 2.3.3, https://CRAN.R-project.org/package=igraph.
See also
components for other relevant methods and generateComponents