This function assembles a post-translational modification (PTM) specification from PTM compositions.

define_ptm_compositions(x, other_ptms = NULL)

Arguments

x

A data frame with PTM compositions (see details).

other_ptms

A named vector (of strings or molecular formulas) defining additional PTMs like c(ptm_1 = correction formula 1, ..., ptm_n = correction formula n) .

Value

A data frame that describes one PTM composition per row and comprises three columns:

modcom_data

Nested column storing the remaining columns from the input data frame.

modcom_formula

Correction formula associated with the respective PTM composition.

Details

PTM compositions

PTM compositions ("modcoms") are supplied in a data frame where each row corresponds to a single composition. This data frame must comprise a column labeled modcom_name with a short description. The remaining columns must be labeled by valid PTM names (see below) and contain the number of the respective PTM found in the respective composition.

Valid PTM names include

  • monosaccharides as provided in the data set monosaccharides,

  • PTMs as provided in the data set ptms,

  • user-defined PTMs supplied by the user via the argument other_ptms.

See also

monosaccharides and ptms for predefined monosaccharides and PTMs, respectively

Examples

ptm_compositions <- tibble::tribble( ~modcom_name, ~Hex, ~HexNAc, ~Fuc, ~PHOS, ~foo, "G0F/G0", 6, 8, 1, 0, 0, "G0F/G0F", 6, 8, 2, 0, 0, "G0F/G1F", 7, 8, 2, 0, 0, "G1F/G1F", 8, 8, 2, 0, 0, "G1F/G2F", 9, 8, 2, 0, 0, "G2F/G2F", 10, 8, 2, 0, 0, "G2F/G2F+P", 10, 8, 2, 1, 0, "G2F/G2F+foo", 10, 8, 2, 0, 1, ) my_ptms <- c( foo = "C42", bar = "H42" ) define_ptm_compositions(ptm_compositions, my_ptms)
#> # A tibble: 8 x 3 #> modcom_name modcom_data modcom_formula #> <chr> <list> <mol> #> 1 G0F/G0 <tibble [1 × 5]> C106 H174 N8 O74 #> 2 G0F/G0F <tibble [1 × 5]> C112 H184 N8 O78 #> 3 G0F/G1F <tibble [1 × 5]> C118 H194 N8 O83 #> 4 G1F/G1F <tibble [1 × 5]> C124 H204 N8 O88 #> 5 G1F/G2F <tibble [1 × 5]> C130 H214 N8 O93 #> 6 G2F/G2F <tibble [1 × 5]> C136 H224 N8 O98 #> 7 G2F/G2F+P <tibble [1 × 5]> C136 H225 N8 O101 P #> 8 G2F/G2F+foo <tibble [1 × 5]> C178 H224 N8 O98