Skip to contents

Perform automated molecular formula assignment.

Usage

assignMFs(
  feature_data,
  parameters = assignmentParameters("FIE-HRMS"),
  verbose = TRUE,
  ...
)

# S4 method for tbl_df
assignMFs(
  feature_data,
  parameters = assignmentParameters("FIE-HRMS"),
  verbose = TRUE
)

# S4 method for AnalysisData
assignMFs(
  feature_data,
  parameters = assignmentParameters("FIE"),
  verbose = TRUE
)

# S4 method for Analysis
assignMFs(
  feature_data,
  parameters = assignmentParameters("FIE"),
  verbose = TRUE,
  type = c("pre-treated", "raw")
)

Arguments

feature_data

a tibble or an object of S4 class AnalysisData or Analysis containing the feature intensity matrix of m/z for which to assign molecular formulas. See details.

parameters

an S4 object of class AssignmentParamters containing the parameters for molecular formula assignment

verbose

should progress output be printed to the console

...

arguments to pass to the relevant method

type

pre-treated or raw data on which to perform assignment when argument feature_data is of S4 class Analysis

Details

If argument feature_data is specified as a tibble, this should be a feature intensity matrix where the columns are the m/z features to assign and the rows are the individual observations, with the cells as abundance values. he m/z features provided as column names should be in the form of <ionisation_mode><m/z>@<retention_time>. Ionisation mode should be given as a prefix n or p for negative or positive ionisation modes respectively. Feature m/z should be provided to an accuracy of least 5 decimal places. The retention time portion (@<retention_time>) is only required for LC-MS data and should be provided in minutes.

Examples

plan(future::sequential)
p <- assignmentParameters('FIE-HRMS')

assignments <- assignMFs(feature_data,p)
#> 
#> assignments v1.0.2 Thu Jan 11 15:07:08 2024
#> ________________________________________________________________________________
#> Assignment Parameters: 
#> 
#> 	 Technique:		 FIE-HRMS 
#> 	 Max M:			 800 
#> 	 MF rank threshold:	 3 
#> 	 PPM threshold:		 4 
#> 	 Relationship limit:	 0.001 
#> 	 RT limit:		  
#> 	 Correlations:
#> 		method: spearman
#>  		pAdjustMethod: bonferroni
#>  		corPvalue: 0.05
#>  		minCoef: 0.7
#>  		maxCor: Inf
#> 
#> 	 Adducts: 
#> 	 n: [M-H]1-, [M+Cl]1-, [M+Cl37]1-, [M+K-2H]1-, [M-2H]2-, [2M-H]1-
#> 	 p: [M+H]1+, [M+K]1+, [M+Na]1+, [M+K41]1+, [M+2H]2+, [2M+H]1+ 
#> 	 Isotopes: 13C, 18O 
#> 	 Transformations: M - [O] + [NH2], M - [OH] + [NH2], M + [H2], M - [H2] + [O], M - [H] + [CH3], M - [H] + [NH2], M - [H] + [OH], M + [H2O], M - [H3] + [H2O], M - [H] + [CHO2], M - [H] + [SO3], M - [H] + [PO3H2]
#> ________________________________________________________________________________
#> No. m/z:	10
#> Calculating correlations 
#> Calculating correlations 	 [10 correlations] [0.2S]
#> Calculating relationships 
#> Calculating relationships 	 [1.7S]
#> Adduct & isotopic assignment 
#> generating molecular formulas…

#> generating molecular formulas	 [8.3S]
#> 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]
#> ________________________________________________________________________________
#> 
#> Complete! [12.8S]