Skip to contents

Get and set methods for the AssignmentParameters S4 class.

Usage

technique(x)

# S4 method for AssignmentParameters
technique(x)

correlationsParameters(x)

# S4 method for AssignmentParameters
correlationsParameters(x)

correlationsParameters(x) <- value

# S4 method for AssignmentParameters,list
correlationsParameters(x) <- value

limit(x)

# S4 method for AssignmentParameters
limit(x)

limit(x) <- value

# S4 method for AssignmentParameters
limit(x) <- value

maxM(x)

# S4 method for AssignmentParameters
maxM(x)

maxM(x) <- value

# S4 method for AssignmentParameters
maxM(x) <- value

MFrankThreshold(x)

# S4 method for AssignmentParameters
MFrankThreshold(x)

MFrankThreshold(x) <- value

# S4 method for AssignmentParameters
MFrankThreshold(x) <- value

ppm(x)

# S4 method for AssignmentParameters
ppm(x)

ppm(x) <- value

# S4 method for AssignmentParameters
ppm(x) <- value

isotopes(x)

# S4 method for AssignmentParameters
isotopes(x)

isotopes(x) <- value

# S4 method for AssignmentParameters
isotopes(x) <- value

adducts(x)

# S4 method for AssignmentParameters
adducts(x)

adducts(x) <- value

# S4 method for AssignmentParameters
adducts(x) <- value

transformations(x)

# S4 method for AssignmentParameters
transformations(x)

transformations(x) <- value

# S4 method for AssignmentParameters
transformations(x) <- value

adductRules(x)

# S4 method for AssignmentParameters
adductRules(x)

adductRules(x) <- value

# S4 method for AssignmentParameters
adductRules(x) <- value

isotopeRules(x)

# S4 method for AssignmentParameters
isotopeRules(x)

isotopeRules(x) <- value

# S4 method for AssignmentParameters
isotopeRules(x) <- value

transformationRules(x)

# S4 method for AssignmentParameters
transformationRules(x)

transformationRules(x) <- value

# S4 method for AssignmentParameters
transformationRules(x) <- value

Arguments

x

S4 object of class AssignmentParameters

value

the value to set

Details

  • technique - Get the analytical technique.

  • correlationsParameters - Get or set the correlation analysis parameters to be passed to metabolyseR::correlations().

  • limit - Get or set the atomic mass unit limit for relationship calculation.

  • maxM - Get or set the maximum molecular mass limit for which to assign molecular formulas.

  • MFrankThreshold - Get or set the molecular formula rank threshold for molecular formula selection.

  • ppm - Get or set the parts per million error threshold.

  • isotopes - Get or set the isotope names. The order in which these are specified denotes the expected relative commonality within the data set.

  • adducts - Get or set the adduct names for the ionisation modes. The order in which these are specified denotes the expected relative commonality within the data set for each ionisation mode.

  • transformations - Get or set the transformation molecular formula changes.

  • isotopeRules - Get or set the isotope rules table. The format of this tibble should match that of mzAnnotation::isotope_rules().

  • adductRules - Get or set the adduct rules table. The format of this tibble should match that of mzAnnotation::adduct_rules().

  • techniqueRules - Get or set the transformation rules table. The format of this tibble should match that of mzAnnotation::transformation_rules().

Examples

assignment_parameters <- assignmentParameters('FIE')

## Return the analytical technique
technique(assignment_parameters)
#> [1] "FIE-HRMS"

## Return correlations parameters
correlationsParameters(assignment_parameters)
#> $method
#> [1] "spearman"
#> 
#> $pAdjustMethod
#> [1] "bonferroni"
#> 
#> $corPvalue
#> [1] 0.05
#> 
#> $minCoef
#> [1] 0.7
#> 
#> $maxCor
#> [1] Inf
#> 

## Set correlations parameters
correlationsParameters(assignment_parameters)$minCoef <- 0.75

## Return limit
limit(assignment_parameters)
#> [1] 0.001

## Set limit
limit(assignment_parameters) <- 0.002

## Return max M
maxM(assignment_parameters)
#> [1] 800

## Set max M
maxM(assignment_parameters) <- 500

## Return MF rank threshold
MFrankThreshold(assignment_parameters)
#> [1] 3

## Set MF rank threshold
MFrankThreshold(assignment_parameters) <- 3

## Return ppm
ppm(assignment_parameters)
#> [1] 4

## Set ppm
ppm(assignment_parameters) <- 3

## Return isotopes
isotopes(assignment_parameters)
#> [1] "13C" "18O"

## Set isotopes
isotopes(assignment_parameters) <- '13C'

## Return adducts
adducts(assignment_parameters)
#> $n
#> [1] "[M-H]1-"    "[M+Cl]1-"   "[M+Cl37]1-" "[M+K-2H]1-" "[M-2H]2-"  
#> [6] "[2M-H]1-"  
#> 
#> $p
#> [1] "[M+H]1+"   "[M+K]1+"   "[M+Na]1+"  "[M+K41]1+" "[M+2H]2+"  "[2M+H]1+" 
#> 

