From bc0e9fd0ea46a5c67ef58876fa869fc69ac80e3a Mon Sep 17 00:00:00 2001 From: Steffen Neumann Date: Mon, 10 Feb 2020 23:10:28 +0100 Subject: [PATCH] Fix issues upon _R_CHECK_LENGTH_1_CONDITION_ and bump version --- DESCRIPTION | 4 ++-- R/pspec2metfrag.R | 2 +- R/xsAnnotate.R | 4 ++-- inst/NEWS | 8 ++++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 92783c7..82917b1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: CAMERA -Version: 1.43.1 -Date: 2019-12-02 +Version: 1.43.2 +Date: 2020-02-10 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 Maintainer: Steffen Neumann diff --git a/R/pspec2metfrag.R b/R/pspec2metfrag.R index 768006b..315e8a1 100644 --- a/R/pspec2metfrag.R +++ b/R/pspec2metfrag.R @@ -15,7 +15,7 @@ extractfragments <- function(object, pspecidx=NULL) { sp <- getpspectra(object, grp=pspec) rt <- median(sp[, "rt"]) peakID <- object@pspectra[[pspec]] - if(object@sample == 1 & length(sampnames(object@xcmsSet)) == 1){ + if(object@sample[1] == 1 & length(sampnames(object@xcmsSet)) == 1){ #single sample #intIdx <- intVal; intIdx <- "maxo"; diff --git a/R/xsAnnotate.R b/R/xsAnnotate.R index fbc37dc..0d83aca 100644 --- a/R/xsAnnotate.R +++ b/R/xsAnnotate.R @@ -785,7 +785,7 @@ setMethod("findAdducts", "xsAnnotate", function(object, ppm=5, mzabs=0.015, mult object@pspectra[[1]] <- seq(1:nrow(object@groupInfo)); } - if(object@sample == 1 & length(sampnames(object@xcmsSet)) == 1){ + if(object@sample[1] == 1 & length(sampnames(object@xcmsSet)) == 1){ ##one sample case mint <- object@groupInfo[, intval]; }else{ @@ -1266,7 +1266,7 @@ setMethod("getPeaklist", "xsAnnotate", function(object, intval="into") { #generate peaktable #Check if xcmsSet contains only one sample - if(object@sample == 1 & length(sampnames(object@xcmsSet)) == 1){ + if(object@sample[1] == 1 & length(sampnames(object@xcmsSet)) == 1){ #intval is here ignored since all intensity values are already contained peaktable <- object@groupInfo; }else { diff --git a/inst/NEWS b/inst/NEWS index 0626c1f..c5bce53 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,3 +1,11 @@ +CHANGES IN VERSION 1.43.2 +------------------------- + +BUG FIXES + + o Change several && causing failure + with _R_CHECK_LENGTH_1_CONDITION_ and _R_CHECK_LENGTH_1_CONDITION_ + CHANGES IN VERSION 1.43.1 -------------------------