An environment used for caching data in RAM.
Format
An environment with the following elements:
CDs
: A data frame. The column names ofCDs
are the chemical descriptors listed in CDFeatures. The rownames inCDs
are SMILES strings.CDRowNr
: A list. The names of the list elements equal the rownames ofCDs
. The values are the indices of the rows in theCDs
data frame.
Details
This environment is used by getCDsFor1Molecule()
to store the results of previous calculations to speed up subsequent calls. It gets initalized upon the first call of getCDsFor1Molecule()
with the chemical descriptors for all molecules available in the RP dataset and the HILIC
dataset of the Retip package.
References
Retip: Retention Time Prediction for Compound Annotation in Untargeted Metabolomics Paolo Bonini, Tobias Kind, Hiroshi Tsugawa, Dinesh Kumar Barupal, and Oliver Fiehn Analytical Chemistry 2020 92 (11), 7515-7522 DOI: 10.1021/acs.analchem.9b05765
Examples
dim(ram_cache$CDs) # 0 241
#> [1] 1316 241
cds <- getCDsFor1Molecule(cache = TRUE, verbose = TRUE)
#> 2024-08-18 12:17:20.20 Loading chemical descriptors for 'O=C(O)CCCCCCCCCO' from RAM cache
dim(ram_cache$CDs) # 1316 241
#> [1] 1316 241
ram_cache$CDRowNr[["COC1=C(C=CC(=C1)CCN)O"]] # 2
#> [1] 2
ram_cache$CDs[1:10, 1:3]
#> Fsp3 nSmallRings
#> CCC(C(=O)O)O 0.7500000 0
#> COC1=C(C=CC(=C1)CCN)O 0.3333333 1
#> C1=NC2=C(N1)C(=NC=N2)N 0.0000000 2
#> C1=NC2=C(C(=N1)N)N=CN2C3C(C(C(O3)COP(=O)(O)O)O)O 0.5000000 3
#> C1C2C(C(C(O2)N3C=NC4=C3N=CN=C4N)O)OP(=O)(O1)O 0.5000000 4
#> C1=NC2=C(C(=N1)N)N=CN2C3C(C(C(O3)COP(=O)(O)O)OP(=O)(O)O)O 0.5000000 3
#> [O-]C(=O)C[C@H](O)C[N+](C)(C)C 0.8571429 0
#> C[N+](C)(CCOP([O-])(OCC(O)CO)=O)C 1.0000000 0
#> CN1C=C(N=C1)CC(C(=O)O)N 0.4285714 1
#> C(CC(=O)O)CN 0.7500000 0
#> nAromRings
#> CCC(C(=O)O)O 0
#> COC1=C(C=CC(=C1)CCN)O 1
#> C1=NC2=C(N1)C(=NC=N2)N 2
#> C1=NC2=C(C(=N1)N)N=CN2C3C(C(C(O3)COP(=O)(O)O)O)O 2
#> C1C2C(C(C(O2)N3C=NC4=C3N=CN=C4N)O)OP(=O)(O1)O 2
#> C1=NC2=C(C(=N1)N)N=CN2C3C(C(C(O3)COP(=O)(O)O)OP(=O)(O)O)O 2
#> [O-]C(=O)C[C@H](O)C[N+](C)(C)C 0
#> C[N+](C)(CCOP([O-])(OCC(O)CO)=O)C 0
#> CN1C=C(N=C1)CC(C(=O)O)N 1
#> C(CC(=O)O)CN 0