Skip to content

Commit

Permalink
improve checking for value attribute in getPeaklist()
Browse files Browse the repository at this point in the history
  • Loading branch information
sneumann committed Aug 23, 2017
1 parent 6bda0bd commit 53f38e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: CAMERA
Version: 1.33.1
Version: 1.33.1.90
Date: 2017-08-18
Title: Collection of annotation related methods for mass spectrometry data
Author: Carsten Kuhl, Ralf Tautenhahn, Hendrik Treutler, Steffen Neumann {ckuhl|htreutle|sneumann}@ipb-halle.de, rtautenh@scripps.edu
Expand Down
2 changes: 1 addition & 1 deletion R/xsAnnotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ getpspectra <- function(object, grp=NULL){
setGeneric("getPeaklist", function(object, intval="into") standardGeneric("getPeaklist"))
setMethod("getPeaklist", "xsAnnotate", function(object, intval="into") {

if (!sum(intval == c("into","intb","maxo", "intf", "maxf"))){
if (! intval %in% colnames(peaks(object(xcmsSet)))) {
stop("unknown intensity value!")
}

Expand Down
3 changes: 2 additions & 1 deletion man/getPeaklist-methods.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
}
\arguments{
\item{object}{ xsAnnotate object}
\item{intval}{ Choose intensity values. Allowed values are into, maxo, intb, intf, maxf}
\item{intval}{ Choose intensity values. Allowed values are into, maxo, intb, intf,
maxf, area, depending on the feature detection algorithm used.}
}
\details{
This function extract the peaktable from an xsAnnotate object, containing three additional columns (isotopes, adducts, pseudospectrum) with represents the annotation results. For a grouped xcmsSet it returns the grouped peaktable.
Expand Down

0 comments on commit 53f38e3

Please sign in to comment.