Skip to content

Commit

Permalink
docs: address Mar's comments and fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Mar 28, 2024
1 parent 32360b1 commit 57f681e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ VignetteBuilder: knitr
BugReports: https://github.com/RforMassSpectrometry/Spectra/issues
URL: https://github.com/RforMassSpectrometry/Spectra
biocViews: Infrastructure, Proteomics, MassSpectrometry, Metabolomics
Encoding: UTF-8
RoxygenNote: 7.3.1
Roxygen: list(markdown=TRUE)
Collate:
Expand Down
15 changes: 10 additions & 5 deletions R/Spectra-estimatePrecursorMz.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
#' m/z of a fragment spectrum using the following approach: in data dependent
#' acquisition (DDA) mode, the MS instrument will select ions with the highest
#' intensities in one MS scan for fragmentation. Thus, for each fragment
#' spectrum, this method identifies the peak with the highest intensity and
#' an m/z value similar to the fragment spectrum's reported precursor m/z
#' (given parameters `tolerance` and `ppm`). This m/z value is then reported.
#' Since the fragment spectrum's potential MS1 mass peak is selected based on
#' its intensity, this method should **only be used for DDA data**.
#' spectrum, this method identifies in the previous MS1 spectrum the peak with
#' the highest intensity and an m/z value similar to the fragment spectrum's
#' reported precursor m/z (given parameters `tolerance` and `ppm`). This m/z
#' value is then reported. Since the fragment spectrum's potential MS1 mass
#' peak is selected based on its intensity, this method should **only be used
#' for DDA data**.
#'
#' @note
#'
Expand Down Expand Up @@ -73,6 +74,10 @@
#' identical(precursorMz(s), pmz)
#' all.equal(precursorMz(s), pmz)
#'
#' ## Plot also the difference of m/z values against the m/z value
#' plot(precursorMz(s), precursorMz(s) - pmz, xlab = "precursor m/z",
#' ylab = "difference reported - estimated precursor m/z")
#'
#' ## we could then replace the reported precursor m/z values
#' s$precursorMz <- pmz
estimatePrecursorMz <- function(object, tolerance = 0.3, ppm = 10,
Expand Down
15 changes: 10 additions & 5 deletions man/estimatePrecursorMz.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 57f681e

Please sign in to comment.