Description Usage Arguments Details Value Examples
Compares two features to determine if they are similar.
1 2 3 4 5 6 | similarFeatures(
feature1,
feature2,
rtThreshold = RT_THRESHOLD,
mzThreshold = MZ_THRESHOLD
)
|
feature1 |
The first feature to compare, as a Feature object or a vector from a feature matrix. |
feature2 |
The second feature to compare, as a Feature object or a vector from a feature matrix. |
rtThreshold |
The RT threshold to use, as a number. |
mzThreshold |
The m/z threshold to use, as a number. |
We consider features to be similar if their retention times and mass-to- charge values are within some fixed threshold of each other, which can be determined and provided by the user. Having a greater degree of similarity means that it is more likely that a close cluster of features can effectively be considered as just a single feature.
The provided features can be ropenms Feature objects or vectors (e.g. from a feature matrix).
TRUE if the two features are similar; FALSE otherwise.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
featureA <- ropenms$Feature()
featureA$setRT(5)
featureA$setMZ(300)
featureB <- ropenms$Feature()
featureB$setRT(6)
featureB$setMZ(300.005)
similarFeatures(featureA, featureB) # Returns TRUE
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.