Error: "Input 'database' is not a 'LOBdbase' object..."
Closed this issue · 1 comments
Troubleshooting error for user @MarcNIOZ. User reports obtaining error when attempting to call doLOBscreen()
with a custom database:
> LOBscreen <- doLOBscreen(xset_a, polarity = "positive", database = "LOBdbase",
remove.iso = FALSE, rt.restrict = TRUE, rt.windows = "LOBSTAHS_rt.windows.csv",
exclude.oddFA = TRUE, match.ppm = 2.5)
Error in doLOBscreen(xset_a, polarity = "positive", database = "LOBdbase", :
Input 'database' is not a 'LOBdbase' object. Use loadLOBdbase() to read a
user-supplied lipid-ox-lipid-oxylipin database from a .csv file, or use
generateLOBdbase() to generate a new LOBSTAHS database.
Also provides:
> LOBdbase
$positive
A positive polarity "LOBdbase" object.
Contains entries for 97545 possible adduct ions of 18221 unique parent compounds.
Parent lipid types ( 25 ): DNPPE, fungalGSL, hapCER, hapGSL, hGSL, IP_DAG, IPL_crenarchaeol, IPL_GDGT0, IPL_GDGT1, IPL_GDGT2, IPL_GDGT3, IPL_GDGT4, IP_MAG, PDMS, pigment, plastoquinone_9, plastoquinone_9OH, plastoquinone_9OH2, PUA, reduced_scytonemin, scytonemin, sGSL, TAG, ubiquinone, vGSL
IP-DAG classes ( 11 ): DGCC, DGDG, DGTS_DGTA, PE, PG, PC, SQDG, MGDG, BLL, PDPT, S_DGCC
IP-MAG classes ( 1 ): LPC
Pigments ( 22 ): Chl_a, 19prime_but_fuco, 19prime_hex_fuco, Allox, Alpha_carotene, Beta_carotenes, Chl_b, Chl_c2, Chl_c3, Chlide_a, Croco, Dd_Ddc, Dt, Echin, Fuco, Lut, Neox_Nos, Peri, Pheophytin_a, Pras, Viol, Zeax
Adducts ( 9 ): [M+2Na+Cl]+, [M+2Na-H]+, [M+C2H3Na2O2]+, [M+C4H10N3]+, [M+H]+, [M+K]+, [M+Na]+, [M+NH4]+, [M+NH4+ACN]+
m/z range: 97.0647914-2016.54119204
Ranges of chemical parameters represented in molecules with acyl moieties:
Total number of acyl carbon atoms: 6-78
Total number of acyl carbon-carbon double bonds: 0-18
Number of additional oxygen atoms: 0-4
Memory usage: 8.11 MB
Resolution: Advised user to specify value for the database
argument without quotations and, in this case, to call the target LOBdbase object directly (rather than calling the parent list object), i.e.,
..., database = LOBdbase$positive, ...
User reports that this allowed screening to proceed without error.
While this was an easy fix, it does suggest we might want to write some sort of auto-detection feature to draw out the user's target database when it is actually embedded within a larger list object. Especially true since generateLOBdbase()
produces a list object with the actual objects of LOBdbase-class embedded as elements $positive
or $negative
, as appropriate. Will open a separate issue for an enhancement.