diff --git a/DESCRIPTION b/DESCRIPTION index 69ccebd..6ac3c1a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: sva Title: Surrogate Variable Analysis -Version: 3.13.2 +Version: 3.13.3 Author: Jeffrey T. Leek , W. Evan Johnson , Hilary S. Parker , Elana J. Fertig , Andrew E. Jaffe , John D. Storey @@ -25,17 +25,18 @@ Description: The sva package contains functions for removing batch reproducibility, see (Leek and Storey 2007 PLoS Genetics, 2008 PNAS or Leek et al. 2011 Nat. Reviews Genetics). Maintainer: Jeffrey T. Leek , John D. Storey - -Depends: + , W. Evan Johnson +Depends: R (>= 2.8), mgcv, genefilter -Suggests: +Suggests: limma, pamr, bladderbatch, BiocStyle, - zebrafishRNASeq + zebrafishRNASeq, + testthat License: Artistic-2.0 biocViews: Microarray, StatisticalMethod, Preprocessing, MultipleComparison, Sequencing, RNASeq, BatchEffect, Normalization diff --git a/R/ComBat.R b/R/ComBat.R index c7f866e..4c74349 100644 --- a/R/ComBat.R +++ b/R/ComBat.R @@ -17,8 +17,8 @@ #' ComBat <- function(dat, batch, mod=NULL, par.prior=TRUE,prior.plots=FALSE) { - # make batch a factor and make a set of indicators for batch + if(length(dim(batch))>1){stop("This version of ComBat only allows one batch variable")} ## to be updated soon! batch <- as.factor(batch) batchmod <- model.matrix(~-1+batch) cat("Found",nlevels(batch),'batches\n') @@ -42,11 +42,11 @@ ComBat <- function(dat, batch, mod=NULL, par.prior=TRUE,prior.plots=FALSE) { # Check if the design is confounded if(qr(design)$rank(n.batch+1)){ - if((qr(design[,-c(1:n.batch)])$rank