## Set adducts
adducts(assignment_parameters) <- list(n = c('[M-H]1-','[M+Cl]1-'),
                                   p = c('[M+H]1+','[M+K]1+'))
                                   
## Return transformations
transformations(assignment_parameters)
#>  [1] "M - [O] + [NH2]"   "M - [OH] + [NH2]"  "M + [H2]"         
#>  [4] "M - [H2] + [O]"    "M - [H] + [CH3]"   "M - [H] + [NH2]"  
#>  [7] "M - [H] + [OH]"    "M + [H2O]"         "M - [H3] + [H2O]" 
#> [10] "M - [H] + [CHO2]"  "M - [H] + [SO3]"   "M - [H] + [PO3H2]"

## Set transformations
transformations(assignment_parameters) <- "M - [O] + [NH2]"

## Return adduct rules
adductRules(assignment_parameters)
#> # A tibble: 58 × 12
#>    Name  Charge    xM   Add Nelec AddAt RemAt AddEx RemEx Rule  Default Isotopic
#>    <chr>  <int> <int> <dbl> <int> <chr> <chr> <chr> <chr> <chr>   <int>    <dbl>
#>  1 [M+3…      3     1 23.0     -3 NA    NA    Na3   NA    HBA2…       0        0
#>  2 [M+H…      3     1 15.7     -3 NA    NA    Na2H  NA    HBA2…       0        0
#>  3 [M+2…      3     1  8.33    -3 NA    NA    NaH2  NA    HBA2…       0        0
#>  4 [M+3…      3     1  1.01    -3 NA    NA    H3    NA    HBA2…       0        0
#>  5 [2M+…      2     2 28.0     -2 NA    NA    H8O3  NA    HBA2…       0        0
#>  6 [M+3…      2     1 62.5     -2 NA    NA    C6H1… NA    HBA2…       0        0
#>  7 [M+2…      2     1 42.0     -2 NA    NA    C4H8… NA    HBA2…       0        0
#>  8 [M+2…      2     1 23.0     -2 NA    NA    Na2   NA    HBA2…       1        0
#>  9 [M+A…      2     1 21.5     -2 NA    NA    C2H5N NA    HBA2…       0        0
#> 10 [M+H…      2     1 20.0     -2 NA    NA    KH    NA    HBA2…       1        0
#> # ℹ 48 more rows

## Set adduct rules
adductRules(assignment_parameters) <- mzAnnotation::adduct_rules()

## Return isotope rules
isotopeRules(assignment_parameters)
#> # A tibble: 8 × 4
#>   Isotope `Mass Difference` Rule  Default
#>   <chr>               <dbl> <chr>   <int>
#> 1 13C                  1.00 C>0         1
#> 2 13C2                 2.01 C>1         1
#> 3 13C3                 3.01 C>2         0
#> 4 13C4                 4.01 C>3         0
#> 5 18O                  2.00 O>0         1
#> 6 37Cl                 2.00 Cl>0        0
#> 7 41K                  2.00 K>0         0
#> 8 34S                  2.00 S>0         1

## Set isotope rules
isotopeRules(assignment_parameters) <- mzAnnotation::isotope_rules()

## Return transformation rules
transformationRules(assignment_parameters)
#> # A tibble: 12 × 10
#>    Name       `MF Change` Difference     C     H     N     O     P     S Default
#>    <chr>      <chr>            <dbl> <int> <int> <int> <int> <int> <int>   <int>
#>  1 Transamin… M - [O] + …     0.0238     0     2     1    -1     0     0       1
#>  2 Ammonia l… M - [OH] +…    -0.984      0     1     1    -1     0     0       1
#>  3 Hydrogena… M + [H2]        2.02       0     2     0     0     0     0       1
#>  4 Alcohol t… M - [H2] +…    14.0        0    -2     0     1     0     0       1
#>  5 Methylati… M - [H] + …    14.0        1     2     0     0     0     0       1
#>  6 Transamin… M - [H] + …    15.0        0     1     1     0     0     0       1
#>  7 Hydroxyla… M - [H] + …    16.0        0     0     0     1     0     0       1
#>  8 Hydration  M + [H2O]      18.0        0     2     0     1     0     0       1
#>  9 Methyl to… M - [H3] +…    30.0        0    -1     0     1     0     0       1
#> 10 Carboxyla… M - [H] + …    44.0        1     0     0     2     0     0       1
#> 11 Sulphation M - [H] + …    80.0        0    -1     0     3     0     1       1
#> 12 Phosphory… M - [H] + …    80.0        0     1     0     3     1     0       1

## Set transformation rules
transformationRules(assignment_parameters) <- mzAnnotation::transformation_rules()