Repository to translate spectra to queries.
Here is what you minimally need:
- A file containing MS/MS spectra with associated skeleton information (or any other relevant chemical classification) provided as metadata. This structure information, stored in the metadata field “skeleton”, allows the generation of queries specific to a given skeleton by extracting repetitive skeleton-specific fragmentation patterns. The MIADB file is provided as an example.
As the package is not (yet) available on CRAN, you will need to install with:
install.packages(
"SpectraToQueries",
repos = c(
"https://spectra-to-knowledge.r-universe.dev",
"https://bioc.r-universe.dev",
"https://cloud.r-project.org"
)
)
To reproduce the example that uses the Monoterpene Indole Alkaloids Database (.mgf) file by default, which includes the annotation of spectral skeletons:
SpectraToQueries::spectra_to_queries()
To reproduce the “grouped” example that uses the MIADB file, which includes an expert-based annotation of spectral “super skeletons” (combination of skeletons exhibiting a high structural similarity):
SpectraToQueries::spectra_to_queries(
spectra = system.file(
"extdata",
"spectra_grouped.rds",
package = "SpectraToQueries"
),
export = "data/interim/queries-grouped.tsv"
)
To generate diagnostic ions queries from your spectra:
SpectraToQueries::spectra_to_queries(
spectra = "yourAwesomeSpectra.mgf",
export = "path/yourEvenBetterResults.tsv"
)
Showing all parameters:
SpectraToQueries::spectra_to_queries(
spectra = NULL,
export = "data/interim/queries.tsv",
beta = 0.5,
dalton = 0.01,
decimals = 4L,
intensity_min = 0L,
ions_max = 10L,
n_skel_min = 5L,
n_spec_min = 3L,
ppm = 20L,
senspe_min = 0.1,
sensitivity_min = 0L,
specificity_min = 0L,
zero_val = 0L
)
TODO
- The RforMassSpectrometry packages suite: https://doi.org/10.3390/metabo12020173