Skip to content

Commit

Permalink
Add argument msLevel to chromatogram,XCMSnExp (issue #205)
Browse files Browse the repository at this point in the history
- Add argument msLevel to chromatogram,XCMSnExp.
  • Loading branch information
jorainer committed Aug 22, 2017
1 parent 8f9eb64 commit 21ed75c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Depends:
methods,
Biobase,
BiocParallel (>= 1.8.0),
MSnbase (>= 2.3.9)
MSnbase (>= 2.3.10)
Imports:
mzR (>= 1.1.6),
BiocGenerics,
Expand Down
8 changes: 6 additions & 2 deletions R/methods-XCMSnExp.R
Original file line number Diff line number Diff line change
Expand Up @@ -1918,6 +1918,9 @@ setMethod("featureValues",
#' Details and Notes sections below). Use \code{missing = 0} to resemble the
#' behaviour of the \code{getEIC} from the \code{old} user interface.
#'
#' @param msLevel \code{integer} specifying the MS level from which the
#' chromatogram should be extracted. Defaults to \code{msLevel = 1L}.
#'
#' @return \code{chromatogram} returns a \code{\link{Chromatograms}} object with
#' the number of columns corresponding to the number of files in
#' \code{object} and number of rows the number of specified ranges (i.e.
Expand Down Expand Up @@ -1987,7 +1990,8 @@ setMethod("featureValues",
setMethod("chromatogram",
signature(object = "XCMSnExp"),
function(object, rt, mz, adjustedRtime = hasAdjustedRtime(object),
aggregationFun = "sum", missing = NA_real_) {
aggregationFun = "sum", missing = NA_real_,
msLevel = 1L) {
## Coerce to OnDiskMSnExp.
if (adjustedRtime)
adj_rt <- rtime(object, adjusted = TRUE)
Expand All @@ -1998,7 +2002,7 @@ setMethod("chromatogram",
}
chromatogram(object, rt = rt, mz = mz,
aggregationFun = aggregationFun,
missing = missing)
missing = missing, msLevel = msLevel)
})

#' @rdname XCMSnExp-class
Expand Down
3 changes: 3 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CHANGES IN VERSION 2.99.7
-------------------------

USER VISIBLE CHANGES:
- Add parameter msLevel to chromatogram,XCMSnExp method (issue #205).

BUG FIXES:
- Fix #201: Warnings: 'readMSData2' is deprecated, thanks to L. Gatto.
- Merge with BioC git after transition
Expand Down
5 changes: 4 additions & 1 deletion man/chromatogram-method.Rd

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

0 comments on commit 21ed75c

Please sign in to comment.