[med-svn] [r-bioc-biobase] 01/03: Imported Upstream version 2.28.0

Andreas Tille tille at debian.org
Sat May 9 07:02:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-bioc-biobase.

commit 97d8a529ee4af3d438285a7625ba2433e7d247a4
Author: Andreas Tille <tille at debian.org>
Date:   Sat May 9 08:46:15 2015 +0200

    Imported Upstream version 2.28.0
---
 DESCRIPTION                            |   5 +++--
 NAMESPACE                              |   2 +-
 NEWS                                   |  13 ++++++++----
 R/methods-AnnotatedDataFrame.R         |  28 +++++++++++++++++++++++++-
 R/methods-MIAME.R                      |   5 +++--
 R/tools.R                              |  11 +----------
 R/vignettes.R                          |   1 -
 build/vignette.rds                     | Bin 344 -> 343 bytes
 inst/CITATION                          |  22 ++++++++++-----------
 inst/doc/BiobaseDevelopment.pdf        | Bin 246497 -> 246480 bytes
 inst/doc/ExpressionSetIntroduction.pdf | Bin 174973 -> 174953 bytes
 inst/doc/esApply.pdf                   | Bin 93273 -> 93292 bytes
 man/cache.Rd                           |  12 +++++------
 man/read.AnnotatedDataFrame.Rd         |  35 +++++++++++++++++++++++++++------
 man/rowQ.Rd                            |   2 +-
 15 files changed, 91 insertions(+), 45 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 53702b3..468e6f1 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: Biobase
 Title: Biobase: Base functions for Bioconductor
-Version: 2.26.0
+Version: 2.28.0
 Author: R. Gentleman, V. Carey, M. Morgan, S. Falcon
 Description: Functions that are needed by many other packages or which
         replace R functions.
@@ -21,4 +21,5 @@ Collate: tools.R strings.R environment.R vignettes.R packages.R
         updateObjectTo.R methods-ScalarObject.R zzz.R
 LazyLoad: yes
 biocViews: Infrastructure
-Packaged: 2014-10-14 00:25:57 UTC; biocbuild
+NeedsCompilation: yes
+Packaged: 2015-04-17 02:06:16 UTC; biocbuild
diff --git a/NAMESPACE b/NAMESPACE
index 9b54676..bcdf777 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -57,4 +57,4 @@ export(Aggregate, addVigs2WinMenu, anyMissing,
        readExpressionSet, read.AnnotatedDataFrame, read.MIAME, MIAME,
        selectSome, strbreak, subListExtract, testBioCConnection,
        lcSuffix, lcPrefix, lcPrefixC, updateOldESet, userQuery,
-       validMsg)
+       validMsg, write.AnnotatedDataFrame)
diff --git a/NEWS b/NEWS
index 19c1801..14e91fb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,10 @@
-CHANGES IN VERSION 2.21
+CHANGES IN VERSION 2.27
 -----------------------
 
-BUG FIXES
+NEW FEATURES
 
-    o Updating an AnnotatedDataFrame no longer duplicates metadata
-      from partially matching column names.
+    o Add write.AnnotatedDataFrame function; request of
+    samuel.granjeaud
 
 CHANGES IN VERSION 2.21
 -----------------------
@@ -16,6 +16,11 @@ USER VISIBLE CHANGES
     o NChannelSet validity requires all assayDataElementNames() to be
       levels in varMetadata()$channel.
 
+BUG FIXES
+
+    o Updating an AnnotatedDataFrame no longer duplicates metadata
+      from partially matching column names.
+
 CHANGES IN VERSION 2.19
 -----------------------
 
diff --git a/R/methods-AnnotatedDataFrame.R b/R/methods-AnnotatedDataFrame.R
index 0fae35c..368f885 100644
--- a/R/methods-AnnotatedDataFrame.R
+++ b/R/methods-AnnotatedDataFrame.R
@@ -448,7 +448,7 @@ read.AnnotatedDataFrame <-
     ## read varMetadata section (the lines with leading "#")
     vmd = grep(paste0("^",  varMetadata.char),
       readLines(filename), value=TRUE)
