Molecular formula assignment methods
assignment-methods.Rd
These methods provide access to performing the individual steps of the molecular
formula assignment approach. See Details for more information of when it is best to use these
instead of assignMFs()
.
Usage
calcCorrelations(assignment)
# S4 method for Assignment
calcCorrelations(assignment)
addIsoAssign(assignment)
# S4 method for Assignment
addIsoAssign(assignment)
transformationAssign(assignment)
# S4 method for Assignment
transformationAssign(assignment)
calcRelationships(assignment)
# S4 method for Assignment
calcRelationships(assignment)
Details
In circumstances where the molecular formula assignment approach has high memory requirements,
such as where there are many correlations (> 2 million) or many high m/z (>700), it may be
preferable to perform the assignment steps separately as opposed to using assignMFs()
. This
can reduce the memory overheads required to successfully assign molecular formulas to the data
and also enable the possibility of objects to be saved and/or unloaded between the assignment
steps where needed.
Examples
plan(future::sequential)
p <- assignmentParameters('FIE-HRMS')
mf_assignments <- assignment(feature_data,p)
mf_assignments <- mf_assignments %>%
calcCorrelations() %>%
calcRelationships() %>%
addIsoAssign() %>%
transformationAssign()
#> Calculating correlations …
#> Calculating correlations ✔ [10 correlations] [0.2S]
#> Calculating relationships …
#> Calculating relationships ✔ [1.4S]
#> Adduct & isotopic assignment …
#> generating molecular formulas…
#> generating molecular formulas ✔ [8.2S]
#> iteration 1…
#> iteration 1 ✔ [0.4S]
#> iteration 2…
#> Adduct & isotopic assignment ✔ [9.3S]
#> Transformation assignment…
#> iteration 1 …
#> iteration 1 ✔ [1.2S]
#> iteration 2 …
#> Transformation assignment ✔ [1.2S]
mf_assignments
#>
#> assignments v1.0.2
#> Assignment:
#> Features: 10
#> Correlations: 10
#> Relationships: 35
#>
#> Adduct & isotope assignment:
#> Iterations: 1
#> MFs: 1
#> Assigned: 5
#>
#> Transformation assignment:
#> Iterations: 1
#> MFs: 1
#> Assigned: 1
#>
#> Total assignments: 6 (60%)
#> Unique MFs: 2
#>