Utilities for working with metabolite databases.
Usage
entries(db)
# S4 method for MetaboliteDatabase
entries(db)
descriptors(db)
# S4 method for MetaboliteDatabase
descriptors(db)
nEntries(db)
# S4 method for MetaboliteDatabase
nEntries(db)
filterMR(db, lower, upper)
# S4 method for MetaboliteDatabase
filterMR(db, lower, upper)
filterER(db, rule)
# S4 method for MetaboliteDatabase
filterER(db, rule)
filterIP(db, rule)
# S4 method for MetaboliteDatabase
filterIP(db, rule)
filterEntries(db, IDs)
# S4 method for MetaboliteDatabase
filterEntries(db, IDs)
filterMF(db, mf)
# S4 method for MetaboliteDatabase
filterMF(db, mf)
Arguments
- db
S4 object of class
MetaboliteDatabase
- lower
lower mass boundary
- upper
upper mass boundary
- rule
a filtering expression
- IDs
a numeric vector of entry IDs
- mf
a molecular formula to filter
Value
A tibble containing metabolite entry information, the number of metabolite entires or an
S4 object of class MetaboliteDatabase
depending on the method used.
Details
entries
- return the metabolite entriesdescriptors
- return the metabolite entry chemical descriptorsnEntries
- return the number of metabolite entriesfilterEntries
- filter the metabolite entries based on a vector of metabolite IDsfilterMR
- filter the metabolite entries based on a mass rangefilterER
- filter the metabolite entries based on an element frequency rulefilterIP
- filter the metabolite entries based on an ionisation product rulefilterMF
- filter the metabolite entries based on a molecular formula
Examples
## Create a metablite ionisation database using the example amino acid data
metabolite_database <- metaboliteDB(amino_acids)
## Return the entries
entries(metabolite_database)
#> # A tibble: 20 × 5
#> ID NAME InChI InChI…¹ SMILES
#> <int> <chr> <chr> <chr> <chr>
#> 1 1 L-Alanine InChI=1S/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1… QNAYBM… C[C@@…
#> 2 2 L-Arginine InChI=1S/C6H14N4O2/c7-4(5(11)12)2-1-3-1… ODKSFY… C(C[C…
#> 3 3 L-Asparagine InChI=1S/C4H8N2O3/c5-2(4(8)9)1-3(6)7/h2… DCXYFE… C([C@…
#> 4 4 L-Aspartic acid InChI=1S/C4H7NO4/c5-2(4(8)9)1-3(6)7/h2H… CKLJMW… C([C@…
#> 5 5 L-Cysteine InChI=1S/C3H7NO2S/c4-2(1-7)3(5)6/h2,7H,… XUJNEK… C([C@…
#> 6 6 L-Glutamic acid InChI=1S/C5H9NO4/c6-3(5(9)10)1-2-4(7)8/… WHUUTD… C(CC(…
#> 7 7 L-Glutamine InChI=1S/C5H10N2O3/c6-3(5(9)10)1-2-4(7)… ZDXPYR… C(CC(…
#> 8 8 Glycine InChI=1S/C2H5NO2/c3-1-2(4)5/h1,3H2,(H,4… DHMQDG… C(C(=…
#> 9 9 L-Histidine InChI=1S/C6H9N3O2/c7-5(6(10)11)1-4-2-8-… HNDVDQ… C(c1c…
#> 10 10 L-Isoleucine InChI=1S/C6H13NO2/c1-3-4(2)5(7)6(8)9/h4… AGPKZV… CC[C@…
#> 11 11 L-Leucine InChI=1S/C6H13NO2/c1-4(2)3-5(7)6(8)9/h4… ROHFNL… CC(C)…
#> 12 12 L-Lysine InChI=1S/C6H14N2O2/c7-4-2-1-3-5(8)6(9)1… KDXKER… C(CCN…
#> 13 13 L-Methionine InChI=1S/C5H11NO2S/c1-9-3-2-4(6)5(7)8/h… FFEARJ… CSCC[…
#> 14 14 L-Phenylalanine InChI=1S/C9H11NO2/c10-8(9(11)12)6-7-4-2… COLNVL… c1ccc…
#> 15 15 L-Proline InChI=1S/C5H9NO2/c7-5(8)4-2-1-3-6-4/h4,… ONIBWK… C1C[C…
#> 16 16 L-Serine InChI=1S/C3H7NO3/c4-2(1-5)3(6)7/h2,5H,1… MTCFGR… C([C@…
#> 17 17 L-Threonine InChI=1S/C4H9NO3/c1-2(6)3(5)4(7)8/h2-3,… AYFVYJ… C[C@H…
#> 18 18 L-Tryptophan InChI=1S/C11H12N2O2/c12-9(11(14)15)5-7-… QIVBCD… c1ccc…
#> 19 19 L-Tyrosine InChI=1S/C9H11NO3/c10-8(9(12)13)5-6-1-3… OUYCCC… c1cc(…
#> 20 20 L-Valine InChI=1S/C5H11NO2/c1-3(2)4(6)5(7)8/h3-4… KZSNJW… CC(C)…
#> # … with abbreviated variable name ¹InChIKey
## Return the chemical descriptors
descriptors(metabolite_database)
#> # A tibble: 20 × 16
#> ID SMILES MF Accur…¹ HBA1 HBA2 HBD logP TPSA Negat…² Posit…³
#> <int> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int>
#> 1 1 C[C@@H](… C3H7… 89.0 3 3 2 0.118 63.3 0 0
#> 2 2 C(C[C@@H… C6H1… 174. 6 6 5 0.553 125. 0 0
#> 3 3 C([C@@H]… C4H8… 132. 5 5 4 0.124 107. 0 0
#> 4 4 C([C@@H]… C4H7… 133. 5 5 3 -0.427 101. 0 0
#> 5 5 C([C@@H]… C3H7… 121. 4 4 3 0.0284 102. 0 0
#> 6 6 C(CC(=O)… C5H9… 147. 5 5 3 -0.0366 101. 0 0
#> 7 7 C(CC(=N)… C5H1… 146. 5 5 4 0.514 107. 0 0
#> 8 8 C(C(=O)O… C2H5… 75.0 3 3 2 -0.27 63.3 0 0
#> 9 9 C(c1cnc[… C6H9… 155. 4 4 3 0.0644 92 0 0
#> 10 10 CC[C@H](… C6H1… 131. 3 3 2 1.14 63.3 0 0
#> 11 11 CC(C)C[C… C6H1… 131. 3 3 2 1.14 63.3 0 0
#> 12 12 C(CCN)C[… C6H1… 146. 4 4 3 0.928 89.3 0 0
#> 13 13 CSCC[C@@… C5H1… 149. 4 4 2 0.852 88.6 0 0
#> 14 14 c1ccc(cc… C9H1… 165. 3 3 2 1.34 63.3 0 0
#> 15 15 C1C[C@@H… C5H9… 115. 3 3 2 0.152 49.3 0 0
#> 16 16 C([C@@H]… C3H7… 105. 4 4 3 -0.909 83.6 0 0
#> 17 17 C[C@H]([… C4H9… 119. 4 4 3 -0.521 83.6 0 0
#> 18 18 c1ccc2c(… C11H… 204. 3 3 3 1.82 79.1 0 0
#> 19 19 c1cc(ccc… C9H1… 181. 4 4 3 1.05 83.6 0 0
#> 20 20 CC(C)[C@… C5H1… 117. 3 3 2 0.755 63.3 0 0
#> # … with 5 more variables: NHH <int>, OH <int>, COOH <int>, COO <int>,
#> # Total_Charge <int>, and abbreviated variable names ¹Accurate_Mass,
#> # ²Negative_Charge, ³Positive_Charge
## Return the number of database entries
nEntries(metabolite_database)
#> [1] 20
## Filter database entries
filterEntries(metabolite_database,c(1:5))
#>
#> MetaboliteDatabase object containing 5 entries
#>
## Filter database using a mass range
filterMR(metabolite_database,100,120)
#>
#> MetaboliteDatabase object containing 4 entries
#>
## Filter the database by an element frequency rule
filterER(metabolite_database,C > 2)
#>
#> MetaboliteDatabase object containing 0 entries
#>
## Filter the database by an ionisation product rule
filterIP(metabolite_database,HBA2>0 & Total_Charge==0)
#>
#> MetaboliteDatabase object containing 20 entries
#>
## Filter a database by a molecular formula
filterMF(metabolite_database,"C3H7NO2")
#>
#> MetaboliteDatabase object containing 1 entries
#>