-    svmd = strsplit(vmd, ":")
+    svmd = strsplit(vmd, ": *")
     varNames = sub("^# *", "", sapply(svmd, "[", 1L))
     varMetad = sapply(svmd, "[", 2L)
 
@@ -469,6 +469,32 @@ read.AnnotatedDataFrame <-
     
 }
 
+write.AnnotatedDataFrame <-
+    function(x, file="", varMetadata.char="#", ..., append=FALSE,
+             fileEncoding="")
+{
+    ## file handling from write.table
+    if (file == "") 
+        file <- stdout()
+    else if (is.character(file)) {
+        file <- if (nzchar(fileEncoding)) 
+            file(file, ifelse(append, "a", "w"), encoding = fileEncoding)
+        else file(file, ifelse(append, "a", "w"))
+        on.exit(close(file))
+    } else if (!isOpen(file, "w")) {
+        open(file, "w")
+        on.exit(close(file))
+    }
+    if (!inherits(file, "connection")) 
+        stop("'file' must be a character string or connection")
+
+    writeLines(sprintf("%s %s: %s", varMetadata.char, varLabels(x),
+                       varMetadata(x)$labelDescription),
+               file)
+    write.table(pData(x), file, append=append, fileEncoding=fileEncoding,
+                ...)
+}
+
 setMethod("AnnotatedDataFrame",
           signature(data="missing", varMetadata="missing"),
 
diff --git a/R/methods-MIAME.R b/R/methods-MIAME.R
index 72ce938..b982870 100644
--- a/R/methods-MIAME.R
+++ b/R/methods-MIAME.R
@@ -131,8 +131,9 @@ read.MIAME <- function(filename=NULL,widget=getOption("BioC")$Base$use.widgets,.
    }
    else
       if(widget) {
-         require(tkWidgets) || stop("Requires tkWidgets")
-         tmp <- tkMIAME()
+         requireNamespace("tkWidgets", quietly=TRUE) ||
+             stop("Requires tkWidgets")
+         tmp <- tkWidgets::tkMIAME()
          MIAME(name=tmp$ExperimentName, lab=tmp$LabName,
                contact=tmp$ContactInfo, title=tmp$ExperimentTitle,
                abstract=tmp$Description, url=tmp$URL)
diff --git a/R/tools.R b/R/tools.R
index f9347a2..245fce9 100644
--- a/R/tools.R
+++ b/R/tools.R
@@ -232,18 +232,9 @@ matchpt <- function(x, y) {
 }
 
 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-cache <- function(expr, dir=".", prefix="tmp_R_cache_", name) {
+cache <- function(expr, dir=".", prefix="tmp_R_cache_") {
     pexpr <- parse(text=deparse(substitute(expr)))
     pexpr <- as.list(pexpr[[1]])
-    useOld <- (pexpr[[1]] != "<-" || !missing(name))
-    if  (useOld) { ## compatibility layer
-        if (missing(name))
-          name <- expr
-        if (pexpr[[1]] != "<-" && !missing(dir))
-          expr <- dir
-        cache__usage <- cache_old
-        return(cache__usage(name, expr))
-    }
     name <- as.character(pexpr[[2]])
     RHS <- pexpr[[3]]
     cachefile <- file.path(dir, paste0(prefix, name, ".RData"))
diff --git a/R/vignettes.R b/R/vignettes.R
index 81139db..565ff82 100644
--- a/R/vignettes.R
+++ b/R/vignettes.R
@@ -2,7 +2,6 @@
 ## uses tools.R
 
 getPkgVigs = function(package=NULL) {
-  require("tools", quietly=TRUE) || stop("Requires the tools package")
   pkgs <- .packages()
   if( !is.null(package) ) {
     if( !is.character(package) )
diff --git a/build/vignette.rds b/build/vignette.rds
index 0cf9324..a8c31e8 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/CITATION b/inst/CITATION
index 4a8d0ab..1c2f680 100644
--- a/inst/CITATION
+++ b/inst/CITATION
@@ -1,14 +1,14 @@
 citEntry(entry="Article",
-  author ="Robert C Gentleman and Vincent J. Carey and Douglas M. Bates and others",
-title ="Bioconductor: Open software development for computational biology and bioinformatics",
-  journal =      "Genome Biology",
-  volume =       "5",
-  year =         "2004", 
-  pages =        "R80",
-  url =          "http://genomebiology.com/2004/5/10/R80",
+  author = "Huber, W.  and Carey, V. J.  and Gentleman, R.  and Anders, S.  and Carlson, M.  and Carvalho, B. S.  and Bravo, H. C.  and Davis, S.  and Gatto, L.  and Girke, T.  and Gottardo, R.  and Hahne, F.  and Hansen, K. D.  and Irizarry, R. A.  and Lawrence, M.  and Love, M. I.  and MacDonald, J.  and Obenchain, V.  and {Ole\'s}, A. K.  and {Pag\`es}, H.  and Reyes, A.  and Shannon, P.  and Smyth, G. K.  and Tenenbaum, D.  and Waldron, L.  and Morgan, M. ",
+  title = "{O}rchestrating high-throughput genomic analysis with {B}ioconductor",
+  journal = "Nature Methods",
+  year = "2015",
+  volume = "12",
+  number = "2",
+  pages = "115--121",
+  url = "http://www.nature.com/nmeth/journal/v12/n2/full/nmeth.3252.html",
   textVersion = paste(
- "Bioconductor: Open software development for computational biology",
- "and bioinformatics", "R. Gentleman, V. J. Carey, D. M. Bates, B.Bolstad, 
-  M. Dettling, S. Dudoit, B. Ellis, L. Gautier, Y. Ge, and others",
-  "2004, Genome Biology, Vol. 5, R80")
+   "Orchestrating high-throughput genomic analysis with Bioconductor.",
+   "W. Huber, V.J. Carey, R. Gentleman, ..., M. Morgan",
+   "Nature Methods, 2015:12, 115.")
 )
diff --git a/inst/doc/BiobaseDevelopment.pdf b/inst/doc/BiobaseDevelopment.pdf
index 98ec3c9..1f9e815 100644
Binary files a/inst/doc/BiobaseDevelopment.pdf and b/inst/doc/BiobaseDevelopment.pdf differ
diff --git a/inst/doc/ExpressionSetIntroduction.pdf b/inst/doc/ExpressionSetIntroduction.pdf
index 7ebbb9e..9b27bc8 100644
Binary files a/inst/doc/ExpressionSetIntroduction.pdf and b/inst/doc/ExpressionSetIntroduction.pdf differ
diff --git a/inst/doc/esApply.pdf b/inst/doc/esApply.pdf
index 56287aa..1b6e310 100644
Binary files a/inst/doc/esApply.pdf and b/inst/doc/esApply.pdf differ
diff --git a/man/cache.Rd b/man/cache.Rd
index b866326..6604d5e 100644
--- a/man/cache.Rd
+++ b/man/cache.Rd
@@ -8,7 +8,7 @@
 }
 
 \usage{
-    cache(expr, dir=".", prefix="tmp_R_cache_", name)
+    cache(expr, dir=".", prefix="tmp_R_cache_")
 }
 \arguments{
     \item{expr}{An expression of the form \code{LHS <- RHS}, Where
@@ -22,8 +22,6 @@
     \item{prefix}{A string giving the prefix to use when naming and
       searching for cache files.  The default is \code{"tmp_R_cache_"}}
 
-    \item{name}{Unused.  This argument is present as a compatibility
-    layer for the deprecated calling convention.}
 }
 
 \details{
@@ -61,10 +59,12 @@
 }
 
 \section{Note}{
+
   The first version of this function had a slightly different interface
-  which is now deprecated (but still functional).  The old version has
-  arguments \code{name} and \code{expr} and the intended usage is:
-  \code{foo <- cache("foo", expr)}.
+  which is no longer functional.  The old version has arguments
+  \code{name} and \code{expr} and the intended usage is: \code{foo <-
+  cache("foo", expr)}.
+
 }
 
 \examples{
diff --git a/man/read.AnnotatedDataFrame.Rd b/man/read.AnnotatedDataFrame.Rd
index cc324a2..c2f84ee 100644
--- a/man/read.AnnotatedDataFrame.Rd
+++ b/man/read.AnnotatedDataFrame.Rd
@@ -1,11 +1,15 @@
 \name{read.AnnotatedDataFrame}
 \alias{read.AnnotatedDataFrame}
+\alias{write.AnnotatedDataFrame}
 \concept{AnnotatedDataFrame}
 
-\title{Read 'AnnotatedDataFrame'}
+\title{Read and write 'AnnotatedDataFrame'}
 
 \description{
-  Create an instance of class AnnotatedDataFrame by reading a file.
+
+  Create an instance of class AnnotatedDataFrame by reading a file, or
+  save an AnnotatedDataFrame to a file.
+
 }
 
 \usage{
@@ -15,26 +19,33 @@ read.AnnotatedDataFrame(filename, path,
      varMetadata.char="#",
      widget = getOption("BioC")$Base$use.widgets,
      sampleNames = character(0), ...) 
+write.AnnotatedDataFrame(x, file="", varMetadata.char="#", ...,
+     append=FALSE, fileEncoding="")
 }
 
 \arguments{
-  \item{filename}{file or connection from which to read.}
+  \item{filename, file}{file or connection from which to read / write.}
+  \item{x}{An instance of class \code{AnnotatedDataFrame}.}
   \item{path}{(optional) directory in which to find \code{filename}.}
   \item{row.names}{this argument gets passed on to
     \code{\link{read.table}} and will be used for the row names of the
     phenoData slot.}
   \item{varMetadata.char}{lines beginning with this character are used
     for the \code{varMetadata} slot. See examples.}
-  \item{sep, header, quote, stringsAsFactors, ...}{further arguments that get passed on to
-    \code{\link{read.table}}.}
+  \item{sep, header, quote, stringsAsFactors, ...}{further arguments
+    that get passed on to \code{\link{read.table}} or \code{write.table}.}
   \item{widget}{logical. Currently this is \emph{not} implemented, and
     setting this option to \code{TRUE} will result in an error. In a
     precursor of this function, \code{read.phenoData}, this option could
     be used to open an interactive GUI widget for entering the data.}
   \item{sampleNames}{optional argument that could be used in conjunction
     with \code{widget}; do not use.}
+  \item{append, fileEncoding}{Arguments as described in
+    \code{\link{write.table}}}.
 }
+
 \details{
+
   The function \code{\link{read.table}} is used to read
   \code{pData}. The argument \code{varMetadata.char} is passed on to
   that function as its argument \code{comment.char}.
@@ -43,10 +54,20 @@ read.AnnotatedDataFrame(filename, path,
   The format is of the form: \code{# variable: textual explanation of the
     variable, units, measurement method, etc.} (assuming that \code{#}
   is the value of \code{varMetadata.char}). See also examples.
+
+  \code{write.AnnotatedDataFrame} outputs \code{varLabels} and
+  \code{varMetadata(x)$labelDescription} as commented header lines, and
+  \code{pData(x)} as a with \code{write.table}.
+
 }
 
 \value{
-   An instance of class \code{AnnotatedDataFrame}
+
+  \code{read.AnnotatedDataFrame}: An instance of class
+  \code{AnnotatedDataFrame}
+
+  \code{write.AnnotatedDataFrame}: \code{NULL}, invisibly.
+
 }
 
 \author{Martin Morgan <mtmorgan at fhcrc.org> and Wolfgang Huber,
@@ -64,6 +85,8 @@ adf
 head(pData(adf))
 head(noquote(readLines(exampleFile)), 11)
 
+write.AnnotatedDataFrame(adf)           # write to console by default
+
 }
 \keyword{file}
 \keyword{manip}
diff --git a/man/rowQ.Rd b/man/rowQ.Rd
index 6f1f807..5b42af7 100644
--- a/man/rowQ.Rd
+++ b/man/rowQ.Rd
@@ -20,7 +20,7 @@ rowMin(imat)
   \item{which}{An integer indicating which order statistic should be returned.}
 }
 \details{
- \code{rowMax}, \code{rowMin} and \code{rowMedians} simply call \code{rowQ}
+ \code{rowMax} and \code{rowMin} simply call \code{rowQ}
 with the appropriate argument set. 
 
  The argument \code{which} takes values between 1, for the minimum per row,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-biobase.git



More information about the debian-med-commit mailing list