[med-svn] [r-bioc-summarizedexperiment] 02/05: New upstream version 1.6.5

Andreas Tille tille at debian.org
Mon Oct 2 10:12:30 UTC 2017


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

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

commit 618fed256b5705b2f13ca0c10c52f3377625323e
Author: Andreas Tille <tille at debian.org>
Date:   Mon Oct 2 12:07:09 2017 +0200

    New upstream version 1.6.5
---
 DESCRIPTION                          |   4 ++--
 R/Assays-class.R                     |  43 +++++++++++++++++++++++++----------
 R/RangedSummarizedExperiment-class.R |   1 +
 build/vignette.rds                   | Bin 209 -> 210 bytes
 inst/doc/SummarizedExperiment.html   |   2 +-
 5 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 5cb8739..eb40214 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -4,7 +4,7 @@ Description: The SummarizedExperiment container contains one or more assays,
 	each represented by a matrix-like object of numeric or other mode.
 	The rows typically represent genomic ranges of interest and the columns
 	represent samples.
-Version: 1.6.3
+Version: 1.6.5
 Encoding: UTF-8
 Author: Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès
 Maintainer: Bioconductor Package Maintainer <maintainer at bioconductor.org>
@@ -27,4 +27,4 @@ Collate: Assays-class.R SummarizedExperiment-class.R
         makeSummarizedExperimentFromDataFrame.R readKallisto.R
         saveHDF5SummarizedExperiment.R zzz.R
 NeedsCompilation: no
