-
Notifications
You must be signed in to change notification settings - Fork 2
/
rules.R
90 lines (79 loc) · 2.18 KB
/
rules.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#' Adduct formation rules
#' @rdname adducts
#' @description Formation rules for electrospray ionisation adducts
#' @format A tibble containing 58 rows and 6 columns
#' \describe{
#' \item{Name}{Adduct name}
#' \item{Charge}{Charge added}
#' \item{xM}{Number of M needed}
#' \item{Add}{Mass value change}
#' \item{Nelec}{Electron change}
#' \item{AddAt}{pseudo formula of the atoms to be added to the molecular formula of one M}
#' \item{RemAt}{pseudo formula of the atoms to be removed to the molecular formula of one M}
#' \item{AddEx}{pseudo formula of the atoms to be added to the final ionisation product molecular formula}
#' \item{RemEx}{pseudo formula of the atoms to be removed to the final ionisation product molecular formula}
#' \item{Rule}{Structural rule for formation}
#' }
#' @examples
#' adduct_names()
#'
#' adduct_rules()
#' @export
adduct_rules <- function(){
return(Adducts)
}
#' @rdname adducts
#' @export
adduct_names <- function(){
return(Adducts$Name)
}
#' Isotopic rules
#' @rdname isotopes
#' @description Isotope rules
#' @format A tibble containing 8 rows and 3 columns.
#' \describe{
#' \item{Isotope}{Isotope name}
#' \item{Mass Difference}{Isotopic mass difference}
#' \item{Rule}{Elemental composition rules}
#' }
#' @examples
#' isotope_names()
#'
#' isotope_rules()
#' @export
isotope_rules <- function(){
return(Isotopes)
}
#' @rdname isotopes
#' @export
isotope_names <- function(){
return(Isotopes$Isotope)
}
#' Transformation rules
#' @rdname transformations
#' @description Transformation rules
#' @format A tibble containing 12 rows and 9 columns.
#' \describe{
#' \item{Name}{Transformation name}
#' \item{MF Change}{Molecular formula change}
#' \item{Difference}{Mass difference}
#' \item{C}{Change in carbon atoms}
#' \item{H}{Change in hydrogen atoms}
#' \item{O}{Change in oxygen atoms}
#' \item{N}{Change in nitrogen atoms}
#' \item{P}{Change in phosphorus atoms}
#' \item{S}{Change in sulphur atoms}
#' }
#' @examples
#' transformation_names()
#'
#' transformation_rules()
#' @export
transformation_rules <- function(){
return(Transformations)
}
#' @rdname transformations
#' @export
transformation_names <- function(){
return(Transformations$`MF Change`)
}