Browse code

document entropy

Mar Garcia Aloy authored on 24/05/2023 07:24:50
Showing 3 changed files

... ...
@@ -14,6 +14,7 @@ export(colCounts)
14 14
 export(colMeansMat)
15 15
 export(colSumsMat)
16 16
 export(common)
17
+export(entropy)
17 18
 export(formatRt)
18 19
 export(getImputeMargin)
19 20
 export(gnps)
20 21
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/entropy.R
3
+\name{entropy}
4
+\alias{entropy}
5
+\title{Spectral entropy}
6
+\usage{
7
+entropy(x)
8
+}
9
+\arguments{
10
+\item{x}{\code{numeric}, intensities of the fragment ions.}
11
+}
12
+\value{
13
+\code{numeric}: (normalized) entropy \code{x}.
14
+}
15
+\description{
16
+These functions allow to calculate entropy measurements of an MS/MS
17
+spectrum based on the metrics suggested by
18
+Li et al. (https://doi.org/10.1038/s41592-021-01331-z).
19
+Spectral entropy and normalized entropy are used to measure the complexity
20
+of an spectra.
21
+MassBank of North America (MoNA) defines spectra entropy as the intensity
22
+weighted spectral peak number
23
+(https://mona.fiehnlab.ucdavis.edu/documentation/entropy.
24
+Additionally it is suggested to label as low-quality spectrums the ones
25
+that have a normalized entropy higher than 0.8 and spectral entropy
26
+higher than 3.
27
+}
28
+\examples{
29
+spectrum <- rbind(c(41.04, 37.16), c(69.07, 66.83), c(86.1, 999.0))
30
+
31
+entropy(spectrum[,2])
32
+nentropy(spectrum[,2])
33
+
34
+}
35
+\author{
36
+Mar Garcia-Aloy
37
+}
38
+\concept{helper functions for users
39
+
40
+#' @references
41
+Li, Y., Kind, T., Folz, J., Vaniya, A., Mehta. S.S., Fiehn, O. (2021).
42
+Spectral entropy outperforms MS/MS dot product similarity for
43
+small-molecule compound identification.
44
+Nature Methods. 2021;18(12):1524-1531.
45
+\doi{10.1038/s41592-021-01331-z}.}
0 46
new file mode 100644
1 47
Binary files /dev/null and b/src/MsCoreUtils.dll differ