-Packaged: 2017-05-29 00:08:18 UTC; biocbuild
+Packaged: 2017-09-29 00:11:42 UTC; biocbuild
diff --git a/R/Assays-class.R b/R/Assays-class.R
index 292ff8e..042242a 100644
--- a/R/Assays-class.R
+++ b/R/Assays-class.R
@@ -227,23 +227,34 @@ setReplaceMethod("[", "Assays",
 
 ### rbind/cbind
 
-.bind_Assays <- function(lst, bind)
+### 'assays' is assumed to be an unnamed list of length >= 1
+.bind_assays <- function(assays, along.cols=FALSE)
 {
-    if (length(lst) == 0L)
+    if (length(dim(assays[[1L]])) == 2L) {
+        BINDING_FUN <- if (along.cols) "cbind" else "rbind"
+    } else {
+        BINDING_FUN <- if (along.cols) "acbind" else "arbind"
+    }
+    do.call(BINDING_FUN, assays)
+}
+
+.bind_Assays_objects <- function(objects, along.cols=FALSE)
+{
+    if (length(objects) == 0L)
         return(Assays())
-    lens <- sapply(lst, length)
+    lens <- sapply(objects, length)
     if (length(unique(lens)) != 1)
-        stop("assays must have the same length")
+        stop("the objects to bind must have the same number of assays")
     len1 <- lens[1L]
     if (len1 == 0L)
         return(Assays())
-    var <- lapply(lst, names)
+    var <- lapply(objects, names)
     uvar <- unique(unlist(var))
     if (is.null(uvar)) {
         ## no names, match by position
         res <- lapply(seq_len(len1), function(index) {
-            e1 <- lapply(lst, "[[", index)
-            do.call(bind, e1)
+            assays <- lapply(objects, "[[", index)
+            .bind_assays(assays, along.cols=along.cols)
         })
     } else {
         ## match by name
@@ -252,20 +263,28 @@ setReplaceMethod("[", "Assays",
         if (!ok)
             stop("assays must have the same names()")
         res <- lapply(uvar, function(index) {
-            e1 <- lapply(lst, "[[", index)
-            do.call(bind, e1)
+            assays <- lapply(objects, "[[", index)
+            .bind_assays(assays, along.cols=along.cols)
         })
         names(res) <- uvar
     }
-    as(SimpleList(res), class(lst[[1L]]))
+    as(SimpleList(res), class(objects[[1L]]))
 }
 
 setMethod("rbind", "Assays",
-    function(..., deparse.level=1) .bind_Assays(unname(list(...)), arbind)
+    function(..., deparse.level=1)
+    {
+        objects <- unname(list(...))
+        .bind_Assays_objects(objects, along.cols=FALSE)
+    }
 )
 
 setMethod("cbind", "Assays",
-    function(..., deparse.level=1) .bind_Assays(unname(list(...)), acbind)
+    function(..., deparse.level=1)
+    {
+        objects <- unname(list(...))
+        .bind_Assays_objects(objects, along.cols=TRUE)
+    }
 )
 
 ### Having "arbind" and "acbind" methods for Matrix objects will make rbind()
diff --git a/R/RangedSummarizedExperiment-class.R b/R/RangedSummarizedExperiment-class.R
index 9e7945f..e8d9dc7 100644
--- a/R/RangedSummarizedExperiment-class.R
+++ b/R/RangedSummarizedExperiment-class.R
@@ -199,6 +199,7 @@ setAs("RangedSummarizedExperiment", "SummarizedExperiment",
 {
     partitioning <- PartitioningByEnd(integer(length(from)), names=names(from))
     rowRanges <- relist(GRanges(), partitioning)
+    mcols(rowRanges) <- mcols(from)
     .new_RangedSummarizedExperiment(from at assays,
                                     rowRanges,
                                     from at colData,
diff --git a/build/vignette.rds b/build/vignette.rds
index ea870a4..a8de930 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/doc/SummarizedExperiment.html b/inst/doc/SummarizedExperiment.html
index 650abb5..beb8368 100644
--- a/inst/doc/SummarizedExperiment.html
+++ b/inst/doc/SummarizedExperiment.html
@@ -106,7 +106,7 @@ document.addEventListener("DOMContentLoaded", function() {
 <p><code>RangedSummarizedExperiment</code> is the child of the <code>SummarizedExperiment</code> class which means that all the methods on <code>SummarizedExperiment</code> also work on a <code>RangedSummarizedExperiment</code>.</p>
 <p>The fundamental difference between the two classes is that the rows of a <code>RangedSummarizedExperiment</code> object represent genomic ranges of interest instead of a <code>DataFrame</code> of features. The <code>RangedSummarizedExperiment</code> ranges are described by a <code>GRanges</code> or a <code>GRangesList</code> object, accessible using the <code>rowRanges()</code> function.</p>
 <p>The following graphic displays the class geometry and highlights the vertical (column) and horizontal (row) relationships.</p>
-<p><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4KCjxzdmcgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwLjAgMC4wIDcwNS41NTM4MDU3NzQyNzgyIDYwMi4xMTU0ODU1NjQzMDQ0IiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGNsaXBQYXRoIGlkPSJwLjAiPjxwYXRoIGQ9Im0wIDBsNzA1LjU1MzgzIDBsMCA2MDIuMTE1NWwtNzA1LjU1MzgzIDBsMCAtNjAyL [...]
+<p><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4KCjxzdmcgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwLjAgMC4wIDcwNS41NTM4MDU3NzQyNzgyIDYwMi4xMTU0ODU1NjQzMDQ0IiBmaWxsPSJub25lIiBzdHJva2U9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGNsaXBQYXRoIGlkPSJwLjAiPjxwYXRoIGQ9Im0wIDBsNzA1LjU1MzgzIDBsMCA2MDIuMTE1NWwtNzA1LjU1MzgzIDBsMCAtNjAyL [...]
 <div id="assays" class="section level2">
 <h2><span class="header-section-number">2.1</span> Assays</h2>
 <p>The <code>airway</code> package contains an example dataset from an RNA-Seq experiment of read counts per gene for airway smooth muscles. These data are stored in a <code>RangedSummarizedExperiment</code> object which contains 8 different experimental and assays 64,102 gene transcripts.</p>

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



More information about the debian-med-commit mailing list