[med-svn] [r-bioc-summarizedexperiment] 10/12: New upstream version 1.6.3
Andreas Tille
tille at debian.org
Mon Oct 2 09:54:52 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 28bc7c1db76af330cc707ca7cf2caeb8136f789d
Author: Andreas Tille <tille at debian.org>
Date: Mon Oct 2 11:52:32 2017 +0200
New upstream version 1.6.3
---
DESCRIPTION | 30 +
NAMESPACE | 123 +
NEWS | 120 +
NOTES | 35 +
R/Assays-class.R | 377 +++
R/RangedSummarizedExperiment-class.R | 572 ++++
R/SummarizedExperiment-class.R | 844 ++++++
R/coverage-methods.R | 15 +
R/findOverlaps-methods.R | 42 +
R/inter-range-methods.R | 22 +
R/intra-range-methods.R | 79 +
R/makeSummarizedExperimentFromDataFrame.R | 32 +
R/makeSummarizedExperimentFromExpressionSet.R | 265 ++
R/nearest-methods.R | 117 +
R/readKallisto.R | 196 ++
R/saveHDF5SummarizedExperiment.R | 127 +
R/zzz.R | 2 +
build/vignette.rds | Bin 0 -> 209 bytes
debian/README.test | 15 -
debian/changelog | 61 -
debian/compat | 1 -
debian/control | 30 -
debian/copyright | 107 -
debian/docs | 1 -
debian/patches/series | 1 -
.../skip_test_needing_not_packaged_database.patch | 54 -
debian/rules | 4 -
debian/source/format | 1 -
debian/tests/control | 3 -
debian/tests/run-unit-test | 6 -
debian/watch | 3 -
inst/doc/SummarizedExperiment.R | 101 +
inst/doc/SummarizedExperiment.Rmd | 345 +++
inst/doc/SummarizedExperiment.html | 541 ++++
inst/extdata/kallisto/abundance.h5 | Bin 0 -> 1086722 bytes
inst/extdata/kallisto/abundance.tsv | 2859 ++++++++++++++++++++
inst/extdata/kallisto/abundance.txt | 16 +
inst/extdata/kallisto/run_info.json | 8 +
inst/scripts/Find_and_update_objects/README | 68 +
.../collect_rda_objects_to_update.R | 133 +
.../data_store_RDA_OBJECTS_TO_UPDATE | 30 +
.../pkgs_RDA_OBJECTS_TO_UPDATE | 9 +
.../Find_and_update_objects/scan_rda_files.R | 68 +
.../Find_and_update_objects/update_rda_objects.R | 70 +
inst/unitTests/test_Assays-class.R | 88 +
.../test_RangedSummarizedExperiment-class.R | 375 +++
inst/unitTests/test_SummarizedExperiment-class.R | 339 +++
inst/unitTests/test_coverage-methods.R | 56 +
inst/unitTests/test_findOverlaps-methods.R | 92 +
inst/unitTests/test_inter-range-methods.R | 52 +
inst/unitTests/test_intra-range-methods.R | 94 +
.../test_makeSummarizedExperimentFromDataFrame.R | 56 +
...est_makeSummarizedExperimentFromExpressionSet.R | 187 ++
inst/unitTests/test_nearest-methods.R | 70 +
man/Assays-class.Rd | 172 ++
man/RangedSummarizedExperiment-class.Rd | 335 +++
man/SummarizedExperiment-class.Rd | 454 ++++
man/coverage-methods.Rd | 80 +
man/findOverlaps-methods.Rd | 105 +
man/inter-range-methods.Rd | 95 +
man/intra-range-methods.Rd | 151 ++
man/makeSummarizedExperimentFromDataFrame.Rd | 87 +
man/makeSummarizedExperimentFromExpressionSet.Rd | 112 +
man/nearest-methods.Rd | 149 +
man/readKallisto.Rd | 120 +
man/saveHDF5SummarizedExperiment.Rd | 144 +
tests/run_unitTests.R | 2 +
vignettes/SummarizedExperiment.Rmd | 345 +++
68 files changed, 11006 insertions(+), 287 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..5cb8739
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,30 @@
+Package: SummarizedExperiment
+Title: SummarizedExperiment container
+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
+Encoding: UTF-8
+Author: Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès
+Maintainer: Bioconductor Package Maintainer <maintainer at bioconductor.org>
+biocViews: Genetics, Infrastructure, Sequencing, Annotation, Coverage,
+ GenomeAnnotation
+Depends: R (>= 3.2), methods, GenomicRanges (>= 1.27.22), Biobase,
+ DelayedArray (>= 0.1.9)
+Imports: utils, stats, tools, Matrix, BiocGenerics (>= 0.15.3),
+ S4Vectors (>= 0.13.13), IRanges (>= 2.7.2), GenomeInfoDb (>=
+ 1.11.4)
+Suggests: annotate, AnnotationDbi, hgu95av2.db, GenomicFeatures,
+ TxDb.Hsapiens.UCSC.hg19.knownGene, BiocStyle, knitr, rmarkdown,
+ digest, jsonlite, rhdf5, HDF5Array (>= 1.4.8), airway, RUnit
+VignetteBuilder: knitr
+License: Artistic-2.0
+Collate: Assays-class.R SummarizedExperiment-class.R
+ RangedSummarizedExperiment-class.R intra-range-methods.R
+ inter-range-methods.R coverage-methods.R findOverlaps-methods.R
+ nearest-methods.R makeSummarizedExperimentFromExpressionSet.R
+ makeSummarizedExperimentFromDataFrame.R readKallisto.R
+ saveHDF5SummarizedExperiment.R zzz.R
+NeedsCompilation: no
+Packaged: 2017-05-29 00:08:18 UTC; biocbuild
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..eaee9f8
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1,123 @@
+import(methods)
+importFrom(utils, read.delim, .DollarNames)
+importFrom(stats, setNames)
+importFrom(tools, file_path_as_absolute)
+importClassFrom(Matrix, Matrix) # for the "acbind" and "arbind" methods
+import(BiocGenerics)
+import(S4Vectors)
+import(IRanges)
+import(GenomeInfoDb)
+import(GenomicRanges)
+import(Biobase)
+import(DelayedArray)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Export S4 classes
+###
+
+exportClasses(
+ Assays, ShallowData, ShallowSimpleListAssays,
+ SummarizedExperiment,
+ RangedSummarizedExperiment
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Export S4 methods for generics not defined in SummarizedExperiment
+###
+
+exportMethods(
+ length, names, "names<-",
+ dim, dimnames, "dimnames<-",
+ "[", "[<-", "[[", "[[<-", "$", "$<-",
+ as.data.frame,
+ coerce,
+ show,
+ c,
+ merge,
+ Compare,
+
+ ## Generics defined in BiocGenerics:
+ cbind, rbind,
+ duplicated, match,
+ is.unsorted, order, rank, sort,
+ start, "start<-", end, "end<-", width, "width<-",
+ strand, "strand<-",
+ updateObject,
+
+ ## Generics defined in S4Vectors:
+ "metadata<-",
+ mcols, "mcols<-",
+ elementMetadata, "elementMetadata<-",
+ values, "values<-",
+ extractROWS, replaceROWS,
+ subset,
+ pcompare,
+
+ ## Generics defined in IRanges:
+ ranges, "ranges<-",
+ shift, narrow, resize, flank, promoters, restrict, trim,
+ isDisjoint, disjointBins,
+ coverage,
+ findOverlaps,
+ precede, follow, nearest, distance, distanceToNearest,
+ acbind, arbind,
+
+ ## Generics defined in GenomeInfoDb:
+ seqinfo, "seqinfo<-",
+ seqnames, "seqnames<-",
+
+ ## Generics defined in DelayedArray:
+ rowRanges, realize
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Export non-generic functions
+###
+
+export(
+ Assays,
+ .DollarNames.SummarizedExperiment,
+ .DollarNames.RangedSummarizedExperiment,
+ makeSummarizedExperimentFromExpressionSet,
+ makeSummarizedExperimentFromDataFrame,
+ naiveRangeMapper, probeRangeMapper, geneRangeMapper,
+ readKallisto, readKallistoBootstrap, KALLISTO_ASSAYS,
+ saveHDF5SummarizedExperiment, loadHDF5SummarizedExperiment
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Export S4 generics defined in SummarizedExperiment + export corresponding
+### methods
+###
+
+export(
+ SummarizedExperiment,
+ "rowRanges<-",
+ rowData, "rowData<-",
+ colData, "colData<-",
+ assayNames, "assayNames<-",
+ assays, "assays<-",
+ assay, "assay<-"
+)
+
+### Exactly the same list as above.
+exportMethods(
+ SummarizedExperiment,
+ "rowRanges<-",
+ rowData, "rowData<-",
+ colData, "colData<-",
+ assayNames, "assayNames<-",
+ assays, "assays<-",
+ assay, "assay<-"
+)
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Register S3 methods
+###
+
+S3method(.DollarNames, SummarizedExperiment)
+S3method(.DollarNames, RangedSummarizedExperiment)
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..cc48bc3
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,120 @@
+CHANGES IN VERSION 1.6.1
+------------------------
+
+BUG FIXES
+
+ o '$' completion on SummarizedExperiment works in RStudio and on
+ RangedSummarizedExperiment.
+
+CHANGES IN VERSION 1.6.0
+------------------------
+
+NEW FEATURES
+
+ o Add saveHDF5SummarizedExperiment() and loadHDF5SummarizedExperiment() for
+ saving/loading HDF5-based SummarizedExperiment objects to/from disk.
+
+DEPRECATED AND DEFUNCT
+
+ o Remove SummarizedExperiment0 class (was introduced to ease transition
+ from old SummarizedExperiment class defined in GenomicRanges to new
+ RangedSummarizedExperiment class defined in SummarizedExperiment package).
+
+
+CHANGES IN VERSION 1.4.0
+------------------------
+
+NEW FEATURES
+
+ o Add makeSummarizedExperimentFromDataFrame() function.
+
+ o Add "acbind" and "arbind" methods for Matrix objects.
+
+SIGNIFICANT USER-VISIBLE CHANGES
+
+ o Speed up "cbind" method for SummarizedExperiment objects based on a
+ suggestion by Peter Hickey.
+
+DEPRECATED AND DEFUNCT
+
+ o Remove exptData() getter and setter (were defunct in BioC 3.3).
+
+BUG FIXES
+
+
+CHANGES IN VERSION 1.2.0
+------------------------
+
+NEW FEATURES
+
+ o Add 'rowData' argument to SummarizedExperiment() constructor. This allows
+ the user to supply the row data at construction time.
+
+ o The SummarizedExperiment() constructor function and the assay() setter
+ now both take any matrix-like object as long as the resulting
+ SummarizedExperiment object is valid.
+
+ o Support r/cbind'ing of SummarizedExperiment objects with assays of
+ arbitrary dimensions (based on a patch by Pete Hickey).
+
+ o Add "is.unsorted" method for RangedSummarizedExperiment objects.
+
+ o NULL colnames() supported during SummarizedExperiment construction.
+
+ o readKallisto() warns early when files need names.
+
+ o base::rank() gained a new 'ties.method="last"' option and base::order()
+ a new argument ('method') in R 3.3. Thus so do the "rank" and "order"
+ methods for RangedSummarizedExperiment objects.
+
+SIGNIFICANT USER-VISIBLE CHANGES
+
+ o Re-introduce the rowData() accessor (was defunt in BioC 3.2) as an alias
+ for mcols() and make it the preferred way to access the row data. There
+ is now a pleasant symmetry between rowData and colData.
+
+ o Rename SummarizedExperiment0 class -> SummarizedExperiment.
+
+ o Improved vignette.
+
+ o Remove updateObject() method for "old" SummarizedExperiment objects.
+
+DEPRECATED AND DEFUNCT
+
+ o exptData() is now defunct, metadata() should be used instead.
+
+BUG FIXES
+
+ o Fix bug in "sort" method for RangedSummarizedExperiment objects when
+ 'ignore.strand=TRUE' (the argument was ignored).
+
+ o Fix 2 bugs when r/cbind'ing SummarizedExperiment objects:
+ - r/cbind'ing assays without names would return only the first element.
+ See https://stat.ethz.ch/pipermail/bioc-devel/2015-November/008318.html
+ - r/cbind'ing assays with names in different order would stop() with
+ 'Assays must have the same names()"
+
+ o Fix validity method for SummarizedExperiment objects reporting incorrect
+ numbers when the nb of cols in assay(x) doesn't match the nb of rows in
+ colData(x).
+
+ o assay colnames() must agree with colData rownames()
+
+ o Fix bug where assays(se, withDimnames=TRUE) was dropping the dimnames of
+ the 3rd and higher-order dimensions of the assays. Thanks to Pete Hickey
+ for catching this and providing a patch.
+
+ o A couple of minor tweaks to the rowData() setter to make it behave
+ consistently with mcols()/elementMetadata() setters for Vector objects
+ in general.
+
+
+CHANGES IN VERSION 0.3.*
+------------------------
+
+NEW FEATURES
+
+ o readKallisto() and readKallistoBootstrap() input kallisto
+ transcript quantification output into SummarizedExperiment (and
+ other) instances.
+
diff --git a/NOTES b/NOTES
new file mode 100644
index 0000000..30ddb40
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,35 @@
+We need a mechanism to save an HDF5Array-based (or more generally
+DelayedArray-based) SummarizedExperiment object to disk.
+
+- The object can have more than 1 assay. Even though most of the time these
+ assays are either all in memory (e.g. ordinary arrays or data frames) or all
+ on disk and using the same backend (i.e. all HDF5-based DelayedArray
+ objects), they can be a mix of in-memory and on-disk assays. Even a given
+ assay can use more than 1 kind of on-disk backend. For example it could be
+ the result of adding an HDF5-based DelayedArray object with a DelayedArray
+ object based on another backend. Since the addition of DelayedArray objects
+ is delayed, the result of this addition is a DelayedArray object with mixed
+ backends.
+
+- Standard mechanisms save() and saveRDS() cannot handle this complexity.
+
+- We need a mechanism that produces several files: one .rda (or .rds)
+ file containing the result of calling save() (or saveRDS()) on the
+ object + all the files (e.g. HDF5) containing the on-disk assay data.
+ The files containing the on-disk assay data can be a mix of HDF5 files
+ and other formats.
+ How should these files be bundled together? By putting them together in a
+ destination folder? By creating a tarball of this folder? Should the creation
+ of the tarball be left to the user or should the save function create it?
+
+- Should the on-disk assays with delayed operations on them be "realized"
+ before the SummarizedExperiment object is saved to disk? Doing this has
+ some significant advantages:
+ (1) It "simplifies" the object: it reduces the number of files needed to
+ store the on-disk assay data (only 1 file per on-disk assay).
+ (2) It relocates and reduces the size of the on-disk data needed to
+ represent the object.
+
+- Should the in-memory assays be converted into on-disk assays before saving?
+ Should this be controlled by the user?
+
diff --git a/R/Assays-class.R b/R/Assays-class.R
new file mode 100644
index 0000000..292ff8e
--- /dev/null
+++ b/R/Assays-class.R
@@ -0,0 +1,377 @@
+### =========================================================================
+### Assays objects
+### -------------------------------------------------------------------------
+###
+### The Assays API consists of:
+### (a) The Assays() constructor function.
+### (b) Lossless back and forth coercion from/to SimpleList. The coercion
+### method from SimpleList doesn't need (and should not) validate the
+### returned object.
+### (c) length, names, names<-, [[, [[<-, dim, [, [<-, rbind, cbind
+###
+### An Assays concrete subclass needs to implement (b) (required) plus
+### optionally any of the methods in (c).
+###
+### IMPORTANT: Methods that return a modified Assays object (a.k.a.
+### endomorphisms), that is, [ as well as replacement methods names<-, [[<-,
+### and [<-, must respect the copy-on-change contract. With objects that
+### don't make use of references internally, the developer doesn't need to
+### take any special action for that because it's automatically taken care of
+### by R itself. However, for objects that do make use of references internally
+### (e.g. environments, external pointers, pointer to a file on disk, etc...),
+### the developer needs to be careful to implement endomorphisms with
+### copy-on-change semantics. This can easily be achieved (and is what the
+### default methods for Assays objects do) by performaing a full (deep) copy
+### of the object before modifying it instead of trying to modify it in-place.
+### Note that the full (deep) copy is not always necessary in order to achieve
+### copy-on-change semantics: it's enough (and often preferrable for
+### performance reasons) to copy only the parts of the objects that need to
+### be modified.
+###
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Assays class
+###
+
+setClass("Assays")
+
+### Validity
+
+.valid.Assays <- function(x)
+{
+ assays <- as(x, "SimpleList", strict=FALSE)
+ if (!is(assays, "SimpleList"))
+ return("'assays' must be a SimpleList object")
+ if (length(assays) == 0L)
+ return(NULL)
+
+ ## Check dims.
+ all_dims <- sapply(assays, function(assay) dim(assay)[1:2])
+ if (any(is.na(all_dims)))
+ return(wmsg("all assays must be matrix-like objects ",
+ "with 2 (or more?) dimensions"))
+ if (!all(all_dims == all_dims[ , 1L]))
+ stop("all assays must have the same nrow and ncol")
+
+ NULL
+}
+
+setValidity2("Assays", .valid.Assays)
+
+### Constructor
+
+.normarg_assays <- function(assays)
+{
+ if (!is(assays, "SimpleList")) {
+ if (is.list(assays) || is.array(assays)) {
+ assays <- SimpleList(assays)
+ } else {
+ stop("'assays' must be a SimpleList, list or array")
+ }
+ }
+ assays
+}
+
+Assays <- function(assays=SimpleList())
+{
+ assays <- .normarg_assays(assays)
+ #ans <- as(assays, "SimpleListAssays")
+ ans <- as(assays, "ShallowSimpleListAssays")
+ #ans <- as(assays, "AssaysInEnv") # a *broken* alternative
+ validObject(ans)
+ ans
+}
+
+### Accessors
+
+.SL_get_length <- selectMethod("length", "SimpleList")
+setMethod("length", "Assays",
+ function(x)
+ {
+ assays <- as(x, "SimpleList", strict=FALSE)
+ .SL_get_length(assays)
+ }
+)
+
+.SL_get_names <- selectMethod("names", "SimpleList")
+setMethod("names", "Assays",
+ function(x)
+ {
+ assays <- as(x, "SimpleList", strict=FALSE)
+ .SL_get_names(assays)
+ }
+)
+
+.SL_set_names <- selectMethod("names<-", "SimpleList")
+setReplaceMethod("names", "Assays",
+ function(x, value)
+ {
+ assays <- as(x, "SimpleList", strict=FALSE)
+ assays <- .SL_set_names(assays, value)
+ as(assays, class(x))
+ }
+)
+
+setMethod("[[", "Assays",
+ function(x, i, j, ...)
+ {
+ assays <- as(x, "SimpleList", strict=FALSE)
+ getListElement(assays, i)
+ }
+)
+
+setReplaceMethod("[[", "Assays",
+ function(x, i, j, ..., value)
+ {
+ assays <- as(x, "SimpleList", strict=FALSE)
+ assays <- setListElement(assays, i, value)
+ ans <- as(assays, class(x))
+ validObject(ans)
+ ans
+ }
+)
+
+setMethod("dim", "Assays",
+ function(x)
+ {
+ if (length(x) == 0L)
+ return(c(0L, 0L))
+ dim(x[[1L]])
+ }
+)
+
+### 2D-Subsetting
+
+.extract_Assays_subset <- function(x, i, j)
+{
+ ## need to expand Rle's for subsetting standard matrix
+ if (!missing(i) && !missing(j)) {
+ fun <- function(x) {
+ switch(length(dim(x)),
+ stop("'[' on assays() with 1 dimension not supported"),
+ x[i, j, drop=FALSE],
+ x[i, j, , drop=FALSE],
+ x[i, j, , , drop=FALSE],
+ stop("'[' on assays() with >4 dimensions not supported"))
+ }
+ } else if (!missing(i)) {
+ fun <- function(x) {
+ switch(length(dim(x)),
+ stop("'[' on assays() with 1 dimension not supported"),
+ x[i, , drop=FALSE],
+ x[i, , , drop=FALSE],
+ x[i, , , , drop=FALSE],
+ stop("'[' on assays() with >4 dimensions not supported"))
+ }
+ } else if (!missing(j)) {
+ fun <- function(x) {
+ switch(length(dim(x)),
+ stop("'[' on assays() with 1 dimension not supported"),
+ x[, j, drop=FALSE],
+ x[, j, , drop=FALSE],
+ x[, j, , , drop=FALSE],
+ stop("'[' on assays() with >4 dimensions not supported"))
+ }
+ }
+ assays <- as(x, "SimpleList", strict=FALSE)
+ as(endoapply(assays, fun), class(x))
+}
+
+setMethod("[", "Assays",
+ function(x, i, j, ..., drop=TRUE) .extract_Assays_subset(x, i, j)
+)
+
+.replace_Assays_subset <- function(x, i, j, value)
+{
+ ## need to expand Rle's for subsetting standard matrix
+ if (!missing(i) && !missing(j)) {
+ fun <- function(x, value) {
+ switch(length(dim(x)),
+ stop("'[<-' on assays() with 1 dimension not supported"),
+ x[i, j] <- value,
+ x[i, j, ] <- value,
+ x[i, j, , ] <- value,
+ stop("'[<-' on assays() with >4 dimensions not supported"))
+ x
+ }
+ } else if (!missing(i)) {
+ fun <- function(x, value) {
+ switch(length(dim(x)),
+ stop("'[<-' on assays() with 1 dimension not supported"),
+ x[i, ] <- value,
+ x[i, , ] <- value,
+ x[i, , , ] <- value,
+ stop("'[<-' on assays() with >4 dimensions not supported"))
+ x
+ }
+ } else if (!missing(j)) {
+ fun <- function(x, value) {
+ switch(length(dim(x)),
+ stop("'[<-' on assays() with 1 dimension not supported"),
+ x[, j] <- value,
+ x[, j, ] <- value,
+ x[, j, , ] <- value,
+ stop("'[<-' on assays() with >4 dimensions not supported"))
+ x
+ }
+ }
+ a <- as(x, "SimpleList", strict=FALSE)
+ v <- as(value, "SimpleList", strict=FALSE)
+ as(mendoapply(fun, x=a, value=v), class(x))
+}
+
+setReplaceMethod("[", "Assays",
+ function(x, i, j, ..., value) .replace_Assays_subset(x, i, j, value)
+)
+
+### rbind/cbind
+
+.bind_Assays <- function(lst, bind)
+{
+ if (length(lst) == 0L)
+ return(Assays())
+ lens <- sapply(lst, length)
+ if (length(unique(lens)) != 1)
+ stop("assays must have the same length")
+ len1 <- lens[1L]
+ if (len1 == 0L)
+ return(Assays())
+ var <- lapply(lst, 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)
+ })
+ } else {
+ ## match by name
+ ok <- all(vapply(var, function(x, y) identical(sort(x), y),
+ logical(1), sort(uvar)))
+ if (!ok)
+ stop("assays must have the same names()")
+ res <- lapply(uvar, function(index) {
+ e1 <- lapply(lst, "[[", index)
+ do.call(bind, e1)
+ })
+ names(res) <- uvar
+ }
+ as(SimpleList(res), class(lst[[1L]]))
+}
+
+setMethod("rbind", "Assays",
+ function(..., deparse.level=1) .bind_Assays(unname(list(...)), arbind)
+)
+
+setMethod("cbind", "Assays",
+ function(..., deparse.level=1) .bind_Assays(unname(list(...)), acbind)
+)
+
+### Having "arbind" and "acbind" methods for Matrix objects will make rbind()
+### and cbind() work on Assays objects with Matrix list elements.
+### Maybe these methods should be defined next to the arbind() and acbind()
+### generics (which are defined in the IRanges package) but that would require
+### to make IRanges depend on the Matrix package.
+setMethod("arbind", "Matrix", function(...) rbind(...))
+setMethod("acbind", "Matrix", function(...) cbind(...))
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### SimpleListAssays class
+###
+
+### The order of inheritance is important: first Assays, then SimpleList!
+setClass("SimpleListAssays", contains=c("Assays", "SimpleList"))
+
+### Lossless back and forth coercion from/to SimpleList are automatically
+### taken care of by automatic methods defined by the methods package.
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### ShallowSimpleListAssays class
+###
+### We implement the REQUIRED coercions only.
+###
+
+.ShallowData <- setRefClass("ShallowData",
+ fields = list( data = "ANY" ))
+
+.ShallowSimpleListAssays0 <- setRefClass("ShallowSimpleListAssays",
+ fields = list( data = "SimpleList" ),
+ contains = c("ShallowData", "Assays"))
+
+setAs("SimpleList", "ShallowSimpleListAssays",
+ function(from) .ShallowSimpleListAssays0(data=from)
+)
+
+setAs("ShallowSimpleListAssays", "SimpleList", function(from) from$data)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### AssaysInEnv class
+###
+### A *broken* alternative to ShallowSimpleListAssays that does NOT respect
+### the copy-on-change contract (only provided for illustration purposes).
+###
+### We implement the REQUIRED coercions plus OPTIONAL methods: length, names,
+### names<-, [[, and [[<-.
+###
+
+setClass("AssaysInEnv",
+ contains="Assays",
+ representation(envir="environment")
+)
+
+.NAMES_SYMBOL <- ".names" # must begin with a . so is ommitted by ls()
+
+setMethod("length", "AssaysInEnv", function(x) length(x at envir) - 1L)
+
+setMethod("names", "AssaysInEnv", function(x) x at envir[[.NAMES_SYMBOL]])
+
+### Does NOT respect the copy-on-change contract!
+setReplaceMethod("names", "AssaysInEnv",
+ function(x, value)
+ {
+ value <- S4Vectors:::normalize_names_replacement_value(value, x)
+ x at envir[[.NAMES_SYMBOL]] <- value
+ x
+ }
+)
+
+setMethod("[[", "AssaysInEnv",
+ function(x, i, j, ...)
+ {
+ key <- setNames(ls(x at envir, sorted=TRUE), names(x))[[i]]
+ get(key, envir=x at envir)
+ }
+)
+
+### Does NOT respect the copy-on-change contract!
+setReplaceMethod("[[", "AssaysInEnv",
+ function(x, i, j, ..., value)
+ {
+ key <- setNames(ls(x at envir, sorted=TRUE), names(x))[[i]]
+ assign(key, value, envir=x at envir)
+ x
+ }
+)
+
+setAs("SimpleList", "AssaysInEnv",
+ function(from)
+ {
+ from <- as.list(from)
+ from_names <- names(from)
+ keys <- paste(sprintf("%09d", seq_along(from)), from_names, sep=":")
+ names(from) <- keys
+ envir <- list2env(from, parent=emptyenv())
+ envir[[.NAMES_SYMBOL]] <- from_names
+ new("AssaysInEnv", envir=envir)
+ }
+)
+
+setAs("AssaysInEnv", "SimpleList",
+ function(from)
+ SimpleList(setNames(as.list(from at envir, sorted=TRUE), names(from)))
+)
+
diff --git a/R/RangedSummarizedExperiment-class.R b/R/RangedSummarizedExperiment-class.R
new file mode 100644
index 0000000..9e7945f
--- /dev/null
+++ b/R/RangedSummarizedExperiment-class.R
@@ -0,0 +1,572 @@
+### =========================================================================
+### RangedSummarizedExperiment objects
+### -------------------------------------------------------------------------
+###
+
+
+### The 'elementMetadata' slot must contain a zero-column DataFrame at all time
+### (this is checked by the validity method). The top-level mcols are stored on
+### the rowRanges component.
+setClass("RangedSummarizedExperiment",
+ contains="SummarizedExperiment",
+ representation(
+ rowRanges="GenomicRangesORGRangesList"
+ ),
+ prototype(
+ rowRanges=GRanges()
+ )
+)
+
+### Combine the new parallel slots with those of the parent class. Make sure
+### to put the new parallel slots *first*.
+setMethod("parallelSlotNames", "RangedSummarizedExperiment",
+ function(x) c("rowRanges", callNextMethod())
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Validity.
+###
+
+### The names and mcols of a RangedSummarizedExperiment must be set on its
+### rowRanges slot, not in its NAMES and elementMetadata slots!
+.valid.RangedSummarizedExperiment <- function(x)
+{
+ if (!is.null(x at NAMES))
+ return("'NAMES' slot must be set to NULL at all time")
+ if (ncol(x at elementMetadata) != 0L)
+ return(wmsg("'elementMetadata' slot must contain a zero-column ",
+ "DataFrame at all time"))
+ rowRanges_len <- length(x at rowRanges)
+ x_nrow <- length(x)
+ if (rowRanges_len != x_nrow) {
+ txt <- sprintf(
+ "\n length of 'rowRanges' (%d) must equal nb of rows in 'x' (%d)",
+ rowRanges_len, x_nrow)
+ return(txt)
+ }
+ NULL
+}
+
+setValidity2("RangedSummarizedExperiment", .valid.RangedSummarizedExperiment)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Constructor.
+###
+
+.new_RangedSummarizedExperiment <- function(assays, rowRanges, colData,
+ metadata)
+{
+ elementMetadata <- S4Vectors:::make_zero_col_DataFrame(length(rowRanges))
+ if (!is(assays, "Assays"))
+ assays <- Assays(assays)
+ new("RangedSummarizedExperiment", rowRanges=rowRanges,
+ colData=colData,
+ assays=assays,
+ elementMetadata=elementMetadata,
+ metadata=as.list(metadata))
+}
+
+.get_colnames_from_assays <- function(assays)
+{
+ if (length(assays) == 0L)
+ return(NULL)
+ colnames(assays[[1L]])
+}
+
+.get_rownames_from_assays <- function(assays)
+{
+ if (length(assays) == 0L)
+ return(NULL)
+ rownames(assays[[1L]])
+}
+
+setGeneric("SummarizedExperiment",
+ function(assays, ...) standardGeneric("SummarizedExperiment"))
+
+setMethod("SummarizedExperiment", "SimpleList",
+ function(assays, rowData=NULL, rowRanges=GRangesList(), colData=DataFrame(),
+ metadata=list())
+{
+ if (missing(colData) && 0L != length(assays)) {
+ assay <- assays[[1]]
+ nms <- colnames(assay)
+ colData <- DataFrame(x=seq_len(ncol(assay)), row.names=nms)[, FALSE]
+ } else if (!missing(colData)) {
+ colData <- as(colData, "DataFrame")
+ if (is.null(rownames(colData)))
+ rownames(colData) <- .get_colnames_from_assays(assays)
+ }
+ ans_colnames <- rownames(colData)
+
+ if (is.null(rowData)) {
+ if (missing(rowRanges)) {
+ ans_rownames <- .get_rownames_from_assays(assays)
+ } else {
+ if (is.null(names(rowRanges)))
+ names(rowRanges) <- .get_rownames_from_assays(assays)
+ ans_rownames <- names(rowRanges)
+ }
+ } else {
+ if (!missing(rowRanges))
+ stop("only one of 'rowData' and 'rowRanges' can be specified")
+ if (is(rowData, "GenomicRangesORGRangesList")) {
+ rowRanges <- rowData
+ if (is.null(names(rowRanges)))
+ names(rowRanges) <- .get_rownames_from_assays(assays)
+ ans_rownames <- names(rowRanges)
+ } else {
+ rowData <- as(rowData, "DataFrame")
+ ans_rownames <- rownames(rowData)
+ if (is.null(ans_rownames))
+ ans_rownames <- .get_rownames_from_assays(assays)
+ }
+ }
+
+ ## validate
+ ok <- vapply(assays, function(x) {
+ colnames <- colnames(x)
+ test <- is.null(colnames) || identical(colnames, ans_colnames)
+ if (!test)
+ stop("assay colnames() must be NULL or equal colData rownames()")
+
+ rownames <- rownames(x)
+ test <- test &&
+ is.null(rownames) || identical(rownames, ans_rownames)
+ if (!test) {
+ txt <- "assay rownames() must be NULL or equal rowData rownames() /
+ rowRanges names()"
+ stop(paste(strwrap(txt, exdent=2), collapse="\n"))
+ }
+
+ test
+ }, logical(1))
+
+ assays <- Assays(assays)
+
+ if (missing(rowRanges) && !is(rowData, "GenomicRangesORGRangesList")) {
+ new_SummarizedExperiment(assays, ans_rownames, rowData, colData,
+ metadata)
+ } else {
+ .new_RangedSummarizedExperiment(assays, rowRanges, colData, metadata)
+ }
+})
+
+setMethod("SummarizedExperiment", "ANY",
+ function(assays, ...)
+{
+ if (is.matrix(assays) && is.list(assays))
+ ## special case -- matrix of lists
+ assays <- list(assays)
+ SummarizedExperiment(SimpleList(assays), ...)
+})
+
+setMethod("SummarizedExperiment", "list",
+ function(assays, ...)
+{
+ SummarizedExperiment(do.call(SimpleList, assays), ...)
+})
+
+setMethod("SummarizedExperiment", "missing",
+ function(assays, ...)
+{
+ SummarizedExperiment(SimpleList(), ...)
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Coercion.
+###
+### See makeSummarizedExperimentFromExpressionSet.R for coercion back and
+### forth between SummarizedExperiment and ExpressionSet.
+###
+
+.from_RangedSummarizedExperiment_to_SummarizedExperiment <- function(from)
+{
+ new_SummarizedExperiment(from at assays,
+ names(from at rowRanges),
+ mcols(from at rowRanges),
+ from at colData,
+ from at metadata)
+}
+
+setAs("RangedSummarizedExperiment", "SummarizedExperiment",
+ .from_RangedSummarizedExperiment_to_SummarizedExperiment
+)
+
+.from_SummarizedExperiment_to_RangedSummarizedExperiment <- function(from)
+{
+ partitioning <- PartitioningByEnd(integer(length(from)), names=names(from))
+ rowRanges <- relist(GRanges(), partitioning)
+ .new_RangedSummarizedExperiment(from at assays,
+ rowRanges,
+ from at colData,
+ from at metadata)
+}
+
+setAs("SummarizedExperiment", "RangedSummarizedExperiment",
+ .from_SummarizedExperiment_to_RangedSummarizedExperiment
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Getters and setters.
+###
+
+### The rowRanges() generic is defined in the DelayedArray package.
+setMethod("rowRanges", "RangedSummarizedExperiment",
+ function(x, ...) x at rowRanges
+)
+
+setGeneric("rowRanges<-",
+ function(x, ..., value) standardGeneric("rowRanges<-"))
+
+.SummarizedExperiment.rowRanges.replace <-
+ function(x, ..., value)
+{
+ if (!is(x, "RangedSummarizedExperiment"))
+ x <- as(x, "RangedSummarizedExperiment")
+ x <- BiocGenerics:::replaceSlots(x, ...,
+ rowRanges=value,
+ elementMetadata=S4Vectors:::make_zero_col_DataFrame(length(value)),
+ check=FALSE)
+ msg <- .valid.SummarizedExperiment.assays_nrow(x)
+ if (!is.null(msg))
+ stop(msg)
+ x
+}
+
+setReplaceMethod("rowRanges", c("SummarizedExperiment", "GenomicRanges"),
+ .SummarizedExperiment.rowRanges.replace)
+
+setReplaceMethod("rowRanges", c("SummarizedExperiment", "GRangesList"),
+ .SummarizedExperiment.rowRanges.replace)
+
+setMethod("names", "RangedSummarizedExperiment",
+ function(x) names(rowRanges(x))
+)
+
+setReplaceMethod("names", "RangedSummarizedExperiment",
+ function(x, value)
+{
+ rowRanges <- rowRanges(x)
+ names(rowRanges) <- value
+ BiocGenerics:::replaceSlots(x, rowRanges=rowRanges, check=FALSE)
+})
+
+setMethod("dimnames", "RangedSummarizedExperiment",
+ function(x)
+{
+ list(names(x), rownames(colData(x)))
+})
+
+setReplaceMethod("dimnames", c("RangedSummarizedExperiment", "list"),
+ function(x, value)
+{
+ rowRanges <- rowRanges(x)
+ names(rowRanges) <- value[[1]]
+ colData <- colData(x)
+ rownames(colData) <- value[[2]]
+ BiocGenerics:::replaceSlots(x,
+ rowRanges=rowRanges,
+ colData=colData,
+ check=FALSE)
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Subsetting.
+###
+
+.DollarNames.RangedSummarizedExperiment <-
+ .DollarNames.SummarizedExperiment
+
+setMethod("subset", "RangedSummarizedExperiment",
+ function(x, subset, select, ...)
+{
+ i <- S4Vectors:::evalqForSubset(subset, rowRanges(x), ...)
+ j <- S4Vectors:::evalqForSubset(select, colData(x), ...)
+ x[i, j]
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+## colData-as-GRanges compatibility: allow direct access to GRanges /
+## GRangesList colData for select functions
+
+## Not supported:
+##
+## Not consistent SummarizedExperiment structure: length, names,
+## as.data.frame, c.
+## Length-changing endomorphisms: disjoin, gaps, reduce, unique.
+## 'legacy' data types / functions: as "RangedData", as "RangesList",
+## renameSeqlevels, keepSeqlevels.
+## Possile to implement, but not yet: Ops, map, window, window<-
+
+## mcols
+setMethod("mcols", "RangedSummarizedExperiment",
+ function(x, use.names=FALSE, ...)
+{
+ mcols(rowRanges(x), use.names=use.names, ...)
+})
+
+setReplaceMethod("mcols", "RangedSummarizedExperiment",
+ function(x, ..., value)
+{
+ BiocGenerics:::replaceSlots(x,
+ rowRanges=local({
+ r <- rowRanges(x)
+ mcols(r) <- value
+ r
+ }),
+ check=FALSE)
+})
+
+### mcols() is the recommended way for accessing the metadata columns.
+### Use of values() or elementMetadata() is discouraged.
+
+setMethod("elementMetadata", "RangedSummarizedExperiment",
+ function(x, use.names=FALSE, ...)
+{
+ elementMetadata(rowRanges(x), use.names=use.names, ...)
+})
+
+setReplaceMethod("elementMetadata", "RangedSummarizedExperiment",
+ function(x, ..., value)
+{
+ elementMetadata(rowRanges(x), ...) <- value
+ x
+})
+
+## Single dispatch, generic signature fun(x, ...)
+local({
+ .funs <-
+ c("duplicated", "end", "end<-", "ranges", "seqinfo", "seqnames",
+ "start", "start<-", "strand", "width", "width<-")
+
+ endomorphisms <- .funs[grepl("<-$", .funs)]
+
+ tmpl <- function() {}
+ environment(tmpl) <- parent.frame(2)
+ for (.fun in .funs) {
+ generic <- getGeneric(.fun)
+ formals(tmpl) <- formals(generic)
+ fmls <- as.list(formals(tmpl))
+ fmls[] <- sapply(names(fmls), as.symbol)
+ fmls[[generic at signature]] <- quote(rowRanges(x))
+ if (.fun %in% endomorphisms)
+ body(tmpl) <- substitute({
+ rowRanges(x) <- do.call(FUN, ARGS)
+ x
+ }, list(FUN=.fun, ARGS=fmls))
+ else
+ body(tmpl) <-
+ substitute(do.call(FUN, ARGS),
+ list(FUN=as.symbol(.fun), ARGS=fmls))
+ setMethod(.fun, "RangedSummarizedExperiment", tmpl)
+ }
+})
+
+setMethod("granges", "RangedSummarizedExperiment",
+ function(x, use.mcols=FALSE, ...)
+{
+ if (!identical(use.mcols, FALSE))
+ stop("\"granges\" method for RangedSummarizedExperiment objects ",
+ "does not support the 'use.mcols' argument")
+ rowRanges(x)
+})
+
+## 2-argument dispatch:
+## pcompare / Compare
+##
+.RangedSummarizedExperiment.pcompare <-
+ function(x, y)
+{
+ if (is(x, "RangedSummarizedExperiment"))
+ x <- rowRanges(x)
+ if (is(y, "RangedSummarizedExperiment"))
+ y <- rowRanges(y)
+ pcompare(x, y)
+}
+
+.RangedSummarizedExperiment.Compare <-
+ function(e1, e2)
+{
+ if (is(e1, "RangedSummarizedExperiment"))
+ e1 <- rowRanges(e1)
+ if (is(e2, "RangedSummarizedExperiment"))
+ e2 <- rowRanges(e2)
+ callGeneric(e1=e1, e2=e2)
+}
+
+local({
+ .signatures <- list(
+ c("RangedSummarizedExperiment", "ANY"),
+ c("ANY", "RangedSummarizedExperiment"),
+ c("RangedSummarizedExperiment", "RangedSummarizedExperiment"))
+
+ for (.sig in .signatures) {
+ setMethod("pcompare", .sig, .RangedSummarizedExperiment.pcompare)
+ setMethod("Compare", .sig, .RangedSummarizedExperiment.Compare)
+ }
+})
+
+## additional getters / setters
+
+setReplaceMethod("strand", "RangedSummarizedExperiment",
+ function(x, ..., value)
+{
+ strand(rowRanges(x)) <- value
+ x
+})
+
+setReplaceMethod("ranges", "RangedSummarizedExperiment",
+ function(x, ..., value)
+{
+ ranges(rowRanges(x)) <- value
+ x
+})
+
+## order, rank, sort
+
+setMethod("is.unsorted", "RangedSummarizedExperiment",
+ function(x, na.rm = FALSE, strictly = FALSE, ignore.strand = FALSE)
+{
+ x <- rowRanges(x)
+ if (!is(x, "GenomicRanges"))
+ stop("is.unsorted() is not yet supported when 'rowRanges(x)' is a ",
+ class(x), " object")
+ callGeneric()
+})
+
+setMethod("order", "RangedSummarizedExperiment",
+ function(..., na.last=TRUE, decreasing=FALSE,
+ method=c("auto", "shell", "radix"))
+{
+ args <- lapply(list(...), rowRanges)
+ do.call("order", c(args, list(na.last=na.last,
+ decreasing=decreasing,
+ method=method)))
+})
+
+setMethod("rank", "RangedSummarizedExperiment",
+ function(x, na.last = TRUE,
+ ties.method = c("average", "first", "last", "random", "max", "min"))
+{
+ ties.method <- match.arg(ties.method)
+ rank(rowRanges(x), na.last=na.last, ties.method=ties.method)
+})
+
+setMethod("sort", "RangedSummarizedExperiment",
+ function(x, decreasing = FALSE, ignore.strand = FALSE)
+{
+ x_rowRanges <- rowRanges(x)
+ if (!is(x_rowRanges, "GenomicRanges"))
+ stop("sort() is not yet supported when 'rowRanges(x)' is a ",
+ class(x_rowRanges), " object")
+ oo <- GenomicRanges:::order_GenomicRanges(x_rowRanges,
+ decreasing = decreasing,
+ ignore.strand = ignore.strand)
+ x[oo]
+})
+
+## seqinfo (also seqlevels, genome, seqlevels<-, genome<-), seqinfo<-
+
+setMethod("seqinfo", "RangedSummarizedExperiment",
+ function(x)
+{
+ seqinfo(x at rowRanges)
+})
+
+setReplaceMethod("seqinfo", "RangedSummarizedExperiment",
+ function (x, new2old= NULL, force=FALSE,
+ pruning.mode=c("error", "coarse", "fine", "tidy"),
+ value)
+{
+ if (!is(value, "Seqinfo"))
+ stop("the supplied 'seqinfo' must be a Seqinfo object")
+ dangling_seqlevels <-
+ GenomeInfoDb:::getDanglingSeqlevels(x at rowRanges, new2old=new2old,
+ force=force,
+ pruning.mode=pruning.mode,
+ seqlevels(value))
+ if (length(dangling_seqlevels) != 0L)
+ x <- x[!(seqnames(x) %in% dangling_seqlevels)]
+ x at rowRanges <-
+ update(x at rowRanges,
+ seqnames = GenomeInfoDb:::makeNewSeqnames(x, new2old,
+ seqlevels(value)),
+ seqinfo = value)
+ if (is.character(msg <- .valid.RangedSummarizedExperiment(x)))
+ stop(msg)
+ x
+})
+
+setMethod("split", "RangedSummarizedExperiment",
+ function(x, f, drop=FALSE, ...)
+{
+ splitAsList(x, f, drop=drop)
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### updateObject()
+###
+
+.old_SummarizedExperiment_slots <- c(
+ "assays",
+ "rowData",
+ "colData",
+ "exptData"
+)
+
+.has_old_SummarizedExperiment_internal_structure <- function(object)
+ all(sapply(.old_SummarizedExperiment_slots, .hasSlot, object=object))
+
+.from_old_SummarizedExperiment_to_RangedSummarizedExperiment <- function(from)
+ .new_RangedSummarizedExperiment(from at assays,
+ from at rowData,
+ from at colData,
+ from at exptData)
+
+.update_old_SummarizedExperiment <- function(object, ..., verbose=FALSE)
+{
+ if (.has_old_SummarizedExperiment_internal_structure(object)) {
+ rse <- .from_old_SummarizedExperiment_to_RangedSummarizedExperiment(object)
+ } else if (!(.hasSlot(object, "NAMES") &&
+ .hasSlot(object, "elementMetadata"))) {
+ rse <- .new_RangedSummarizedExperiment(object at assays,
+ object at rowRanges,
+ object at colData,
+ object at metadata)
+ } else {
+ return(object)
+ }
+
+ if (!(extends(class(object), "RangedSummarizedExperiment") &&
+ class(object) != "RangedSummarizedExperiment"))
+ return(rse)
+
+ xslotnames <- setdiff(slotNames(class(object)), slotNames(class(rse)))
+ xslots <- attributes(object)[xslotnames]
+ #do.call("new", c(list(Class=class(object), rse), xslots))
+
+ ## The line above doesn't work because of a bug in R (see
+ ## https://stat.ethz.ch/pipermail/r-devel/2015-May/071130.html),
+ ## so we use the workaround below.
+ rse_slots <- attributes(rse)[slotNames(class(rse))]
+
+ ## Because of another bug in R, rse_slots$NAMES is broken when the NAMES
+ ## slot is NULL so we repair it (see
+ ## https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16428).
+ if (is.name(rse_slots$NAMES))
+ rse_slots$NAMES <- NULL
+
+ do.call("new", c(list(Class=class(object)), rse_slots, xslots))
+}
+
+setMethod("updateObject", "SummarizedExperiment",
+ .update_old_SummarizedExperiment
+)
+
diff --git a/R/SummarizedExperiment-class.R b/R/SummarizedExperiment-class.R
new file mode 100644
index 0000000..4fbeb0a
--- /dev/null
+++ b/R/SummarizedExperiment-class.R
@@ -0,0 +1,844 @@
+### =========================================================================
+### SummarizedExperiment objects
+### -------------------------------------------------------------------------
+###
+
+
+setClass("SummarizedExperiment",
+ contains="Vector",
+ representation(
+ colData="DataFrame", # columns and their annotations
+ assays="Assays", # Data -- e.g., list of matricies
+ NAMES="character_OR_NULL",
+ elementMetadata="DataFrame"
+ ),
+ prototype(
+ assays=Assays()
+ )
+)
+
+### Combine the new parallel slots with those of the parent class. Make sure
+### to put the new parallel slots *first*.
+setMethod("parallelSlotNames", "SummarizedExperiment",
+ function(x) c("NAMES", callNextMethod())
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Validity.
+###
+
+.valid.SummarizedExperiment.assays_nrow <- function(x)
+{
+ if (length(x at assays) == 0L)
+ return(NULL)
+ assays_nrow <- nrow(x at assays)
+ rowData_nrow <- length(x)
+ if (assays_nrow != rowData_nrow) {
+ txt <- sprintf(
+ "\n nb of rows in 'assay' (%d) must equal nb of rows in 'rowData' (%d)",
+ assays_nrow, rowData_nrow)
+ return(txt)
+ }
+ NULL
+}
+
+.valid.SummarizedExperiment.assays_ncol <- function(x)
+{
+ if (length(x at assays) == 0L)
+ return(NULL)
+ assays_ncol <- ncol(x at assays)
+ colData_nrow <- nrow(colData(x))
+ if (assays_ncol != colData_nrow) {
+ txt <- sprintf(
+ "\n nb of cols in 'assay' (%d) must equal nb of rows in 'colData' (%d)",
+ assays_ncol, colData_nrow)
+ return(txt)
+ }
+ NULL
+}
+
+.valid.SummarizedExperiment.assays_dim <- function(x)
+{
+ c(.valid.SummarizedExperiment.assays_nrow(x),
+ .valid.SummarizedExperiment.assays_ncol(x))
+}
+
+.valid.SummarizedExperiment <- function(x)
+{
+ .valid.SummarizedExperiment.assays_dim(x)
+}
+
+setValidity2("SummarizedExperiment", .valid.SummarizedExperiment)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Low-level constructor (not exported).
+###
+
+new_SummarizedExperiment <- function(assays, names, rowData, colData,
+ metadata)
+{
+ if (!is(assays, "Assays"))
+ assays <- Assays(assays)
+ if (is.null(rowData)) {
+ if (is.null(names))
+ nrow <- nrow(assays)
+ else
+ nrow <- length(names)
+ rowData <- S4Vectors:::make_zero_col_DataFrame(nrow)
+ } else {
+ rownames(rowData) <- NULL
+ }
+ new("SummarizedExperiment", NAMES=names,
+ elementMetadata=rowData,
+ colData=colData,
+ assays=assays,
+ metadata=as.list(metadata))
+}
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Getters and setters.
+###
+
+setMethod("length", "SummarizedExperiment",
+ function(x) nrow(x at elementMetadata)
+)
+
+setMethod("names", "SummarizedExperiment", function(x) x at NAMES)
+
+setReplaceMethod("names", "SummarizedExperiment",
+ function(x, value)
+ {
+ NAMES <- S4Vectors:::normalize_names_replacement_value(value, x)
+ BiocGenerics:::replaceSlots(x, NAMES=NAMES, check=FALSE)
+ }
+)
+
+## rowData, colData seem too vague, but from eSet derived classes wanted to
+## call the rows / cols something different from 'features' or 'samples', so
+## might as well avoid the issue
+
+setGeneric("rowData", function(x, ...) standardGeneric("rowData"))
+
+setMethod("rowData", "SummarizedExperiment",
+ function(x, ...) mcols(x, ...)
+)
+
+setGeneric("rowData<-",
+ function(x, ..., value) standardGeneric("rowData<-"))
+
+setReplaceMethod("rowData", "SummarizedExperiment",
+ function(x, ..., value) `mcols<-`(x, ..., value=value)
+)
+
+setGeneric("colData", function(x, ...) standardGeneric("colData"))
+
+setMethod("colData", "SummarizedExperiment", function(x, ...) x at colData)
+
+setGeneric("colData<-",
+ function(x, ..., value) standardGeneric("colData<-"))
+
+setReplaceMethod("colData", c("SummarizedExperiment", "DataFrame"),
+ function(x, ..., value)
+{
+ if (nrow(value) != ncol(x))
+ stop("nrow of supplied 'colData' must equal ncol of object")
+ BiocGenerics:::replaceSlots(x, colData=value, check=FALSE)
+})
+
+setGeneric("assays",
+ function(x, ..., withDimnames=TRUE) standardGeneric("assays"),
+ signature="x")
+
+setMethod("assays", "SummarizedExperiment",
+ function(x, ..., withDimnames=TRUE)
+{
+ assays <- as(x at assays, "SimpleList")
+ if (withDimnames) {
+ assays <- endoapply(assays,
+ function(assay) {
+ dimnames(assay)[1:2] <- dimnames(x)
+ assay
+ }
+ )
+ }
+ assays
+})
+
+setGeneric("assays<-",
+ function(x, ..., withDimnames=TRUE, value) standardGeneric("assays<-"),
+ signature=c("x", "value"))
+
+.SummarizedExperiment.assays.replace <-
+ function(x, ..., withDimnames=TRUE, value)
+{
+ ## withDimnames arg allows names(assays(se, withDimnames=FALSE)) <- value
+ ok <- vapply(value, function(elt, xdimnames) {
+ e <- dimnames(elt)
+ (is.null(e[[1]]) || identical(e[[1]], xdimnames[[1]])) &&
+ (is.null(e[[2]]) || identical(e[[2]], xdimnames[[2]]))
+ }, logical(1), xdimnames=dimnames(x))
+ if (!all(ok))
+ stop("current and replacement dimnames() differ")
+ x <- BiocGenerics:::replaceSlots(x, assays=Assays(value), check=FALSE)
+ ## validObject(x) should be called below because it would then fully
+ ## re-validate objects that derive from SummarizedExperiment (e.g.
+ ## DESeqDataSet objects) after the user sets the assays slot with
+ ## assays(x) <- value. For example the assays slot of a DESeqDataSet
+ ## object must contain a matrix named 'counts' and calling validObject(x)
+ ## would check that but .valid.SummarizedExperiment(x) doesn't.
+ ## The FourC() constructor function defined in the FourCSeq package
+ ## actually takes advantage of the incomplete validation below to
+ ## purposedly return invalid FourC objects!
+ msg <- .valid.SummarizedExperiment(x)
+ if (!is.null(msg))
+ stop(msg)
+ x
+}
+
+setReplaceMethod("assays", c("SummarizedExperiment", "SimpleList"),
+ .SummarizedExperiment.assays.replace)
+
+setReplaceMethod("assays", c("SummarizedExperiment", "list"),
+ .SummarizedExperiment.assays.replace)
+
+setGeneric("assay", function(x, i, ...) standardGeneric("assay"))
+
+## convenience for common use case
+setMethod("assay", c("SummarizedExperiment", "missing"),
+ function(x, i, ...)
+{
+ assays <- assays(x, ...)
+ if (0L == length(assays))
+ stop("'assay(<", class(x), ">, i=\"missing\", ...) ",
+ "length(assays(<", class(x), ">)) is 0'")
+ assays[[1]]
+})
+
+setMethod("assay", c("SummarizedExperiment", "numeric"),
+ function(x, i, ...)
+{
+ tryCatch({
+ assays(x, ...)[[i]]
+ }, error=function(err) {
+ stop("'assay(<", class(x), ">, i=\"numeric\", ...)' ",
+ "invalid subscript 'i'\n", conditionMessage(err))
+ })
+})
+
+setMethod("assay", c("SummarizedExperiment", "character"),
+ function(x, i, ...)
+{
+ msg <- paste0("'assay(<", class(x), ">, i=\"character\", ...)' ",
+ "invalid subscript 'i'")
+ res <- tryCatch({
+ assays(x, ...)[[i]]
+ }, error=function(err) {
+ stop(msg, "\n", conditionMessage(err))
+ })
+ if (is.null(res))
+ stop(msg, "\n'i' not in names(assays(<", class(x), ">))")
+ res
+})
+
+setGeneric("assay<-", signature=c("x", "i"),
+ function(x, i, ..., value) standardGeneric("assay<-"))
+
+setReplaceMethod("assay", c("SummarizedExperiment", "missing"),
+ function(x, i, ..., value)
+{
+ if (0L == length(assays(x)))
+ stop("'assay(<", class(x), ">) <- value' ", "length(assays(<",
+ class(x), ">)) is 0")
+ assays(x)[[1]] <- value
+ x
+})
+
+setReplaceMethod("assay", c("SummarizedExperiment", "numeric"),
+ function(x, i = 1, ..., value)
+{
+ assays(x, ...)[[i]] <- value
+ x
+})
+
+setReplaceMethod("assay", c("SummarizedExperiment", "character"),
+ function(x, i, ..., value)
+{
+ assays(x, ...)[[i]] <- value
+ x
+})
+
+setGeneric("assayNames", function(x, ...) standardGeneric("assayNames"))
+
+setMethod("assayNames", "SummarizedExperiment",
+ function(x, ...)
+{
+ names(assays(x, withDimnames=FALSE))
+})
+
+setGeneric("assayNames<-",
+ function(x, ..., value) standardGeneric("assayNames<-"))
+
+setReplaceMethod("assayNames", c("SummarizedExperiment", "character"),
+ function(x, ..., value)
+{
+ names(assays(x, withDimnames=FALSE)) <- value
+ x
+})
+
+## cannonical location for dim, dimnames; dimnames should be checked
+## for consistency (if non-null) and stripped from assays on
+## construction, or added from assays if row/col names are NULL in
+## <SummarizedExperiment> but not assays. dimnames need to be added on
+## to assays when assays() invoked
+setMethod("dim", "SummarizedExperiment",
+ function(x)
+{
+ c(length(x), nrow(colData(x)))
+})
+
+setMethod("dimnames", "SummarizedExperiment",
+ function(x)
+{
+ list(names(x), rownames(colData(x)))
+})
+
+setReplaceMethod("dimnames", c("SummarizedExperiment", "list"),
+ function(x, value)
+{
+ NAMES <- S4Vectors:::normalize_names_replacement_value(value[[1]], x)
+ colData <- colData(x)
+ rownames(colData) <- value[[2]]
+ BiocGenerics:::replaceSlots(x, NAMES=NAMES, colData=colData, check=FALSE)
+})
+
+setReplaceMethod("dimnames", c("SummarizedExperiment", "NULL"),
+ function(x, value)
+{
+ dimnames(x) <- list(NULL, NULL)
+ x
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Subsetting.
+###
+
+.SummarizedExperiment.charbound <-
+ function(idx, txt, fmt)
+{
+ orig <- idx
+ idx <- match(idx, txt)
+ if (any(bad <- is.na(idx))) {
+ msg <- paste(S4Vectors:::selectSome(orig[bad]), collapse=" ")
+ stop(sprintf(fmt, msg))
+ }
+ idx
+}
+
+setMethod("[", c("SummarizedExperiment", "ANY", "ANY"),
+ function(x, i, j, ..., drop=TRUE)
+{
+ if (1L != length(drop) || (!missing(drop) && drop))
+ warning("'drop' ignored '[,", class(x), ",ANY,ANY-method'")
+
+ if (missing(i) && missing(j))
+ return(x)
+
+ if (!missing(i)) {
+ if (is.character(i)) {
+ fmt <- paste0("<", class(x), ">[i,] index out of bounds: %s")
+ i <- .SummarizedExperiment.charbound(i, rownames(x), fmt)
+ }
+ ii <- as.vector(i)
+ ans_elementMetadata <- x at elementMetadata[i, , drop=FALSE]
+ if (is(x, "RangedSummarizedExperiment")) {
+ ans_rowRanges <- x at rowRanges[i]
+ } else {
+ ans_NAMES <- x at NAMES[ii]
+ }
+ }
+ if (!missing(j)) {
+ if (is.character(j)) {
+ fmt <- paste0("<", class(x), ">[,j] index out of bounds: %s")
+ j <- .SummarizedExperiment.charbound(j, colnames(x), fmt)
+ }
+ ans_colData <- x at colData[j, , drop=FALSE]
+ jj <- as.vector(j)
+ }
+
+ if (missing(i)) {
+ ans_assays <- x at assays[ , jj]
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ colData=ans_colData,
+ assays=ans_assays,
+ check=FALSE)
+ } else if (missing(j)) {
+ ans_assays <- x at assays[ii, ]
+ if (is(x, "RangedSummarizedExperiment")) {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ elementMetadata=ans_elementMetadata,
+ rowRanges=ans_rowRanges,
+ assays=ans_assays,
+ check=FALSE)
+ } else {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ elementMetadata=ans_elementMetadata,
+ NAMES=ans_NAMES,
+ assays=ans_assays,
+ check=FALSE)
+ }
+ } else {
+ ans_assays <- x at assays[ii, jj]
+ if (is(x, "RangedSummarizedExperiment")) {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ elementMetadata=ans_elementMetadata,
+ rowRanges=ans_rowRanges,
+ colData=ans_colData,
+ assays=ans_assays,
+ check=FALSE)
+ } else {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ elementMetadata=ans_elementMetadata,
+ NAMES=ans_NAMES,
+ colData=ans_colData,
+ assays=ans_assays,
+ check=FALSE)
+ }
+ }
+ ans
+})
+
+setReplaceMethod("[",
+ c("SummarizedExperiment", "ANY", "ANY", "SummarizedExperiment"),
+ function(x, i, j, ..., value)
+{
+ if (missing(i) && missing(j))
+ return(value)
+
+ ans_metadata <- c(metadata(x), metadata(value))
+
+ if (!missing(i)) {
+ if (is.character(i)) {
+ fmt <- paste0("<", class(x), ">[i,] index out of bounds: %s")
+ i <- .SummarizedExperiment.charbound(i, rownames(x), fmt)
+ }
+ ii <- as.vector(i)
+ ans_elementMetadata <- local({
+ emd <- x at elementMetadata
+ emd[i,] <- value at elementMetadata
+ emd
+ })
+ if (is(x, "RangedSummarizedExperiment")) {
+ ans_rowRanges <- local({
+ r <- x at rowRanges
+ r[i] <- value at rowRanges
+ names(r)[ii] <- names(value at rowRanges)
+ r
+ })
+ } else {
+ ans_NAMES <- local({
+ nms <- x at NAMES
+ nms[ii] <- value at NAMES
+ nms
+ })
+ }
+ }
+
+ if (!missing(j)) {
+ if (is.character(j)) {
+ fmt <- paste0("<", class(x), ">[,j] index out of bounds: %s")
+ j <- .SummarizedExperiment.charbound(j, colnames(x), fmt)
+ }
+ jj <- as.vector(j)
+ ans_colData <- local({
+ c <- x at colData
+ c[j,] <- value at colData
+ rownames(c)[jj] <- rownames(value at colData)
+ c
+ })
+ }
+
+ if (missing(i)) {
+ ans_assays <- local({
+ a <- x at assays
+ a[ , jj] <- value at assays
+ a
+ })
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ metadata=ans_metadata,
+ colData=ans_colData,
+ assays=ans_assays,
+ check=FALSE)
+ msg <- .valid.SummarizedExperiment.assays_ncol(ans)
+ } else if (missing(j)) {
+ ans_assays <- local({
+ a <- x at assays
+ a[ii, ] <- value at assays
+ a
+ })
+ if (is(x, "RangedSummarizedExperiment")) {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ metadata=ans_metadata,
+ elementMetadata=ans_elementMetadata,
+ rowRanges=ans_rowRanges,
+ assays=ans_assays,
+ check=FALSE)
+ } else {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ metadata=ans_metadata,
+ elementMetadata=ans_elementMetadata,
+ NAMES=ans_NAMES,
+ assays=ans_assays,
+ check=FALSE)
+ }
+ msg <- .valid.SummarizedExperiment.assays_nrow(ans)
+ } else {
+ ans_assays <- local({
+ a <- x at assays
+ a[ii, jj] <- value at assays
+ a
+ })
+ if (is(x, "RangedSummarizedExperiment")) {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ metadata=ans_metadata,
+ elementMetadata=ans_elementMetadata,
+ rowRanges=ans_rowRanges,
+ colData=ans_colData,
+ assays=ans_assays,
+ check=FALSE)
+ } else {
+ ans <- BiocGenerics:::replaceSlots(x, ...,
+ metadata=ans_metadata,
+ elementMetadata=ans_elementMetadata,
+ NAMES=ans_NAMES,
+ colData=ans_colData,
+ assays=ans_assays,
+ check=FALSE)
+ }
+ msg <- .valid.SummarizedExperiment.assays_dim(ans)
+ }
+ if (!is.null(msg))
+ stop(msg)
+ ans
+})
+
+setMethod("extractROWS", "SummarizedExperiment",
+ function(x, i)
+ {
+ i <- normalizeSingleBracketSubscript(i, x)
+ x[i, ]
+ }
+)
+
+setMethod("replaceROWS", "SummarizedExperiment",
+ function(x, i, value)
+ {
+ i <- normalizeSingleBracketSubscript(i, x)
+ x[i, ] <- value
+ x
+ }
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Quick colData access.
+###
+
+setMethod("[[", c("SummarizedExperiment", "ANY", "missing"),
+ function(x, i, j, ...)
+{
+ colData(x)[[i, ...]]
+})
+
+setReplaceMethod("[[", c("SummarizedExperiment", "ANY", "missing"),
+ function(x, i, j, ..., value)
+{
+ colData(x)[[i, ...]] <- value
+ x
+})
+
+.DollarNames.SummarizedExperiment <- function(x, pattern = "")
+ grep(pattern, names(colData(x)), value=TRUE)
+
+setMethod("$", "SummarizedExperiment",
+ function(x, name)
+{
+ colData(x)[[name]]
+})
+
+setReplaceMethod("$", "SummarizedExperiment",
+ function(x, name, value)
+{
+ colData(x)[[name]] <- value
+ x
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Display.
+###
+
+setMethod("show", "SummarizedExperiment",
+ function(object)
+{
+ selectSome <- S4Vectors:::selectSome
+ scat <- function(fmt, vals=character(), exdent=2, ...)
+ {
+ vals <- ifelse(nzchar(vals), vals, "''")
+ lbls <- paste(S4Vectors:::selectSome(vals), collapse=" ")
+ txt <- sprintf(fmt, length(vals), lbls)
+ cat(strwrap(txt, exdent=exdent, ...), sep="\n")
+ }
+
+ cat("class:", class(object), "\n")
+ cat("dim:", dim(object), "\n")
+
+ ## metadata()
+ expt <- names(metadata(object))
+ if (is.null(expt))
+ expt <- character(length(metadata(object)))
+ scat("metadata(%d): %s\n", expt)
+
+ ## assays()
+ nms <- assayNames(object)
+ if (is.null(nms))
+ nms <- character(length(assays(object, withDimnames=FALSE)))
+ scat("assays(%d): %s\n", nms)
+
+ ## rownames()
+ dimnames <- dimnames(object)
+ dlen <- sapply(dimnames, length)
+ if (dlen[[1]]) scat("rownames(%d): %s\n", dimnames[[1]])
+ else scat("rownames: NULL\n")
+
+ ## rowData()
+ scat("rowData names(%d): %s\n", names(rowData(object)))
+
+ ## colnames()
+ if (dlen[[2]]) scat("colnames(%d): %s\n", dimnames[[2]])
+ else cat("colnames: NULL\n")
+
+ ## colData()
+ scat("colData names(%d): %s\n", names(colData(object)))
+})
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Combine.
+###
+
+### Appropriate for objects with different ranges and same samples.
+setMethod("rbind", "SummarizedExperiment",
+ function(..., deparse.level=1)
+{
+ args <- unname(list(...))
+ .rbind.SummarizedExperiment(args)
+})
+
+.rbind.SummarizedExperiment <- function(args)
+{
+ if (!.compare(lapply(args, colnames)))
+ stop("'...' objects must have the same colnames")
+ if (!.compare(lapply(args, ncol)))
+ stop("'...' objects must have the same number of samples")
+
+ if (is(args[[1L]], "RangedSummarizedExperiment")) {
+ rowRanges <- do.call(c, lapply(args, rowRanges))
+ } else {
+ ## Code below taken from combine_GAlignments_objects() from the
+ ## GenomicAlignments package.
+
+ ## Combine "NAMES" slots.
+ NAMES_slots <- lapply(args, function(x) x at NAMES)
+ ## TODO: Use elementIsNull() here when it becomes available.
+ has_no_names <- sapply(NAMES_slots, is.null, USE.NAMES=FALSE)
+ if (all(has_no_names)) {
+ NAMES <- NULL
+ } else {
+ noname_idx <- which(has_no_names)
+ if (length(noname_idx) != 0L)
+ NAMES_slots[noname_idx] <-
+ lapply(elementNROWS(args[noname_idx]), character)
+ NAMES <- unlist(NAMES_slots, use.names=FALSE)
+ }
+ }
+ colData <- .cbind.DataFrame(args, colData, "colData")
+ assays <- do.call(rbind, lapply(args, slot, "assays"))
+ elementMetadata <- do.call(rbind, lapply(args, slot, "elementMetadata"))
+ metadata <- do.call(c, lapply(args, metadata))
+
+ if (is(args[[1L]], "RangedSummarizedExperiment")) {
+ BiocGenerics:::replaceSlots(args[[1L]],
+ rowRanges=rowRanges, colData=colData, assays=assays,
+ elementMetadata=elementMetadata, metadata=metadata)
+ } else {
+ BiocGenerics:::replaceSlots(args[[1L]],
+ NAMES=NAMES, colData=colData, assays=assays,
+ elementMetadata=elementMetadata, metadata=metadata)
+ }
+}
+
+### Appropriate for objects with same ranges and different samples.
+setMethod("cbind", "SummarizedExperiment",
+ function(..., deparse.level=1)
+{
+ args <- unname(list(...))
+ .cbind.SummarizedExperiment(args)
+})
+
+.cbind.SummarizedExperiment <- function(args)
+{
+ if (is(args[[1L]], "RangedSummarizedExperiment")) {
+ if (!.compare(lapply(args, rowRanges), TRUE))
+ stop("'...' object ranges (rows) are not compatible")
+ rowRanges <- rowRanges(args[[1L]])
+ mcols(rowRanges) <- .cbind.DataFrame(args, mcols, "mcols")
+ } else {
+ elementMetadata <- .cbind.DataFrame(args, mcols, "mcols")
+ }
+ colData <- do.call(rbind, lapply(args, colData))
+ assays <- do.call(cbind, lapply(args, slot, "assays"))
+ metadata <- do.call(c, lapply(args, metadata))
+
+ if (is(args[[1L]], "RangedSummarizedExperiment")) {
+ BiocGenerics:::replaceSlots(args[[1L]],
+ rowRanges=rowRanges,
+ colData=colData, assays=assays, metadata=metadata)
+ } else {
+ BiocGenerics:::replaceSlots(args[[1L]],
+ elementMetadata=elementMetadata,
+ colData=colData, assays=assays, metadata=metadata)
+ }
+}
+
+.compare <- function(x, GenomicRanges=FALSE)
+{
+ x1 <- x[[1]]
+ if (GenomicRanges) {
+ if (is(x1, "GRangesList")) {
+ x <- lapply(x, unlist)
+ x1 <- x[[1]]
+ }
+ for (i in seq_along(x)[-1]) {
+ if (!identicalVals(x1, x[[i]]))
+ return(FALSE)
+ }
+ return(TRUE)
+ } else {
+ all(sapply(x[-1],
+ function(xelt) all(identical(xelt, x[[1]]))))
+ }
+}
+
+.cbind.DataFrame <- function(args, accessor, accessorName)
+{
+ lst <- lapply(args, accessor)
+ if (!.compare(lst)) {
+ nms <- lapply(lst, names)
+ nmsv <- unlist(nms, use.names=FALSE)
+ names(nmsv) <- rep(seq_along(nms), elementNROWS(nms))
+ dups <- duplicated(nmsv)
+ ## no duplicates
+ if (!any(dups))
+ return(do.call(cbind, lst))
+ ## confirm duplicates are the same
+ lapply(nmsv[duplicated(nmsv)], function(d) {
+ if (!.compare(lapply(lst, "[", d)))
+ stop("column(s) '", unname(d),
+ "' in ", sQuote(accessorName),
+ " are duplicated and the data do not match")})
+ ## remove duplicates
+ do.call(cbind, lst)[,!dups]
+ } else {
+ lst[[1]]
+ }
+}
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### identicalVals()
+###
+### Internal generic and methods (i.e. not exported).
+### Provides a fast implementation of 'length(x) == length(y) && all(x == y)'
+### for various kinds of vector-like objects.
+### TODO: Move this to S4Vectors (for the generic and methods for factor and
+### Rle objects) and IRanges (for the method for Ranges objects).
+###
+
+setGeneric("identicalVals", function(x, y) standardGeneric("identicalVals"))
+
+### Semantically equivalent to identical(as.character(x), as.character(y))
+### but avoids turning the 2 factor objects into character vectors so is more
+### efficient.
+setMethod("identicalVals", c("factor", "factor"),
+ function(x, y)
+ {
+ m <- match(levels(y), levels(x), nomatch=0L)
+ identical(as.integer(x), m[y])
+ }
+)
+
+### Only support factor-Rle objects at the moment!
+### Semantically equivalent to identical(as.character(x), as.character(y))
+### but avoids turning the 2 factor-Rle objects into character vectors so is
+### more efficient.
+setMethod("identicalVals", c("Rle", "Rle"),
+ function(x, y) identical(runLength(x), runLength(y)) &&
+ identicalVals(runValue(x), runValue(y))
+)
+
+setMethod("identicalVals", c("Ranges", "Ranges"),
+ function(x, y) identical(start(x), start(y)) &&
+ identical(width(x), width(y))
+)
+
+### Like 'x == y' this method ignores circularity of the underlying sequences
+### e.g. ranges [1, 10] and [101, 110] represent the same position on a
+### circular sequence of length 100 so should be considered equal. However
+### for 'x == y' and the method below, they are not.
+### TODO: Take circularity of the underlying sequences into account.
+setMethod("identicalVals", c("GenomicRanges", "GenomicRanges"),
+ function(x, y)
+ {
+ ## Trying to merge 'seqinfo(x)' and 'seqinfo(y)' will raise an error
+ ## if 'x' and 'y' are not based on the same reference genome. This is
+ ## the standard way to check that 'x' and 'y' are based on the same
+ ## reference genome.
+ merge(seqinfo(x), seqinfo(y)) # we ignore the returned value
+
+ identicalVals(seqnames(x), seqnames(y)) &&
+ identicalVals(ranges(x), ranges(y)) &&
+ identicalVals(strand(x), strand(y))
+ }
+)
+
+
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### On-disk realization.
+###
+
+setMethod("realize", "SummarizedExperiment",
+ function(x)
+ {
+ for (i in seq_along(assays(x))) {
+ ## We drop the dimnames of the individual assays for 2 reasons:
+ ## 1) These dimnames are kind of irrelevant. The dimnames that
+ ## really matter are 'dimnames(x)' and they are stored
+ ## somewhere else in 'x'. So we don't loose them by not
+ ## realizing the assay dimnames on disk. As a little extra
+ ## bonus, this actually saves a little bit of time and disk
+ ## space.
+ ## 2) Using the HDF5Array backend to realize an array-like object
+ ## on disk doesn't store the dimnames in the HDF5 file at the
+ ## moment.
+ a <- assay(x, i, withDimnames=FALSE)
+ dimnames(a) <- NULL
+ assay(x, i) <- realize(a)
+ }
+ x
+ }
+)
+
diff --git a/R/coverage-methods.R b/R/coverage-methods.R
new file mode 100644
index 0000000..2bc5f22
--- /dev/null
+++ b/R/coverage-methods.R
@@ -0,0 +1,15 @@
+### =========================================================================
+### "coverage" method
+### -------------------------------------------------------------------------
+###
+
+
+setMethod("coverage", "RangedSummarizedExperiment",
+ function(x, shift=0L, width=NULL, weight=1L,
+ method=c("auto", "sort", "hash"))
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+)
+
diff --git a/R/findOverlaps-methods.R b/R/findOverlaps-methods.R
new file mode 100644
index 0000000..d39afee
--- /dev/null
+++ b/R/findOverlaps-methods.R
@@ -0,0 +1,42 @@
+### =========================================================================
+### findOverlaps methods
+### -------------------------------------------------------------------------
+
+
+### findOverlaps
+
+setMethod("findOverlaps", c("RangedSummarizedExperiment", "Vector"),
+ function(query, subject, maxgap=0L, minoverlap=1L,
+ type=c("any", "start", "end", "within", "equal"),
+ select=c("all", "first", "last", "arbitrary"),
+ ignore.strand=FALSE)
+ {
+ query <- rowRanges(query)
+ callGeneric()
+ }
+)
+
+setMethod("findOverlaps", c("Vector", "RangedSummarizedExperiment"),
+ function(query, subject, maxgap=0L, minoverlap=1L,
+ type=c("any", "start", "end", "within", "equal"),
+ select=c("all", "first", "last", "arbitrary"),
+ ignore.strand=FALSE)
+ {
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+)
+
+setMethod("findOverlaps", c("RangedSummarizedExperiment",
+ "RangedSummarizedExperiment"),
+ function(query, subject, maxgap=0L, minoverlap=1L,
+ type=c("any", "start", "end", "within", "equal"),
+ select=c("all", "first", "last", "arbitrary"),
+ ignore.strand=FALSE)
+ {
+ query <- rowRanges(query)
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+)
+
diff --git a/R/inter-range-methods.R b/R/inter-range-methods.R
new file mode 100644
index 0000000..0a36037
--- /dev/null
+++ b/R/inter-range-methods.R
@@ -0,0 +1,22 @@
+### =========================================================================
+### Inter-range methods
+### -------------------------------------------------------------------------
+###
+
+
+setMethod("isDisjoint", "RangedSummarizedExperiment",
+ function(x, ignore.strand=FALSE)
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+)
+
+setMethod("disjointBins", "RangedSummarizedExperiment",
+ function(x, ignore.strand = FALSE)
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+)
+
diff --git a/R/intra-range-methods.R b/R/intra-range-methods.R
new file mode 100644
index 0000000..e9873c9
--- /dev/null
+++ b/R/intra-range-methods.R
@@ -0,0 +1,79 @@
+### =========================================================================
+### Intra-range methods
+### -------------------------------------------------------------------------
+###
+
+
+setMethod("shift", "RangedSummarizedExperiment",
+ function(x, shift=0L, use.names=TRUE)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
+setMethod("narrow", "RangedSummarizedExperiment",
+ function(x, start=NA, end=NA, width=NA, use.names=TRUE)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
+setMethod("resize", "RangedSummarizedExperiment",
+ function(x, width, fix="start", use.names=TRUE, ignore.strand=FALSE)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
+setMethod("flank", "RangedSummarizedExperiment",
+ function(x, width, start=TRUE, both=FALSE, use.names=TRUE,
+ ignore.strand=FALSE)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
+setMethod("promoters", "RangedSummarizedExperiment",
+ function(x, upstream=2000, downstream=200)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
+### Because 'keep.all.ranges' is FALSE by default, it will break if some
+### ranges are dropped.
+setMethod("restrict", "RangedSummarizedExperiment",
+ function(x, start=NA, end=NA, keep.all.ranges=FALSE, use.names=TRUE)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
+setMethod("trim", "RangedSummarizedExperiment",
+ function(x, use.names=TRUE)
+ {
+ x0 <- x
+ x <- rowRanges(x)
+ rowRanges(x0) <- callGeneric()
+ x0
+ }
+)
+
diff --git a/R/makeSummarizedExperimentFromDataFrame.R b/R/makeSummarizedExperimentFromDataFrame.R
new file mode 100644
index 0000000..57e07a2
--- /dev/null
+++ b/R/makeSummarizedExperimentFromDataFrame.R
@@ -0,0 +1,32 @@
+### =========================================================================
+### makeSummarizedExperimentFromDataFrame()
+### -------------------------------------------------------------------------
+
+### 'df' must be a data.frame or DataFrame object.
+makeSummarizedExperimentFromDataFrame <-
+ function(df,
+ ...,
+ seqinfo = NULL,
+ starts.in.df.are.0based = FALSE)
+ {
+ rowRanges <- makeGRangesFromDataFrame(
+ df,
+ ...,
+ keep.extra.columns = FALSE,
+ seqinfo = seqinfo,
+ starts.in.df.are.0based = starts.in.df.are.0based)
+
+ # Find column names for rowRanges
+ granges_cols <-
+ GenomicRanges:::.find_GRanges_cols(names(df), ...)
+
+ rangedNames <- names(df)[na.omit(granges_cols)]
+ idx <- match(rangedNames, names(df))
+ counts <- as.matrix(df[, -idx, drop = FALSE])
+
+ if (!is(as.vector(counts), "numeric"))
+ stop("failed to coerce non-range columns to 'numeric'")
+
+ SummarizedExperiment(
+ assays=SimpleList(counts), rowRanges=rowRanges)
+ }
diff --git a/R/makeSummarizedExperimentFromExpressionSet.R b/R/makeSummarizedExperimentFromExpressionSet.R
new file mode 100644
index 0000000..66d123f
--- /dev/null
+++ b/R/makeSummarizedExperimentFromExpressionSet.R
@@ -0,0 +1,265 @@
+##
+## makeSummarizedExperimentFromExpressionSet
+
+## coercion
+
+.from_rowRanges_to_FeatureData <- function(from)
+{
+ if (is(from, "GRanges")) {
+ fd <- .from_GRanges_to_FeatureData(from)
+ } else if (is(from, "GRangesList")) {
+ fd <- .from_GRangesList_to_FeatureData(from)
+ } else {
+ stop("class ", sQuote(class(from)),
+ " is not a supported type for rowRanges coercion")
+ }
+ featureNames(fd) <- names(from)
+ fd
+}
+
+.from_GRanges_to_FeatureData <- function(from)
+{
+ data <- as.data.frame(from)
+
+ ## the first mcols are automatically included in the data.frame from
+ ## as.data.frame, the secondary mcols holds the metadata for the first
+ ## metadata columns.
+ metaData <- mcols(mcols(from))
+ if (is.null(metaData)) {
+ metaData <- as.data.frame(matrix(ncol=0, nrow=NCOL(data)))
+ } else {
+ metaData <- as.data.frame(metaData)
+ }
+ AnnotatedDataFrame(data, metaData)
+}
+.from_GRangesList_to_FeatureData <- function(from)
+{
+ data <- as.data.frame(mcols(from))
+
+ ## the first mcols are automatically included in the data.frame from
+ ## as.data.frame, the secondary mcols holds the metadata for the first
+ ## metadata columns.
+ metaData <- mcols(mcols(from))
+ if (is.null(metaData)) {
+ metaData <- as.data.frame(matrix(ncol=0, nrow=NCOL(data)))
+ } else {
+ metaData <- as.data.frame(metaData)
+ }
+ AnnotatedDataFrame(data, metaData)
+}
+
+.from_AnnotatedDataFrame_to_DataFrame <- function(from)
+{
+ df <- DataFrame(pData(from), row.names=rownames(from))
+ mcols(df) <- DataFrame(varMetadata(from))
+ df
+}
+
+.from_DataFrame_to_AnnotatedDataFrame <- function(df)
+{
+ data <- as(df, "data.frame")
+ metaData <- mcols(df)
+ if (is.null(metaData)) {
+ metaData <- as.data.frame(matrix(ncol=0, nrow=NCOL(data)))
+ } else {
+ metaData <- as(metaData, "data.frame")
+ }
+ AnnotatedDataFrame(data, metaData)
+}
+
+## If the ExpressionSet has featureData with range information make
+## GRanges out of that, otherwise make an empty GRangesList with names
+## from the featureNames
+naiveRangeMapper <- function(from)
+{
+ nms <- featureNames(from)
+ res <- tryCatch({
+ makeGRangesFromDataFrame(pData(featureData(from)),
+ keep.extra.columns = TRUE)
+ }, error = function(e) {
+ res <- relist(GRanges(), vector("list", length=length(nms)))
+ mcols(res) <- .from_AnnotatedDataFrame_to_DataFrame(featureData(from))
+ res
+ })
+ names(res) <- nms
+ res
+}
+
+# Simple ProbeId to Range mapper
+# Probes with multiple ranges are dropped
+# The sign of the chromosome location is assumed to contain the strand
+# information
+probeRangeMapper <- function(from)
+{
+ annotation <- annotation(from)
+ if (identical(annotation, character(0))) {
+ return(naiveRangeMapper(from))
+ }
+ if (requireNamespace("annotate", quietly = TRUE)) {
+ annotationPackage <- annotate::annPkgName(annotation)
+ test <- require(annotationPackage, character.only = TRUE,
+ quietly = TRUE)
+ if (test) {
+ db <- get(annotationPackage, envir = asNamespace(annotationPackage))
+ pid <- featureNames(from)
+ locs <- AnnotationDbi::select(
+ db, pid, columns = c("CHR", "CHRLOC", "CHRLOCEND"))
+ locs <- na.omit(locs)
+ dups <- duplicated(locs$PROBEID)
+ if (any(dups)) {
+ locs <- locs[!dups, , drop = FALSE]
+ }
+ strand <- ifelse(locs$CHRLOC > 0, "+", "-")
+ res <- GRanges(seqnames = locs$CHR,
+ ranges = IRanges(abs(locs$CHRLOC),
+ abs(locs$CHRLOCEND)),
+ strand = strand)
+ names(res) <- locs$PROBEID
+
+ if (NROW(res) < length(pid)) {
+ warning(length(pid) - NROW(res),
+ " probes could not be mapped.", call. = FALSE)
+ }
+ res
+ } else {
+ stop("Failed to load ", sQuote(annotationPackage), " package",
+ call. = FALSE)
+ }
+ } else {
+ stop("Failed to load annotate package", call. = FALSE)
+ }
+}
+
+# Simple ProbeId to Gene mapper
+# Is there a way to get the txDb given the annotation package?
+geneRangeMapper <- function(txDbPackage, key = "ENTREZID")
+{
+ function(from) {
+ annotation <- annotation(from)
+ if (identical(annotation, character(0))) {
+ return(naiveRangeMapper(from))
+ }
+ if (requireNamespace("annotate", quietly = TRUE)) {
+ annotationPackage <- annotate::annPkgName(annotation)
+ test <- require(annotationPackage, character.only = TRUE,
+ quietly = TRUE)
+ if (test) {
+ db <- get(annotationPackage,
+ envir = asNamespace(annotationPackage))
+ pid <- featureNames(from)
+ probeIdToGeneId <-
+ AnnotationDbi::mapIds(db, pid, key, "PROBEID")
+ geneIdToProbeId <-
+ setNames(names(probeIdToGeneId), probeIdToGeneId)
+
+ if (requireNamespace(txDbPackage, quietly = TRUE)) {
+ txDb <- get(txDbPackage, envir = asNamespace(txDbPackage))
+ genes <- GenomicFeatures::genes(txDb)
+ probesWithAMatch <-
+ probeIdToGeneId[probeIdToGeneId %in% names(genes)]
+ res <- genes[probesWithAMatch]
+ names(res) <- geneIdToProbeId[names(res)]
+ if (NROW(res) < length(pid)) {
+ warning(length(pid) - NROW(res),
+ " probes could not be mapped.", call. = FALSE)
+ }
+ res
+ } else {
+ stop("Failed to load ", sQuote(txDbPackage), " package",
+ call. = FALSE)
+ }
+
+ } else {
+ stop("Failed to load ", sQuote(annotationPackage), " package",
+ call. = FALSE)
+ }
+ } else {
+ stop("Failed to load annotate package", call. = FALSE)
+ }
+ }
+}
+
+makeSummarizedExperimentFromExpressionSet <-
+ function(from, mapFun = naiveRangeMapper, ...)
+{
+ mapFun <- match.fun(mapFun)
+ rowRanges <- mapFun(from, ...)
+ matches <- match(names(rowRanges),
+ featureNames(from),
+ nomatch = 0)
+ from <- from[matches, drop = FALSE]
+ assays <- as.list(assayData(from))
+ colData <- .from_AnnotatedDataFrame_to_DataFrame(phenoData(from))
+ metadata <- SimpleList(
+ experimentData = experimentData(from),
+ annotation = annotation(from),
+ protocolData = protocolData(from)
+ )
+
+ SummarizedExperiment(
+ assays = assays,
+ rowRanges = rowRanges,
+ colData = colData,
+ metadata = metadata
+ )
+}
+
+setAs("ExpressionSet", "RangedSummarizedExperiment", function(from)
+{
+ makeSummarizedExperimentFromExpressionSet(from)
+})
+
+setAs("RangedSummarizedExperiment", "ExpressionSet",
+ function(from)
+{
+ assayData <- list2env(as.list(assays(from)))
+
+ numAssays <- length(assayData)
+
+ if (numAssays == 0) {
+ assayData$exprs <- new("matrix")
+ } else if (!"exprs" %in% ls(assayData)) {
+ ## if there isn't an exprs assay we need to pick one as exprs,
+ ## so rename the first element exprs and issue a warning.
+ exprs <- ls(assayData)[[1]]
+ warning("No assay named ", sQuote("exprs"), " found, renaming ",
+ exprs, " to ", sQuote("exprs"), ".")
+ assayData[["exprs"]] <- assayData[[exprs]]
+ rm(list=exprs, envir=assayData)
+ }
+
+ featureData <- .from_rowRanges_to_FeatureData(rowRanges(from))
+ phenoData <- .from_DataFrame_to_AnnotatedDataFrame(colData(from))
+
+ metadata <- metadata(from)
+
+ experimentData <- if (!is.null(metadata$experimentData)) {
+ metadata$experimentData
+ } else {
+ MIAME()
+ }
+
+ annotation <- if (!is.null(metadata$annotation)) {
+ metadata$annotation
+ } else {
+ character()
+ }
+
+ protocolData <- if (!is.null(metadata$protocolData)) {
+ metadata$protocolData
+ } else {
+ annotatedDataFrameFrom(assayData, byrow=FALSE)
+ }
+
+ ExpressionSet(assayData,
+ phenoData = phenoData,
+ featureData = featureData,
+ experimentData = experimentData,
+ annotation = annotation,
+ protocolData = protocolData
+ )
+})
+
+setAs("SummarizedExperiment", "ExpressionSet", function(from)
+ as(as(from, "RangedSummarizedExperiment"), "ExpressionSet")
+)
diff --git a/R/nearest-methods.R b/R/nearest-methods.R
new file mode 100644
index 0000000..7f20507
--- /dev/null
+++ b/R/nearest-methods.R
@@ -0,0 +1,117 @@
+### =========================================================================
+### nearest (and related) methods
+### -------------------------------------------------------------------------
+###
+
+
+### precede & follow
+
+for (f in c("precede", "follow")) {
+ setMethod(f, c("RangedSummarizedExperiment", "ANY"),
+ function(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+ )
+ setMethod(f, c("ANY", "RangedSummarizedExperiment"),
+ function(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+ {
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+ )
+ setMethod(f, c("RangedSummarizedExperiment", "RangedSummarizedExperiment"),
+ function(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+ {
+ x <- rowRanges(x)
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+ )
+}
+
+### nearest
+
+setMethod("nearest", c("RangedSummarizedExperiment", "ANY"),
+ function(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+)
+
+setMethod("nearest", c("ANY", "RangedSummarizedExperiment"),
+ function(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+ {
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+)
+
+setMethod("nearest", c("RangedSummarizedExperiment",
+ "RangedSummarizedExperiment"),
+ function(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+ {
+ x <- rowRanges(x)
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+)
+
+### distance
+
+setMethod("distance", c("RangedSummarizedExperiment", "ANY"),
+ function(x, y, ignore.strand=FALSE, ...)
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+)
+
+setMethod("distance", c("ANY", "RangedSummarizedExperiment"),
+ function(x, y, ignore.strand=FALSE, ...)
+ {
+ y <- rowRanges(y)
+ callGeneric()
+ }
+)
+
+setMethod("distance", c("RangedSummarizedExperiment",
+ "RangedSummarizedExperiment"),
+ function(x, y, ignore.strand=FALSE, ...)
+ {
+ x <- rowRanges(x)
+ y <- rowRanges(y)
+ callGeneric()
+ }
+)
+
+### distanceToNearest
+
+setMethod("distanceToNearest", c("RangedSummarizedExperiment", "ANY"),
+ function(x, subject, ignore.strand=FALSE, ...)
+ {
+ x <- rowRanges(x)
+ callGeneric()
+ }
+)
+
+setMethod("distanceToNearest", c("ANY", "RangedSummarizedExperiment"),
+ function(x, subject, ignore.strand=FALSE, ...)
+ {
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+)
+
+setMethod("distanceToNearest", c("RangedSummarizedExperiment",
+ "RangedSummarizedExperiment"),
+ function(x, subject, ignore.strand=FALSE, ...)
+ {
+ x <- rowRanges(x)
+ subject <- rowRanges(subject)
+ callGeneric()
+ }
+)
+
diff --git a/R/readKallisto.R b/R/readKallisto.R
new file mode 100644
index 0000000..9a160f2
--- /dev/null
+++ b/R/readKallisto.R
@@ -0,0 +1,196 @@
+.require <-
+ function(pkg)
+{
+ withCallingHandlers({
+ requireNamespace(pkg)
+ }, warning=function(w) {
+ invokeRestart("muffleWarning")
+ }) || {
+ msg <- sprintf('install %s with
+ source("http://bioconductor.org/biocLite.R"); biocLite("%s")',
+ pkg, pkg)
+ stop(paste(strwrap(msg, exdent=2), collapse="\n"))
+ }
+}
+
+.open <- function(files, h5) {
+ lapply(files, function(file) {
+ if (h5 && rhdf5::H5Fis_hdf5(file))
+ rhdf5::H5Fopen(file)
+ else file(file, open="rt")
+ })
+}
+
+.close <- function(cons)
+ UseMethod(".close")
+
+.close.list <- function(cons)
+ for (con in cons)
+ .close(con)
+
+.close.connection <- function(cons)
+ close(cons)
+
+.close.H5IdComponent <- function(cons)
+ rhdf5::H5Fclose(cons)
+
+.colData <- function(jsonfile) {
+ json <- jsonlite::fromJSON(jsonfile)
+ do.call("data.frame", c(json, stringsAsFactors=FALSE))
+}
+
+.KALLISTO_COLCLASSES <-
+ c("character", "integer" , "numeric", "numeric", "numeric")
+
+.KALLISTO_ROWDATA <- "length"
+
+KALLISTO_ASSAYS <- c("est_counts", "tpm", "eff_length")
+
+.read <- function(con)
+ UseMethod(".read")
+
+.read.connection <- function(con)
+ read.delim(con, header=TRUE, colClasses=.KALLISTO_COLCLASSES, row.names=1)
+
+.read.H5IdComponent <- function(con) {
+ eff_length <- rhdf5::h5read(con, "/aux/eff_lengths")
+ est_counts <- rhdf5::h5read(con, "/est_counts")
+ tpm0 <- est_counts / eff_length
+ data.frame(row.names=rhdf5::h5read(con, "/aux/ids"),
+ length=rhdf5::h5read(con, "/aux/lengths"),
+ eff_length=eff_length,
+ est_counts=est_counts,
+ tpm=tpm0 / (sum(tpm0) / 1e6))
+}
+
+readKallisto <-
+ function(files,
+ json=file.path(dirname(files), "run_info.json"),
+ h5=any(grepl("\\.h5$", files)),
+ what=KALLISTO_ASSAYS,
+ as=c("SummarizedExperiment", "list", "matrix"))
+{
+ as <- match.arg(as)
+ if (missing(what))
+ what <- what[1]
+ else {
+ whats <- eval(formals()[["what"]])
+ if (!all(what %in% KALLISTO_ASSAYS))
+ stop("'what' must be in ",
+ paste(sQuote(KALLISTO_ASSAYS), collapse=", "),
+ call.=FALSE)
+ }
+
+ stopifnot(is.character(files))
+ test <- file.exists(files)
+ if (!all(test))
+ stop("file(s) do not exist:\n ",
+ paste(files[!test], collapse="\n "))
+ if (is.null(names(files)))
+ names(files) <- basename(dirname(files))
+ if (anyDuplicated(names(files)))
+ stop("'names()' of 'files' must be unique")
+
+ if (as != "matrix") {
+ .require("jsonlite")
+ stopifnot(length(files) == length(json))
+ if (!is.null(names(json)))
+ stopifnot(identical(names(json), names(files)))
+ else
+ names(json) <- names(files)
+ test <- file.exists(json)
+ if (!all(test))
+ stop("json file(s) do not exist:\n ",
+ paste(json[!test], collapse="\n "))
+ }
+
+ if (h5)
+ .require("rhdf5")
+
+ cons <- .open(files, h5)
+ value <- .read(cons[[1]])
+ rowData <- value[, .KALLISTO_ROWDATA, drop=FALSE]
+ assay <- matrix(0, nrow(rowData), length(cons),
+ dimnames=list(rownames(rowData), names(cons)))
+ assays <- setNames(replicate(length(what), assay, FALSE), what)
+ for (w in what)
+ assays[[w]][,1] <- value[[w]]
+ for (i in seq_along(cons)[-1]) {
+ value <- .read(cons[[i]])
+ if (!identical(rowData, value[, .KALLISTO_ROWDATA, drop=FALSE]))
+ stop("rowData differs between files:\n ",
+ paste(files[c(1, i)], collapse="\n "))
+ for (w in what)
+ assays[[w]][,i] <- value[[w]]
+ }
+ .close(cons)
+
+ if (as != "matrix")
+ colData <- do.call("rbind", lapply(json, .colData))
+
+ switch(as, matrix={
+ if (length(assays) == 1L)
+ assays[[1]]
+ else assays
+ }, list={
+ c(setNames(list(colData, rowData), c("colData", "rowData")), assays)
+ }, SummarizedExperiment={
+ SummarizedExperiment(assays=assays,
+ rowData=as(rowData, "DataFrame"),
+ colData=as(colData, "DataFrame"))
+ })
+}
+
+.readIds <- function(con, i) {
+ if (!missing(i))
+ rhdf5::h5read(con, "/aux/ids", list(i))
+ else rhdf5::h5read(con, "/aux/ids")
+}
+
+readKallistoBootstrap <-
+ function(file, i, j)
+{
+ .require("rhdf5")
+ stopifnot(length(file) == 1L, is.character(file))
+ stopifnot(file.exists(file))
+ stopifnot(rhdf5::H5Fis_hdf5(file))
+ con <- rhdf5::H5Fopen(file)
+ on.exit(rhdf5::H5Fclose(con))
+ nboot <- as.integer(rhdf5::h5read(con, "/aux/num_bootstrap"))
+ if (nboot == 0L)
+ stop("file contains no bootstraps:\n ", file)
+
+ if (!missing(i) && is.character(i)) {
+ idx <- match(i, .readIds(con))
+ if (anyNA(i))
+ stop("unknown target id(s)", i[is.na(idx)])
+ i <- idx
+ }
+ if (!missing(j) && is.numeric(j)) {
+ if (any((j < 1L) || any(j > nboot)))
+ stop("'j' must be >0 and <=", nboot)
+ j <- paste0("bs", as.integer(j) - 1L)
+ }
+
+ m <- if (missing(i) && missing(j)) {
+ simplify2array(rhdf5::h5read(con, "/bootstrap"))
+ } else if (missing(i)) {
+ query <- setNames(sprintf("/bootstrap/%s", j), j)
+ simplify2array(lapply(query, rhdf5::h5read, file=con))
+ } else if (missing(j)) {
+ group <- rhdf5::H5Gopen(con, "/bootstrap")
+ name <- rhdf5::h5ls(group)$name
+ rhdf5::H5Gclose(group)
+ query <- setNames(sprintf("/bootstrap/%s", name), name)
+ simplify2array(lapply(query, rhdf5::h5read, file=con, index=list(i)))
+ } else {
+ query <- setNames(sprintf("/bootstrap/%s", j), j)
+ simplify2array(lapply(query, rhdf5::h5read, file=con, index=list(i)))
+ }
+
+ rownames(m) <- .readIds(con, i)
+ if (missing(j)) {
+ o <- order(as.integer(sub("bs", "", colnames(m), fixed=TRUE)))
+ m[,o]
+ } else m
+}
diff --git a/R/saveHDF5SummarizedExperiment.R b/R/saveHDF5SummarizedExperiment.R
new file mode 100644
index 0000000..52a1ba4
--- /dev/null
+++ b/R/saveHDF5SummarizedExperiment.R
@@ -0,0 +1,127 @@
+### =========================================================================
+### Save/load a HDF5-based SummarizedExperiment object
+### -------------------------------------------------------------------------
+
+
+.create_dir <- function(dir, replace)
+{
+ if (dir.exists(dir)) {
+ if (!replace)
+ stop(wmsg("Directory \"", dir, "\" already exists. ",
+ "Use 'replace=TRUE' to replace it. ",
+ "Its content will be lost!"))
+ if (unlink(dir, recursive=TRUE) != 0L)
+ stop("failed to delete directory \"", dir, "\"")
+ } else if (file.exists(dir)) {
+ stop(wmsg("\"", dir, "\" already exists and is a file, ",
+ "not a directory"))
+ }
+ if (!suppressWarnings(dir.create(dir)))
+ stop("cannot create directory \"", dir, "\"")
+}
+
+.write_h5_assays <- function(assays, h5_path, chunk_dim, level, verbose)
+{
+ nassay <- length(assays)
+ for (i in seq_len(nassay)) {
+ a <- assays[[i]]
+ h5_name <- sprintf("assay%03d", i)
+ if (verbose)
+ message("Start writing assay ", i, "/", nassay, " to '",
+ h5_path, "':")
+ a <- HDF5Array::writeHDF5Array(a, h5_path, h5_name, chunk_dim, level,
+ verbose=verbose)
+ if (verbose)
+ message("Finished writing assay ", i, "/", nassay, " to '",
+ h5_path, "'.")
+ assays[[i]] <- a
+ }
+ assays
+}
+
+.shorten_h5_paths <- function(assays)
+{
+ nassay <- length(assays)
+ for (i in seq_len(nassay)) {
+ a <- assays[[i]]
+ a at seed@file <- basename(a at seed@file)
+ assays[[i]] <- a
+ }
+ assays
+}
+
+### Save all the assays in HDF5 format, including in-memory assays.
+### Delayed assays with delayed operations on them are realized while they
+### are written to disk..
+saveHDF5SummarizedExperiment <- function(x, dir="my_h5_se", replace=FALSE,
+ chunk_dim=NULL, level=NULL,
+ verbose=FALSE)
+{
+ if (!is(x, "SummarizedExperiment"))
+ stop("'x' must be a SummarizedExperiment object")
+ if (!isSingleString(dir))
+ stop(wmsg("'dir' must be a single string specifying the path ",
+ "to the directory where to save the ", class(x),
+ " object (the directory will be created)"))
+ if (!isTRUEorFALSE(replace))
+ stop("'replace' must be TRUE or FALSE")
+ if (!isTRUEorFALSE(verbose))
+ stop("'verbose' must be TRUE or FALSE")
+
+ ## We try library(HDF5Array) before deleting or creating directory 'dir'.
+ ## That way if HDF5Array is not installed then we will stop without having
+ ## made changes to the file system.
+ library(HDF5Array) # for writeHDF5Array()
+ .create_dir(dir, replace)
+
+ h5_path <- file.path(dir, "assays.h5")
+ x at assays <- .write_h5_assays(x at assays, h5_path, chunk_dim, level, verbose)
+
+ rds_path <- file.path(dir, "se.rds")
+ ans <- x
+ x at assays <- .shorten_h5_paths(x at assays)
+ saveRDS(x, file=rds_path)
+
+ invisible(ans)
+}
+
+.THE_EXPECTED_STUFF <- c(
+ "a HDF5-based SummarizedExperiment object previously ",
+ "saved with saveHDF5SummarizedExperiment()"
+)
+
+.stop_if_bad_dir <- function(dir)
+ stop(wmsg("directory \"", dir, "\" does not seem to contain ",
+ .THE_EXPECTED_STUFF))
+
+### Does a lot of checking and tries to fail graciously if the content
+### of 'dir' doesn't look as expected.
+loadHDF5SummarizedExperiment <- function(dir="my_h5_se")
+{
+ library(rhdf5) # for h5ls()
+ library(HDF5Array) # for the HDF5Array class
+ if (!isSingleString(dir))
+ stop(wmsg("'dir' must be a single string specifying the path ",
+ "to the directory containing ", .THE_EXPECTED_STUFF))
+ h5_path <- file.path(dir, "assays.h5")
+ rds_path <- file.path(dir, "se.rds")
+ if (!file.exists(h5_path) || !file.exists(rds_path))
+ .stop_if_bad_dir(dir)
+ h5_content <- try(rhdf5::h5ls(h5_path), silent=TRUE)
+ if (inherits(h5_content, "try-error"))
+ .stop_if_bad_dir(dir)
+ h5_datasets <- h5_content[ , "name"]
+ ans <- readRDS(rds_path)
+ if (!is(ans, "SummarizedExperiment"))
+ .stop_if_bad_dir(dir)
+ for (i in seq_along(assays(ans))) {
+ a <- assay(ans, i, withDimnames=FALSE)
+ if (!is(a, "HDF5Array") || !identical(a at seed@file, "assays.h5") ||
+ !(a at seed@name %in% h5_datasets))
+ .stop_if_bad_dir(dir)
+ a at seed@file <- file_path_as_absolute(file.path(dir, a at seed@file))
+ assay(ans, i, withDimnames=FALSE) <- a
+ }
+ ans
+}
+
diff --git a/R/zzz.R b/R/zzz.R
new file mode 100644
index 0000000..dd7aaac
--- /dev/null
+++ b/R/zzz.R
@@ -0,0 +1,2 @@
+.test <- function() BiocGenerics:::testPackage("SummarizedExperiment")
+
diff --git a/build/vignette.rds b/build/vignette.rds
new file mode 100644
index 0000000..ea870a4
Binary files /dev/null and b/build/vignette.rds differ
diff --git a/debian/README.test b/debian/README.test
deleted file mode 100644
index d22f2c9..0000000
--- a/debian/README.test
+++ /dev/null
@@ -1,15 +0,0 @@
-Notes on how this package can be tested.
-────────────────────────────────────────
-
-Please make sure you have installed the Recommended package
-r-bioc-shortread. Then you should be able to successfully run the test
-suite by doing
-
-R --no-save <<EOT
-BiocGenerics:::testPackage('Rsamtools')
-EOT
-
-Currently one out of 73 tests is failing which is sorted out with
-upstream before an autopkgtest will be provided.
-
- -- Andreas Tille <tille at debian.org> Mon, 16 Jun 2014 16:28:55 +0200
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 8ee346e..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,61 +0,0 @@
-r-bioc-summarizedexperiment (1.6.3-1) unstable; urgency=medium
-
- * Team upload
- * New upstream version
- * Add new Build-Depends: r-bioc-delayedarray
-
- -- Graham Inggs <ginggs at debian.org> Fri, 09 Jun 2017 16:16:24 +0200
-
-r-bioc-summarizedexperiment (1.4.0-2) unstable; urgency=medium
-
- * Exclude more parts of test suite which fail due to missing data package
- * debhelper 10
- * d/watch: version=4
-
- -- Andreas Tille <tille at debian.org> Sun, 15 Jan 2017 18:43:53 +0100
-
-r-bioc-summarizedexperiment (1.4.0-1) unstable; urgency=medium
-
- * New upstream version
- * Convert to dh-r
- * Generic BioConductor homepage
- * New Build-Depends: r-cran-matrix
- * New versioned Build-Depends: r-bioc-s4vectors (>= 0.11.7),
- r-bioc-iranges (>= 2.7.2),
-
- -- Andreas Tille <tille at debian.org> Wed, 26 Oct 2016 21:57:26 +0200
-
-r-bioc-summarizedexperiment (1.2.0-1) unstable; urgency=medium
-
- * New upstream version
- * Fix versioned Depends
-
- -- Andreas Tille <tille at debian.org> Sun, 08 May 2016 19:12:19 +0200
-
-r-bioc-summarizedexperiment (1.0.2-3) unstable; urgency=medium
-
- * Skip test needing unpackaged database (thanks to Gordon Ball
- <gordon at chronitis.net> for the hint)
-
- -- Andreas Tille <tille at debian.org> Tue, 03 May 2016 20:27:21 +0200
-
-r-bioc-summarizedexperiment (1.0.2-2) unstable; urgency=medium
-
- * Add missing Depends to autopkgtest
-
- -- Andreas Tille <tille at debian.org> Fri, 29 Apr 2016 08:41:09 +0200
-
-r-bioc-summarizedexperiment (1.0.2-1) unstable; urgency=medium
-
- * New upstream version
- * cme fix dpkg-control
- * Fix dependencies of autopkgtest
- * Increased versioned Depends r-bioc-genomicranges
-
- -- Andreas Tille <tille at debian.org> Wed, 27 Apr 2016 22:38:57 +0200
-
-r-bioc-summarizedexperiment (1.0.0-1) unstable; urgency=low
-
- * Initial release (closes: #803616)
-
- -- Andreas Tille <tille at debian.org> Sat, 31 Oct 2015 22:52:41 +0100
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index f599e28..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 9cbdc91..0000000
--- a/debian/control
+++ /dev/null
@@ -1,30 +0,0 @@
-Source: r-bioc-summarizedexperiment
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
-Section: gnu-r
-Priority: optional
-Build-Depends: debhelper (>= 10),
- dh-r,
- r-base-dev,
- r-bioc-biobase (>= 2.26.0),
- r-bioc-genomicranges (>= 1.24.0),
- r-bioc-iranges (>= 2.7.2),
- r-bioc-s4vectors (>= 0.11.7),
- r-bioc-delayedarray,
- r-cran-matrix
-Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-bioc-summarizedexperiment/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-bioc-summarizedexperiment/trunk/
-Homepage: https://bioconductor.org/packages/SummarizedExperiment/
-
-Package: r-bioc-summarizedexperiment
-Architecture: all
-Depends: ${R:Depends},
- ${misc:Depends},
-Recommends: ${R:Recommends}
-Suggests: ${R:Suggests}
-Description: BioConductor assay container
- 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.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 360a81e..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,107 +0,0 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: SummarizedExperiment
-Upstream-Contact: Bioconductor Package Maintainer <maintainer at bioconductor.org>
-Source: https://bioconductor.org/packages/SummarizedExperiment/
-
-Files: *
-Copyright: © 2014-2016 Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès
-License: Artistic-2.0
-
-
-Files: debian/*
-Copyright: 2015-2016 Andreas Tille <tille at debian.org>
-License: Artistic-2.0
-
-License: Artistic-2.0
- The "Artistic License"
- .
- Preamble
- .
- 1. You may make and give away verbatim copies of the source form of the
- Standard Version of this Package without restriction, provided that
- you duplicate all of the original copyright notices and associated
- disclaimers.
- .
- 2. You may apply bug fixes, portability fixes and other modifications
- derived from the Public Domain or from the Copyright Holder. A
- Package modified in such a way shall still be considered the Standard
- Version.
- .
- 3. You may otherwise modify your copy of this Package in any way,
- provided that you insert a prominent notice in each changed file stating
- how and when you changed that file, and provided that you do at least
- ONE of the following:
- .
- a) place your modifications in the Public Domain or otherwise make them
- Freely Available, such as by posting said modifications to Usenet or
- an equivalent medium, or placing the modifications on a major archive
- site such as uunet.uu.net, or by allowing the Copyright Holder to include
- your modifications in the Standard Version of the Package.
- .
- b) use the modified Package only within your corporation or organization.
- .
- c) rename any non-standard executables so the names do not conflict
- with standard executables, which must also be provided, and provide
- a separate manual page for each non-standard executable that clearly
- documents how it differs from the Standard Version.
- .
- d) make other distribution arrangements with the Copyright Holder.
- .
- 4. You may distribute the programs of this Package in object code or
- executable form, provided that you do at least ONE of the following:
- .
- a) distribute a Standard Version of the executables and library files,
- together with instructions (in the manual page or equivalent) on where
- to get the Standard Version.
- .
- b) accompany the distribution with the machine-readable source of
- the Package with your modifications.
- .
- c) give non-standard executables non-standard names, and clearly
- document the differences in manual pages (or equivalent), together
- with instructions on where to get the Standard Version.
- .
- d) make other distribution arrangements with the Copyright Holder.
- .
- 5. You may charge a reasonable copying fee for any distribution of this
- Package. You may charge any fee you choose for support of this Package.
- You may not charge a fee for this Package itself. However, you may
- distribute this Package in aggregate with other (possibly commercial)
- programs as part of a larger (possibly commercial) software distribution
- provided that you do not advertise this Package as a product of your
- own. You may embed this Package's interpreter within an executable of
- yours (by linking); this shall be construed as a mere form of
- aggregation, provided that the complete Standard Version of the
- interpreter is so embedded.
- .
- 6. The scripts and library files supplied as input to or produced as
- output from the programs of this Package do not automatically fall under
- the copyright of this Package, but belong to whoever generated them, and
- may be sold commercially, and may be aggregated with this Package. If
- such scripts or library files are aggregated with this Package via the
- so-called "undump" or "unexec" methods of producing a binary executable
- image, then distribution of such an image shall neither be construed as
- a distribution of this Package nor shall it fall under the restrictions
- of Paragraphs 3 and 4, provided that you do not represent such an
- executable image as a Standard Version of this Package.
- .
- 7. C subroutines (or comparably compiled subroutines in other
- languages) supplied by you and linked into this Package in order to
- emulate subroutines and variables of the language defined by this
- Package shall not be considered part of this Package, but are the
- equivalent of input as in Paragraph 6, provided these subroutines do
- not change the language in any way that would cause it to fail the
- regression tests for the language.
- .
- 8. Aggregation of this Package with a commercial distribution is always
- permitted provided that the use of this Package is embedded; that is,
- when no overt attempt is made to make this Package's interfaces visible
- to the end user of the commercial distribution. Such use shall not be
- construed as a distribution of this Package.
- .
- 9. The name of the Copyright Holder may not be used to endorse or promote
- products derived from this software without specific prior written permission.
- .
- 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 50f6656..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-debian/README.test
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index af56ecc..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-skip_test_needing_not_packaged_database.patch
diff --git a/debian/patches/skip_test_needing_not_packaged_database.patch b/debian/patches/skip_test_needing_not_packaged_database.patch
deleted file mode 100644
index 639d1db..0000000
--- a/debian/patches/skip_test_needing_not_packaged_database.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Description: Skip test needing unpackaged database
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 03 May 2016 20:27:21 +0200
-
---- a/inst/unitTests/test_makeSummarizedExperimentFromExpressionSet.R
-+++ b/inst/unitTests/test_makeSummarizedExperimentFromExpressionSet.R
-@@ -141,47 +141,3 @@ test_GenomicRanges_SummarizedExperiment_
- sampleNames(eset5))
- }
-
--test_GenomicRanges_SummarizedExperiment_coercion_mappingFunctions <- function()
--{
-- ## naiveRangeMapper
-- ## valid object from empty object
-- checkTrue(validObject(makeSummarizedExperimentFromExpressionSet(ExpressionSet())))
--
-- ## valid object from sample ExpressionSet
-- data("sample.ExpressionSet", package = "Biobase")
-- eset1 <- sample.ExpressionSet
-- checkTrue(validObject(makeSummarizedExperimentFromExpressionSet(eset1)))
--
-- ## makeSummarizedExperimentFromExpressionSet should be the same as `as`
-- ## with default args
-- checkEquals(makeSummarizedExperimentFromExpressionSet(eset1),
-- as(eset1, "RangedSummarizedExperiment"))
--
-- ## probeRangeMapper
-- ## valid object from empty object
-- checkTrue(validObject(
-- makeSummarizedExperimentFromExpressionSet(ExpressionSet(),
-- probeRangeMapper)))
--
-- ## valid object from sample ExpressionSet
-- se1 <- makeSummarizedExperimentFromExpressionSet(eset1, probeRangeMapper)
-- checkTrue(validObject(se1))
--
-- ## Granges returned have rownames that were from the featureNames
-- checkTrue(all(rownames(rowRanges(se1)) %in% featureNames(eset1)))
--
-- ## geneRangeMapper
-- ## valid object from empty object
-- checkTrue(validObject(
-- makeSummarizedExperimentFromExpressionSet(ExpressionSet(),
-- geneRangeMapper(NULL))))
--
-- ## valid object from sample ExpressionSet
-- se2 <- makeSummarizedExperimentFromExpressionSet(eset1,
-- geneRangeMapper("TxDb.Hsapiens.UCSC.hg19.knownGene"))
-- checkTrue(validObject(se2))
--
-- ## Granges returned have rownames that were from the featureNames
-- checkTrue(all(rownames(rowRanges(se2)) %in% featureNames(eset1)))
--}
--
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 68d9a36..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/make -f
-
-%:
- dh $@ --buildsystem R
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
deleted file mode 100644
index 768f587..0000000
--- a/debian/tests/control
+++ /dev/null
@@ -1,3 +0,0 @@
-Tests: run-unit-test
-Depends: @, r-cran-runit, r-cran-digest, r-bioc-annotate
-Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
deleted file mode 100644
index b5e9276..0000000
--- a/debian/tests/run-unit-test
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh -e
-
-LC_ALL=C R --no-save <<EOT
-SummarizedExperiment:::.test()
-EOT
-
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 9eacbd4..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=4
-opts=downloadurlmangle=s?^(.*)\.\.?http:$1packages/release/bioc? \
- http://www.bioconductor.org/packages/release/bioc/html/SummarizedExperiment.html .*/SummarizedExperiment_([\d\.]+)\.tar\.gz
diff --git a/inst/doc/SummarizedExperiment.R b/inst/doc/SummarizedExperiment.R
new file mode 100644
index 0000000..716bf4a
--- /dev/null
+++ b/inst/doc/SummarizedExperiment.R
@@ -0,0 +1,101 @@
+## ----style, echo=FALSE, results='asis'-----------------------------------
+BiocStyle::markdown()
+
+## ----include = FALSE-----------------------------------------------------
+# download current version of SE diagram
+#download.file("https://docs.google.com/feeds/download/drawings/Export?id=18OcDb80FpvSGRYnFl-8vUqwNNLaNHrG1I9SWKHCselo&exportFormat=svg", "SE.svg")
+download.file("https://docs.google.com/feeds/download/drawings/Export?id=1kiC8Qlo1mhSnLDqkGiRNPSo6GWn3C2duBszCFbJCB-g&exportFormat=svg", "SE.svg")
+
+## ---- echo=FALSE---------------------------------------------------------
+suppressPackageStartupMessages(library(SummarizedExperiment))
+suppressPackageStartupMessages(data(airway, package="airway"))
+
+## ------------------------------------------------------------------------
+library(SummarizedExperiment)
+data(airway, package="airway")
+se <- airway
+se
+
+## ----assays, eval = FALSE------------------------------------------------
+# assays(se)$counts
+
+## ----assays_table, echo = FALSE------------------------------------------
+knitr::kable(assays(se)$counts[1:10,])
+
+## ----rowRanges-----------------------------------------------------------
+rowRanges(se)
+
+## ----colData-------------------------------------------------------------
+colData(se)
+
+## ----columnSubset--------------------------------------------------------
+# subset for only those samples treated with dexamethasone
+se[, se$dex == "trt"]
+
+## ----metadata------------------------------------------------------------
+metadata(se)
+
+## ----metadata-formula----------------------------------------------------
+metadata(se)$formula <- counts ~ dex + albut
+
+metadata(se)
+
+## ----constructRSE--------------------------------------------------------
+nrows <- 200
+ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)),
+ IRanges(floor(runif(200, 1e5, 1e6)), width=100),
+ strand=sample(c("+", "-"), 200, TRUE),
+ feature_id=sprintf("ID%03d", 1:200))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+
+SummarizedExperiment(assays=list(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+
+## ----constructSE---------------------------------------------------------
+SummarizedExperiment(assays=list(counts=counts), colData=colData)
+
+## ----2d------------------------------------------------------------------
+# subset the first five transcripts and first three samples
+se[1:5, 1:3]
+
+## ----colDataExtraction---------------------------------------------------
+se[, se$cell == "N61311"]
+
+## ----getSet--------------------------------------------------------------
+counts <- matrix(1:15, 5, 3, dimnames=list(LETTERS[1:5], LETTERS[1:3]))
+
+dates <- SummarizedExperiment(assays=list(counts=counts),
+ rowData=DataFrame(month=month.name[1:5], day=1:5))
+
+# Subset all January assays
+dates[rowData(dates)$month == "January", ]
+
+## ----assay_assays--------------------------------------------------------
+assays(se)
+
+assays(se)[[1]][1:5, 1:5]
+
+# assay defaults to the first assay if no i is given
+assay(se)[1:5, 1:5]
+
+assay(se, 1)[1:5, 1:5]
+
+## ----overlap-------------------------------------------------------------
+# Subset for only rows which are in the interval 100,000 to 110,000 of
+# chromosome 1
+roi <- GRanges(seqnames="1", ranges=100000:1100000)
+subsetByOverlaps(se, roi)
+
+## ----rseSubclass---------------------------------------------------------
+setClass("MyRSESubclass",
+ contains="RangedSummarizedExperiment",
+ representation=representation(
+ slot1="integer",
+ slot2="function"
+ ## ... maybe more ...
+ )
+)
+
diff --git a/inst/doc/SummarizedExperiment.Rmd b/inst/doc/SummarizedExperiment.Rmd
new file mode 100644
index 0000000..5702f6b
--- /dev/null
+++ b/inst/doc/SummarizedExperiment.Rmd
@@ -0,0 +1,345 @@
+---
+title: "_SummarizedExperiment_ for Coordinating Experimental Assays, Samples, and Regions of Interest"
+author: "Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès"
+date: "Revised: 22 June, 2016"
+output:
+ BiocStyle::html_document:
+ toc: true
+vignette: >
+ %\VignetteIndexEntry{SummarizedExperiment}
+ %\VignetteEngine{knitr::rmarkdown}
+ \usepackage[utf8]{inputenc}
+---
+
+```{r style, echo=FALSE, results='asis'}
+BiocStyle::markdown()
+```
+
+
+# Introduction
+
+The `SummarizedExperiment` class is used to store rectangular matrices of
+experimental results, which are commonly produced by sequencing and microarray
+experiments. Each object stores observations of one or more samples, along
+with additional meta-data describing both the observations (features) and
+samples (phenotypes).
+
+A key aspect of the `SummarizedExperiment` class is the coordination of the
+meta-data and assays when subsetting. For example, if you want to exclude a
+given sample you can do for both the meta-data and assay in one operation,
+which ensures the meta-data and observed data will remain in sync. Improperly
+accounting for meta and observational data has resulted in a number of
+incorrect results and retractions so this is a very desirable
+property.
+
+`SummarizedExperiment` is in many ways similar to the historical
+`ExpressionSet`, the main distinction being that `SummarizedExperiment` is more
+flexible in it's row information, allowing both `GRanges` based as well as those
+described by arbitrary `DataFrame`s. This makes it ideally suited to a variety
+of experiments, particularly sequencing based experiments such as RNA-Seq and
+ChIp-Seq.
+
+# Anatomy of a `SummarizedExperiment`
+
+The _SummarizedExperiment_ package contains two classes:
+`SummarizedExperiment` and `RangedSummarizedExperiment`.
+
+`SummarizedExperiment` is a matrix-like container where rows represent features
+of interest (e.g. genes, transcripts, exons, etc.) and columns represent
+samples. The objects contain one or more assays, each represented by a
+matrix-like object of numeric or other mode. The rows of a
+`SummarizedExperiment` object represent features of interest. Information
+about these features is stored in a `DataFrame` object, accessible using the
+function `rowData()`. Each row of the `DataFrame` provides information on the
+feature in the corresponding row of the `SummarizedExperiment` object. Columns
+of the DataFrame represent different attributes of the features of interest,
+e.g., gene or transcript IDs, etc.
+
+`RangedSummarizedExperiment` is the child of the `SummarizedExperiment` class
+which means that all the methods on `SummarizedExperiment` also work on a
+`RangedSummarizedExperiment`.
+
+The fundamental difference between the two classes is that the rows of a
+`RangedSummarizedExperiment` object represent genomic ranges of interest
+instead of a `DataFrame` of features. The `RangedSummarizedExperiment` ranges
+are described by a `GRanges` or a `GRangesList` object, accessible using the
+`rowRanges()` function.
+
+The following graphic displays the class geometry and highlights the
+vertical (column) and horizontal (row) relationships.
+
+
+```{r include = FALSE}
+# download current version of SE diagram
+#download.file("https://docs.google.com/feeds/download/drawings/Export?id=18OcDb80FpvSGRYnFl-8vUqwNNLaNHrG1I9SWKHCselo&exportFormat=svg", "SE.svg")
+download.file("https://docs.google.com/feeds/download/drawings/Export?id=1kiC8Qlo1mhSnLDqkGiRNPSo6GWn3C2duBszCFbJCB-g&exportFormat=svg", "SE.svg")
+```
+
+![Summarized Experiment](SE.svg)
+
+## Assays
+
+The `airway` 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 `RangedSummarizedExperiment` object which contains 8 different
+experimental and assays 64,102 gene transcripts.
+
+```{r, echo=FALSE}
+suppressPackageStartupMessages(library(SummarizedExperiment))
+suppressPackageStartupMessages(data(airway, package="airway"))
+```
+
+```{r}
+library(SummarizedExperiment)
+data(airway, package="airway")
+se <- airway
+se
+```
+
+To retrieve the experiment data from a `SummarizedExperiment` object one can
+use the `assays()` accessor. An object can have multiple assay datasets
+each of which can be accessed using the `$` operator.
+The `airway` dataset contains only one assay (`counts`). Here each row
+represents a gene transcript and each column one of the samples.
+
+```{r assays, eval = FALSE}
+assays(se)$counts
+```
+
+```{r assays_table, echo = FALSE}
+knitr::kable(assays(se)$counts[1:10,])
+```
+
+## 'Row' (regions-of-interest) data
+The `rowRanges()` accessor is used to view the range information for a
+`RangedSummarizedExperiment`. (Note if this were the parent
+`SummarizedExperiment` class we'd use `rowData()`). The data are stored in a
+`GRangesList` object, where each list element corresponds to one gene
+transcript and the ranges in each `GRanges` correspond to the exons in the
+transcript.
+
+```{r rowRanges}
+rowRanges(se)
+```
+
+## 'Column' (sample) data
+
+Sample meta-data describing the samples can be accessed using `colData()`, and
+is a `DataFrame` that can store any number of descriptive columns for each
+sample row.
+
+```{r colData}
+colData(se)
+```
+
+This sample metadata can be accessed using the `$` accessor which makes it
+easy to subset the entire object by a given phenotype.
+
+```{r columnSubset}
+# subset for only those samples treated with dexamethasone
+se[, se$dex == "trt"]
+```
+
+## Experiment-wide metadata
+
+Meta-data describing the experimental methods and publication references can be
+accessed using `metadata()`.
+
+```{r metadata}
+metadata(se)
+```
+
+Note that `metadata()` is just a simple list, so it is appropriate for _any_
+experiment wide metadata the user wishes to save, such as storing model
+formulas.
+
+```{r metadata-formula}
+metadata(se)$formula <- counts ~ dex + albut
+
+metadata(se)
+```
+
+# Constructing a `SummarizedExperiment`
+
+Often, `SummarizedExperiment` or `RangedSummarizedExperiment` objects are
+returned by functions written by other packages. However it is possible to
+create them by hand with a call to the `SummarizedExperiment()` constructor.
+
+Constructing a `RangedSummarizedExperiment` with a `GRanges` as the
+_rowRanges_ argument:
+
+```{r constructRSE}
+nrows <- 200
+ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)),
+ IRanges(floor(runif(200, 1e5, 1e6)), width=100),
+ strand=sample(c("+", "-"), 200, TRUE),
+ feature_id=sprintf("ID%03d", 1:200))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+
+SummarizedExperiment(assays=list(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+```
+
+A `SummarizedExperiment` can be constructed with or without supplying
+a `DataFrame` for the _rowData_ argument:
+
+```{r constructSE}
+SummarizedExperiment(assays=list(counts=counts), colData=colData)
+```
+
+# Common operations on `SummarizedExperiment`
+
+## Subsetting
+
+- `[` Performs two dimensional subsetting, just like subsetting a matrix
+ or data frame.
+```{r 2d}
+# subset the first five transcripts and first three samples
+se[1:5, 1:3]
+```
+- `$` operates on `colData()` columns, for easy sample extraction.
+```{r colDataExtraction}
+se[, se$cell == "N61311"]
+```
+
+## Getters and setters
+
+- `rowRanges()` / (`rowData()`), `colData()`, `metadata()`
+```{r getSet}
+counts <- matrix(1:15, 5, 3, dimnames=list(LETTERS[1:5], LETTERS[1:3]))
+
+dates <- SummarizedExperiment(assays=list(counts=counts),
+ rowData=DataFrame(month=month.name[1:5], day=1:5))
+
+# Subset all January assays
+dates[rowData(dates)$month == "January", ]
+```
+
+- `assay()` versus `assays()`
+There are two accessor functions for extracting the assay data from a
+`SummarizedExperiment` object. `assays()` operates on the entire list of assay
+data as a whole, while `assay()` operates on only one assay at a time.
+`assay(x, i)` is simply a convenience function which is equivalent to
+`assays(x)[[i]]`.
+
+```{r assay_assays}
+assays(se)
+
+assays(se)[[1]][1:5, 1:5]
+
+# assay defaults to the first assay if no i is given
+assay(se)[1:5, 1:5]
+
+assay(se, 1)[1:5, 1:5]
+```
+
+## Range-based operations
+
+- `subsetByOverlaps()`
+`SummarizedExperiment` objects support all of the `findOverlaps()` methods and
+associated functions. This includes `subsetByOverlaps()`, which makes it easy
+to subset a `SummarizedExperiment` object by an interval.
+
+```{r overlap}
+# Subset for only rows which are in the interval 100,000 to 110,000 of
+# chromosome 1
+roi <- GRanges(seqnames="1", ranges=100000:1100000)
+subsetByOverlaps(se, roi)
+```
+
+# Advanced: Extending `RangedSummarizedExperiment`
+
+For representing and manipulating data in their own package, Bioconductor
+developers are encouraged to re-use existing classes defined in other
+packages like the `RangedSummarizedExperiment` or `GRanges` containers
+defined in the `SummarizedExperiment` or `GenomicRanges` infrastructure
+packages, respectively. Many Bioconductor packages are designed around
+these basic containers, that is, they define functions that take and/or
+return a `RangedSummarizedExperiment` or `GRanges` object.
+For example the `csaw` package defines various functions that operate
+on `RangedSummarizedExperiment` objects, which are used to represent the
+number of ChIP-seq reads from each BAM file overlapping pre-specified
+regions.
+
+However, sometimes re-using the `RangedSummarizedExperiment` class as-is
+does not satisfy the needs of the package and the developer makes the choice
+to extend the class in order to accomodate the special needs of the package
+and/or the specificities of the data that it deals with. For example the
+`DESeq2` package defines the `DESeqDataSet` class which extends
+`RangedSummarizedExperiment` to add the `design` and `dispersionFunction`
+slots to it.
+
+The following subsections describe in a nutshell how the developer would
+typically proceed for extending `RangedSummarizedExperiment` in his/her
+own package. Some familiarity with the S4 class system is required. Readers
+not familiar with the S4 class system are encouraged to consult the vignette
+`A quick overview of the S4 class system` located in the `S4Vectors` package
+for the basics of implementing and extending S4 classes.
+
+The approach described below allows the developer to extend
+`RangedSummarizedExperiment` it in a way that remains agnostic of its
+internals. Keeping this separation between the responsibilities of the owners
+of the parent and child classes facilitate maintenance in the long run.
+In particular, the implementation of the child class won't be affected by
+changes in the internals of the parent class.
+
+## Depend on, and import, the `SummarizedExperiment` package
+
+Add `SummarizedExperiment` to the Depends field of the DESCRIPTION file
+of the package and the `import(SummarizedExperiment)` directive to its
+NAMESPACE file.
+
+## Define and export the `RangedSummarizedExperiment` subclass
+
+Define the subclass with something like:
+```{r rseSubclass}
+setClass("MyRSESubclass",
+ contains="RangedSummarizedExperiment",
+ representation=representation(
+ slot1="integer",
+ slot2="function"
+ ## ... maybe more ...
+ )
+)
+```
+
+Export it by adding the `exportClasses(MyRSESubclass)` directive to the
+NAMESPACE file.
+
+## Construct `MyRSESubclass` instances
+
+When calling `new()` for constructing a `MyRSESubclass` instance, specify
+only the MyRSESubclass-specific slots:
+`new("MyRSESubclass", rse, slot1=value1, slot2=value2)`,
+where `rse` is a `RangedSummarizedExperiment` object.
+
+Providing a `MyRSESubclass` constructor function (named as the class itself)
+is recommended.
+
+## Define a validity method
+
+The validity method for `MyRSESubclass` only needs to take care of what's
+new in `MyRSESubclass` with respect to `RangedSummarizedExperiment`, that is,
+of the aspects of `MyRSESubclass` objects that are not already covered by the
+validity method for `RangedSummarizedExperiment` objects. This is because
+calling `validObject()` on a `MyRSESubclass` object automatically validates
+it as a `RangedSummarizedExperiment` object first and then calls the validity
+method for `MyRSESubclass` objects. In other words, validation works
+incrementally starting from the root of the class hierarchy and going in the
+parent-to-child direction.
+
+## Use the `RangedSummarizedExperiment` accessors on `MyRSESubclass` objects
+
+Like any user of `RangedSummarizedExperiment` objects, the developer of
+`MyRSESubclass` should always use the `RangedSummarizedExperiment` accessors
+to access the `RangedSummarizedExperiment`-specific parts of his/her
+`MyRSESubclass` objects.
+
+## Use `callNextMethod`
+
+In case some of the methods defined for `RangedSummarizedExperiment` objects
+need to be overwritten, the new methods should call `callNextMethod`
+internally.
diff --git a/inst/doc/SummarizedExperiment.html b/inst/doc/SummarizedExperiment.html
new file mode 100644
index 0000000..650abb5
--- /dev/null
+++ b/inst/doc/SummarizedExperiment.html
@@ -0,0 +1,541 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+<meta charset="utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="pandoc" />
+
+<meta name="author" content="Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès" />
+
+
+<title>SummarizedExperiment for Coordinating Experimental Assays, Samples, and Regions of Interest</title>
+
+<link href="data:text/css;charset=utf-8,pre%20%2Eoperator%2C%0Apre%20%2Eparen%20%7B%0Acolor%3A%20rgb%28104%2C%20118%2C%20135%29%0A%7D%0Apre%20%2Eliteral%20%7B%0Acolor%3A%20%23990073%0A%7D%0Apre%20%2Enumber%20%7B%0Acolor%3A%20%23099%3B%0A%7D%0Apre%20%2Ecomment%20%7B%0Acolor%3A%20%23998%3B%0Afont%2Dstyle%3A%20italic%0A%7D%0Apre%20%2Ekeyword%20%7B%0Acolor%3A%20%23900%3B%0Afont%2Dweight%3A%20bold%0A%7D%0Apre%20%2Eidentifier%20%7B%0Acolor%3A%20rgb%280%2C%200%2C%200%29%3B%0A%7D%0Apre%20%2Estri [...]
+<script src="data:application/x-javascript;base64,dmFyIGhsanM9bmV3IGZ1bmN0aW9uKCl7ZnVuY3Rpb24gbShwKXtyZXR1cm4gcC5yZXBsYWNlKC8mL2dtLCImYW1wOyIpLnJlcGxhY2UoLzwvZ20sIiZsdDsiKX1mdW5jdGlvbiBmKHIscSxwKXtyZXR1cm4gUmVnRXhwKHEsIm0iKyhyLmNJPyJpIjoiIikrKHA/ImciOiIiKSl9ZnVuY3Rpb24gYihyKXtmb3IodmFyIHA9MDtwPHIuY2hpbGROb2Rlcy5sZW5ndGg7cCsrKXt2YXIgcT1yLmNoaWxkTm9kZXNbcF07aWYocS5ub2RlTmFtZT09IkNPREUiKXtyZXR1cm4gcX1pZighKHEubm9kZVR5cGU9PTMmJnEubm9kZVZhbHVlLm1hdGNoKC9ccysvKSkpe2JyZWFrfX19ZnVuY3Rpb24gaCh0LH [...]
+
+<style type="text/css">code{white-space: pre;}</style>
+<style type="text/css">
+ pre:not([class]) {
+ background-color: white;
+ }
+</style>
+<script type="text/javascript">
+if (window.hljs && document.readyState && document.readyState === "complete") {
+ window.setTimeout(function() {
+ hljs.initHighlighting();
+ }, 0);
+}
+</script>
+
+
+<link href="data:text/css;charset=utf-8,body%2C%20td%20%7B%0Afont%2Dfamily%3A%20sans%2Dserif%3B%0Abackground%2Dcolor%3A%20white%3B%0Afont%2Dsize%3A%2013px%3B%0A%7D%0Abody%20%7B%0Amax%2Dwidth%3A%20800px%3B%0Amargin%3A%200%20auto%3B%0Apadding%3A%201em%201em%202em%3B%0Aline%2Dheight%3A%2020px%3B%0A%7D%0A%0Adiv%23TOC%20li%20%7B%0Alist%2Dstyle%3Anone%3B%0Abackground%2Dimage%3Anone%3B%0Abackground%2Drepeat%3Anone%3B%0Abackground%2Dposition%3A0%3B%0A%7D%0A%0Ap%2C%20pre%20%7B%20margin%3A%200em%2 [...]
+
+<script type="text/javascript">
+document.addEventListener("DOMContentLoaded", function() {
+ var links = document.links;
+ for (var i = 0, linksLength = links.length; i < linksLength; i++)
+ if(links[i].hostname != window.location.hostname)
+ links[i].target = '_blank';
+});
+</script>
+
+</head>
+
+<body>
+
+
+<div id="header">
+<h1 class="title"><em>SummarizedExperiment</em> for Coordinating Experimental Assays, Samples, and Regions of Interest</h1>
+<h4 class="author"><em>Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès</em></h4>
+<h4 class="date"><em>Revised: 22 June, 2016</em></h4>
+</div>
+
+<h1>Contents</h1>
+<div id="TOC">
+<ul>
+<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a></li>
+<li><a href="#anatomy-of-a-summarizedexperiment"><span class="toc-section-number">2</span> Anatomy of a <code>SummarizedExperiment</code></a><ul>
+<li><a href="#assays"><span class="toc-section-number">2.1</span> Assays</a></li>
+<li><a href="#row-regions-of-interest-data"><span class="toc-section-number">2.2</span> ‘Row’ (regions-of-interest) data</a></li>
+<li><a href="#column-sample-data"><span class="toc-section-number">2.3</span> ‘Column’ (sample) data</a></li>
+<li><a href="#experiment-wide-metadata"><span class="toc-section-number">2.4</span> Experiment-wide metadata</a></li>
+</ul></li>
+<li><a href="#constructing-a-summarizedexperiment"><span class="toc-section-number">3</span> Constructing a <code>SummarizedExperiment</code></a></li>
+<li><a href="#common-operations-on-summarizedexperiment"><span class="toc-section-number">4</span> Common operations on <code>SummarizedExperiment</code></a><ul>
+<li><a href="#subsetting"><span class="toc-section-number">4.1</span> Subsetting</a></li>
+<li><a href="#getters-and-setters"><span class="toc-section-number">4.2</span> Getters and setters</a></li>
+<li><a href="#range-based-operations"><span class="toc-section-number">4.3</span> Range-based operations</a></li>
+</ul></li>
+<li><a href="#advanced-extending-rangedsummarizedexperiment"><span class="toc-section-number">5</span> Advanced: Extending <code>RangedSummarizedExperiment</code></a><ul>
+<li><a href="#depend-on-and-import-the-summarizedexperiment-package"><span class="toc-section-number">5.1</span> Depend on, and import, the <code>SummarizedExperiment</code> package</a></li>
+<li><a href="#define-and-export-the-rangedsummarizedexperiment-subclass"><span class="toc-section-number">5.2</span> Define and export the <code>RangedSummarizedExperiment</code> subclass</a></li>
+<li><a href="#construct-myrsesubclass-instances"><span class="toc-section-number">5.3</span> Construct <code>MyRSESubclass</code> instances</a></li>
+<li><a href="#define-a-validity-method"><span class="toc-section-number">5.4</span> Define a validity method</a></li>
+<li><a href="#use-the-rangedsummarizedexperiment-accessors-on-myrsesubclass-objects"><span class="toc-section-number">5.5</span> Use the <code>RangedSummarizedExperiment</code> accessors on <code>MyRSESubclass</code> objects</a></li>
+<li><a href="#use-callnextmethod"><span class="toc-section-number">5.6</span> Use <code>callNextMethod</code></a></li>
+</ul></li>
+</ul>
+</div>
+
+<script type="text/javascript">
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector("h1").className = "title";
+});
+</script>
+<script type="text/javascript">
+document.addEventListener("DOMContentLoaded", function() {
+ var links = document.links;
+ for (var i = 0, linksLength = links.length; i < linksLength; i++)
+ if (links[i].hostname != window.location.hostname)
+ links[i].target = '_blank';
+});
+</script>
+<div id="introduction" class="section level1">
+<h1><span class="header-section-number">1</span> Introduction</h1>
+<p>The <code>SummarizedExperiment</code> class is used to store rectangular matrices of experimental results, which are commonly produced by sequencing and microarray experiments. Each object stores observations of one or more samples, along with additional meta-data describing both the observations (features) and samples (phenotypes).</p>
+<p>A key aspect of the <code>SummarizedExperiment</code> class is the coordination of the meta-data and assays when subsetting. For example, if you want to exclude a given sample you can do for both the meta-data and assay in one operation, which ensures the meta-data and observed data will remain in sync. Improperly accounting for meta and observational data has resulted in a number of incorrect results and retractions so this is a very desirable property.</p>
+<p><code>SummarizedExperiment</code> is in many ways similar to the historical <code>ExpressionSet</code>, the main distinction being that <code>SummarizedExperiment</code> is more flexible in it’s row information, allowing both <code>GRanges</code> based as well as those described by arbitrary <code>DataFrame</code>s. This makes it ideally suited to a variety of experiments, particularly sequencing based experiments such as RNA-Seq and ChIp-Seq.</p>
+</div>
+<div id="anatomy-of-a-summarizedexperiment" class="section level1">
+<h1><span class="header-section-number">2</span> Anatomy of a <code>SummarizedExperiment</code></h1>
+<p>The <em>SummarizedExperiment</em> package contains two classes: <code>SummarizedExperiment</code> and <code>RangedSummarizedExperiment</code>.</p>
+<p><code>SummarizedExperiment</code> is a matrix-like container where rows represent features of interest (e.g. genes, transcripts, exons, etc.) and columns represent samples. The objects contain one or more assays, each represented by a matrix-like object of numeric or other mode. The rows of a <code>SummarizedExperiment</code> object represent features of interest. Information about these features is stored in a <code>DataFrame</code> object, accessible using the function <code>rowData [...]
+<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 [...]
+<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>
+<pre class="r"><code>library(SummarizedExperiment)
+data(airway, package="airway")
+se <- airway
+se</code></pre>
+<pre><code>## class: RangedSummarizedExperiment
+## dim: 64102 8
+## metadata(1): ''
+## assays(1): counts
+## rownames(64102): ENSG00000000003 ENSG00000000005 ... LRG_98 LRG_99
+## rowData names(0):
+## colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
+## colData names(9): SampleName cell ... Sample BioSample</code></pre>
+<p>To retrieve the experiment data from a <code>SummarizedExperiment</code> object one can use the <code>assays()</code> accessor. An object can have multiple assay datasets each of which can be accessed using the <code>$</code> operator. The <code>airway</code> dataset contains only one assay (<code>counts</code>). Here each row represents a gene transcript and each column one of the samples.</p>
+<pre class="r"><code>assays(se)$counts</code></pre>
+<table>
+<thead>
+<tr class="header">
+<th></th>
+<th align="right">SRR1039508</th>
+<th align="right">SRR1039509</th>
+<th align="right">SRR1039512</th>
+<th align="right">SRR1039513</th>
+<th align="right">SRR1039516</th>
+<th align="right">SRR1039517</th>
+<th align="right">SRR1039520</th>
+<th align="right">SRR1039521</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td>ENSG00000000003</td>
+<td align="right">679</td>
+<td align="right">448</td>
+<td align="right">873</td>
+<td align="right">408</td>
+<td align="right">1138</td>
+<td align="right">1047</td>
+<td align="right">770</td>
+<td align="right">572</td>
+</tr>
+<tr class="even">
+<td>ENSG00000000005</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+</tr>
+<tr class="odd">
+<td>ENSG00000000419</td>
+<td align="right">467</td>
+<td align="right">515</td>
+<td align="right">621</td>
+<td align="right">365</td>
+<td align="right">587</td>
+<td align="right">799</td>
+<td align="right">417</td>
+<td align="right">508</td>
+</tr>
+<tr class="even">
+<td>ENSG00000000457</td>
+<td align="right">260</td>
+<td align="right">211</td>
+<td align="right">263</td>
+<td align="right">164</td>
+<td align="right">245</td>
+<td align="right">331</td>
+<td align="right">233</td>
+<td align="right">229</td>
+</tr>
+<tr class="odd">
+<td>ENSG00000000460</td>
+<td align="right">60</td>
+<td align="right">55</td>
+<td align="right">40</td>
+<td align="right">35</td>
+<td align="right">78</td>
+<td align="right">63</td>
+<td align="right">76</td>
+<td align="right">60</td>
+</tr>
+<tr class="even">
+<td>ENSG00000000938</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">2</td>
+<td align="right">0</td>
+<td align="right">1</td>
+<td align="right">0</td>
+<td align="right">0</td>
+<td align="right">0</td>
+</tr>
+<tr class="odd">
+<td>ENSG00000000971</td>
+<td align="right">3251</td>
+<td align="right">3679</td>
+<td align="right">6177</td>
+<td align="right">4252</td>
+<td align="right">6721</td>
+<td align="right">11027</td>
+<td align="right">5176</td>
+<td align="right">7995</td>
+</tr>
+<tr class="even">
+<td>ENSG00000001036</td>
+<td align="right">1433</td>
+<td align="right">1062</td>
+<td align="right">1733</td>
+<td align="right">881</td>
+<td align="right">1424</td>
+<td align="right">1439</td>
+<td align="right">1359</td>
+<td align="right">1109</td>
+</tr>
+<tr class="odd">
+<td>ENSG00000001084</td>
+<td align="right">519</td>
+<td align="right">380</td>
+<td align="right">595</td>
+<td align="right">493</td>
+<td align="right">820</td>
+<td align="right">714</td>
+<td align="right">696</td>
+<td align="right">704</td>
+</tr>
+<tr class="even">
+<td>ENSG00000001167</td>
+<td align="right">394</td>
+<td align="right">236</td>
+<td align="right">464</td>
+<td align="right">175</td>
+<td align="right">658</td>
+<td align="right">584</td>
+<td align="right">360</td>
+<td align="right">269</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div id="row-regions-of-interest-data" class="section level2">
+<h2><span class="header-section-number">2.2</span> ‘Row’ (regions-of-interest) data</h2>
+<p>The <code>rowRanges()</code> accessor is used to view the range information for a <code>RangedSummarizedExperiment</code>. (Note if this were the parent <code>SummarizedExperiment</code> class we’d use <code>rowData()</code>). The data are stored in a <code>GRangesList</code> object, where each list element corresponds to one gene transcript and the ranges in each <code>GRanges</code> correspond to the exons in the transcript.</p>
+<pre class="r"><code>rowRanges(se)</code></pre>
+<pre><code>## GRangesList object of length 64102:
+## $ENSG00000000003
+## GRanges object with 17 ranges and 2 metadata columns:
+## seqnames ranges strand | exon_id exon_name
+## <Rle> <IRanges> <Rle> | <integer> <character>
+## [1] X [99883667, 99884983] - | 667145 ENSE00001459322
+## [2] X [99885756, 99885863] - | 667146 ENSE00000868868
+## [3] X [99887482, 99887565] - | 667147 ENSE00000401072
+## [4] X [99887538, 99887565] - | 667148 ENSE00001849132
+## [5] X [99888402, 99888536] - | 667149 ENSE00003554016
+## ... ... ... ... . ... ...
+## [13] X [99890555, 99890743] - | 667156 ENSE00003512331
+## [14] X [99891188, 99891686] - | 667158 ENSE00001886883
+## [15] X [99891605, 99891803] - | 667159 ENSE00001855382
+## [16] X [99891790, 99892101] - | 667160 ENSE00001863395
+## [17] X [99894942, 99894988] - | 667161 ENSE00001828996
+##
+## ...
+## <64101 more elements>
+## -------
+## seqinfo: 722 sequences (1 circular) from an unspecified genome</code></pre>
+</div>
+<div id="column-sample-data" class="section level2">
+<h2><span class="header-section-number">2.3</span> ‘Column’ (sample) data</h2>
+<p>Sample meta-data describing the samples can be accessed using <code>colData()</code>, and is a <code>DataFrame</code> that can store any number of descriptive columns for each sample row.</p>
+<pre class="r"><code>colData(se)</code></pre>
+<pre><code>## DataFrame with 8 rows and 9 columns
+## SampleName cell dex albut Run avgLength
+## <factor> <factor> <factor> <factor> <factor> <integer>
+## SRR1039508 GSM1275862 N61311 untrt untrt SRR1039508 126
+## SRR1039509 GSM1275863 N61311 trt untrt SRR1039509 126
+## SRR1039512 GSM1275866 N052611 untrt untrt SRR1039512 126
+## SRR1039513 GSM1275867 N052611 trt untrt SRR1039513 87
+## SRR1039516 GSM1275870 N080611 untrt untrt SRR1039516 120
+## SRR1039517 GSM1275871 N080611 trt untrt SRR1039517 126
+## SRR1039520 GSM1275874 N061011 untrt untrt SRR1039520 101
+## SRR1039521 GSM1275875 N061011 trt untrt SRR1039521 98
+## Experiment Sample BioSample
+## <factor> <factor> <factor>
+## SRR1039508 SRX384345 SRS508568 SAMN02422669
+## SRR1039509 SRX384346 SRS508567 SAMN02422675
+## SRR1039512 SRX384349 SRS508571 SAMN02422678
+## SRR1039513 SRX384350 SRS508572 SAMN02422670
+## SRR1039516 SRX384353 SRS508575 SAMN02422682
+## SRR1039517 SRX384354 SRS508576 SAMN02422673
+## SRR1039520 SRX384357 SRS508579 SAMN02422683
+## SRR1039521 SRX384358 SRS508580 SAMN02422677</code></pre>
+<p>This sample metadata can be accessed using the <code>$</code> accessor which makes it easy to subset the entire object by a given phenotype.</p>
+<pre class="r"><code># subset for only those samples treated with dexamethasone
+se[, se$dex == "trt"]</code></pre>
+<pre><code>## class: RangedSummarizedExperiment
+## dim: 64102 4
+## metadata(1): ''
+## assays(1): counts
+## rownames(64102): ENSG00000000003 ENSG00000000005 ... LRG_98 LRG_99
+## rowData names(0):
+## colnames(4): SRR1039509 SRR1039513 SRR1039517 SRR1039521
+## colData names(9): SampleName cell ... Sample BioSample</code></pre>
+</div>
+<div id="experiment-wide-metadata" class="section level2">
+<h2><span class="header-section-number">2.4</span> Experiment-wide metadata</h2>
+<p>Meta-data describing the experimental methods and publication references can be accessed using <code>metadata()</code>.</p>
+<pre class="r"><code>metadata(se)</code></pre>
+<pre><code>## [[1]]
+## Experiment data
+## Experimenter name: Himes BE
+## Laboratory: NA
+## Contact information:
+## Title: RNA-Seq transcriptome profiling identifies CRISPLD2 as a glucocorticoid responsive gene that modulates cytokine function in airway smooth muscle cells.
+## URL: http://www.ncbi.nlm.nih.gov/pubmed/24926665
+## PMIDs: 24926665
+##
+## Abstract: A 226 word abstract is available. Use 'abstract' method.</code></pre>
+<p>Note that <code>metadata()</code> is just a simple list, so it is appropriate for <em>any</em> experiment wide metadata the user wishes to save, such as storing model formulas.</p>
+<pre class="r"><code>metadata(se)$formula <- counts ~ dex + albut
+
+metadata(se)</code></pre>
+<pre><code>## [[1]]
+## Experiment data
+## Experimenter name: Himes BE
+## Laboratory: NA
+## Contact information:
+## Title: RNA-Seq transcriptome profiling identifies CRISPLD2 as a glucocorticoid responsive gene that modulates cytokine function in airway smooth muscle cells.
+## URL: http://www.ncbi.nlm.nih.gov/pubmed/24926665
+## PMIDs: 24926665
+##
+## Abstract: A 226 word abstract is available. Use 'abstract' method.
+##
+## $formula
+## counts ~ dex + albut</code></pre>
+</div>
+</div>
+<div id="constructing-a-summarizedexperiment" class="section level1">
+<h1><span class="header-section-number">3</span> Constructing a <code>SummarizedExperiment</code></h1>
+<p>Often, <code>SummarizedExperiment</code> or <code>RangedSummarizedExperiment</code> objects are returned by functions written by other packages. However it is possible to create them by hand with a call to the <code>SummarizedExperiment()</code> constructor.</p>
+<p>Constructing a <code>RangedSummarizedExperiment</code> with a <code>GRanges</code> as the <em>rowRanges</em> argument:</p>
+<pre class="r"><code>nrows <- 200
+ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)),
+ IRanges(floor(runif(200, 1e5, 1e6)), width=100),
+ strand=sample(c("+", "-"), 200, TRUE),
+ feature_id=sprintf("ID%03d", 1:200))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+
+SummarizedExperiment(assays=list(counts=counts),
+ rowRanges=rowRanges, colData=colData)</code></pre>
+<pre><code>## class: RangedSummarizedExperiment
+## dim: 200 6
+## metadata(0):
+## assays(1): counts
+## rownames: NULL
+## rowData names(1): feature_id
+## colnames(6): A B ... E F
+## colData names(1): Treatment</code></pre>
+<p>A <code>SummarizedExperiment</code> can be constructed with or without supplying a <code>DataFrame</code> for the <em>rowData</em> argument:</p>
+<pre class="r"><code>SummarizedExperiment(assays=list(counts=counts), colData=colData)</code></pre>
+<pre><code>## class: SummarizedExperiment
+## dim: 200 6
+## metadata(0):
+## assays(1): counts
+## rownames: NULL
+## rowData names(0):
+## colnames(6): A B ... E F
+## colData names(1): Treatment</code></pre>
+</div>
+<div id="common-operations-on-summarizedexperiment" class="section level1">
+<h1><span class="header-section-number">4</span> Common operations on <code>SummarizedExperiment</code></h1>
+<div id="subsetting" class="section level2">
+<h2><span class="header-section-number">4.1</span> Subsetting</h2>
+<ul>
+<li><code>[</code> Performs two dimensional subsetting, just like subsetting a matrix or data frame.</li>
+</ul>
+<pre class="r"><code># subset the first five transcripts and first three samples
+se[1:5, 1:3]</code></pre>
+<pre><code>## class: RangedSummarizedExperiment
+## dim: 5 3
+## metadata(2): '' formula
+## assays(1): counts
+## rownames(5): ENSG00000000003 ENSG00000000005 ENSG00000000419
+## ENSG00000000457 ENSG00000000460
+## rowData names(0):
+## colnames(3): SRR1039508 SRR1039509 SRR1039512
+## colData names(9): SampleName cell ... Sample BioSample</code></pre>
+<ul>
+<li><code>$</code> operates on <code>colData()</code> columns, for easy sample extraction.</li>
+</ul>
+<pre class="r"><code>se[, se$cell == "N61311"]</code></pre>
+<pre><code>## class: RangedSummarizedExperiment
+## dim: 64102 2
+## metadata(2): '' formula
+## assays(1): counts
+## rownames(64102): ENSG00000000003 ENSG00000000005 ... LRG_98 LRG_99
+## rowData names(0):
+## colnames(2): SRR1039508 SRR1039509
+## colData names(9): SampleName cell ... Sample BioSample</code></pre>
+</div>
+<div id="getters-and-setters" class="section level2">
+<h2><span class="header-section-number">4.2</span> Getters and setters</h2>
+<ul>
+<li><code>rowRanges()</code> / (<code>rowData()</code>), <code>colData()</code>, <code>metadata()</code></li>
+</ul>
+<pre class="r"><code>counts <- matrix(1:15, 5, 3, dimnames=list(LETTERS[1:5], LETTERS[1:3]))
+
+dates <- SummarizedExperiment(assays=list(counts=counts),
+ rowData=DataFrame(month=month.name[1:5], day=1:5))
+
+# Subset all January assays
+dates[rowData(dates)$month == "January", ]</code></pre>
+<pre><code>## class: SummarizedExperiment
+## dim: 1 3
+## metadata(0):
+## assays(1): counts
+## rownames(1): A
+## rowData names(2): month day
+## colnames(3): A B C
+## colData names(0):</code></pre>
+<ul>
+<li><code>assay()</code> versus <code>assays()</code> There are two accessor functions for extracting the assay data from a <code>SummarizedExperiment</code> object. <code>assays()</code> operates on the entire list of assay data as a whole, while <code>assay()</code> operates on only one assay at a time. <code>assay(x, i)</code> is simply a convenience function which is equivalent to <code>assays(x)[[i]]</code>.</li>
+</ul>
+<pre class="r"><code>assays(se)</code></pre>
+<pre><code>## List of length 1
+## names(1): counts</code></pre>
+<pre class="r"><code>assays(se)[[1]][1:5, 1:5]</code></pre>
+<pre><code>## SRR1039508 SRR1039509 SRR1039512 SRR1039513 SRR1039516
+## ENSG00000000003 679 448 873 408 1138
+## ENSG00000000005 0 0 0 0 0
+## ENSG00000000419 467 515 621 365 587
+## ENSG00000000457 260 211 263 164 245
+## ENSG00000000460 60 55 40 35 78</code></pre>
+<pre class="r"><code># assay defaults to the first assay if no i is given
+assay(se)[1:5, 1:5]</code></pre>
+<pre><code>## SRR1039508 SRR1039509 SRR1039512 SRR1039513 SRR1039516
+## ENSG00000000003 679 448 873 408 1138
+## ENSG00000000005 0 0 0 0 0
+## ENSG00000000419 467 515 621 365 587
+## ENSG00000000457 260 211 263 164 245
+## ENSG00000000460 60 55 40 35 78</code></pre>
+<pre class="r"><code>assay(se, 1)[1:5, 1:5]</code></pre>
+<pre><code>## SRR1039508 SRR1039509 SRR1039512 SRR1039513 SRR1039516
+## ENSG00000000003 679 448 873 408 1138
+## ENSG00000000005 0 0 0 0 0
+## ENSG00000000419 467 515 621 365 587
+## ENSG00000000457 260 211 263 164 245
+## ENSG00000000460 60 55 40 35 78</code></pre>
+</div>
+<div id="range-based-operations" class="section level2">
+<h2><span class="header-section-number">4.3</span> Range-based operations</h2>
+<ul>
+<li><code>subsetByOverlaps()</code> <code>SummarizedExperiment</code> objects support all of the <code>findOverlaps()</code> methods and associated functions. This includes <code>subsetByOverlaps()</code>, which makes it easy to subset a <code>SummarizedExperiment</code> object by an interval.</li>
+</ul>
+<pre class="r"><code># Subset for only rows which are in the interval 100,000 to 110,000 of
+# chromosome 1
+roi <- GRanges(seqnames="1", ranges=100000:1100000)
+subsetByOverlaps(se, roi)</code></pre>
+<pre><code>## class: RangedSummarizedExperiment
+## dim: 74 8
+## metadata(2): '' formula
+## assays(1): counts
+## rownames(74): ENSG00000131591 ENSG00000177757 ... ENSG00000272512
+## ENSG00000273443
+## rowData names(0):
+## colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
+## colData names(9): SampleName cell ... Sample BioSample</code></pre>
+</div>
+</div>
+<div id="advanced-extending-rangedsummarizedexperiment" class="section level1">
+<h1><span class="header-section-number">5</span> Advanced: Extending <code>RangedSummarizedExperiment</code></h1>
+<p>For representing and manipulating data in their own package, Bioconductor developers are encouraged to re-use existing classes defined in other packages like the <code>RangedSummarizedExperiment</code> or <code>GRanges</code> containers defined in the <code>SummarizedExperiment</code> or <code>GenomicRanges</code> infrastructure packages, respectively. Many Bioconductor packages are designed around these basic containers, that is, they define functions that take and/or return a <code> [...]
+<p>However, sometimes re-using the <code>RangedSummarizedExperiment</code> class as-is does not satisfy the needs of the package and the developer makes the choice to extend the class in order to accomodate the special needs of the package and/or the specificities of the data that it deals with. For example the <code>DESeq2</code> package defines the <code>DESeqDataSet</code> class which extends <code>RangedSummarizedExperiment</code> to add the <code>design</code> and <code>dispersionFu [...]
+<p>The following subsections describe in a nutshell how the developer would typically proceed for extending <code>RangedSummarizedExperiment</code> in his/her own package. Some familiarity with the S4 class system is required. Readers not familiar with the S4 class system are encouraged to consult the vignette <code>A quick overview of the S4 class system</code> located in the <code>S4Vectors</code> package for the basics of implementing and extending S4 classes.</p>
+<p>The approach described below allows the developer to extend <code>RangedSummarizedExperiment</code> it in a way that remains agnostic of its internals. Keeping this separation between the responsibilities of the owners of the parent and child classes facilitate maintenance in the long run. In particular, the implementation of the child class won’t be affected by changes in the internals of the parent class.</p>
+<div id="depend-on-and-import-the-summarizedexperiment-package" class="section level2">
+<h2><span class="header-section-number">5.1</span> Depend on, and import, the <code>SummarizedExperiment</code> package</h2>
+<p>Add <code>SummarizedExperiment</code> to the Depends field of the DESCRIPTION file of the package and the <code>import(SummarizedExperiment)</code> directive to its NAMESPACE file.</p>
+</div>
+<div id="define-and-export-the-rangedsummarizedexperiment-subclass" class="section level2">
+<h2><span class="header-section-number">5.2</span> Define and export the <code>RangedSummarizedExperiment</code> subclass</h2>
+<p>Define the subclass with something like:</p>
+<pre class="r"><code>setClass("MyRSESubclass",
+ contains="RangedSummarizedExperiment",
+ representation=representation(
+ slot1="integer",
+ slot2="function"
+ ## ... maybe more ...
+ )
+)</code></pre>
+<p>Export it by adding the <code>exportClasses(MyRSESubclass)</code> directive to the NAMESPACE file.</p>
+</div>
+<div id="construct-myrsesubclass-instances" class="section level2">
+<h2><span class="header-section-number">5.3</span> Construct <code>MyRSESubclass</code> instances</h2>
+<p>When calling <code>new()</code> for constructing a <code>MyRSESubclass</code> instance, specify only the MyRSESubclass-specific slots: <code>new("MyRSESubclass", rse, slot1=value1, slot2=value2)</code>, where <code>rse</code> is a <code>RangedSummarizedExperiment</code> object.</p>
+<p>Providing a <code>MyRSESubclass</code> constructor function (named as the class itself) is recommended.</p>
+</div>
+<div id="define-a-validity-method" class="section level2">
+<h2><span class="header-section-number">5.4</span> Define a validity method</h2>
+<p>The validity method for <code>MyRSESubclass</code> only needs to take care of what’s new in <code>MyRSESubclass</code> with respect to <code>RangedSummarizedExperiment</code>, that is, of the aspects of <code>MyRSESubclass</code> objects that are not already covered by the validity method for <code>RangedSummarizedExperiment</code> objects. This is because calling <code>validObject()</code> on a <code>MyRSESubclass</code> object automatically validates it as a <code>RangedSummarizedEx [...]
+</div>
+<div id="use-the-rangedsummarizedexperiment-accessors-on-myrsesubclass-objects" class="section level2">
+<h2><span class="header-section-number">5.5</span> Use the <code>RangedSummarizedExperiment</code> accessors on <code>MyRSESubclass</code> objects</h2>
+<p>Like any user of <code>RangedSummarizedExperiment</code> objects, the developer of <code>MyRSESubclass</code> should always use the <code>RangedSummarizedExperiment</code> accessors to access the <code>RangedSummarizedExperiment</code>-specific parts of his/her <code>MyRSESubclass</code> objects.</p>
+</div>
+<div id="use-callnextmethod" class="section level2">
+<h2><span class="header-section-number">5.6</span> Use <code>callNextMethod</code></h2>
+<p>In case some of the methods defined for <code>RangedSummarizedExperiment</code> objects need to be overwritten, the new methods should call <code>callNextMethod</code> internally.</p>
+</div>
+</div>
+
+
+
+<!-- dynamically load mathjax for compatibility with self-contained -->
+<script>
+ (function () {
+ var script = document.createElement("script");
+ script.type = "text/javascript";
+ script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
+ document.getElementsByTagName("head")[0].appendChild(script);
+ })();
+</script>
+
+</body>
+</html>
diff --git a/inst/extdata/kallisto/abundance.h5 b/inst/extdata/kallisto/abundance.h5
new file mode 100644
index 0000000..b7ee6be
Binary files /dev/null and b/inst/extdata/kallisto/abundance.h5 differ
diff --git a/inst/extdata/kallisto/abundance.tsv b/inst/extdata/kallisto/abundance.tsv
new file mode 100644
index 0000000..ff68341
--- /dev/null
+++ b/inst/extdata/kallisto/abundance.tsv
@@ -0,0 +1,2859 @@
+target_id length eff_length est_counts tpm
+uc010tkp.2 981 832 0 0
+uc001vuz.1 31578 31429 0 0
+uc001vva.1 31578 31429 0 0
+uc010ahc.1 31578 31429 0 0
+uc021rmy.1 41 41 0 0
+uc021rmz.1 30 30 0 0
+uc001vvd.3 32 32 0 0
+uc021rna.1 28 28 0 0
+uc021rnb.1 37 37 0 0
+uc021rnd.1 37 37 0 0
+uc021rne.1 41 41 0 0
+uc021rnf.1 30 30 0 0
+uc010tkq.2 32 32 0 0
+uc021rng.1 28 28 0 0
+uc021rnh.1 28 28 0 0
+uc001vvf.2 40 40 0 0
+uc001vvh.3 32 32 0 0
+uc001vvi.3 34158 34009 0 0
+uc001vvk.1 34259 34110 0 0
+uc001vvl.4 42885 42736 2206.9 476.273
+uc021rnj.1 69004 68855 444.552 59.5463
+uc001vvn.3 1387 1238 0 0
+uc001vvt.3 10204 10055 0 0
+uc001vwd.3 4044 3895 0 0
+uc010tkt.2 942 793 0 0
+uc010tku.2 942 793 0 0
+uc010tkv.2 924 775 0 0
+uc001vwh.1 945 796 0 0
+uc010tkw.2 972 823 0 0
+uc001vwj.2 1076 927 0 0
+uc010tkx.2 1047 898 0 0
+uc001vwn.1 939 790 0 0
+uc001vwo.1 1032 883 0 0
+uc010tla.2 927 778 0 0
+uc010tlb.2 1038 889 0 0
+uc010tlc.2 993 844 0 0
+uc010tld.2 975 826 0 0
+uc001vxb.1 14290 14141 247.606 161.491
+uc001vxc.3 14291 14142 231.649 151.073
+uc001vxd.3 14291 14142 231.649 151.073
+uc010tle.2 3310 3161 268.096 782.228
+uc001vxg.3 2642 2493 1428 5282.92
+uc001vxh.3 2642 2493 1428 5282.92
+uc001vxi.3 2642 2493 1428 5282.92
+uc021rnr.1 2642 2493 1428 5282.92
+uc010ahm.2 3822 3673 0 0
+uc010ahn.3 5785 5636 1559.52 2552.04
+uc001vxo.4 8628 8479 0 0
+uc021rns.1 3246 3097 3840.48 11437
+uc001vxp.2 5619 5470 0 0
+uc010tlj.2 651 502 0 0
+uc001vxu.1 16736 16587 0 0
+uc021rnw.1 82 82 0 0
+uc021rnz.1 82 82 0 0
+uc021rob.1 72 72 0 0
+uc021roh.1 73 73 0 0
+uc021roi.1 89 89 0 0
+uc021roj.1 72 72 0 0
+uc001vxw.4 10010 9861 28.5268 26.6809
+uc001vxx.4 16423 16274 17.2901 9.79877
+uc001vxy.4 16423 16274 17.2901 9.79877
+uc001vxz.3 5414 5265 0 0
+uc001vya.3 11827 11678 0 0
+uc021rok.1 444 295 50.5198 1579.45
+uc021rol.1 444 295 14.3732 449.364
+uc001vyc.3 2441 2292 0 0
+uc021rom.1 444 295 0 0
+uc001vyd.3 2522 2373 0 0
+uc021ron.1 444 295 0 0
+uc001vye.4 1417 1268 0 0
+uc021roo.1 453 304 0 0
+uc001vyj.3 946 797 0 0
+uc021roq.1 483 334 0 0
+uc021ror.1 836 687 0 0
+uc010aif.2 37095 36946 1 0.249632
+uc001vyl.1 965 816 0 0
+uc021ros.1 486 337 0 0
+uc010tlk.2 3311 3162 0 0
+uc001vym.3 7225 7076 1092.63 1424.14
+uc001vyn.3 7230 7081 561.687 731.589
+uc001vyo.3 7230 7081 561.687 731.589
+uc001vyr.3 2621 2472 1 3.73095
+uc001vys.4 2621 2472 1 3.73095
+uc001vzh.3 1988 1839 0 0
+uc001vzk.4 2008 1859 0 0
+uc001vzl.2 2009 1860 0 0
+uc021rou.1 471 322 0 0
+uc010tlm.2 465 316 0 0
+uc001vzn.1 5186 5037 0 0
+uc001vzo.1 16539 16390 0 0
+uc001vzp.3 19510 19361 111 52.8765
+uc010aij.3 19510 19361 111 52.8765
+uc010tln.2 19510 19361 111 52.8765
+uc010tlo.2 4788 4639 61.4477 122.166
+uc001wag.3 63325 63176 3.51495 0.513139
+uc001wah.3 33748 33599 0 0
+uc001wai.3 33748 33599 0 0
+uc001waj.1 3812 3663 0 0
+uc001wak.3 30043 29894 0 0
+uc010aim.3 29943 29794 0 0
+uc001wal.3 29448 29299 0 0
+uc001wam.3 27378 27229 0.485047 0.164293
+uc001way.3 19037 18888 318.807 155.671
+uc001waz.3 21985 21836 5.57481e-06 2.35464e-06
+uc010tlu.2 21985 21836 5.57481e-06 2.35464e-06
+uc010tlv.2 11575 11426 1450.81 1171.07
+uc001wbi.2 711 562 0 0
+uc001wbk.3 698 549 0 0
+uc010tmd.2 942 793 0 0
+uc021roz.1 520 371 0 0
+uc001wbn.3 561 412 0 0
+uc021rpa.1 255349 255200 1.00344 0.0362641
+uc021rpb.1 159 10 0 0
+uc001wbp.2 810 661 0 0
+uc010aip.1 13535 13386 0 0
+uc021rpc.1 244 95 0 0
+uc010aiq.1 592 443 0 0
+uc001wbt.1 585 436 0 0
+uc021rpd.1 309 160 0 0
+uc010air.1 594 445 0 0
+uc001wbv.3 117 117 0 0
+uc010ais.1 588 439 0 0
+uc001wbw.2 725946 725797 0 0
+uc001wbx.2 635 486 0 0
+uc001wbz.1 681 532 0 0
+uc010ait.1 681 532 0 0
+uc021rpe.1 219473 219324 0 0
+uc001wcb.2 647 498 0 0
+uc001wcc.3 3761 3612 0 0
+uc021rpf.1 276 127 0 0
+uc021rpg.1 396747 396598 0 0
+uc021rph.1 648 499 0 0
+uc010aiv.1 389875 389726 0 0
+uc021rpi.1 245 96 0 0
+uc021rpj.2 172012 171863 0 0
+uc010aiy.2 577 428 0 0
+uc001wch.2 578 429 0 0
+uc010aiz.2 588 439 0 0
+uc021rpk.1 248 99 0 0
+uc001wck.3 527 378 0 0
+uc021rpl.1 538598 538449 0 0
+uc021rpm.1 594 445 0 0
+uc010tmm.2 87855 87706 0 0
+uc010tmo.2 508219 508070 0 0
+uc001wcq.3 8442 8293 0 0
+uc001wco.3 558067 557918 0 0
+uc010ajd.1 5004 4855 0 0
+uc010aje.1 550895 550746 0 0
+uc001wcp.2 550824 550675 0 0
+uc001wcr.1 550597 550448 0 0
+uc001wcs.1 550597 550448 0 0
+uc010ajf.1 550597 550448 0 0
+uc001wct.4 5069 4920 0 0
+uc001wcu.4 476295 476146 0 0
+uc021rpn.1 476295 476146 0 0
+uc021rpo.1 554 405 0 0
+uc021rpp.1 277 128 0 0
+uc001wcx.4 500362 500213 0 0
+uc001wcy.3 562 413 0 0
+uc021rpq.1 256 107 0 0
+uc001wcz.2 570 421 0 0
+uc021rpr.1 461793 461644 0 0
+uc010tmp.1 595 446 0 0
+uc001wdb.2 1375 1226 0 0
+uc010ajh.1 686 537 0 0
+uc010aji.1 915 766 0 0
+uc001wdd.2 360721 360572 0 0
+uc010ajj.1 398119 397970 0 0
+uc001wde.1 424764 424615 0 0
+uc010tmq.2 24 24 0 0
+uc010ajk.2 400760 400611 0 0
+uc001wdg.1 400414 400265 0 0
+uc021rpt.1 400414 400265 0 0
+uc001wdh.2 582 433 0 0
+uc010ajl.1 368898 368749 0 0
+uc001wdi.2 587 438 0 0
+uc021rpu.1 124 124 0 0
+uc010ajm.2 776 627 0 0
+uc021rpv.1 311404 311255 0 0
+uc001wdk.2 612 463 0 0
+uc010ajn.1 605 456 0 0
+uc010ajo.1 326632 326483 0 0
+uc010ajp.1 322108 321959 0 0
+uc021rpw.1 305227 305078 0 0
+uc001wdn.3 622 473 0 0
+uc021rpx.1 170 21 0 0
+uc010tmr.2 213989 213840 4.31181 0.185968
+uc010ajq.1 563 414 0.991652 22.0916
+uc001wdq.2 459 310 0 0
+uc001wdr.2 555 406 0 0
+uc001wdu.2 562 413 0 0
+uc001wdv.4 129626 129477 0 0
+uc001wdw.2 7594 7445 0 0
+uc001wdx.4 15832 15683 0 0
+uc010ajs.1 7958 7809 0 0
+uc001wdz.4 7266 7117 0 0
+uc010tms.2 8153 8004 0 0
+uc010ajt.3 4741 4592 0 0
+uc010aju.1 5548 5399 0 0
+uc001wea.4 6824 6675 0 0
+uc001wec.3 78798 78649 0 0
+uc001wed.1 1569 1420 0 0
+uc001wee.4 73237 73088 0 0
+uc021rpy.1 58 58 0 0
+uc010tmt.1 68202 68053 0 0
+uc010ajv.1 65443 65294 0 0
+uc001weg.2 68325 68176 0 0
+uc001weh.1 33370 33221 0 0
+uc001wei.3 65884 65735 0 0
+uc001wej.3 63516 63367 0 0
+uc001wek.3 62821 62672 0 0
+uc001wel.3 62624 62475 0 0
+uc001wem.4 61619 61470 0 0
+uc001wen.2 54882 54733 0 0
+uc001weo.2 56700 56551 0 0
+uc010ajw.2 65 65 0 0
+uc001wep.3 57287 57138 0 0
+uc001weq.3 56202 56053 0 0
+uc021rpz.1 66 66 0 0
+uc021rqa.1 50847 50698 0 0
+uc021rqb.1 55214 55065 0 0
+uc001wet.3 52964 52815 0 0
+uc021rqc.1 64 64 0 0
+uc001weu.3 52422 52273 0 0
+uc021rqd.1 112 112 0 0
+uc001wev.3 50509 50360 0 0
+uc021rqe.1 59 59 0 0
+uc021rqf.1 62 62 0 0
+uc010tmv.2 43983 43834 0 0
+uc021rqg.1 55 55 0 0
+uc001wez.2 42616 42467 0 0
+uc001wfa.2 276 127 0 0
+uc010ajx.1 43975 43826 0 0
+uc001wfb.2 40068 39919 0 0
+uc021rqh.1 39133 38984 0 0
+uc001wfd.1 42015 41866 0 0
+uc001wfe.3 42875 42726 0 0
+uc001wfg.2 38390 38241 0 0
+uc021rqi.1 56 56 0 0
+uc001wfh.1 39653 39504 0 0
+uc001wfi.2 34879 34730 0 0
+uc001wfj.1 2388 2239 0 0
+uc001wfk.3 38176 38027 0 0
+uc001wfl.3 30236 30087 0 0
+uc010ajy.2 36496 36347 0 0
+uc001wfn.3 35888 35739 0 0
+uc021rqj.1 61 61 0 0
+uc001wfo.2 2030 1881 0 0
+uc001wfp.3 33671 33522 0 0
+uc021rqk.1 63 63 0 0
+uc001wfq.2 30661 30512 0 0
+uc001wfr.1 27327 27178 0 0
+uc010ajz.1 27312 27163 0 0
+uc021rql.1 65 65 0 0
+uc001wfs.2 25699 25550 0 0
+uc001wft.2 27035 26886 0 0
+uc001wfu.3 21541 21392 0 0
+uc001wfv.2 26312 26163 0 0
+uc001wfw.1 24990 24841 0 0
+uc021rqm.1 62 62 0 0
+uc001wfx.3 25282 25133 0 0
+uc001wfy.2 19228 19079 0 0
+uc001wfz.1 18143 17994 0 0
+uc021rqn.1 137 137 0 0
+uc001wgb.3 1618 1469 0 0
+uc001wgc.2 15829 15680 0 0
+uc021rqo.1 15270 15121 0 0
+uc001wge.4 18649 18500 0 0
+uc021rqp.1 18640 18491 0 0
+uc021rqq.1 59 59 0 0
+uc010tmw.2 15103 14954 0 0
+uc010tmx.2 16006 15857 0 0
+uc010tmy.2 10150 10001 0 0
+uc010akb.2 131 131 0 0
+uc021rqr.1 6820 6671 0 0
+uc001wgh.3 13080 12931 0 0
+uc001wgi.2 7530 7381 0 0
+uc001wgj.1 8463 8314 0 0
+uc001wgk.3 8978 8829 4 4.17846
+uc010tmz.1 6015 5866 0 0
+uc010tna.1 11670 11521 0 0
+uc001wgm.3 14119 13970 458 302.369
+uc010tnb.2 14119 13970 458 302.369
+uc010tnc.2 2101 1952 0 0
+uc001wgn.2 5268 5119 2092.11 3769.36
+uc001wgp.2 5038 4889 4605.89 8688.82
+uc001wgw.4 5155 5006 63 116.069
+uc001wgx.4 5155 5006 63 116.069
+uc001wgy.4 5155 5006 63 116.069
+uc001wgz.4 5155 5006 63 116.069
+uc001wha.4 5155 5006 63 116.069
+uc001whb.4 5155 5006 63 116.069
+uc001whc.3 11011 10862 12 10.1892
+uc001whd.3 6332 6183 1144.79 1707.63
+uc001whe.3 5323 5174 4258.21 7590.47
+uc010tnd.1 3621 3472 5.7037 15.1511
+uc001whf.1 4458 4309 10.2963 22.038
+uc021rqs.1 73 73 0 0
+uc021rqt.1 73 73 0 0
+uc010ake.1 1894 1745 0 0
+uc001wiu.3 4983 4834 523.402 998.611
+uc021rqv.1 423 274 420.333 14148.5
+uc001wjg.4 4998 4849 0 0
+uc001wjh.4 19424 19275 92.5751 44.2963
+uc021rqx.1 4900 4751 0 0
+uc001wji.4 4622 4473 1570.52 3238.26
+uc001wjj.3 5149 5000 0 0
+uc001wjk.3 5998 5849 1678.91 2647.36
+uc001wjq.3 3595 3446 0 0
+uc001wjr.3 3543 3394 0 0
+uc001wjs.3 2965 2816 0 0
+uc001wjt.3 2965 2816 0 0
+uc001wju.3 2965 2816 0 0
+uc010akm.3 2965 2816 0 0
+uc010akn.3 2965 2816 0 0
+uc010ako.3 2965 2816 0 0
+uc001wjy.3 8505 8356 396 437.084
+uc001wjz.3 8505 8356 396 437.084
+uc031qnt.1 47822 47673 3.45502e-08 6.68415e-09
+uc001wkb.5 46772 46623 44.6402 8.83068
+uc001wkg.5 3593 3444 50.9575 136.462
+uc001wkh.5 3593 3444 50.9575 136.462
+uc010akr.4 3593 3444 50.9575 136.462
+uc031qnu.1 3593 3444 50.9575 136.462
+uc031qnv.1 3593 3444 50.9575 136.462
+uc031qnw.1 3593 3444 50.9575 136.462
+uc031qnx.1 3593 3444 50.9575 136.462
+uc001wko.1 6977 6828 0 0
+uc010aku.1 13105 12956 0 0
+uc001wkt.4 9276 9127 28 28.2942
+uc001wku.4 9276 9127 28 28.2942
+uc010akv.3 9276 9127 28 28.2942
+uc010aky.2 14368 14219 0 0
+uc001wla.3 15524 15375 287.815 172.65
+uc001wlb.3 15524 15375 287.815 172.65
+uc010akz.3 15524 15375 287.815 172.65
+uc001wlc.4 52653 52504 0 0
+uc001wld.4 52653 52504 0 0
+uc001wle.4 52653 52504 0 0
+uc001wlf.3 14450 14301 0 0
+uc021rra.1 20817 20668 0 0
+uc021rrb.1 36535 36386 0 0
+uc021rrc.1 36535 36386 0 0
+uc031qnz.1 36535 36386 0 0
+uc021rrd.2 81504 81355 0 0
+uc021rre.1 36394 36245 0 0
+uc010tnt.2 15937 15788 0 0
+uc001wli.4 17591 17442 392.464 207.525
+uc021rrf.1 59994 59845 18.7647 2.89188
+uc010alb.3 11377 11228 0 0
+uc031qoa.1 44369 44220 0 0
+uc031qob.1 44369 44220 0 0
+uc031qoc.1 44369 44220 0 0
+uc010tnu.3 14966 14817 1.08237 0.673726
+uc021rrg.2 14966 14817 1.08237 0.673726
+uc021rrh.2 14966 14817 1.08237 0.673726
+uc021rri.2 14966 14817 1.08237 0.673726
+uc021rrj.2 14966 14817 1.08237 0.673726
+uc001wlj.2 17732 17583 24 12.5888
+uc001wlk.2 7810 7661 0 0
+uc010tnv.2 7251 7102 0 0
+uc001wlm.3 7139 6990 0 0
+uc001wll.3 6561 6412 0 0
+uc001wls.3 6288 6139 0 0
+uc001wlt.3 9857 9708 159.883 151.894
+uc010tnw.2 9857 9708 159.883 151.894
+uc010ald.2 5991 5842 455.204 718.641
+uc010ale.2 5991 5842 455.204 718.641
+uc001wlu.4 9818 9669 1458.9 1391.59
+uc010tnx.2 9818 9669 1458.9 1391.59
+uc001wlv.3 10546 10397 127.911 113.466
+uc001wlw.3 10466 10317 160.775 143.725
+uc001wly.3 10466 10317 160.775 143.725
+uc001wlz.3 10466 10317 160.775 143.725
+uc001wmc.3 9960 9811 328.859 309.146
+uc010tny.2 9960 9811 328.859 309.146
+uc001wma.4 9958 9809 398.488 374.678
+uc001wmb.4 9958 9809 398.488 374.678
+uc001wmf.2 1384 1235 18 134.423
+uc001wmg.3 2799 2650 1165 4054.6
+uc001wmh.3 2799 2650 1165 4054.6
+uc031qod.1 994 845 0 0
+uc001wml.1 14452 14303 238.071 153.514
+uc001wmm.1 8063 7914 663.049 772.711
+uc001wmn.1 13889 13740 0.29702 0.199373
+uc010alg.1 13363 13214 453.745 316.698
+uc001wmo.1 10338 10189 0 0
+uc001wmp.3 15435 15286 0 0
+uc010alh.1 5736 5587 0 0
+uc001wmq.3 6046 5897 231.055 361.37
+uc010alj.3 3600 3451 142.784 381.594
+uc001wmr.3 8230 8081 25 28.5327
+uc001wms.3 8230 8081 25 28.5327
+uc001wne.3 2552 2403 0.00215404 0.00826739
+uc001wnf.3 2552 2403 0.00215404 0.00826739
+uc001wng.3 2529 2380 18.5273 71.7966
+uc001wnh.3 2529 2380 18.5273 71.7966
+uc001wnq.1 1392 1243 135.511 1005.47
+uc001wnu.2 6798 6649 97.4192 135.131
+uc001wnr.3 6800 6651 73.3847 101.762
+uc001wns.3 6800 6651 73.3847 101.762
+uc001wnv.3 6800 6651 73.3847 101.762
+uc010alk.2 6343 6194 1.91645e-05 2.8536e-05
+uc001wnw.3 6345 6196 1.41391e-05 2.10463e-05
+uc001wnx.3 6345 6196 1.41391e-05 2.10463e-05
+uc010all.3 6345 6196 1.41391e-05 2.10463e-05
+uc010toe.1 6021 5872 784.916 1232.83
+uc021rro.1 27626 27477 41.6206 13.9703
+uc001wol.1 5277 5128 766.849 1379.21
+uc001wom.1 2114 1965 368.151 1727.95
+uc001wor.3 1903 1754 21.5515 113.322
+uc010alo.3 1903 1754 21.5515 113.322
+uc021rrp.1 1077 928 5.98646e-08 5.94963e-07
+uc001wos.3 6538 6389 465.599 672.12
+uc010alp.3 4930 4781 122.749 236.792
+uc001wou.3 3337 3188 6.31818 18.2785
+uc021rrq.1 1059 910 96.5165 978.2
+uc010alr.3 12666 12517 0 0
+uc010tok.2 12666 12517 0 0
+uc010tol.2 12666 12517 0 0
+uc010als.2 7207 7058 27.2048 35.5494
+uc010tom.2 12345 12196 0 0
+uc010ton.2 12345 12196 0 0
+uc010too.2 12345 12196 0 0
+uc010alt.3 12096 11947 0 0
+uc010top.2 12096 11947 0 0
+uc010toq.2 12096 11947 0 0
+uc010alu.3 6688 6539 4.2658 6.01667
+uc001wpc.3 11585 11436 0 0
+uc010tor.2 11585 11436 0 0
+uc010tos.2 10509 10360 9.5391e-08 8.4921e-08
+uc010alv.3 10452 10303 1.72422e-05 1.54346e-05
+uc010tot.2 10452 10303 1.72422e-05 1.54346e-05
+uc010tou.2 10452 10303 1.72422e-05 1.54346e-05
+uc010tov.2 10452 10303 1.72422e-05 1.54346e-05
+uc010tow.2 10452 10303 1.72422e-05 1.54346e-05
+uc010tox.2 10452 10303 1.72422e-05 1.54346e-05
+uc001wpd.3 6790 6641 0.142797 0.198314
+uc010toy.2 6790 6641 0.142797 0.198314
+uc010toz.2 6790 6641 0.142797 0.198314
+uc010tpa.2 5910 5761 23.0504 36.9019
+uc010tpb.2 5910 5761 23.0504 36.9019
+uc001wpf.4 20503 20354 62 28.0937
+uc010tpc.2 12056 11907 0 0
+uc001wph.4 11407 11258 335.685 275.004
+uc010alw.3 11388 11239 1648 1352.38
+uc001wpo.1 59226 59077 3.00936 0.469811
+uc021rrs.1 84 84 0 0
+uc001wqc.3 27049 26900 0 0
+uc021rrt.1 27049 26900 0 0
+uc021rru.1 22 22 0 0
+uc001wqe.4 3206 3057 0 0
+uc010tpd.3 5857 5708 0 0
+uc001wqf.3 22091 21942 0 0
+uc021rrw.1 103 103 0 0
+uc010tpe.1 48947 48798 86.567 16.3613
+uc001wqk.2 60718 60569 8.95726 1.36393
+uc010tpf.1 60718 60569 8.95726 1.36393
+uc001wql.1 8539 8390 44.5185 48.938
+uc010amd.2 93724 93575 106.103 10.4577
+uc001wqm.2 113574 113425 34.9286 2.84014
+uc001wqn.2 113574 113425 34.9286 2.84014
+uc010amf.2 113574 113425 34.9286 2.84014
+uc010tpg.2 113574 113425 34.9286 2.84014
+uc010tph.2 113574 113425 34.9286 2.84014
+uc010tpi.2 113509 113360 59.9367 4.87641
+uc001wqp.2 16082 15933 0 0
+uc001wqr.2 16082 15933 0 0
+uc001wqq.4 20521 20372 2.97625 1.34742
+uc001wqt.1 10165 10016 0 0
+uc021rry.1 71345 71196 0.727641 0.0942604
+uc001wqw.4 60333 60184 0 0
+uc001wqx.4 60333 60184 0 0
+uc010amh.3 60333 60184 0 0
+uc001wqy.4 70981 70832 90.969 11.8449
+uc021rrz.1 69808 69659 0 0
+uc001wri.3 32126 31977 52.9042 15.2588
+uc001wrk.4 299839 299690 82.169 2.52874
+uc010amj.3 299839 299690 82.169 2.52874
+uc010tpl.2 283308 283159 0 0
+uc021rsb.1 146655 146506 193.157 12.1597
+uc001wrl.3 82746 82597 11.0243 1.23099
+uc001wrm.3 82440 82291 363.741 40.7669
+uc001wrn.3 82440 82291 363.741 40.7669
+uc001wro.3 82440 82291 363.741 40.7669
+uc001wrp.3 82440 82291 363.741 40.7669
+uc021rsd.1 79 79 0 0
+uc010aml.3 405341 405192 0 0
+uc001wrq.3 503790 503641 95.1424 1.74229
+uc021rse.1 21 21 0 0
+uc001wrr.3 1481 1332 0 0
+uc001wrs.3 864924 864775 1.00032 0.0106685
+uc001wrt.3 864924 864775 1.00032 0.0106685
+uc001wru.3 864924 864775 1.00032 0.0106685
+uc001wrv.3 864924 864775 1.00032 0.0106685
+uc001wrw.3 465861 465712 0 0
+uc010tpo.2 575 426 24 519.6
+uc001wso.3 46670 46521 448.667 88.9493
+uc010tpp.2 46670 46521 448.667 88.9493
+uc010tpq.2 46670 46521 448.667 88.9493
+uc001wsp.3 38477 38328 342.987 82.5332
+uc001wsq.3 36980 36831 4.33396 1.08527
+uc001wsv.1 11051 10902 0 0
+uc001wsy.2 151971 151822 90.1724 5.47781
+uc001wsz.2 151971 151822 90.1724 5.47781
+uc010tps.2 151971 151822 90.1724 5.47781
+uc001wta.4 195156 195007 1145.01 54.1537
+uc001wtc.2 151740 151591 0.192828 0.0117318
+uc031qof.1 151740 151591 0.192828 0.0117318
+uc001wtd.3 25109 24960 237.222 87.6552
+uc010tpt.2 25109 24960 237.222 87.6552
+uc010tpu.2 25026 24877 0 0
+uc001wth.1 3013 2864 2 6.44058
+uc010tpx.1 37563 37414 0 0
+uc001wtl.3 45573 45424 149.245 30.3027
+uc031qog.1 94862 94713 0 0
+uc001wtp.3 1207 1058 0 0
+uc001wtw.1 3202 3053 6.04315 18.2559
+uc001wty.4 20239 20090 376.762 172.964
+uc010amq.3 11814 11665 29.238 23.1169
+uc021rsh.2 1768 1619 25.8915 147.496
+uc010amr.2 309872 309723 0 0
+uc001wub.4 348144 347995 0 0
+uc001wuc.3 353347 353198 25.4194 0.663767
+uc001wud.3 353347 353198 25.4194 0.663767
+uc001wue.3 353347 353198 25.4194 0.663767
+uc010ams.3 353347 353198 25.4194 0.663767
+uc010amt.3 353347 353198 25.4194 0.663767
+uc001wug.3 430192 430043 46.7684 1.00302
+uc001wuh.3 70073 69924 0 0
+uc001wui.3 47186 47037 0 0
+uc001wuj.3 47186 47037 0 0
+uc001wul.1 5065 4916 0 0
+uc021rsi.1 1176 1027 0 0
+uc001wuq.3 22690 22541 36.5 14.9344
+uc001wur.3 22690 22541 36.5 14.9344
+uc001wus.3 22690 22541 36.5 14.9344
+uc010amx.3 22690 22541 36.5 14.9344
+uc001wuw.4 8036 7887 2835 3315.19
+uc010amy.2 14283 14134 0 0
+uc001wux.3 19451 19302 0 0
+uc010tqe.1 80755 80606 0 0
+uc001wuy.4 85922 85773 0.000589264 6.33618e-05
+uc001wuz.4 85922 85773 0.000589264 6.33618e-05
+uc001wva.4 84896 84747 49.3689 5.37275
+uc001wvb.4 84896 84747 49.3689 5.37275
+uc001wvc.4 84896 84747 49.3689 5.37275
+uc001wve.1 41914 41765 0 0
+uc001wvf.4 84070 83921 0.781455 0.0858818
+uc001wvg.4 84070 83921 0.781455 0.0858818
+uc001wvh.4 84070 83921 0.781455 0.0858818
+uc001wvi.4 84070 83921 0.781455 0.0858818
+uc010amz.3 84070 83921 0.781455 0.0858818
+uc001wvj.4 74968 74819 0 0
+uc001wvl.1 21155 21006 2 0.878121
+uc021rsk.1 129 129 0 0
+uc001wvm.3 296989 296840 0 0
+uc010ana.3 205123 204974 0 0
+uc001wvo.3 9954 9805 0 0
+uc001wvp.1 6843 6694 2 2.75557
+uc010anb.1 35192 35043 49.1454 12.9345
+uc001wvu.3 45931 45782 28.9872 5.83955
+uc001wvv.3 112219 112070 56.3551 4.6378
+uc001wvw.3 112219 112070 56.3551 4.6378
+uc010anc.3 112219 112070 56.3551 4.6378
+uc001wvy.4 31503 31354 140.639 41.3696
+uc001wvz.4 31503 31354 140.639 41.3696
+uc010and.3 31503 31354 140.639 41.3696
+uc001wwa.1 5865 5716 128.082 206.664
+uc010ane.3 99 99 0 0
+uc001wwc.2 31491 31342 38.1056 11.2132
+uc001wwd.4 64958 64809 119.825 17.0522
+uc010anf.3 64958 64809 119.825 17.0522
+uc001wwe.4 46194 46045 0 0
+uc010ang.3 25820 25671 0.244448 0.0878237
+uc031qoi.1 437743 437594 0 0
+uc031qoj.1 437743 437594 0 0
+uc031qok.1 30543 30394 0.5 0.151722
+uc031qol.1 30543 30394 0.5 0.151722
+uc021rsl.1 124 124 0 0
+uc021rsp.1 301 152 1635.81 99256.3
+uc001wwn.3 15976 15827 198.91 115.912
+uc001wwo.3 15976 15827 198.91 115.912
+uc001wwp.3 15976 15827 198.91 115.912
+uc010ank.3 15976 15827 198.91 115.912
+uc001wwr.3 2711 2562 864.866 3113.42
+uc001www.3 60048 59899 0 0
+uc010tqg.2 60048 59899 0 0
+uc010tqh.2 60048 59899 0 0
+uc001wwx.3 15070 14921 1141.75 705.734
+uc001wxg.4 4037 3888 504.144 1195.9
+uc021rsu.1 528 379 927.856 22579.2
+uc001wxv.3 10697 10548 34.202 29.9054
+uc001wxw.2 13900 13751 0 0
+uc001wxx.2 13900 13751 0 0
+uc021rsv.1 13900 13751 0 0
+uc010ant.2 16325 16176 261.795 149.265
+uc001wyd.4 99985 99836 25.9382 2.39618
+uc001wye.4 73042 72893 2.03226 0.257135
+uc001wyf.4 73042 72893 2.03226 0.257135
+uc021rsw.1 73042 72893 2.03226 0.257135
+uc021rsx.1 72940 72791 0 0
+uc021rsz.1 88 88 0 0
+uc001wyq.3 32811 32662 5.5 1.55306
+uc001wyr.3 32811 32662 5.5 1.55306
+uc001wys.3 32811 32662 5.5 1.55306
+uc010any.3 32811 32662 5.5 1.55306
+uc010tqr.1 5684 5535 243.104 405.081
+uc001wza.4 17487 17338 309.948 164.876
+uc010aoa.3 17487 17338 309.948 164.876
+uc021rta.1 32165 32016 0 0
+uc001wzb.4 241606 241457 15.6332 0.597138
+uc021rtb.1 104 104 0 0
+uc001wzc.3 78869 78720 3.40818 0.399305
+uc001wzd.3 78869 78720 3.40818 0.399305
+uc001wze.3 32614 32465 17.1028 4.8587
+uc001wzf.3 17081 16932 0 0
+uc001wzg.3 13444 13295 43.9841 30.5123
+uc021rtd.1 107 107 0 0
+uc001wzh.3 122567 122418 0 0
+uc010aoc.2 106993 106844 0 0
+uc001wzi.3 109497 109348 0 0
+uc001wzj.3 109497 109348 0 0
+uc021rte.1 109497 109348 0 0
+uc001wzk.3 92209 92060 0 0
+uc010aod.3 15193 15044 851 521.716
+uc001wzq.3 9012 8863 0 0
+uc001wzr.3 14307 14158 0 0
+uc001wzt.4 84566 84417 51.6517 5.64316
+uc001wzu.4 84566 84417 51.6517 5.64316
+uc010tqv.2 3158 3009 40.297 123.515
+uc010tqw.2 11511 11362 7.4003e-05 6.00706e-05
+uc010tqx.2 20821 20672 80.4001 35.8709
+uc001wzy.3 6499 6350 21.3314 30.9823
+uc001xaa.3 44823 44674 172.722 35.6583
+uc010tqy.2 44823 44674 172.722 35.6583
+uc001xap.3 23262 23113 11.7964 4.70716
+uc001xar.3 23262 23113 11.7964 4.70716
+uc010aoi.1 8896 8747 0 0
+uc010aoj.2 20323 20174 417.838 191.022
+uc010tra.1 27968 27819 0 0
+uc001xay.3 28748 28599 80 25.7992
+uc001xba.3 136260 136111 0 0
+uc001xbb.4 225704 225555 86.8278 3.55037
+uc001xbc.3 225704 225555 86.8278 3.55037
+uc001xbe.3 15875 15726 133.892 78.5246
+uc001xbf.2 47153 47004 0 0
+uc001xbg.2 38528 38379 797.452 191.637
+uc021rtg.1 116 116 0 0
+uc001xbo.3 22363 22214 152.563 63.3417
+uc001xbp.3 22363 22214 152.563 63.3417
+uc021rti.1 1323 1174 189.874 1491.65
+uc001xbq.1 18551 18402 2472.1 1238.99
+uc001xbr.3 16214 16065 803.5 461.289
+uc021rtj.1 16214 16065 803.5 461.289
+uc001xbu.3 82309 82160 186.876 20.9779
+uc010aoo.3 81458 81309 0 0
+uc021rtk.1 2136 1987 1243.06 5769.79
+uc001xbv.3 75927 75778 705.591 85.8771
+uc001xcb.3 104378 104229 1080.7 95.6282
+uc001xcc.3 104378 104229 1080.7 95.6282
+uc001xcd.3 104378 104229 1080.7 95.6282
+uc001xce.3 104378 104229 1080.7 95.6282
+uc001xcf.2 104378 104229 1080.7 95.6282
+uc010trb.2 104378 104229 1080.7 95.6282
+uc010aoq.3 40310 40161 0 0
+uc010trc.2 23311 23162 0 0
+uc001xcg.3 21242 21093 386.754 169.108
+uc031qoq.1 2520 2371 265.023 1030.91
+uc010aos.3 1473 1324 0 0
+uc001xch.3 182939 182790 2 0.100913
+uc001xci.3 36959 36810 0 0
+uc001xcj.3 69895 69746 2.65968 0.351704
+uc001xck.3 34105 33956 12.9509 3.51763
+uc010aot.1 36472 36323 66.6641 16.9269
+uc001xcl.1 55160 55011 0 0
+uc001xcm.3 69722 69573 27.596 3.65825
+uc001xcn.3 69722 69573 27.596 3.65825
+uc010trf.3 69722 69573 27.596 3.65825
+uc001xco.3 34064 33915 169.016 45.9626
+uc021rtn.1 108612 108463 0 0
+uc001xcr.3 117650 117501 0 0
+uc001xcu.4 6570 6421 88.4826 127.093
+uc001xcv.3 21192 21043 43.169 18.9205
+uc010tri.2 21192 21043 43.169 18.9205
+uc010trj.2 21192 21043 43.169 18.9205
+uc001xcx.4 22196 22047 143.667 60.1
+uc010aow.3 22196 22047 143.667 60.1
+uc010trk.2 22196 22047 143.667 60.1
+uc021rtq.1 75 75 0 0
+uc001xdf.3 35521 35372 314.384 81.9725
+uc021rtr.1 22602 22453 0 0
+uc010apc.3 22005 21856 0 0
+uc010trp.2 22005 21856 0 0
+uc001xdj.2 27205 27056 432.286 147.359
+uc001xdk.2 27205 27056 432.286 147.359
+uc021rtt.1 27205 27056 432.286 147.359
+uc010apf.1 7609 7460 47.5832 58.8279
+uc001xdo.3 75230 75081 71.8495 8.82595
+uc001xdp.3 75230 75081 71.8495 8.82595
+uc001xdq.3 75230 75081 71.8495 8.82595
+uc010apg.1 33920 33771 0 0
+uc001xdr.1 12776 12627 15 10.9562
+uc010trq.1 12776 12627 15 10.9562
+uc001xdt.4 121447 121298 100.376 7.63209
+uc001xdu.4 121447 121298 100.376 7.63209
+uc010trr.2 121447 121298 100.376 7.63209
+uc010trs.2 121447 121298 100.376 7.63209
+uc001xdv.4 120840 120691 4.34165e-06 3.31778e-07
+uc010trt.2 97533 97384 0 0
+uc010tru.1 45658 45509 106.363 21.5555
+uc010trv.2 14253 14104 0 0
+uc001xdw.3 10282 10133 0 0
+uc001xdx.3 10282 10133 0 0
+uc010trw.2 9484 9335 0 0
+uc001xdy.4 77501 77352 3.26972 0.389859
+uc001xea.2 182743 182594 2.05284e-06 1.0369e-07
+uc001xeb.1 141957 141808 0 0
+uc031qou.1 107965 107816 200.687 17.1674
+uc001xec.2 16241 16092 83.0466 47.597
+uc001xef.4 20921 20772 126.474 56.1555
+uc001xeg.4 20921 20772 126.474 56.1555
+uc001xeh.4 20921 20772 126.474 56.1555
+uc010try.2 20921 20772 126.474 56.1555
+uc001xei.4 20795 20646 0 0
+uc001xej.4 18170 18021 633.954 324.449
+uc001xeo.3 2173 2024 0 0
+uc001xep.1 143847 143698 0 0
+uc001xer.4 42904 42755 590.145 127.303
+uc001xeq.2 77223 77074 397.809 47.603
+uc010apm.3 16486 16337 332.18 187.529
+uc001xew.4 53336 53187 15.2137 2.63813
+uc010apn.3 53336 53187 15.2137 2.63813
+uc001xex.4 39307 39158 0 0
+uc001xey.4 49840 49691 685.573 127.246
+uc021rtx.1 20 20 0 0
+uc001xfa.4 2588 2439 0 0
+uc010apq.2 74275 74126 210.243 26.1589
+uc001xfd.3 233940 233791 80.6165 3.18027
+uc001xfe.3 233940 233791 80.6165 3.18027
+uc001xfg.2 71872 71723 35.1688 4.52238
+uc001xfh.2 102620 102471 82.7443 7.4474
+uc001xfi.3 102620 102471 82.7443 7.4474
+uc001xfj.1 71760 71611 0 0
+uc001xfk.3 102508 102359 2.92502e-06 2.63554e-07
+uc010trz.2 102487 102338 0 0
+uc010tsa.2 363412 363263 2.70631 0.0687107
+uc001xfn.3 229184 229035 1.24292 0.0500506
+uc010tsb.2 73814 73665 3.5035 0.43864
+uc001xfo.3 7619 7470 7.54854 9.31987
+uc021rtz.1 84174 84025 3 0.329291
+uc010tsc.1 31418 31269 0 0
+uc031qow.1 38885 38736 0 0
+uc001xfq.2 52859 52710 1404.82 245.807
+uc001xfr.2 52859 52710 1404.82 245.807
+uc001xfs.2 52859 52710 1404.82 245.807
+uc021rua.1 50638 50489 85.1349 15.5517
+uc021rub.1 178 29 121.632 38682.9
+uc001xft.3 34072 33923 96 26.1003
+uc010tsd.1 94190 94041 1.00017 0.0980898
+uc001xfu.1 105887 105738 0 0
+uc010tse.1 22370 22221 0 0
+uc010apt.2 16829 16680 0 0
+uc001xgb.2 89129 88980 0 0
+uc021rue.1 142 142 0 0
+uc021rug.1 20 20 0 0
+uc001xgk.3 107936 107787 0 0
+uc001xgl.3 373485 373336 70.9809 1.75351
+uc001xgm.3 373485 373336 70.9809 1.75351
+uc021ruh.1 228904 228755 2119.25 85.4434
+uc010apw.1 22679 22530 26.9433 11.0295
+uc010apx.1 26393 26244 0 0
+uc010apy.3 150835 150686 502.8 30.7744
+uc010apz.1 35476 35327 445.666 116.351
+uc001xgn.3 86509 86360 567.845 60.6436
+uc021rui.1 86509 86360 567.845 60.6436
+uc001xgo.3 85109 84960 11.6585 1.2656
+uc001xgp.3 4225 4076 175.774 397.729
+uc010aqa.3 64378 64229 687.361 98.701
+uc001xgq.3 58955 58806 0 0
+uc001xgr.3 17126 16977 1002.82 544.792
+uc001xgs.3 12309 12160 606.902 460.312
+uc010tsi.2 12309 12160 606.902 460.312
+uc001xgt.3 10496 10347 3.22203e-07 2.87199e-07
+uc010aqe.2 52407 52258 0 0
+uc001xhb.3 71967 71818 1779.38 228.508
+uc010aqf.3 71967 71818 1779.38 228.508
+uc001xhd.4 9005 8856 0 0
+uc021ruk.1 1284 1135 0 0
+uc001xhh.4 20967 20818 54.5308 24.1585
+uc010aqg.3 20378 20229 7.24818e-07 3.30463e-07
+uc001xhi.2 29117 28968 33.8188 10.7673
+uc021rul.1 2142 1993 788.453 3648.68
+uc021rum.1 2405 2256 3.36622 13.7617
+uc001xhj.3 7332 7183 0 0
+uc001xhk.4 2769 2620 1220 4294.64
+uc001xhl.1 39477 39328 0 0
+uc001xhm.1 3271 3122 6 17.725
+uc001xhn.1 39868 39719 67.8649 15.7585
+uc001xho.1 39868 39719 67.8649 15.7585
+uc001xhp.2 16750 16601 2001.38 1111.89
+uc010aqh.1 13701 13552 353.512 240.585
+uc001xhq.1 6284 6135 583.378 877.007
+uc001xhv.3 21006 20857 177.536 78.5057
+uc001xhw.2 21006 20857 177.536 78.5057
+uc021rup.1 21006 20857 177.536 78.5057
+uc010tsj.2 30231 30082 30.63 9.39093
+uc010tsk.2 30231 30082 30.63 9.39093
+uc010tsl.2 148295 148146 138.22 8.60498
+uc010tsm.2 148295 148146 138.22 8.60498
+uc001xia.3 75867 75718 204.546 24.9149
+uc001xib.3 2045 1896 23.3402 113.536
+uc001xid.3 47073 46924 424.066 83.3502
+uc010tso.2 47073 46924 424.066 83.3502
+uc021ruu.1 82 82 0 0
+uc021ruv.1 4394 4245 0 0
+uc001xin.3 333530 333381 45.3027 1.25329
+uc001xio.3 333530 333381 45.3027 1.25329
+uc001xir.4 333530 333381 45.3027 1.25329
+uc010tsp.2 333530 333381 45.3027 1.25329
+uc001xip.3 331392 331243 94.1374 2.6211
+uc001xiq.3 331392 331243 94.1374 2.6211
+uc021rux.1 85 85 0 0
+uc001xiu.3 12163 12014 0.666667 0.511787
+uc001xiv.3 12163 12014 0.666667 0.511787
+uc010tsq.1 12163 12014 0.666667 0.511787
+uc001xiw.3 551609 551460 0 0
+uc001xix.3 674401 674252 11.4176 0.156179
+uc001xiy.3 674401 674252 11.4176 0.156179
+uc010tss.2 674401 674252 11.4176 0.156179
+uc010tst.2 674401 674252 11.4176 0.156179
+uc010tsu.2 358563 358414 258.772 6.65887
+uc001xiz.3 11161 11012 209.607 175.552
+uc010tsv.2 11161 11012 209.607 175.552
+uc001xja.2 39158 39009 1.39333 0.329425
+uc010aqn.2 39158 39009 1.39333 0.329425
+uc001xjb.2 38692 38543 0 0
+uc001xjc.4 94767 94618 599.808 58.4664
+uc001xjd.4 94767 94618 599.808 58.4664
+uc021rva.1 105 105 0 0
+uc001xjg.3 26200 26051 2238 792.325
+uc001xjl.1 56248 56099 183.638 30.1908
+uc010tsw.1 20506 20357 458.246 207.612
+uc001xjm.1 5132 4983 0 0
+uc001xjn.1 19071 18922 154.203 75.1613
+uc010tsx.1 11005 10856 0 0
+uc001xjo.1 8001 7852 0 0
+uc001xjp.1 8013 7864 0 0
+uc031qpe.1 3128 2979 31.1404 96.4099
+uc001xjs.3 31858 31709 1214.36 353.21
+uc001xjz.4 32566 32417 15 4.26762
+uc001xjy.2 3105 2956 0 0
+uc010aqq.3 67548 67399 0 0
+uc001xkd.3 658315 658166 0.224502 0.00314595
+uc010aqr.3 658315 658166 0.224502 0.00314595
+uc001xke.3 678103 677954 97.5041 1.32645
+uc001xkf.2 776243 776094 429.571 5.10491
+uc001xkg.2 910440 910291 108.54 1.09971
+uc031qpf.1 7782 7633 0 0
+uc001xkt.3 52544 52395 111.697 19.6617
+uc001xku.3 52544 52395 111.697 19.6617
+uc001xkv.3 52544 52395 111.697 19.6617
+uc001xkw.3 52544 52395 111.697 19.6617
+uc001xky.3 52544 52395 111.697 19.6617
+uc001xkx.3 52255 52106 188.92 33.4394
+uc010aqt.3 52255 52106 188.92 33.4394
+uc010tte.2 52255 52106 188.92 33.4394
+uc001xla.2 91780 91631 2 0.201305
+uc001xlb.2 94510 94361 0 0
+uc010aqu.2 94510 94361 0 0
+uc021rvg.1 64012 63863 1194.08 172.446
+uc021rvh.1 64012 63863 1194.08 172.446
+uc001xld.4 30809 30660 0 0
+uc001xle.3 63723 63574 76.1324 11.0448
+uc001xlf.4 63723 63574 76.1324 11.0448
+uc001xlg.4 63723 63574 76.1324 11.0448
+uc010aqx.3 63723 63574 76.1324 11.0448
+uc021rvi.1 1855 1706 898.032 4854.9
+uc001xli.2 18937 18788 0 0
+uc010ttf.1 43745 43596 6.02492 1.2746
+uc001xlk.3 103552 103403 1040.24 92.783
+uc010aqz.3 103552 103403 1040.24 92.783
+uc001xll.3 45104 44955 4.58519 0.940692
+uc021rvj.1 3723 3574 1.19025 3.0715
+uc001xln.1 3429 3280 593.107 1667.73
+uc001xlo.3 4894 4745 844.044 1640.58
+uc001xlp.3 4889 4740 391.459 761.686
+uc001xls.2 152970 152821 15783.4 952.542
+uc001xlt.2 152970 152821 15783.4 952.542
+uc021rvp.1 197 48 0 0
+uc001xmd.3 7749 7600 7.90738 9.59593
+uc021rvq.1 2169 2020 46.8013 213.685
+uc001xmi.2 33574 33425 8 2.20743
+uc001xmn.4 105416 105267 2.83044e-08 2.47987e-09
+uc001xmo.2 207978 207829 1867.26 82.864
+uc010are.1 207978 207829 1867.26 82.864
+uc010arf.1 102383 102234 560.893 50.6002
+uc001xmp.2 13400 13251 1656.19 1152.73
+uc001xmq.3 71 71 0 0
+uc021rvt.1 271 122 0 0
+uc001xmr.1 107902 107753 4.24439 0.36329
+uc010ttl.2 1843 1694 0 0
+uc001xms.3 210092 209943 6.91898 0.303954
+uc001xmt.3 210092 209943 6.91898 0.303954
+uc001xmu.3 153123 152974 109.77 6.6181
+uc001xmv.3 151833 151684 1693.34 102.961
+uc010ttm.2 141170 141021 0 0
+uc021rvu.1 889 740 30 373.902
+uc021rvv.1 634422 634273 0.000213722 3.1077e-06
+uc001xna.4 634083 633934 0.00035364 5.145e-06
+uc010ttn.2 634083 633934 0.00035364 5.145e-06
+uc021rvw.1 629677 629528 0.252275 0.00369595
+uc021rvx.1 629677 629528 0.252275 0.00369595
+uc021rvy.1 629677 629528 0.252275 0.00369595
+uc021rvz.1 629677 629528 0.252275 0.00369595
+uc001xmx.4 633453 633304 0.000902257 1.31397e-05
+uc001xmy.4 633453 633304 0.000902257 1.31397e-05
+uc010tto.2 633453 633304 0.000902257 1.31397e-05
+uc021rwa.1 633453 633304 0.000902257 1.31397e-05
+uc021rwb.1 633453 633304 0.000902257 1.31397e-05
+uc010arg.3 53091 52942 0 0
+uc010ttp.1 128560 128411 0 0
+uc021rwc.1 98061 97912 0 0
+uc001xng.3 33318 33169 20.1421 5.60067
+uc001xnh.3 33318 33169 20.1421 5.60067
+uc001xni.3 33318 33169 20.1421 5.60067
+uc001xnj.3 33318 33169 20.1421 5.60067
+uc010ttr.2 33318 33169 20.1421 5.60067
+uc010tts.2 33318 33169 20.1421 5.60067
+uc010ttt.2 33318 33169 20.1421 5.60067
+uc001xnk.3 20144 19995 154.469 71.2505
+uc021rwd.1 72 72 0 0
+uc001xnn.4 42664 42515 0 0
+uc001xno.3 62856 62707 676.608 99.5151
+uc010ttu.2 62856 62707 676.608 99.5151
+uc001xnp.3 49742 49593 510.175 94.8782
+uc001xnq.4 37770 37621 0 0
+uc001xnr.3 87257 87108 211.501 22.3935
+uc001xnv.3 87257 87108 211.501 22.3935
+uc010ark.3 86875 86726 0 0
+uc001xnt.1 69278 69129 0 0
+uc001xnu.3 75725 75576 1900.29 231.902
+uc001xnw.4 37143 36994 17.4582 4.35248
+uc010arl.3 37143 36994 17.4582 4.35248
+uc010ttw.2 37143 36994 17.4582 4.35248
+uc010ttx.2 35024 34875 363.033 96.0063
+uc010tty.2 35024 34875 363.033 96.0063
+uc010arm.3 13931 13782 272.907 182.629
+uc010arn.3 12242 12093 51.6523 39.3934
+uc001xoi.1 16908 16759 0 0
+uc001xok.1 2462 2313 801.815 3197.17
+uc001xol.1 6571 6422 265.188 380.847
+uc010tuc.3 38435 38286 48.2888 11.6325
+uc001xom.4 8039 7890 275.163 321.648
+uc001xon.5 6600 6451 1340.17 1916.02
+uc001xoo.3 4061 3912 4 9.43037
+uc001xop.3 3045 2896 1 3.1847
+uc001xoq.4 58854 58705 35.3583 5.555
+uc010aru.3 58854 58705 35.3583 5.555
+uc010arv.3 58854 58705 35.3583 5.555
+uc021rwi.1 73 73 0 0
+uc001xow.3 33635 33486 174.16 47.9681
+uc010tue.2 33622 33473 251.075 69.1793
+uc001xox.3 33548 33399 1.58532 0.437775
+uc001xoy.2 80318 80169 216.52 24.9092
+uc010ary.2 18469 18320 249.153 125.432
+uc010tuf.2 36908 36759 0 0
+uc001xoz.2 45674 45525 0.000139878 2.83379e-05
+uc001xpa.2 45674 45525 0.000139878 2.83379e-05
+uc001xpb.2 45674 45525 0.000139878 2.83379e-05
+uc010arz.2 45674 45525 0.000139878 2.83379e-05
+uc010tug.2 45674 45525 0.000139878 2.83379e-05
+uc010tuh.2 45674 45525 0.000139878 2.83379e-05
+uc010tui.2 45674 45525 0.000139878 2.83379e-05
+uc010tuj.2 34203 34054 686.984 186.057
+uc001xpe.3 13132 12983 31.044 22.0532
+uc010tuk.2 13177 13028 78.1999 55.36
+uc010tul.2 8827 8678 0 0
+uc010tum.2 8827 8678 0 0
+uc010tun.2 9230 9081 0 0
+uc001xph.3 12859 12710 483.201 350.631
+uc010tup.2 46738 46589 9.77002 1.9341
+uc001xpm.1 51067 50918 136.108 24.6536
+uc001xpp.2 115462 115313 107.422 8.59175
+uc010asb.2 115455 115306 113.744 9.09794
+uc001xpq.3 23267 23118 0 0
+uc001xpw.4 11546 11397 1.20769 0.977313
+uc021rwl.1 2109 1960 0.792307 3.72825
+uc001xpz.3 1849 1700 79.5 431.306
+uc031qph.1 1849 1700 79.5 431.306
+uc021rwn.1 95 95 0 0
+uc001xqe.1 1797 1648 0 0
+uc001xqf.1 22397 22248 0 0
+uc001xqh.3 23541 23392 347.851 137.149
+uc001xqi.3 23649 23500 4.53853 1.78121
+uc001xqj.4 73945 73796 1807.11 225.85
+uc001xql.4 55977 55828 751.315 124.119
+uc001xqm.1 12732 12583 30.5298 22.3773
+uc001xqo.1 3327 3178 0 0
+uc010tuu.2 10001 9852 0 0
+uc001xqu.2 19343 19194 0 0
+uc001xqs.3 21857 21708 1018.94 432.908
+uc001xqt.2 21857 21708 1018.94 432.908
+uc001xqv.2 21857 21708 1018.94 432.908
+uc010tuw.1 21857 21708 1018.94 432.908
+uc001xrc.2 6683 6534 1480 2089.06
+uc001xrh.3 8501 8352 10.5 11.5949
+uc001xri.3 8501 8352 10.5 11.5949
+uc001xrn.3 3457 3308 122 340.143
+uc010tva.2 3457 3308 122 340.143
+uc010asi.3 2592 2443 0 0
+uc001xrp.3 2005 1856 0 0
+uc010asj.3 44896 44747 165.394 34.0896
+uc010tvb.2 44485 44336 39.5442 8.2261
+uc010tvc.2 44345 44196 777.966 162.347
+uc001xrq.3 40568 40419 291.096 66.423
+uc001xrr.3 24551 24402 0 0
+uc001xrs.2 69573 69424 989 131.388
+uc010tvd.1 42708 42559 0 0
+uc001xrv.3 23790 23641 95.142 37.1171
+uc001xrw.2 49192 49043 86.8429 16.3315
+uc010ask.2 226100 225951 1.08252e-07 4.41864e-09
+uc001xrx.3 293875 293726 0 0
+uc001xry.1 84343 84194 487.841 53.4398
+uc001xrz.3 142213 142064 15.3902 0.999147
+uc001xsa.3 171936 171787 366.467 19.6749
+uc001xse.3 73539 73390 0 0
+uc001xsf.2 96688 96539 0 0
+uc010asl.1 96688 96539 0 0
+uc001xsg.2 97997 97848 53.2223 5.0166
+uc010asm.1 97997 97848 53.2223 5.0166
+uc010tve.3 98321 98172 240.278 22.5732
+uc031qpj.1 98321 98172 240.278 22.5732
+uc001xsh.3 50876 50727 157.471 28.6305
+uc001xsi.3 50876 50727 157.471 28.6305
+uc001xsj.1 24769 24620 20.3174 7.61112
+uc001xsk.1 23045 22896 178.329 71.8341
+uc001xsl.3 48438 48289 190.933 36.4671
+uc001xsm.3 3106 2957 82.9494 258.72
+uc001xsn.1 2557 2408 63.5286 243.322
+uc001xso.3 130491 130342 0 0
+uc001xsr.3 130491 130342 0 0
+uc001xsq.1 90969 90820 2.00194 0.2033
+uc001xss.3 11746 11597 0 0
+uc001xst.2 21129 20980 4.88327 2.14671
+uc001xsx.2 43921 43772 0 0
+uc010asn.1 43921 43772 0 0
+uc010aso.1 18089 17940 0 0
+uc010tvg.1 27027 26878 0 0
+uc001xsw.2 43919 43770 0 0
+uc010tvh.1 26273 26124 1 0.353043
+uc001xtc.1 19052 18903 284.413 138.767
+uc001xtd.3 19053 18904 270.587 132.014
+uc001xtf.2 77737 77588 2.5 0.297176
+uc010asq.1 77737 77588 2.5 0.297176
+uc021rws.1 73 73 0 0
+uc001xtj.3 10711 10562 207.098 180.841
+uc001xtk.3 10711 10562 207.098 180.841
+uc010ass.3 10711 10562 207.098 180.841
+uc001xtl.4 1167 1018 0 0
+uc001xtm.3 10235 10086 198.706 181.702
+uc021rwt.1 1803 1654 3.44972 19.2361
+uc001xtq.1 13826 13677 4.55028 3.06842
+uc010tvk.1 10697 10548 0 0
+uc001xtw.3 11443 11294 5481 4475.89
+uc001xue.5 9528 9379 238.5 234.531
+uc031qpl.1 9528 9379 238.5 234.531
+uc031qpm.1 9528 9379 238.5 234.531
+uc031qpn.1 9528 9379 238.5 234.531
+uc001xuh.2 8913 8764 2.01115 2.11646
+uc021rwv.1 8913 8764 2.01115 2.11646
+uc021rww.1 279 130 0 0
+uc010tvo.1 125879 125730 0.272617 0.0199978
+uc001xui.3 133872 133723 97.9517 6.75575
+uc001xuj.3 133872 133723 97.9517 6.75575
+uc001xuk.1 65552 65403 17.5535 2.47534
+uc001xul.3 10723 10574 273.272 238.354
+uc001xum.2 1697918 1.69777e+06 10.8045 0.058694
+uc001xun.4 1464560 1.46441e+06 0 0
+uc010asv.1 373368 373219 0 0
+uc021rwz.1 84 84 0 0
+uc001xup.3 588952 588803 85.4866 1.33905
+uc001xuq.3 588952 588803 85.4866 1.33905
+uc001xur.5 588952 588803 85.4866 1.33905
+uc010asw.4 588952 588803 85.4866 1.33905
+uc001xuw.1 244049 243900 7.83489 0.296271
+uc001xvb.1 152960 152811 0 0
+uc001xvc.3 153426 153277 0 0
+uc010tvs.2 153426 153277 0 0
+uc001xvd.1 190778 190629 1.00005 0.048384
+uc001xvj.3 1239 1090 4 33.8455
+uc021rxc.1 74 74 0 0
+uc021rxd.1 83 83 0 0
+uc021rxe.1 324 175 0 0
+uc031qpp.1 26196 26047 0 0
+uc031qpq.1 26160 26011 0 0
+uc001xvr.3 97783 97634 0 0
+uc010atd.3 97699 97550 0 0
+uc021rxf.1 1983 1834 0 0
+uc001xvs.3 16978 16829 0 0
+uc001xvv.3 9688 9539 0 0
+uc021rxh.1 1014 865 0 0
+uc001xvw.3 62795 62646 4.0047 0.589582
+uc001xwj.3 35 35 0 0
+uc021ryc.1 59 59 0 0
+uc001xwk.3 56 56 0 0
+uc001xwl.3 55 55 0 0
+uc021ryd.1 30 30 0 0
+uc031qpz.1 31 31 0 0
+uc031qqa.1 29 29 0 0
+uc021rye.1 33 33 0 0
+uc001xwq.3 53063 52914 4.23166 0.737577
+uc001xwr.3 53063 52914 4.23166 0.737577
+uc001xws.3 27802 27653 0 0
+uc001xwt.3 22535 22386 0 0
+uc001xwu.3 9108 8959 9.56706 9.84887
+uc001xww.3 50601 50452 173.129 31.6489
+uc001xwx.3 50601 50452 173.129 31.6489
+uc010twd.2 50601 50452 173.129 31.6489
+uc010twe.2 50601 50452 173.129 31.6489
+uc010twf.2 50601 50452 173.129 31.6489
+uc001xwy.3 50163 50014 0 0
+uc010twg.2 40932 40783 0 0
+uc001xxa.3 37670 37521 0 0
+uc001xxb.3 19124 18975 321.216 156.129
+uc001xxc.3 19124 18975 321.216 156.129
+uc010atg.1 28904 28755 0 0
+uc001xxi.3 53418 53269 67.1429 11.625
+uc001xxj.3 53418 53269 67.1429 11.625
+uc001xxk.3 53418 53269 67.1429 11.625
+uc001xxl.3 53418 53269 67.1429 11.625
+uc010ath.3 53418 53269 67.1429 11.625
+uc010ati.3 53418 53269 67.1429 11.625
+uc010atj.3 53418 53269 67.1429 11.625
+uc021ryh.1 73 73 0 0
+uc001xxq.3 2440 2291 21.5023 86.5622
+uc001xxr.3 1261 1112 0 0
+uc021ryi.1 290 141 0 0
+uc010atm.3 89826 89677 0.00983 0.00101097
+uc001xxy.3 88863 88714 256.748 26.692
+uc001xxz.3 88863 88714 256.748 26.692
+uc001xya.3 88863 88714 256.748 26.692
+uc010atn.3 88863 88714 256.748 26.692
+uc001xyb.3 88200 88051 4.71866e-05 4.94256e-06
+uc001xyd.1 48481 48332 0 0
+uc001xye.1 124088 123939 1 0.0744149
+uc001xyf.3 16073 15924 6.12226 3.54591
+uc001xyg.3 16073 15924 6.12226 3.54591
+uc001xyh.3 13472 13323 415.135 287.379
+uc001xyl.2 11293 11144 2306.5 1908.89
+uc010atq.2 11293 11144 2306.5 1908.89
+uc001xym.2 10011 9862 0 0
+uc021ryj.1 3676 3527 0 0
+uc001xyq.3 6249 6100 0 0
+uc001xyr.1 2042 1893 0 0
+uc010atu.3 53709 53560 0 0
+uc010atv.2 75158 75009 0 0
+uc001xyy.2 82462 82313 0 0
+uc001xyv.2 111347 111198 37.341 3.09711
+uc001xyw.2 111347 111198 37.341 3.09711
+uc001xyx.2 111347 111198 37.341 3.09711
+uc001xyz.2 111347 111198 37.341 3.09711
+uc001xza.2 111347 111198 37.341 3.09711
+uc001xzb.2 111347 111198 37.341 3.09711
+uc001xzc.2 111347 111198 37.341 3.09711
+uc010twj.1 55567 55418 0 0
+uc001xze.2 110725 110576 4.81838e-08 4.01891e-09
+uc010atw.3 127 127 0 0
+uc021ryn.1 26 26 0 0
+uc001yah.2 42246 42097 1959 429.191
+uc001yai.3 178901 178752 0 0
+uc010twm.2 178289 178140 0 0
+uc001yak.3 177674 177525 0 0
+uc010auj.3 62147 61998 0 0
+uc010twn.2 58117 57968 0 0
+uc001yan.3 48716 48567 0 0
+uc001yap.3 175210 175061 0 0
+uc010auk.3 175210 175061 0 0
+uc001yaq.3 112756 112607 0 0
+uc001yar.1 9841 9692 0 0
+uc001yas.1 33985 33836 0 0
+uc001yaz.1 45655 45506 472.446 95.7527
+uc001yba.1 6838 6689 4.55447 6.27978
+uc001ybb.1 2083 1934 0 0
+uc001ybc.4 12194 12045 2.5 1.91426
+uc001ybd.4 12194 12045 2.5 1.91426
+uc001ybi.3 4682 4533 0 0
+uc001ybk.4 2136 1987 122.189 567.156
+uc010auo.3 2057 1908 0 0
+uc021sax.1 396 247 86.8109 3241.49
+uc001ybm.4 22161 22012 330.858 138.628
+uc001ybn.4 22161 22012 330.858 138.628
+uc010auq.3 19400 19251 460.285 220.516
+uc001ybs.1 374125 373976 27.0093 0.666098
+uc001ybt.1 1164 1015 0 0
+uc001ybu.1 63274 63125 0 0
+uc001ybv.1 229786 229637 0 0
+uc001ybz.2 10715 10566 0 0
+uc021say.1 10715 10566 0 0
+uc021saz.1 2267 2118 0 0
+uc010aus.2 2266 2117 0 0
+uc001yca.2 2224 2075 0 0
+uc031qqc.1 879 730 0 0
+uc001ycf.3 10283 10134 0 0
+uc001ycg.1 11568 11419 0 0
+uc010twp.2 14400 14251 0 0
+uc001ych.4 13034 12885 0 0
+uc001yci.3 22553 22404 92 37.873
+uc001yck.3 21422 21273 256.5 111.206
+uc001ycl.3 21422 21273 256.5 111.206
+uc001ycm.1 4148 3999 0 0
+uc001ycn.1 5201 5052 0 0
+uc021sba.1 5955 5806 19 30.1817
+uc001ycr.3 53534 53385 0 0
+uc001ycs.1 105424 105275 0 0
+uc010avd.3 8465 8316 0 0
+uc001ydk.3 8461 8312 0 0
+uc001ydl.3 8402 8253 0 0
+uc010ave.3 9399 9250 0 0
+uc001ydm.3 11752 11603 0 0
+uc001ydn.1 6497 6348 0 0
+uc001ydo.4 31996 31847 0 0
+uc010avf.1 2788 2639 0 0
+uc001ydp.3 11757 11608 0 0
+uc001ydr.3 11757 11608 0 0
+uc021sbb.2 11757 11608 0 0
+uc001yds.3 11663 11514 0 0
+uc010avg.3 11663 11514 0 0
+uc001ydt.3 6270 6121 0 0
+uc010twt.1 22246 22097 37.7096 15.7393
+uc001yee.1 2451 2302 4.07152 16.3124
+uc001yem.1 9733 9584 571 549.487
+uc001yen.1 5077 4928 0 0
+uc001yep.1 21063 20914 25.4757 11.2346
+uc021sbf.1 20670 20521 0 0
+uc021sbg.1 22275 22126 0 0
+uc021sbh.1 8592 8443 0 0
+uc001yet.1 10197 10048 0 0
+uc001yeu.2 16577 16428 1.7411 0.977478
+uc001yev.2 16577 16428 1.7411 0.977478
+uc001yew.3 29388 29239 0 0
+uc001yex.3 29388 29239 0 0
+uc010avj.3 29388 29239 0 0
+uc021sbi.1 29388 29239 0 0
+uc001yfa.3 6212 6063 0 0
+uc001yez.3 6227 6078 0 0
+uc001yfd.1 41297 41148 0 0
+uc001yfe.3 48800 48651 0 0
+uc001yff.4 54566 54417 2 0.338971
+uc010avl.2 39369 39220 1151.55 270.797
+uc001yfg.2 39532 39383 23.1498 5.42133
+uc010avm.1 39532 39383 23.1498 5.42133
+uc010twu.1 39532 39383 23.1498 5.42133
+uc001yfh.3 8554 8405 6.73118 7.3862
+uc021sbj.1 1062 913 1.26882 12.8173
+uc001yfj.5 23839 23690 79.8356 31.0813
+uc031qqe.1 23839 23690 79.8356 31.0813
+uc031qqf.1 23839 23690 79.8356 31.0813
+uc001yfl.4 22555 22406 17.4933 7.20071
+uc001yfm.1 7181 7032 0 0
+uc001yfn.3 97317 97168 4.0372 0.383199
+uc001yfo.3 33223 33074 0 0
+uc001yfp.3 33223 33074 0 0
+uc001yfq.3 64741 64592 479.25 68.4307
+uc001yfr.3 64741 64592 479.25 68.4307
+uc010avp.3 64741 64592 479.25 68.4307
+uc010twv.2 64741 64592 479.25 68.4307
+uc001yfs.3 3010 2861 0 0
+uc001yft.3 84268 84119 308 33.7695
+uc001yfu.3 5290 5141 0 0
+uc031qqg.1 3892 3743 0 0
+uc001yfz.2 6154 6005 0 0
+uc021sbm.1 91 91 0 0
+uc001ygi.4 30114 29965 1678.67 516.678
+uc021sbo.1 102 102 0 0
+uc001ygl.1 24132 23983 0 0
+uc010avs.3 31532 31383 0 0
+uc031qqk.1 23 23 0 0
+uc001ygn.1 29020 28871 0 0
+uc001ygo.3 42884 42735 0 0
+uc031qql.1 42598 42449 0 0
+uc001ygp.3 21305 21156 0 0
+uc010avt.1 171748 171599 0 0
+uc010tww.2 168460 168311 0 0
+uc001ygq.3 118177 118028 0 0
+uc001ygr.3 148651 148502 2 0.124213
+uc001ygs.3 148651 148502 2 0.124213
+uc001ygt.3 172423 172274 29.5475 1.58186
+uc001ygv.2 120736 120587 38.9759 2.98101
+uc001ygu.3 78823 78674 1220.48 143.076
+uc021sbp.1 99 99 0 0
+uc001ygw.1 2317 2168 346.996 1476.16
+uc001ygy.2 40270 40121 1994.75 458.548
+uc001ygz.2 2376 2227 1613 6680.08
+uc010twy.1 98 98 0 0
+uc001yhc.3 7037 6888 1 1.33898
+uc001yhd.3 7037 6888 1 1.33898
+uc010avx.3 153886 153737 45.2619 2.71533
+uc021sbq.1 5313 5164 26.7655 47.8031
+uc001yhn.3 153808 153659 3.14912e-07 1.89016e-08
+uc010avy.3 149394 149245 282.973 17.4869
+uc001yho.3 148304 148155 0 0
+uc021sbr.1 244 95 0 0
+uc001yhr.1 15477 15328 0 0
+uc001yhu.4 8263 8114 0 0
+uc001yhs.4 8266 8117 0 0
+uc021sbs.1 330 181 0 0
+uc021sbt.1 84 84 0 0
+uc021sbu.1 204 55 0 0
+uc021sbw.2 28198 28049 0 0
+uc001yhw.3 34916 34767 0 0
+uc001yhy.3 34916 34767 0 0
+uc001yhz.3 34916 34767 0 0
+uc001yib.3 34916 34767 0 0
+uc001yic.3 34916 34767 0 0
+uc001yie.3 34916 34767 0 0
+uc010avz.2 34916 34767 0 0
+uc010txb.2 34916 34767 0 0
+uc010txc.2 34916 34767 0 0
+uc010txd.2 34916 34767 0 0
+uc010txe.2 34916 34767 0 0
+uc010txf.2 34916 34767 0 0
+uc010txg.2 34916 34767 0 0
+uc010txh.2 34916 34767 0 0
+uc021sbv.1 87 87 0 0
+uc021sbx.1 30419 30270 0 0
+uc001yid.2 29603 29454 0 0
+uc021sbz.1 98 98 0 0
+uc001yif.2 2963 2814 0 0
+uc021sca.1 89 89 0 0
+uc010txi.2 93 93 0 0
+uc021scb.1 72 72 0 0
+uc021scc.1 114 114 0 0
+uc021scd.1 93 93 0 0
+uc001yig.3 97 97 0 0
+uc021sce.1 94 94 0 0
+uc010txk.1 82 82 0 0
+uc010txl.1 12199 12050 0 0
+uc021scf.1 77 77 0 0
+uc021scg.1 79 79 0 0
+uc021sch.1 58 58 0 0
+uc001yii.1 70 70 0 0
+uc001yij.3 71 71 0 0
+uc021sci.1 72 72 0 0
+uc001yil.3 74 74 0 0
+uc001yim.1 77 77 0 0
+uc001yin.3 74 74 0 0
+uc001yio.3 76 76 0 0
+uc001yiq.3 71 71 0 0
+uc001yir.3 71 71 0 0
+uc001yis.3 77 77 0 0
+uc001yit.3 74 74 0 0
+uc001yiu.3 104 104 0 0
+uc001yiv.3 69 69 0 0
+uc021scj.1 73 73 0 0
+uc001yiw.3 71 71 0 0
+uc001yix.1 76 76 0 0
+uc001yiy.1 71 71 0 0
+uc001yiz.3 71 71 0 0
+uc001yja.3 71 71 0 0
+uc001yjb.3 74 74 0 0
+uc001yjc.3 74 74 0 0
+uc001yjd.3 73 73 0 0
+uc001yje.3 74 74 0 0
+uc001yjf.1 71 71 0 0
+uc001yjg.3 69 69 0 0
+uc001yjh.3 74 74 0 0
+uc001yji.3 71 71 0 0
+uc001yjj.3 74 74 0 0
+uc021sck.1 78 78 0 0
+uc001yjk.1 71 71 0 0
+uc001yjl.3 71 71 0 0
+uc001yjm.3 71 71 0 0
+uc001yjn.3 71 71 0 0
+uc001yjo.1 71 71 0 0
+uc001yjp.1 71 71 0 0
+uc001yjq.3 71 71 0 0
+uc001yjr.3 69 69 0 0
+uc001yjs.3 71 71 0 0
+uc001yjt.1 69 69 0 0
+uc001yju.3 71 71 0 0
+uc001yjv.3 74 74 0 0
+uc021scl.1 75 75 0 0
+uc010awa.1 67 67 0 0
+uc021scm.1 96 96 0 0
+uc001yjx.1 63 63 0 0
+uc021scn.1 80 80 0 0
+uc010awb.1 61 61 0 0
+uc021sco.1 88 88 0 0
+uc001yjy.1 86 86 0 0
+uc021scp.1 88 88 0 0
+uc021scq.1 80 80 0 0
+uc021scr.1 84 84 0 0
+uc010txm.2 81 81 0 0
+uc021scs.1 78 78 0 0
+uc021sct.1 78 78 0 0
+uc021scu.1 82 82 0 0
+uc021scv.1 81 81 0 0
+uc021scw.1 77 77 0 0
+uc021scx.1 80 80 0 0
+uc010txn.1 66 66 0 0
+uc021scy.1 109 109 0 0
+uc021scz.1 80 80 0 0
+uc021sda.1 81 81 0 0
+uc021sdb.1 100 100 0 0
+uc010awc.1 68 68 0 0
+uc021sdc.1 82 82 0 0
+uc021sdd.1 85 85 0 0
+uc021sde.1 85 85 0 0
+uc010awd.3 75 75 0 0
+uc021sdf.1 84 84 0 0
+uc021sdg.1 78 78 0 0
+uc021sdh.1 79 79 0 0
+uc021sdi.1 91 91 0 0
+uc021sdj.1 97 97 0 0
+uc021sdk.1 80 80 0 0
+uc010awe.3 76 76 0 0
+uc010txo.1 73 73 0 0
+uc021sdl.1 66 66 0 0
+uc021sdm.1 73 73 0 0
+uc021sdn.1 82 82 0 0
+uc010awg.3 84 84 0 0
+uc021sdo.1 81 81 0 0
+uc021sdp.1 102 102 0 0
+uc010awh.1 69 69 0 0
+uc021sdq.1 84 84 0 0
+uc021sdr.1 79 79 0 0
+uc021sds.1 91 91 0 0
+uc010txp.1 70 70 0 0
+uc021sdt.1 80 80 0 0
+uc021sdu.1 79 79 0 0
+uc021sdv.1 78 78 0 0
+uc001yjz.2 3026 2877 0 0
+uc010awi.1 557 408 0 0
+uc021sdx.1 2102 1953 20 94.4486
+uc010awj.3 2089 1940 0 0
+uc001ykj.4 74775 74626 26.0803 3.22322
+uc001ykk.3 166194 166045 168.544 9.36173
+uc010txr.2 166194 166045 168.544 9.36173
+uc001ykl.1 1005 856 9.96308 107.346
+uc010txs.1 73214 73065 0 0
+uc010txt.2 96845 96696 0 0
+uc001ykn.3 102823 102674 0 0
+uc001yko.3 118189 118040 348.017 27.1919
+uc001ykp.3 118189 118040 348.017 27.1919
+uc001ykq.3 30465 30316 0 0
+uc001ykr.1 2194 2045 0 0
+uc001yks.2 86271 86122 59445.6 6366.1
+uc001ykt.1 8699 8550 4346.37 4688.44
+uc001ykz.3 70679 70530 0 0
+uc001yla.3 70679 70530 0 0
+uc001ylb.3 70679 70530 0 0
+uc001ylf.3 70679 70530 0 0
+uc010txu.2 70679 70530 0 0
+uc001ylc.3 75153 75004 0 0
+uc001yld.3 83822 83673 330.57 36.4372
+uc001yle.3 83822 83673 330.57 36.4372
+uc021sdy.1 2766 2617 8.32187 29.3282
+uc021sdz.1 74 74 0 0
+uc001ylo.3 25798 25649 0 0
+uc031qqo.1 23877 23728 1.60428e-06 6.23571e-07
+uc001ylp.3 23424 23275 123.362 48.883
+uc010awk.2 23424 23275 123.362 48.883
+uc001ylq.1 16383 16234 15.6066 8.86645
+uc001ylr.3 17190 17041 0 0
+uc001yls.3 11553 11404 0 0
+uc001ylt.3 8242 8093 17.8563 20.3493
+uc010txw.2 62310 62161 0 0
+uc010awl.3 102709 102560 0 0
+uc001ylw.2 139519 139370 822.558 54.4333
+uc010txx.2 139519 139370 822.558 54.4333
+uc021sed.1 83 83 0 0
+uc001ymb.4 137918 137769 1344.52 90.0088
+uc001ymc.2 134022 133873 543.654 37.4539
+uc001ymd.2 134022 133873 543.654 37.4539
+uc001yme.2 134022 133873 543.654 37.4539
+uc010txy.2 134022 133873 543.654 37.4539
+uc001ymf.1 2717 2568 27.2857 97.996
+uc001ymg.4 8187 8038 0 0
+uc001ymh.4 7921 7772 12 14.2402
+uc001ymk.3 10414 10265 40 35.9392
+uc001yml.1 3096 2947 71.9949 225.315
+uc001ymm.1 11113 10964 849.023 714.198
+uc010awo.1 11113 10964 849.023 714.198
+uc010txz.1 10435 10286 928.591 832.618
+uc010tya.1 3525 3376 1317.37 3598.92
+uc021see.1 23 23 0 0
+uc001ymq.4 11023 10874 1062.17 900.89
+uc001ymr.4 11023 10874 1062.17 900.89
+uc001ymt.4 10164 10015 0.547871 0.50454
+uc001ymu.3 10076 9927 2235.12 2076.59
+uc001ymv.1 126 126 0 0
+uc001ymw.4 118466 118317 84.0853 6.55451
+uc001ymx.4 118466 118317 84.0853 6.55451
+uc001ymy.4 118466 118317 84.0853 6.55451
+uc001ymz.4 118466 118317 84.0853 6.55451
+uc001yna.4 118466 118317 84.0853 6.55451
+uc010awp.3 118466 118317 84.0853 6.55451
+uc021sef.1 542 393 138.428 3248.61
+uc010tyb.2 38273 38124 857.891 207.54
+uc010awq.3 28837 28688 0 0
+uc001ynd.3 3962 3813 705.938 1707.53
+uc001yng.3 7902 7753 688 818.439
+uc010aws.3 7902 7753 688 818.439
+uc010tyc.2 27938 27789 170.924 56.728
+uc010tyd.1 123270 123121 93.3797 6.995
+uc010tye.1 56129 55980 0 0
+uc001ynm.1 57044 56895 63.3319 10.2664
+uc001yno.3 72364 72215 714.772 91.2868
+uc010tyf.2 72364 72215 714.772 91.2868
+uc021seh.1 10543 10394 0.455076 0.403803
+uc001ynp.1 18149 18000 0 0
+uc001ynq.1 18149 18000 0 0
+uc001ynr.1 18149 18000 0 0
+uc010awu.1 18149 18000 0 0
+uc001yns.3 25863 25714 1638.07 587.532
+uc001ynw.1 3277 3128 0 0
+uc001yoc.3 17925 17776 664.603 344.823
+uc001yod.3 17925 17776 664.603 344.823
+uc001yoe.3 2238 2089 1033.79 4564.19
+uc001yoh.1 10329 10180 2 1.81197
+uc001yom.4 124188 124039 990.873 73.6762
+uc001yon.4 82127 81978 366.83 41.2701
+uc031qqq.1 3250 3101 158.352 470.965
+uc001yoo.2 21660 21511 0 0
+uc001yoq.2 27024 26875 24 8.23627
+uc001yor.2 27024 26875 24 8.23627
+uc010tyg.2 110 110 0 0
+uc001yos.4 42176 42027 3069 673.498
+uc010tyh.1 9063 8914 0 0
+uc001yow.1 10128 9979 0 0
+uc010awy.1 2367 2218 0 0
+uc001yoy.4 15203 15054 121.003 74.1334
+uc001ypb.2 30005 29856 2158.79 666.878
+uc001ypc.2 30005 29856 2158.79 666.878
+uc010awz.1 12358 12209 1203.41 909.082
+uc001ypd.3 23114 22965 2452 984.74
+uc001ype.3 17420 17271 0 0
+uc001ypf.3 17420 17271 0 0
+uc010tyj.1 4353 4204 0.266608 0.584896
+uc001ypg.1 6521 6372 272.217 394.01
+uc001yph.3 6527 6378 1151.6 1665.27
+uc001ypi.3 6527 6378 1151.6 1665.27
+uc021sel.1 2232 2083 150.311 665.531
+uc001ypp.3 4116 3967 411.052 955.658
+uc021sem.1 1269 1120 21.948 180.736
+uc001ypq.4 2518 2369 22 85.6496
+uc001yps.3 31458 31309 2134.92 628.899
+uc010axb.4 31458 31309 2134.92 628.899
+uc001ypt.3 8727 8578 442.153 475.394
+uc001ypu.1 8387 8238 0 0
+uc010tyl.1 8387 8238 0 0
+uc001ypy.1 9240 9091 95 96.3784
+uc001ypz.1 9240 9091 95 96.3784
+uc010tym.1 9240 9091 95 96.3784
+uc010tyq.2 2552 2403 1008.62 3871.18
+uc001yqs.2 97315 97166 269.656 25.5954
+uc001yqt.3 83733 83584 891.028 98.3186
+uc001yqu.3 83733 83584 891.028 98.3186
+uc001yqw.3 15277 15128 101 61.5755
+uc001yqx.3 50872 50723 59.0234 10.7322
+uc001yqy.3 50872 50723 59.0234 10.7322
+uc021seq.1 50872 50723 59.0234 10.7322
+uc001yqz.1 22282 22133 633.359 263.923
+uc001yra.1 22282 22133 633.359 263.923
+uc001yrb.3 12451 12302 6080.21 4558.38
+uc010tyr.2 7233 7084 1.28543 1.67354
+uc031qqr.1 7233 7084 1.28543 1.67354
+uc031qqs.1 7233 7084 1.28543 1.67354
+uc001yrc.3 5987 5838 0 0
+uc001yrd.2 5396 5247 142.087 249.753
+uc031qqt.1 5396 5247 142.087 249.753
+uc031qqu.1 5396 5247 142.087 249.753
+uc031qqv.1 5396 5247 142.087 249.753
+uc001yrf.2 4312 4163 0 0
+uc001yrg.3 2925 2776 2851.8 9474.73
+uc031qqw.1 22 22 0 0
+uc001yri.4 1868 1719 2830 15183.7
+uc001yrj.3 9394 9245 0 0
+uc001yrk.3 9066 8917 184.028 190.341
+uc001yrm.3 8000 7851 281.324 330.483
+uc001yrn.3 8000 7851 281.324 330.483
+uc001yro.3 8000 7851 281.324 330.483
+uc010tys.2 7142 6993 0 0
+uc001yrp.1 3587 3438 0 0
+uc021ses.1 960 811 0.831088 9.45135
+uc001yrr.3 2463 2314 0 0
+uc001ysq.3 32551 32402 0 0
+uc001ysr.3 32551 32402 0 0
+uc001yss.3 13815 13666 0 0
+uc001yst.3 14665 14516 0 0
+uc021seu.1 698 549 0 0
+uc001ysy.2 13075 12926 763.369 544.676
+uc031qnr.1 3097 2948 0 0
+uc001vvb.3 4041 3892 0 0
+uc021rnc.1 40 40 0 0
+uc001vvg.2 40 40 0 0
+uc021rni.1 40 40 0 0
+uc001vvo.1 10225 10076 0 0
+uc001vvq.1 68973 68824 204.029 27.3413
+uc001vvr.1 45125 44976 524.761 107.609
+uc010ahe.1 45125 44976 524.761 107.609
+uc001vvs.1 34237 34088 0 0
+uc001vvu.3 1388 1239 0 0
+uc001vvv.1 5842 5693 0 0
+uc001vvw.2 34158 34009 0 0
+uc001vvx.2 32 32 0 0
+uc021rnk.1 40 40 0 0
+uc001vvz.2 40 40 0 0
+uc010tkr.2 32 32 0 0
+uc021rnl.1 41 41 0 0
+uc021rnm.1 28 28 0 0
+uc010tks.2 32 32 0 0
+uc021rnn.1 41 41 0 0
+uc001vwb.3 36319 36170 64.5 16.4467
+uc001vwc.3 36319 36170 64.5 16.4467
+uc021rno.1 1429 1280 0 0
+uc010tky.2 933 784 0 0
+uc010tkz.2 915 766 0 0
+uc001vwt.3 16853 16704 249.5 137.758
+uc001vwu.3 16853 16704 249.5 137.758
+uc001vwv.4 18006 17857 1094.33 565.208
+uc001vwx.4 21643 21494 0 0
+uc001vwy.4 21945 21796 36.8892 15.6096
+uc001vwz.4 21945 21796 36.8892 15.6096
+uc021rnp.2 21945 21796 36.8892 15.6096
+uc010ahh.2 17828 17679 0 0
+uc021rnq.1 148 148 0 0
+uc010ahi.1 99 99 0 0
+uc001vxa.1 341 192 24 1152.86
+uc010ahj.1 7481 7332 31.9164 40.1475
+uc010ahk.3 26101 25952 191.944 68.2136
+uc001vxe.3 47754 47605 0.000314474 6.09257e-05
+uc010tlf.1 45513 45364 90.6021 18.4202
+uc010tlg.1 45513 45364 90.6021 18.4202
+uc010tlh.1 10868 10719 112.935 97.1724
+uc010tli.2 6832 6683 0 0
+uc001vxf.3 8061 7912 1341 1563.18
+uc001vxk.2 3626 3477 890 2360.77
+uc001vxl.2 3626 3477 890 2360.77
+uc001vxq.4 4839 4690 0 0
+uc010aho.3 4839 4690 0 0
+uc010ahp.3 4839 4690 0 0
+uc010ahq.3 4839 4690 0 0
+uc010ahr.3 4839 4690 0 0
+uc010ahs.3 4839 4690 0 0
+uc010aht.3 4839 4690 0 0
+uc010ahu.3 4839 4690 0 0
+uc021rnt.1 618 469 0 0
+uc010ahv.3 4833 4684 0 0
+uc010ahx.3 5096 4947 0 0
+uc010ahw.3 5101 4952 0 0
+uc001vxs.3 7366 7217 0 0
+uc021rnu.1 600 451 0 0
+uc001vxt.3 743 594 0 0
+uc021rnv.1 72 72 0 0
+uc021rnx.1 72 72 0 0
+uc021rny.1 73 73 0 0
+uc021roa.1 73 73 0 0
+uc001vxv.1 996 847 0 0
+uc021roc.1 94 94 0 0
+uc021rod.1 94 94 0 0
+uc021roe.1 94 94 0 0
+uc021rof.1 94 94 0 0
+uc021rog.1 82 82 0 0
+uc001vyf.3 1044 895 0 0
+uc001vyg.3 1522 1373 0 0
+uc001vyh.3 1522 1373 0 0
+uc001vyi.3 1522 1373 0 0
+uc021rop.1 471 322 0 0
+uc001vyt.3 6058 5909 177.465 276.992
+uc001vyu.3 6559 6410 104.73 150.689
+uc001vyv.3 8264 8115 50.5797 57.4852
+uc001vyw.3 8277 8128 11.1976 12.706
+uc001vyx.3 8343 8194 0.00550266 0.00619361
+uc001vyy.3 8343 8194 0.00550266 0.00619361
+uc001vyz.3 8343 8194 0.00550266 0.00619361
+uc001vza.3 8343 8194 0.00550266 0.00619361
+uc001vzb.3 8343 8194 0.00550266 0.00619361
+uc001vzc.3 8742 8593 0 0
+uc001vzd.3 9014 8865 0 0
+uc001vze.3 9014 8865 0 0
+uc001vzf.3 9014 8865 0 0
+uc001vzg.3 9014 8865 0 0
+uc010aig.3 9014 8865 0 0
+uc010tll.2 54110 53961 0 0
+uc001vzj.3 1966 1817 0 0
+uc021rot.1 471 322 0 0
+uc001vzr.2 8604 8455 1783.06 1945
+uc001vzs.2 8969 8820 0 0
+uc010aik.1 14659 14510 20.4944 13.0267
+uc010tlp.2 1089 940 0 0
+uc001vzu.2 5425 5276 8.22334 14.3751
+uc021rov.1 6822 6673 4.77666 6.60194
+uc001vzw.3 60343 60194 28.7529 4.40551
+uc001vzx.3 60343 60194 28.7529 4.40551
+uc001vzy.3 60343 60194 28.7529 4.40551
+uc001vzz.3 60343 60194 28.7529 4.40551
+uc001waa.3 60343 60194 28.7529 4.40551
+uc001wac.3 60343 60194 28.7529 4.40551
+uc001wad.3 60343 60194 28.7529 4.40551
+uc010ail.3 60343 60194 28.7529 4.40551
+uc010tlq.2 60343 60194 28.7529 4.40551
+uc010tlr.2 19606 19457 12.3536 5.85578
+uc001wae.3 58712 58563 0 0
+uc001wao.2 32795 32646 3361.06 949.542
+uc001waq.2 1286 1137 42.9405 348.317
+uc001war.2 46515 46366 5128.31 1020.1
+uc001was.2 52105 51956 1291.93 229.335
+uc001wat.1 103 103 0 0
+uc001wau.1 109 109 0 0
+uc001wav.1 9710 9561 682.764 658.621
+uc021row.1 300 151 0 0
+uc010tls.2 17654 17505 0 0
+uc001wax.3 17954 17805 85.021 44.0405
+uc010ain.4 17954 17805 85.021 44.0405
+uc010tlt.2 17954 17805 85.021 44.0405
+uc001wbb.3 5691 5542 924.736 1538.93
+uc001wbc.3 13176 13027 0.0915321 0.0648033
+uc010tlw.1 10403 10254 468.16 421.084
+uc010tlx.2 10164 10015 0 0
+uc021rox.1 9626 9477 0.0588644 0.0572862
+uc021roy.1 29 29 0 0
+uc010tly.2 5131 4982 0 0
+uc001wbe.3 16106 15957 0 0
+uc001wbf.3 4890 4741 0 0
+uc010tlz.1 4890 4741 0 0
+uc001wbg.1 15865 15716 0 0
+uc010tma.1 15865 15716 0 0
+uc010tmb.2 942 793 0 0
+uc010tmc.2 933 784 0 0
+uc001wds.1 102866 102717 0 0
+uc001wdt.1 15199 15050 1.69654 1.03967
+uc001web.1 624 475 0 0
+uc001wgl.2 24337 24188 1820 693.968
+uc001wgr.4 42187 42038 22.0104 4.82897
+uc001wgs.4 42676 42527 0.000408549 8.86027e-05
+uc001wgt.4 43245 43096 0 0
+uc001wgu.4 46589 46440 0 0
+uc001wgv.4 46589 46440 0 0
+uc001whg.3 18543 18394 682.714 342.318
+uc001whh.3 18543 18394 682.714 342.318
+uc001whi.3 18543 18394 682.714 342.318
+uc001whj.3 18543 18394 682.714 342.318
+uc010tne.2 18543 18394 682.714 342.318
+uc001whk.1 16431 16282 0 0
+uc001whl.1 8929 8780 845.5 888.151
+uc001whm.1 8929 8780 845.5 888.151
+uc001whn.1 8929 8780 845.5 888.151
+uc010tnf.1 8929 8780 845.5 888.151
+uc010tng.1 8929 8780 845.5 888.151
+uc010tnh.1 8929 8780 845.5 888.151
+uc001who.3 8949 8800 559.604 586.497
+uc001wht.3 10915 10766 51.2661 43.9181
+uc001whu.3 10915 10766 51.2661 43.9181
+uc001whv.3 10915 10766 51.2661 43.9181
+uc001whw.3 10915 10766 51.2661 43.9181
+uc001whq.3 10921 10772 30.3316 25.9697
+uc021rqu.1 80 80 0 0
+uc001why.3 6023 5874 1064.11 1670.78
+uc001whz.3 11439 11290 662.891 541.522
+uc001wib.2 13233 13084 487.228 343.447
+uc001wic.2 14137 13988 0 0
+uc001wia.4 23251 23102 20.7544 8.2857
+uc001wie.3 23251 23102 20.7544 8.2857
+uc001wif.3 23251 23102 20.7544 8.2857
+uc001wig.3 23251 23102 20.7544 8.2857
+uc001wih.3 23251 23102 20.7544 8.2857
+uc001wii.3 9295 9146 2864.11 2888.19
+uc001wij.3 9295 9146 2864.11 2888.19
+uc010tni.2 9370 9221 738.777 738.93
+uc001wil.3 10478 10329 1762.5 1573.76
+uc010akf.3 10478 10329 1762.5 1573.76
+uc001win.3 5185 5036 0 0
+uc001wio.4 11053 10904 3449.67 2917.83
+uc001wip.4 12974 12825 0 0
+uc001wiq.4 13006 12857 0 0
+uc001wir.4 13006 12857 0 0
+uc001wis.4 22245 22096 3035.91 1267.19
+uc001wit.4 37050 36901 217.896 54.4602
+uc010akg.3 37050 36901 217.896 54.4602
+uc010tnj.2 37050 36901 217.896 54.4602
+uc010aki.1 4547 4398 0 0
+uc001wiv.2 2306 2157 2 8.5516
+uc001wiw.3 4849 4700 356.991 700.53
+uc001wix.4 29156 29007 0 0
+uc010tnk.3 29156 29007 0 0
+uc001wiy.4 30164 30015 56.4403 17.3428
+uc010tnl.3 30164 30015 56.4403 17.3428
+uc001wiz.4 58366 58217 2.06429 0.32703
+uc010akj.4 58366 58217 2.06429 0.32703
+uc021rqw.1 106 106 0 0
+uc001wja.2 12466 12317 550.653 412.326
+uc001wjb.2 25904 25755 15.8863 5.68891
+uc031qns.1 6928 6779 40.8212 55.5378
+uc001wjc.2 5163 5014 61.8899 113.842
+uc001wjl.3 6134 5985 0 0
+uc010akk.3 6134 5985 0 0
+uc001wjm.3 6554 6405 0 0
+uc001wjn.3 6554 6405 0 0
+uc010akl.1 3950 3801 0 0
+uc001wjo.4 9234 9085 0 0
+uc001wjp.4 9234 9085 0 0
+uc010tnm.3 9234 9085 0 0
+uc001wjv.3 26288 26139 0 0
+uc010tnn.2 71 71 0 0
+uc010akp.2 8566 8417 0 0
+uc001wjx.3 22924 22775 0 0
+uc021rqy.1 77 77 0 0
+uc010akq.3 5948 5799 29.7309 47.2849
+uc010tno.2 30795 30646 24.9264 7.50159
+uc001wke.3 2328 2179 0 0
+uc001wkk.3 7947 7798 1120.5 1325.24
+uc001wkl.2 8503 8354 0 0
+uc001wkn.2 8503 8354 0 0
+uc001wkp.1 3365 3216 431.147 1236.45
+uc010tnp.1 4679 4530 202.08 411.427
+uc010aks.3 2532 2383 239.435 926.682
+uc010akt.3 3088 2939 0 0
+uc010tnq.1 2396 2247 0.840146 3.44841
+uc010tnr.1 4967 4818 0 0
+uc001wkq.2 10766 10617 0 0
+uc001wkr.2 10766 10617 0 0
+uc001wks.2 3850 3701 0 0
+uc031qny.1 11690 11541 0 0
+uc001wky.3 15453 15304 96.0726 57.8979
+uc001wkz.3 15453 15304 96.0726 57.8979
+uc010akx.1 16359 16210 0 0
+uc021rrk.1 1840 1691 5.20993 28.4156
+uc001wlo.3 4517 4368 7.24664 15.3011
+uc001wlp.3 15024 14875 5.67567 3.51907
+uc001wlq.3 34908 34759 6.97723 1.85133
+uc001wmi.3 2624 2475 600 2235.86
+uc001wmj.3 3282 3133 247 727.117
+uc001wmt.1 4545 4396 1414.92 2968.53
+uc001wmu.2 8651 8502 50.9039 55.2202
+uc001wmv.1 9590 9441 47.3592 46.2652
+uc001wmw.1 9590 9441 47.3592 46.2652
+uc001wmx.1 9590 9441 47.3592 46.2652
+uc001wmy.1 9590 9441 47.3592 46.2652
+uc010tnz.1 9590 9441 47.3592 46.2652
+uc001wmz.2 10435 10286 5560.66 4985.95
+uc001wnb.1 6958 6809 23.9051 32.3798
+uc010toa.1 6958 6809 23.9051 32.3798
+uc010tob.1 25433 25284 339.326 123.777
+uc001wnc.3 5639 5490 3869.79 6501.05
+uc001wni.3 4571 4422 286.545 597.644
+uc010toc.2 4571 4422 286.545 597.644
+uc001wnj.4 6490 6341 277.563 403.712
+uc001wnk.2 3332 3183 0 0
+uc001wnl.2 2662 2513 0 0
+uc001wnm.2 2662 2513 0 0
+uc021rrl.1 2662 2513 0 0
+uc021rrm.1 18962 18813 0 0
+uc001wnn.2 15520 15371 1787 1072.24
+uc001wno.2 15520 15371 1787 1072.24
+uc001wnp.2 5766 5617 0 0
+uc010alm.3 2350 2201 434.293 1819.83
+uc001woa.4 3030 2881 43.4268 139.022
+uc001wob.4 3030 2881 43.4268 139.022
+uc001woc.4 3030 2881 43.4268 139.022
+uc010tof.2 3030 2881 43.4268 139.022
+uc001wod.3 14097 13948 226.845 149.998
+uc010tog.2 14097 13948 226.845 149.998
+uc021rrn.1 1277 1128 107.309 877.396
+uc001wof.4 6090 5941 596.406 925.871
+uc001wog.4 6090 5941 596.406 925.871
+uc010aln.2 4059 3910 591.213 1394.55
+uc001woj.2 8863 8714 0 0
+uc001wok.3 9236 9087 1166.35 1183.8
+uc001won.3 2796 2647 1125.74 3922.39
+uc001woo.3 6184 6035 404.988 618.918
+uc001wop.3 6184 6035 404.988 618.918
+uc001wow.3 16723 16574 0 0
+uc001wox.3 16723 16574 0 0
+uc001woy.3 16723 16574 0 0
+uc010toh.2 16723 16574 0 0
+uc001woz.4 2819 2670 0 0
+uc001wpa.3 3045 2896 0 0
+uc001wpb.3 4016 3867 0 0
+uc010alq.3 4016 3867 0 0
+uc010toi.2 4016 3867 0 0
+uc010toj.1 1991 1842 0 0
+uc001wpg.4 2992 2843 49 158.96
+uc001wpi.3 2687 2538 262.514 953.958
+uc001wpm.3 3036 2887 297.798 951.356
+uc001wpp.1 2760 2611 0 0
+uc010alx.1 2760 2611 0 0
+uc001wpq.3 2743 2594 0 0
+uc001wpr.2 3241 3092 0 0
+uc010aly.2 3241 3092 0 0
+uc010alz.2 3241 3092 0 0
+uc031qoe.1 3241 3092 0 0
+uc001wps.2 3272 3123 0 0
+uc010ama.2 3272 3123 0 0
+uc010amb.2 3272 3123 0 0
+uc001wpt.3 7378 7229 0.904426 1.15389
+uc001wpu.3 237790 237641 2.78655e-06 1.08147e-07
+uc001wpv.3 237866 237717 2.06183e-06 7.99944e-08
+uc001wpw.3 237866 237717 2.06183e-06 7.99944e-08
+uc001wpx.1 234304 234155 3.09572 0.121934
+uc021rrr.1 84 84 0 0
+uc001wpy.3 151872 151723 0 0
+uc001wpz.3 151872 151723 0 0
+uc001wqa.3 151872 151723 0 0
+uc001wqb.3 127637 127488 0 0
+uc010amc.2 351220 351071 20.4818 0.538074
+uc001wqg.1 2294 2145 0 0
+uc021rrv.1 278492 278343 0 0
+uc001wqh.3 351213 351064 0 0
+uc001wqi.3 344 195 0 0
+uc001wqj.1 964 815 0 0
+uc001wqs.3 13630 13481 0 0
+uc001wqu.2 132603 132454 257.838 17.9535
+uc001wqv.2 132603 132454 257.838 17.9535
+uc010tpj.1 132603 132454 257.838 17.9535
+uc021rrx.1 97 97 0 0
+uc001wra.1 23553 23404 0 0
+uc001wrb.1 29190 29041 1875.26 595.549
+uc001wrc.1 107366 107217 2101.22 180.749
+uc001wrd.1 55369 55220 807.411 134.855
+uc001wre.3 4635 4486 114.115 234.613
+uc010ami.3 95588 95439 1063.22 102.746
+uc001wrf.4 128795 128646 2130.73 152.757
+uc001wrg.1 63811 63662 0 0
+uc010tpk.1 123163 123014 0 0
+uc001wrh.3 20315 20166 0 0
+uc001wrj.3 11438 11289 245.069 200.217
+uc021rsa.1 5002 4853 0 0
+uc021rsc.1 71 71 0 0
+uc010amk.3 1281 1132 41 334.045
+uc001wry.3 26612 26463 0 0
+uc001wsa.4 26864 26715 556 191.95
+uc001wsc.3 29325 29176 2419.94 764.973
+uc001wsd.1 23809 23660 431 168.008
+uc001wse.1 68698 68549 169.654 22.826
+uc001wsf.1 68749 68600 555.68 74.7082
+uc010tpm.1 68749 68600 555.68 74.7082
+uc010amm.1 62307 62158 0 0
+uc001wsg.3 3436 3287 674.454 1892.43
+uc010tpn.1 4174 4025 0 0
+uc001wsh.3 4442 4293 24.1819 51.9514
+uc001wsi.3 4442 4293 24.1819 51.9514
+uc001wsj.3 4442 4293 24.1819 51.9514
+uc001wsk.3 122917 122768 788.533 59.2383
+uc001wsl.3 122917 122768 788.533 59.2383
+uc001wsm.1 74709 74560 0 0
+uc001wss.3 36842 36693 0.000884763 0.000222388
+uc001wst.3 36842 36693 0.000884763 0.000222388
+uc001wsu.3 37002 36853 51.2149 12.8171
+uc010tpr.2 37002 36853 51.2149 12.8171
+uc010amn.1 23439 23290 0 0
+uc001wsw.3 14646 14497 0 0
+uc001wsx.1 14335 14186 9.50261 6.17804
+uc001wtf.4 3245 3096 1965 5853.68
+uc010amp.3 134671 134522 125.938 8.63437
+uc001wti.3 270875 270726 89.3325 3.04332
+uc001wtj.3 270875 270726 89.3325 3.04332
+uc010tpv.2 270875 270726 89.3325 3.04332
+uc010tpw.1 260117 259968 0 0
+uc001wtk.1 84778 84629 51.384 5.59985
+uc031qoh.1 40942 40793 0 0
+uc001wtm.2 22119 21970 44.5 18.6809
+uc001wtn.2 22119 21970 44.5 18.6809
+uc001wto.2 22119 21970 44.5 18.6809
+uc010tpy.1 22119 21970 44.5 18.6809
+uc001wtq.3 40497 40348 0 0
+uc001wtr.3 40497 40348 0 0
+uc001wts.3 46324 46175 0 0
+uc001wtt.3 3300 3151 51.2789 150.092
+uc001wtu.3 3827 3678 3.33898 8.37279
+uc001wtv.3 3827 3678 3.33898 8.37279
+uc001wtx.3 2571 2422 14 53.3116
+uc001wtz.2 494740 494591 21.5623 0.402083
+uc021rsf.1 494740 494591 21.5623 0.402083
+uc021rsg.1 83 83 0 0
+uc010tpz.3 4711 4562 382.662 773.62
+uc001wuf.4 5569 5420 385.338 655.708
+uc001wuk.2 6065 5916 0 0
+uc001wum.2 2371 2222 0 0
+uc010amw.2 89866 89717 3.31974 0.341269
+uc021rsj.1 167544 167395 0 0
+uc001wun.3 198933 198784 0 0
+uc001wuo.3 198933 198784 0 0
+uc001wup.1 71315 71166 276.757 35.8669
+uc010tqa.1 71315 71166 276.757 35.8669
+uc010tqb.1 71315 71166 276.757 35.8669
+uc010tqc.1 36515 36366 192.73 48.8789
+uc001wut.1 22620 22471 59 24.2157
+uc001wuu.1 22620 22471 59 24.2157
+uc001wuv.1 22620 22471 59 24.2157
+uc010tqd.1 22620 22471 59 24.2157
+uc001wvd.3 1359 1210 9.51806e-07 7.25489e-06
+uc001wvk.3 36128 35979 398.986 102.277
+uc001wvn.3 3146 2997 0 0
+uc001wvq.4 36809 36660 0 0
+uc001wvr.3 37653 37504 122.732 30.1819
+uc001wvs.1 2019 1870 0 0
+uc001wvt.4 2206 2057 79.2685 355.414
+uc001wvx.1 829 680 0 0
+uc010tqf.2 19208 19059 208 100.654
+uc001wwf.3 50213 50064 632 116.428
+uc010anh.2 26660 26511 0 0
+uc001wwg.3 809 660 0 0
+uc001wwh.4 42597 42448 7.60899 1.65325
+uc001wwi.4 503611 503462 4.6376 0.084956
+uc001wwj.4 835330 835181 0 0
+uc010ani.3 755586 755437 12.8293 0.156629
+uc021rsn.1 110 110 0 0
+uc001wwk.2 30062 29913 4.83419 1.4905
+uc021rso.1 68 68 0 0
+uc010anj.1 286513 286364 350.252 11.2805
+uc001wwl.4 9745 9596 63.3622 60.8987
+uc001wwm.4 2845 2696 1792.9 6133.44
+uc001wwq.2 1998 1849 684.636 3415
+uc021rsq.1 321 172 1904.1 102101
+uc001wws.4 10057 9908 236.941 220.557
+uc001wwt.4 10057 9908 236.941 220.557
+uc010ann.3 21123 20974 158.867 69.8589
+uc001wwu.3 44829 44680 9.48524e-07 1.95796e-07
+uc021rsr.1 44829 44680 9.48524e-07 1.95796e-07
+uc010ano.3 38200 38051 106.502 25.8142
+uc001wwz.3 15711 15562 0 0
+uc001wxa.3 17747 17598 58.7162 30.7725
+uc001wxc.3 69008 68859 352.67 47.2363
+uc010tqi.2 69008 68859 352.67 47.2363
+uc001wxe.2 67897 67748 2.08627 0.284015
+uc001wxd.1 36336 36187 0.010704 0.00272811
+uc010anq.1 32726 32577 0 0
+uc021rst.1 301 152 1008 61162.4
+uc001wxh.1 18424 18275 0 0
+uc001wxi.1 25809 25660 22.9204 8.23822
+uc010tqj.3 1212 1063 4.05049 35.1433
+uc031qom.1 32572 32423 4.48218 1.27498
+uc001wxl.3 3637 3488 1.51782 4.01338
+uc010tqk.2 8993 8844 4 4.17137
+uc001wxn.1 7595 7446 0 0
+uc001wxo.1 7948 7799 60 70.9545
+uc001wxp.1 7948 7799 60 70.9545
+uc001wxq.1 7948 7799 60 70.9545
+uc010ans.3 13635 13486 111.74 76.4175
+uc001wxs.4 114254 114105 81.4801 6.5859
+uc010tql.2 114254 114105 81.4801 6.5859
+uc010tqm.1 22998 22849 86.5831 34.9489
+uc001wxt.2 24791 24642 61.7168 23.0991
+uc010tqn.2 74663 74514 15.31 1.89499
+uc001wxu.3 69796 69647 614.562 81.3825
+uc010tqo.1 66347 66198 0 0
+uc001wxz.3 65923 65774 0.0844651 0.0118438
+uc010anu.2 80469 80320 190.027 21.8202
+uc001wya.3 114166 114017 198.724 16.0749
+uc001wyb.3 114166 114017 198.724 16.0749
+uc001wyc.1 10588 10439 63.611 56.2006
+uc010anv.1 92163 92014 0 0
+uc001wyh.2 34774 34625 528.243 140.706
+uc021rsy.2 3175 3026 251.835 767.564
+uc001wyi.3 111359 111210 696.785 57.786
+uc001wyj.3 111359 111210 696.785 57.786
+uc001wyk.3 105294 105145 0 0
+uc001wym.2 105294 105145 0 0
+uc001wyn.3 12255 12106 42.2999 32.226
+uc001wyo.3 103889 103740 0 0
+uc001wyp.1 60734 60585 0 0
+uc001wyu.3 39314 39165 948.273 223.307
+uc010tqq.2 39314 39165 948.273 223.307
+uc010anz.1 8276 8127 337.454 382.959
+uc001wyw.4 21280 21131 0 0
+uc001wyx.4 120442 120293 0 0
+uc001wyy.2 116927 116778 0 0
+uc001wyz.4 99638 99489 4 0.370811
+uc031qon.1 145441 145292 0 0
+uc031qoo.1 53324 53175 0 0
+uc021rtc.1 2227 2078 0 0
+uc001wzo.3 64427 64278 3.52837e-05 5.06267e-06
+uc010tqs.2 64427 64278 3.52837e-05 5.06267e-06
+uc010tqt.1 63502 63353 30.0348 4.37245
+uc001wzp.3 56520 56371 0 0
+uc001wzs.3 121994 121845 71.1342 5.38442
+uc010aoe.3 121994 121845 71.1342 5.38442
+uc010tqu.2 121994 121845 71.1342 5.38442
+uc001wzv.3 53815 53666 841 144.532
+uc001xab.3 16476 16327 795.686 449.473
+uc001xad.3 93603 93454 0 0
+uc001xac.3 93827 93678 1735.73 170.888
+uc001xae.3 93827 93678 1735.73 170.888
+uc001xaf.3 91610 91461 0 0
+uc001xag.3 56925 56776 625.924 101.677
+uc001xah.3 116589 116440 92.3755 7.31682
+uc001xai.3 116589 116440 92.3755 7.31682
+uc001xaj.3 116589 116440 92.3755 7.31682
+uc001xak.1 8813 8664 0.865937 0.921798
+uc031qop.1 58 58 0 0
+uc001xal.4 3719 3570 255 658.779
+uc010aoh.3 4816 4667 0 0
+uc001xan.4 7100 6951 0 0
+uc001xao.4 7100 6951 0 0
+uc001xat.1 14502 14353 1141.5 733.501
+uc001xav.1 14502 14353 1141.5 733.501
+uc021rtf.1 14536 14387 493 316.042
+uc001xbd.1 2211 2062 0 0
+uc001xbh.1 60819 60670 62.4082 9.48714
+uc001xbi.1 60819 60670 62.4082 9.48714
+uc001xbj.1 60819 60670 62.4082 9.48714
+uc001xbk.1 60819 60670 62.4082 9.48714
+uc010aol.1 60819 60670 62.4082 9.48714
+uc001xbl.1 57182 57033 0 0
+uc021rth.1 81 81 0 0
+uc010aom.2 52463 52314 68.2137 12.026
+uc001xbm.2 88164 88015 551.003 57.7384
+uc001xbn.2 88164 88015 551.003 57.7384
+uc001xbs.3 43563 43414 454.5 96.5543
+uc001xbt.3 43563 43414 454.5 96.5543
+uc001xbw.2 24912 24763 262.425 97.7393
+uc001xbx.2 45468 45319 0 0
+uc001xby.3 26334 26185 0 0
+uc001xbz.2 22121 21972 47.1217 19.7797
+uc001xca.3 3936 3787 39.8783 97.1201
+uc010trd.2 15540 15391 0 0
+uc010tre.2 15540 15391 0 0
+uc021rtl.1 84 84 0 0
+uc001xcp.4 4957 4808 0 0
+uc021rtm.2 4957 4808 0 0
+uc031qor.1 4957 4808 0 0
+uc001xcq.4 9770 9621 0 0
+uc010aou.4 9770 9621 0 0
+uc031qos.1 9770 9621 0 0
+uc031qot.1 9770 9621 0 0
+uc001xcs.3 29897 29748 358.662 111.197
+uc001xct.3 66424 66275 47.7795 6.64905
+uc010trg.2 66424 66275 47.7795 6.64905
+uc010trh.2 66424 66275 47.7795 6.64905
+uc001xcy.2 23982 23833 0 0
+uc001xcz.2 23982 23833 0 0
+uc010trl.1 23982 23833 0 0
+uc010trm.1 23982 23833 0 0
+uc010trn.1 23982 23833 0 0
+uc010aox.1 15256 15107 0 0
+uc010aoy.3 15078 14929 0 0
+uc010aoz.1 32976 32827 0 0
+uc010apa.1 32976 32827 0 0
+uc021rtp.1 301953 301804 0 0
+uc001xdc.3 148040 147891 0 0
+uc010tro.2 294048 293899 20.3854 0.639718
+uc001xdd.3 134742 134593 0 0
+uc001xde.3 35982 35833 0 0
+uc021rts.1 73 73 0 0
+uc001xdl.3 32773 32624 42.8721 12.1201
+uc021rtu.1 32773 32624 42.8721 12.1201
+uc001xdn.2 24202 24053 0 0
+uc010apd.2 12547 12398 37.7775 28.1028
+uc010ape.2 12547 12398 37.7775 28.1028
+uc010aph.3 18591 18442 2.73272e-06 1.36664e-06
+uc001xds.3 18863 18714 124.502 61.3589
+uc010api.3 18863 18714 124.502 61.3589
+uc021rtv.1 84 84 0 0
+uc001xed.2 36320 36171 144.684 36.8916
+uc010apj.3 1820 1671 88.316 487.451
+uc001xee.1 11668 11519 303.378 242.905
+uc010trx.1 5683 5534 186.622 311.022
+uc021rtw.1 71765 71616 1.00086 0.128893
+uc001xek.2 34839 34690 0.319646 0.084983
+uc010apl.2 34839 34690 0.319646 0.084983
+uc001xem.1 131738 131589 1.36827 0.0959004
+uc001xen.1 274864 274715 0 0
+uc001xes.3 20712 20563 1319.87 591.986
+uc001xet.3 25062 24913 0 0
+uc001xev.1 5524 5375 0 0
+uc001xez.4 50091 49942 0 0
+uc010apo.3 50091 49942 0 0
+uc001xfb.4 4739 4590 128 257.196
+uc001xfc.3 14597 14448 882.452 563.315
+uc010app.1 6351 6202 138.548 206.033
+uc001xff.4 9616 9467 476.981 464.682
+uc021rty.1 72 72 0 0
+uc001xfl.3 4442 4293 0 0
+uc001xfm.3 19798 19649 0 0
+uc031qov.1 9592 9443 2 1.95338
+uc021ruc.1 2051 1902 85.717 415.646
+uc001xfx.3 338011 337862 0 0
+uc001xfy.3 338011 337862 0 0
+uc001xfz.1 389627 389478 0 0
+uc001xga.3 152054 151905 0 0
+uc021rud.1 6045 5896 0 0
+uc010tsf.1 133601 133452 0 0
+uc010tsg.1 133602 133453 0 0
+uc001xgd.1 168725 168576 175.033 9.57618
+uc001xge.2 168725 168576 175.033 9.57618
+uc010tsh.1 168725 168576 175.033 9.57618
+uc001xgf.1 161306 161157 0 0
+uc001xgg.4 92092 91943 0 0
+uc001xgh.4 44885 44736 95.5001 19.6886
+uc001xgi.4 44885 44736 95.5001 19.6886
+uc031qox.1 44885 44736 95.5001 19.6886
+uc021ruf.1 1164 1015 141.5 1285.75
+uc001xgj.3 43822 43673 402.551 85.011
+uc001xgy.2 56043 55894 0 0
+uc001xgu.3 67378 67229 0 0
+uc001xgv.3 111518 111369 19.1747 1.58794
+uc001xgw.3 111518 111369 19.1747 1.58794
+uc001xgx.3 111518 111369 19.1747 1.58794
+uc031qoy.1 55258 55109 0 0
+uc010aqb.1 50047 49898 0 0
+uc010aqc.1 50047 49898 0 0
+uc001xha.1 61382 61233 0 0
+uc001xgz.2 48189 48040 0 0
+uc010aqd.1 25779 25630 0 0
+uc021ruj.2 2139 1990 2 9.26925
+uc001xhc.3 56108 55959 514.873 84.859
+uc001xhf.3 17000 16851 4.71363e-06 2.57987e-06
+uc001xhg.3 18377 18228 126.844 64.18
+uc010aqi.3 36271 36122 871.748 222.58
+uc001xhr.3 76863 76714 903.9 108.671
+uc001xhs.3 133601 133452 2.35207 0.162553
+uc001xht.3 56747 56598 0 0
+uc001xhu.3 113485 113336 0 0
+uc021run.1 84 84 0 0
+uc021ruo.1 293 144 0 0
+uc001xhy.2 3754 3605 0 0
+uc021ruq.2 3754 3605 0 0
+uc031qoz.1 3754 3605 0 0
+uc001xhz.2 26344 26195 20.03 7.0523
+uc021rur.1 26344 26195 20.03 7.0523
+uc021rus.1 26344 26195 20.03 7.0523
+uc021rut.1 26344 26195 20.03 7.0523
+uc001xic.2 96444 96295 56.9939 5.45874
+uc031qpa.1 96444 96295 56.9939 5.45874
+uc001xie.2 27421 27272 164.744 55.7134
+uc001xif.2 27421 27272 164.744 55.7134
+uc001xig.2 27421 27272 164.744 55.7134
+uc001xih.2 27421 27272 164.744 55.7134
+uc031qpb.1 27572 27423 358.743 120.652
+uc001xij.2 25352 25203 0 0
+uc001xii.2 25201 25052 0 0
+uc001xik.4 18806 18657 0 0
+uc031qpc.1 18806 18657 0 0
+uc031qpd.1 18957 18808 0 0
+uc001xil.3 9455 9306 0 0
+uc021ruw.1 66 66 0 0
+uc001xim.4 2025 1876 0.979454 4.81525
+uc021ruz.1 109 109 0 0
+uc010tsr.3 13125 12976 0 0
+uc001xjf.3 22140 21991 557.811 233.943
+uc001xjh.1 25129 24980 90 33.229
+uc001xji.1 849 700 0 0
+uc001xjj.1 61406 61257 1.0059 0.151449
+uc001xjk.3 45039 44890 0 0
+uc021rvb.1 504 355 3.99417 103.769
+uc001xjr.1 10995 10846 201.772 171.577
+uc010tsy.1 7047 6898 0 0
+uc001xjt.3 23736 23587 90.8802 35.5357
+uc001xju.3 23736 23587 90.8802 35.5357
+uc010aqp.3 23736 23587 90.8802 35.5357
+uc001xjv.4 18992 18843 1189.6 582.261
+uc001xjw.4 18992 18843 1189.6 582.261
+uc001xjx.4 18992 18843 1189.6 582.261
+uc001xka.2 70070 69921 1516.6 200.046
+uc010tsz.1 70070 69921 1516.6 200.046
+uc001xkb.3 11112 10963 0 0
+uc021rvc.1 318 169 0 0
+uc001xkc.4 55808 55659 0 0
+uc010tta.2 20357 20208 0 0
+uc021rvd.1 298 149 0 0
+uc001xkh.2 6260 6111 1227.47 1852.54
+uc001xki.2 6260 6111 1227.47 1852.54
+uc021rve.1 8589 8440 51.1774 55.9246
+uc021rvf.1 499 350 3.87772 102.182
+uc001xkk.3 14141 13992 6399.38 4218.19
+uc010ttb.2 103444 103295 0 0
+uc001xkl.3 105244 105095 2815.51 247.083
+uc001xkm.3 105244 105095 2815.51 247.083
+uc001xkn.3 105244 105095 2815.51 247.083
+uc010ttc.2 7197 7048 3164.08 4140.46
+uc001xko.1 94087 93938 0 0
+uc010ttd.1 93495 93346 0 0
+uc001xkp.3 102278 102129 688.406 62.1675
+uc001xkq.3 102278 102129 688.406 62.1675
+uc001xkr.4 63994 63845 0 0
+uc001xks.2 35011 34862 0 0
+uc001xlc.2 18182 18033 2451.75 1253.94
+uc010aqy.4 5070 4921 6.6816 12.5226
+uc031qpg.1 2124 1975 1.3184 6.15669
+uc021rvk.1 1431 1282 4.61474 33.1992
+uc001xlr.2 21455 21306 2 0.865757
+uc001xlu.3 35990 35841 0 0
+uc001xlv.3 35990 35841 0 0
+uc001xlw.3 144854 144705 1.56863 0.0999778
+uc001xlx.3 144854 144705 1.56863 0.0999778
+uc001xly.3 144854 144705 1.56863 0.0999778
+uc001xlz.3 144854 144705 1.56863 0.0999778
+uc010ara.3 144854 144705 1.56863 0.0999778
+uc001xma.2 34132 33983 0.838795 0.227647
+uc010ttg.2 2049 1900 10.2913 49.9556
+uc001xmb.3 34651 34502 72.5775 19.4011
+uc021rvl.1 34651 34502 72.5775 19.4011
+uc021rvm.1 92010 91861 75.2995 7.56012
+uc021rvn.1 92010 91861 75.2995 7.56012
+uc021rvo.1 92010 91861 75.2995 7.56012
+uc001xmc.4 50595 50446 281.946 51.5475
+uc021rvr.1 14878 14729 11.0032 6.8899
+uc001xme.3 12655 12506 6 4.42487
+uc021rvs.1 2331 2182 0 0
+uc001xmf.3 16428 16279 73.5401 41.6643
+uc010tth.2 16428 16279 73.5401 41.6643
+uc010tti.2 16428 16279 73.5401 41.6643
+uc001xmg.1 8157 8008 0.0395872 0.0455931
+uc010ttj.2 8090 7941 108.34 125.829
+uc001xmh.1 32501 32352 0 0
+uc001xmk.3 55309 55160 244.45 40.8727
+uc010ttk.2 55309 55160 244.45 40.8727
+uc001xml.3 81035 80886 198.08 22.5858
+uc001xmm.3 81035 80886 198.08 22.5858
+uc010arh.1 4062 3913 0 0
+uc001xnc.2 274806 274657 3.87843 0.130237
+uc001xnd.1 62246 62097 2.12624 0.315798
+uc001xnf.2 232242 232093 0 0
+uc010ari.1 224150 224001 0 0
+uc010ttq.1 224150 224001 0 0
+uc001xnl.3 17506 17357 248.05 131.805
+uc001xnm.3 57762 57613 81.5764 13.0591
+uc010arj.3 57762 57613 81.5764 13.0591
+uc010ttv.2 556 407 0 0
+uc001xnx.3 1962 1813 0 0
+uc010ttz.1 9209 9060 999.086 1017.05
+uc010aro.1 91772 91623 83.7776 8.43318
+uc010arp.1 91772 91623 83.7776 8.43318
+uc010arq.1 91772 91623 83.7776 8.43318
+uc010arr.1 91772 91623 83.7776 8.43318
+uc001xny.1 183369 183220 0.00176669 8.89314e-05
+uc001xnz.1 183369 183220 0.00176669 8.89314e-05
+uc001xoa.1 183369 183220 0.00176669 8.89314e-05
+uc001xob.1 183369 183220 0.00176669 8.89314e-05
+uc001xoc.1 183369 183220 0.00176669 8.89314e-05
+uc001xod.1 183369 183220 0.00176669 8.89314e-05
+uc010ars.1 183369 183220 0.00176669 8.89314e-05
+uc001xoe.3 2704 2555 1247.9 4504.62
+uc001xof.1 174498 174349 94.0258 4.97388
+uc001xog.3 174318 174169 0.000496068 2.62686e-05
+uc001xoh.1 172354 172205 1.44779e-05 7.75403e-07
+uc021rwe.1 80463 80314 20.577 2.36297
+uc021rwf.2 80463 80314 20.577 2.36297
+uc010tub.1 33050 32901 32.2248 9.03336
+uc021rwg.1 73 73 0 0
+uc021rwh.1 97 97 0 0
+uc001xor.1 2643 2494 1249 4618.85
+uc001xos.3 14055 13906 2007.7 1331.57
+uc001xot.3 45177 45028 63.2711 12.9596
+uc001xou.3 72072 71923 37.439 4.80092
+uc010tud.1 21410 21261 0.00397741 0.00172538
+uc010arw.2 20951 20802 1827.53 810.267
+uc001xov.1 7577 7428 2 2.48328
+uc021rwj.1 105 105 0 0
+uc001xpd.3 17423 17274 16.3643 8.73718
+uc001xpi.3 57921 57772 571.352 91.2124
+uc010tuo.2 52846 52697 20.8464 3.6485
+uc001xpo.3 24325 24176 196.411 74.929
+uc010asa.3 24325 24176 196.411 74.929
+uc010tuq.2 24325 24176 196.411 74.929
+uc001xpr.2 17788 17639 126.233 66.0036
+uc001xps.2 17788 17639 126.233 66.0036
+uc010tur.2 16740 16591 698.533 388.313
+uc001xpu.2 12774 12625 0 0
+uc001xpv.2 10778 10629 0 0
+uc001xpx.2 20210 20061 0 0
+uc001xpy.3 13442 13293 1228.5 852.354
+uc010tus.2 13442 13293 1228.5 852.354
+uc021rwm.1 72 72 0 0
+uc001xqa.3 114149 114000 128 10.3555
+uc001xqb.3 51853 51704 1667 297.358
+uc010tut.1 49206 49057 0 0
+uc001xqd.1 29809 29660 0 0
+uc001xqq.2 10802 10653 4 3.46303
+uc031qpi.1 10802 10653 4 3.46303
+uc010tux.2 18532 18383 326.519 163.817
+uc010asd.2 16843 16694 98.587 54.4662
+uc001xqx.1 4505 4356 310.904 658.274
+uc001xqy.1 12366 12217 35.9901 27.1698
+uc001xqz.3 13935 13786 10 6.69005
+uc001xrb.3 13935 13786 10 6.69005
+uc010ase.2 7636 7487 0 0
+uc010asf.2 7636 7487 0 0
+uc001xrd.1 37769 37620 217 53.1996
+uc001xre.1 37769 37620 217 53.1996
+uc010tuy.1 26905 26756 0 0
+uc001xrf.3 10809 10660 160.5 138.863
+uc001xrg.3 10809 10660 160.5 138.863
+uc001xrj.3 9571 9422 679.24 664.887
+uc001xrk.3 35212 35063 464.654 122.222
+uc001xrl.3 44961 44812 2206.36 454.097
+uc010asg.1 16293 16144 6156.99 3517.42
+uc010tuz.1 16430 16281 4.97357 2.81744
+uc001xrm.1 45179 45030 1148.29 235.19
+uc010ash.1 45179 45030 1148.29 235.19
+uc021rwq.1 81 81 0 0
+uc001xrt.3 10306 10157 1459 1324.82
+uc001xsc.2 23651 23502 399 156.58
+uc001xsd.3 18689 18540 0 0
+uc031qpk.1 27 27 0 0
+uc021rwr.1 87 87 0 0
+uc001xsu.1 4985 4836 116.117 221.45
+uc001xsv.3 25698 25549 1671 603.212
+uc001xsy.4 4157 4008 963 2215.98
+uc001xsz.3 33084 32935 0 0
+uc001xta.1 7012 6863 2 2.68772
+uc001xtb.1 5084 4935 0 0
+uc010asp.3 10522 10373 0 0
+uc001xtg.1 5822 5673 0 0
+uc001xth.1 26208 26059 1644.41 581.997
+uc001xti.2 45927 45778 1325.59 267.066
+uc010asr.2 21428 21279 0 0
+uc001xtn.1 2626 2477 248.474 925.174
+uc001xto.1 36102 35953 80.5255 20.6569
+uc001xtr.3 29035 28886 4.592 1.46616
+uc010tvi.2 16454 16305 7.408 4.19032
+uc001xtt.2 30966 30817 104.389 31.2415
+uc001xtu.2 30966 30817 104.389 31.2415
+uc001xtv.2 30966 30817 104.389 31.2415
+uc010tvj.2 30966 30817 104.389 31.2415
+uc021rwu.1 30966 30817 104.389 31.2415
+uc001xty.3 24473 24324 0.666667 0.252779
+uc001xtz.3 24473 24324 0.666667 0.252779
+uc001xua.3 24473 24324 0.666667 0.252779
+uc001xub.3 110771 110622 2611.28 217.71
+uc001xuc.1 35608 35459 639 166.204
+uc001xuf.3 43554 43405 436.741 92.8009
+uc010tvm.2 43554 43405 436.741 92.8009
+uc010tvn.1 43202 43053 0 0
+uc021rwx.1 119 119 0 0
+uc021rwy.1 73 73 0 0
+uc001xuo.1 9296 9147 0 0
+uc001xut.3 14001 13852 153.321 102.084
+uc010asx.3 14001 13852 153.321 102.084
+uc021rxa.1 14001 13852 153.321 102.084
+uc021rxb.1 14103 13954 790.501 522.482
+uc010asy.3 33530 33381 18.0138 4.97706
+uc010asz.3 359356 359207 348.008 8.93536
+uc031qpo.1 464720 464571 6.72809 0.13357
+uc001xux.2 443064 442915 0 0
+uc001xuy.1 74767 74618 0 0
+uc001xva.1 59547 59398 0 0
+uc010ata.1 36231 36082 47.4745 12.1349
+uc001xve.2 45501 45352 350.305 71.239
+uc001xvf.2 45501 45352 350.305 71.239
+uc001xvg.2 45780 45631 162.39 32.8221
+uc001xvi.1 140 140 0 0
+uc010tvt.3 18169 18020 1732.06 886.494
+uc010tvu.3 166563 166414 0 0
+uc001xvk.2 166755 166606 138.14 7.64709
+uc010atc.1 23304 23155 139.801 55.6845
+uc010tvv.2 62315 62166 3056 453.386
+uc001xvo.4 35052 34903 0 0
+uc001xvp.3 17715 17566 0 0
+uc001xvq.1 4856 4707 0 0
+uc010tvw.1 142829 142680 0 0
+uc001xvt.3 60258 60109 1.32664e-07 2.03554e-08
+uc010tvy.2 60258 60109 1.32664e-07 2.03554e-08
+uc010tvx.2 60652 60503 0 0
+uc010tvz.1 59037 58888 33 5.16839
+uc001xvu.2 29956 29807 0 0
+uc021rxg.1 104 104 0 0
+uc001xvx.3 29 29 0 0
+uc031qpr.1 28 28 0 0
+uc010twa.1 31 31 0 0
+uc021rxi.1 70 70 0 0
+uc021rxj.1 34 34 0 0
+uc031qps.1 45 45 0 0
+uc021rxk.1 28 28 0 0
+uc021rxl.1 40 40 0 0
+uc021rxm.1 30 30 0 0
+uc031qpt.1 45 45 0 0
+uc001xwa.3 31 31 0 0
+uc021rxo.1 30 30 0 0
+uc001xwb.3 52 52 0 0
+uc001xwc.3 39 39 0 0
+uc001xwd.1 30 30 0 0
+uc021rxp.1 31 31 0 0
+uc021rxq.1 46 46 0 0
+uc021rxr.1 37 37 0 0
+uc021rxs.1 34 34 0 0
+uc031qpu.1 30 30 0 0
+uc021rxu.1 31 31 0 0
+uc031qpv.1 30 30 0 0
+uc021rxv.1 34 34 0 0
+uc031qpw.1 30 30 0 0
+uc021rxw.1 30 30 0 0
+uc021rxx.1 30 30 0 0
+uc010twb.2 35 35 0 0
+uc001xwh.3 36 36 0 0
+uc031qpx.1 31 31 0 0
+uc021rxy.1 31 31 0 0
+uc021rxz.1 30 30 0 0
+uc001xwi.3 32 32 0 0
+uc031qpy.1 32 32 0 0
+uc021rya.1 35 35 0 0
+uc021ryb.1 1236 1087 0 0
+uc001xwm.3 90804 90655 1 0.101736
+uc001xwn.3 143142 142993 0 0
+uc001xwo.3 146805 146656 0 0
+uc001xwp.1 2185 2036 0 0
+uc010twc.2 84842 84693 1497.92 163.121
+uc001xwv.4 89002 88853 64.0767 6.65113
+uc010atf.1 58590 58441 0 0
+uc001xxd.3 4883 4734 16.2671 31.6921
+uc001xxe.3 6590 6441 33.9107 48.557
+uc001xxf.3 50660 50511 24.795 4.52737
+uc021ryf.1 177923 177774 9.11298 0.472781
+uc021ryg.1 177923 177774 9.11298 0.472781
+uc001xxh.1 93439 93290 16.9708 1.67778
+uc001xxn.4 260939 260790 1352.41 47.8285
+uc001xxo.4 462979 462830 15.6576 0.312012
+uc010atk.3 462979 462830 15.6576 0.312012
+uc031qqb.1 2152 2003 0 0
+uc001xxp.2 207217 207068 30.9709 1.37946
+uc001xxs.3 157399 157250 0 0
+uc001xxt.3 157621 157472 56.7012 3.32091
+uc001xxu.3 6832 6683 0 0
+uc001xxv.1 117725 117576 160.736 12.6084
+uc001xxw.2 31198 31049 0 0
+uc001xxx.2 31420 31271 0 0
+uc010atp.1 34490 34341 461.7 123.998
+uc001xyi.2 54084 53935 26.15 4.47165
+uc001xyj.2 54084 53935 26.15 4.47165
+uc001xyo.3 103621 103472 0 0
+uc010ats.3 149125 148976 0 0
+uc001xyp.3 275830 275681 1491.34 49.8929
+uc010twi.1 189312 189163 0 0
+uc001xys.2 189827 189678 44.0493 2.14185
+uc001xyt.3 166675 166526 0 0
+uc010att.1 160039 159890 0 0
+uc001xzg.3 11977 11828 0 0
+uc001xzh.3 21349 21200 0 0
+uc021ryk.1 1098 949 0 0
+uc001xzi.3 12301 12152 518.264 393.343
+uc001xzj.3 14340 14191 0 0
+uc010aty.3 146522 146373 1574.74 99.2235
+uc010twk.1 77729 77580 0 0
+uc021ryl.1 38706 38557 0 0
+uc001xzl.4 39204 39055 0 0
+uc001xzm.3 52689 52540 7.04557e-08 1.23678e-08
+uc001xzn.3 52858 52709 404.942 70.8559
+uc001xzo.3 52858 52709 404.942 70.8559
+uc010atz.3 52858 52709 404.942 70.8559
+uc001xzp.1 47656 47507 0 0
+uc001xzq.1 7553 7404 121.354 151.167
+uc010aua.3 2331 2182 0 0
+uc010aub.1 89199 89050 41.5083 4.29901
+uc001xzs.1 151296 151147 0 0
+uc001xzt.4 56583 56434 13.3333 2.17904
+uc001xzu.4 56583 56434 13.3333 2.17904
+uc010auc.3 56583 56434 13.3333 2.17904
+uc001xzv.4 87614 87465 0 0
+uc021rym.1 113 113 0 0
+uc001xzw.3 5406 5257 23.946 42.011
+uc010aud.3 77363 77214 4.20202e-06 5.01914e-07
+uc001xzx.4 78292 78143 186.208 21.9774
+uc010aue.3 78292 78143 186.208 21.9774
+uc010auf.2 47963 47814 107.398 20.7162
+uc001xzy.3 72161 72012 440.44 56.4092
+uc001xzz.4 9675 9526 0 0
+uc001yaa.3 5762 5613 14 23.0039
+uc001yab.3 5872 5723 1.60801e-07 2.59139e-07
+uc001yac.4 48070 47921 3.72641 0.717187
+uc001yad.4 48070 47921 3.72641 0.717187
+uc001yae.4 48070 47921 3.72641 0.717187
+uc010aug.3 48070 47921 3.72641 0.717187
+uc010twl.2 48070 47921 3.72641 0.717187
+uc021ryo.1 48070 47921 3.72641 0.717187
+uc021ryp.1 48070 47921 3.72641 0.717187
+uc021ryq.1 48070 47921 3.72641 0.717187
+uc021ryr.1 48070 47921 3.72641 0.717187
+uc021rys.1 48070 47921 3.72641 0.717187
+uc021ryt.1 48070 47921 3.72641 0.717187
+uc021ryu.1 48070 47921 3.72641 0.717187
+uc021ryv.1 48070 47921 3.72641 0.717187
+uc021ryw.1 48070 47921 3.72641 0.717187
+uc021ryx.1 48070 47921 3.72641 0.717187
+uc021ryy.1 48070 47921 3.72641 0.717187
+uc021ryz.2 48070 47921 3.72641 0.717187
+uc021rza.1 48070 47921 3.72641 0.717187
+uc021rzb.1 48070 47921 3.72641 0.717187
+uc021rzc.1 48070 47921 3.72641 0.717187
+uc021rzd.1 48070 47921 3.72641 0.717187
+uc021rze.1 48070 47921 3.72641 0.717187
+uc021rzf.1 48070 47921 3.72641 0.717187
+uc021rzg.1 48070 47921 3.72641 0.717187
+uc021rzh.1 48070 47921 3.72641 0.717187
+uc021rzi.1 48070 47921 3.72641 0.717187
+uc021rzj.1 48070 47921 3.72641 0.717187
+uc021rzk.1 48070 47921 3.72641 0.717187
+uc021rzl.1 48070 47921 3.72641 0.717187
+uc021rzm.1 48070 47921 3.72641 0.717187
+uc021rzn.1 48070 47921 3.72641 0.717187
+uc021rzo.1 35860 35711 0 0
+uc021rzp.1 25216 25067 0 0
+uc021rzq.1 35687 35538 0 0
+uc021rzr.1 35687 35538 0 0
+uc021rzs.1 35687 35538 0 0
+uc021rzt.1 35687 35538 0 0
+uc021rzu.1 35687 35538 0 0
+uc021rzv.1 35687 35538 0 0
+uc021rzw.1 35687 35538 0 0
+uc021rzx.1 35687 35538 0 0
+uc021rzy.1 35687 35538 0 0
+uc021rzz.1 35687 35538 0 0
+uc021saa.1 35687 35538 0 0
+uc021sab.1 35687 35538 0 0
+uc021sac.1 35687 35538 0 0
+uc021sad.1 35687 35538 0 0
+uc021sae.1 35687 35538 0 0
+uc021saf.2 35687 35538 0 0
+uc021sag.1 35687 35538 0 0
+uc021sah.1 35687 35538 0 0
+uc021sai.1 35687 35538 0 0
+uc021saj.1 35687 35538 0 0
+uc021sak.1 35687 35538 0 0
+uc021sal.1 35687 35538 0 0
+uc021sam.1 35687 35538 0 0
+uc021san.1 35687 35538 0 0
+uc021sao.1 35687 35538 0 0
+uc021sap.1 35687 35538 0 0
+uc021saq.1 35687 35538 0 0
+uc021sar.1 35687 35538 0 0
+uc021sas.1 35687 35538 0 0
+uc021sat.1 35687 35538 0 0
+uc021sau.2 35687 35538 0 0
+uc021sav.1 25669 25520 36.4813 13.1843
+uc001yaf.3 5686 5537 479 797.864
+uc001yag.1 2931 2782 0 0
+uc001yal.1 813 664 0 0
+uc001yam.1 871 722 0 0
+uc001yat.3 29022 28873 1177.47 376.119
+uc001yau.3 29022 28873 1177.47 376.119
+uc001yav.3 44896 44747 124.031 25.5643
+uc001yaw.3 44896 44747 124.031 25.5643
+uc001ybe.2 179005 178856 250.632 12.9241
+uc001ybf.3 175583 175434 1515.01 79.6472
+uc001ybg.3 176196 176047 704.677 36.9172
+uc001ybh.3 176196 176047 704.677 36.9172
+uc001ybj.3 2709 2560 431 1552.76
+uc021saw.1 1056 907 0 0
+uc001ybl.1 4223 4074 220 498.046
+uc010aur.3 57388 57239 546.013 87.979
+uc010two.2 57388 57239 546.013 87.979
+uc001ybo.3 95490 95341 8.98455 0.869129
+uc001ybp.3 95490 95341 8.98455 0.869129
+uc001ybq.4 39418 39269 0 0
+uc001ybr.3 45412 45263 19.0045 3.87241
+uc001ybw.1 70123 69974 0 0
+uc001ybx.1 70123 69974 0 0
+uc001yby.2 21643 21494 0 0
+uc001ycb.2 6343 6194 0 0
+uc001ycc.2 23269 23120 0 0
+uc001ycd.3 42578 42429 0 0
+uc001yce.1 17882 17733 0 0
+uc001ycj.3 30291 30142 1906.33 583.303
+uc010twq.2 30291 30142 1906.33 583.303
+uc010twr.2 30291 30142 1906.33 583.303
+uc001ycq.3 1840 1691 10 54.5411
+uc001yct.3 9712 9563 0 0
+uc001ycu.5 9959 9810 0 0
+uc001ycv.3 19104 18955 0 0
+uc010auv.3 19104 18955 0 0
+uc001ycw.4 6495 6346 0 0
+uc001ycx.4 12070 11921 0 0
+uc001ycy.4 13946 13797 0 0
+uc001ycz.4 13946 13797 0 0
+uc001ydb.4 13946 13797 0 0
+uc001ydc.4 13946 13797 0 0
+uc010auw.3 13946 13797 0 0
+uc010aux.3 13946 13797 0 0
+uc010auy.3 13946 13797 0 0
+uc010auz.3 13946 13797 0 0
+uc010ava.3 13946 13797 0 0
+uc010avb.3 13946 13797 0 0
+uc001yda.1 9548 9399 0 0
+uc001ydd.1 10322 10173 0 0
+uc001yde.3 13613 13464 0 0
+uc001ydf.3 13613 13464 0 0
+uc001ydg.3 13613 13464 0 0
+uc010avc.3 13613 13464 0 0
+uc001ydh.1 11708 11559 0 0
+uc001ydi.1 11708 11559 0 0
+uc001ydj.3 30562 30413 0 0
+uc001ydu.3 1940 1791 0 0
+uc010avh.1 19996 19847 263.865 122.618
+uc021sbc.1 47276 47127 986.316 193.025
+uc001ydv.3 50583 50434 0 0
+uc001ydw.2 55521 55372 0 0
+uc001ydx.2 71195 71046 0 0
+uc001ydy.1 8702 8553 0 0
+uc021sbd.1 11671 11522 73.4508 58.7945
+uc001ydz.1 24908 24759 0.0278167 0.0103619
+uc001yea.1 24908 24759 0.0278167 0.0103619
+uc001yeb.1 24908 24759 0.0278167 0.0103619
+uc001yec.1 24696 24547 13.5041 5.0738
+uc021sbe.1 68 68 0 0
+uc001yef.2 137970 137821 66.0216 4.41813
+uc001yeh.4 2824 2675 56 193.078
+uc001yei.4 58343 58194 138.62 21.9692
+uc010avi.3 58343 58194 138.62 21.9692
+uc001yej.1 31685 31536 53.761 15.7227
+uc001yek.3 1961 1812 98.5 501.355
+uc001yel.3 1961 1812 98.5 501.355
+uc001yfb.4 4230 4081 0 0
+uc001yfc.4 4230 4081 0 0
+uc031qqd.1 4230 4081 0 0
+uc001yfi.3 82084 81935 571 64.2739
+uc001yfv.2 54012 53863 1.00161 0.171505
+uc001yfw.2 52515 52366 0 0
+uc001yfx.2 45063 44914 0 0
+uc001yfy.2 20195 20046 0 0
+uc010avq.2 20195 20046 0 0
+uc021sbl.1 41 41 0 0
+uc001yga.3 102198 102049 0 0
+uc001ygb.3 102198 102049 0 0
+uc031qqh.1 102198 102049 0 0
+uc031qqi.1 102198 102049 0 0
+uc031qqj.1 82499 82350 590.547 66.1391
+uc001ygc.3 83144 82995 387.453 43.0561
+uc001ygd.3 71086 70937 0 0
+uc021sbn.1 70794 70645 0 0
+uc001ygf.3 69611 69462 0 0
+uc010avr.3 93125 92976 4125.51 409.237
+uc001ygx.2 13260 13111 13 9.14482
+uc010avv.3 4619 4470 2595.1 5354.43
+uc001yha.3 15408 15259 528.952 319.711
+uc010twx.2 15408 15259 528.952 319.711
+uc010avw.3 10866 10717 5.84164e-06 5.02724e-06
+uc001yhg.2 41803 41654 1238.21 274.161
+uc001yhh.1 41803 41654 1238.21 274.161
+uc001yhi.1 41803 41654 1238.21 274.161
+uc001yhk.1 42556 42407 1154.51 251.089
+uc001yhl.1 42556 42407 1154.51 251.089
+uc010twz.1 21398 21249 0 0
+uc001yhp.3 9633 9484 1191.89 1159.08
+uc010txa.2 30924 30775 1880.75 563.638
+uc001yhq.3 32648 32499 207.36 58.8468
+uc010txj.1 4193 4044 0 0
+uc031qqm.1 21 21 0 0
+uc001ykb.1 3454 3305 6.27637 17.5148
+uc001ykd.1 8181 8032 9.04937 10.3911
+uc001yke.3 3105 2956 1.57537 4.91525
+uc031qqn.1 3105 2956 1.57537 4.91525
+uc001ykf.3 3100 2951 7.76176 24.2582
+uc001ykg.3 3100 2951 7.76176 24.2582
+uc001ykh.3 3096 2947 0 0
+uc021sdw.1 136 136 0 0
+uc001yku.4 6438 6289 24671.2 36180.6
+uc001ykv.4 59012 58863 35.8363 5.61498
+uc001ykw.1 3714 3565 0 0
+uc001ykx.1 3387 3238 0 0
+uc001ylh.4 16125 15976 51.7262 29.8614
+uc001ylj.4 11801 11652 37.4979 29.6807
+uc001ylk.4 11801 11652 37.4979 29.6807
+uc001yll.4 11801 11652 37.4979 29.6807
+uc001ylm.4 76380 76231 12.6053 1.52507
+uc001yln.4 76380 76231 12.6053 1.52507
+uc010txv.3 76380 76231 12.6053 1.52507
+uc001ylu.1 16977 16828 511.38 280.271
+uc021sea.1 14436 14287 0 0
+uc001ylv.1 14638 14489 18.1323 11.542
+uc021seb.1 14638 14489 18.1323 11.542
+uc001ylx.1 1957 1808 23.2597 118.652
+uc001ylz.1 2931 2782 148.526 492.393
+uc001yma.1 2931 2782 148.526 492.393
+uc021sec.1 954 805 407.689 4670.9
+uc001ymi.1 125027 124878 6070.82 448.362
+uc001ymj.1 20760 20611 1504.02 673.01
+uc001ymn.3 1808 1659 0 0
+uc001ymp.1 694 545 2 33.8455
+uc001ynf.2 3202 3053 31419 94914.7
+uc001ynh.2 5775 5626 622.317 1020.19
+uc001yni.2 5775 5626 622.317 1020.19
+uc001ynj.2 6271 6122 49.371 74.3783
+uc021seg.1 1344 1195 291.994 2253.59
+uc001ynu.1 1647 1498 0 0
+uc001ynv.1 1660 1511 0 0
+uc001ynx.4 17870 17721 398.153 207.219
+uc001yny.4 17870 17721 398.153 207.219
+uc001ynz.4 17870 17721 398.153 207.219
+uc001yoa.4 17870 17721 398.153 207.219
+uc021sei.1 20 20 0 0
+uc010awv.1 12803 12654 633.353 461.621
+uc001yof.1 113840 113691 86.6785 7.03158
+uc001yog.1 107062 106913 0 0
+uc001yoi.4 9279 9130 1393.61 1407.8
+uc001yoj.4 9279 9130 1393.61 1407.8
+uc001yok.3 9057 8908 0 0
+uc010aww.2 9057 8908 0 0
+uc031qqp.1 1883 1734 0 0
+uc021sej.1 86 86 0 0
+uc001you.2 2237 2088 0 0
+uc001yov.1 1201 1052 0 0
+uc001yox.1 10678 10529 0 0
+uc021sek.1 56 56 1 164.695
+uc001ypj.3 2372 2223 592.883 2459.79
+uc010tyk.2 8329 8180 4174.05 4706.22
+uc001ypk.3 24252 24103 33.3262 12.7521
+uc001ypl.3 24252 24103 33.3262 12.7521
+uc010axa.3 24842 24693 463.371 173.07
+uc001ypm.3 26394 26245 271.02 95.2405
+uc001ypn.3 26394 26245 271.02 95.2405
+uc021sen.1 4440 4291 30.1699 64.846
+uc021seo.1 16652 16503 8304.66 4641.16
+uc001ypx.2 33230 33081 951.349 265.234
+uc010axc.1 41104 40955 98.8246 22.2549
+uc001yqa.2 11516 11367 422.97 343.188
+uc001yqb.2 11516 11367 422.97 343.188
+uc021sep.1 726 577 1148.06 18350.9
+uc001yqc.3 6767 6618 2 2.78722
+uc001yqd.3 16018 15869 0 0
+uc001yqe.3 16018 15869 0 0
+uc010axe.1 10031 9882 0 0
+uc001yqf.4 10423 10274 5162.34 4634.2
+uc001yqg.4 27844 27695 3313.83 1103.56
+uc001yqh.4 27844 27695 3313.83 1103.56
+uc001yqi.4 8387 8238 214 239.585
+uc010tyn.3 8387 8238 214 239.585
+uc001yqk.2 13107 12958 493.271 351.087
+uc001yql.2 38600 38451 0.696621 0.167092
+uc001yqo.2 40119 39970 161.141 37.1825
+uc001yqp.2 91707 91558 248.197 25.0016
+uc010axg.1 91707 91558 248.197 25.0016
+uc010tyo.1 106292 106143 6.41266e-05 5.57204e-06
+uc010typ.1 106292 106143 6.41266e-05 5.57204e-06
+uc001yqn.2 38457 38308 7.53597e-08 1.81434e-08
+uc010axh.1 38457 38308 7.53597e-08 1.81434e-08
+uc010axi.1 10793 10644 0 0
+uc010axj.1 21252 21103 0 0
+uc001yqr.3 44807 44658 0 0
+uc031qqx.1 1288830 1.28868e+06 1857.4 13.2932
+uc001yrs.3 277245 277096 0 0
+uc001yrt.3 277622 277473 0 0
+uc010axp.1 290 141 0 0
+uc001yru.2 2323 2174 0 0
+uc001yrw.1 263185 263036 0 0
+uc001yrx.2 264192 264043 0 0
+uc001yry.1 180 31 0 0
+uc001yrz.2 224573 224424 0 0
+uc001ysb.2 4706 4557 0 0
+uc031qqy.1 3257 3108 0 0
+uc001ysc.3 639 490 0 0
+uc001ysd.1 290 141 0 0
+uc001yse.3 127790 127641 0 0
+uc001ysg.1 5201 5052 0 0
+uc001ysh.1 8273 8124 0 0
+uc001ysi.2 8273 8124 0 0
+uc001ysj.3 26364 26215 0 0
+uc001ysk.1 24815 24666 0 0
+uc001ysl.1 24815 24666 0 0
+uc001ysm.2 25822 25673 0 0
+uc001ysn.1 26820 26671 0 0
+uc021set.1 2474 2325 0 0
+uc001ysu.1 2540 2391 0 0
+uc001ysv.3 21198 21049 0 0
+uc001ysw.1 741 592 0 0
+uc001ysx.1 4114 3965 0 0
+uc001ysz.3 1023 874 0 0
+uc001yta.1 1088 939 0 0
diff --git a/inst/extdata/kallisto/abundance.txt b/inst/extdata/kallisto/abundance.txt
new file mode 100644
index 0000000..91a23bd
--- /dev/null
+++ b/inst/extdata/kallisto/abundance.txt
@@ -0,0 +1,16 @@
+target_id length eff_length est_counts tpm
+NM_001168316 2283 2105.9 164.133 12856.9
+NM_174914 2385 2207.9 1495.6 111741
+NR_031764 1853 1675.9 104.27 10263.4
+NM_004503 1681 1503.9 332.001 36416.5
+NM_006897 1541 1363.9 664 80308.9
+NM_014212 2037 1859.9 55 4878.11
+NM_014620 2300 2122.9 592.584 46046.7
+NM_017409 1959 1781.9 47 4351.04
+NM_017410 2396 2218.9 42 3122.41
+NM_018953 1612 1434.9 227.995 26210.8
+NM_022658 2288 2110.9 4881 381434
+NM_153633 1666 1488.9 359.898 39874.2
+NM_153693 2072 1894.9 72.5147 6312.74
+NM_173860 849 671.903 962 236182
+NR_003084 1640 1462.9 0.00787013 0.887453
diff --git a/inst/extdata/kallisto/run_info.json b/inst/extdata/kallisto/run_info.json
new file mode 100644
index 0000000..d5eb080
--- /dev/null
+++ b/inst/extdata/kallisto/run_info.json
@@ -0,0 +1,8 @@
+{
+ "n_targets": 2858,
+ "n_bootstraps": 100,
+ "kallisto_version": "0.42.2",
+ "index_version": 10,
+ "start_time": "Wed Jun 10 15:03:26 2015",
+ "call": "../kallisto/build/src/kallisto quant -i hg19chr14transcripts.idx -o output -b 100 --single -l 150 /dev/fd/63"
+}
diff --git a/inst/scripts/Find_and_update_objects/README b/inst/scripts/Find_and_update_objects/README
new file mode 100644
index 0000000..e51f3de
--- /dev/null
+++ b/inst/scripts/Find_and_update_objects/README
@@ -0,0 +1,68 @@
+Find and update objects
+=======================
+
+This document describes the procedure for finding and updating serialized
+objects in the rda files located in a directory hierarchy. This procedure
+consists of 4 STEPS, as described below.
+
+Note that this procedure was developped and used to update all "old"
+serialized SummarizedExperiment objects located in the data-experiment svn
+repository. It should be easy to adapt to update other types of objects in
+other locations.
+
+Also note that the purpose of STEPS 1 & 2 & 3 below is to collect the list
+of rda objects to update. Since this can take a long time, the 2 lists
+obtained for the "old" serialized SummarizedExperiment objects located
+in https://hedgehog.fhcrc.org/bioc-data/trunk/experiment/pkgs and
+https://hedgehog.fhcrc.org/bioc-data/trunk/experiment/data_store were saved
+to the pkgs_RDA_OBJECTS_TO_UPDATE and data_store_RDA_OBJECTS_TO_UPDATE
+files, respectively, and these 2 files placed in this folder. So in case
+these objects need to be updated again, these 2 files can be re-used to run
+STEP 4 directly without the need to re-run STEPS 1 & 2 & 3.
+
+STEP 1: Prepare list of rda files to scan.
+
+ cd <dir/you/want/to/search>
+ find . -type d -name '.svn' -prune -o -type f -print | \
+ grep -Ei '\.(rda|RData)$' >RDA_FILES
+
+STEP 2: Scan the rda files.
+
+ cd <dir/you/want/to/search>
+
+ R="$HOME/bin/R-3.2"
+ R_SCRIPT="scriptfile <- system.file('scripts', 'Find_and_update_objects', "
+ R_SCRIPT="$R_SCRIPT 'scan_rda_files.R', "
+ R_SCRIPT="$R_SCRIPT package='SummarizedExperiment', mustWork=TRUE)"
+ R_SCRIPT="$R_SCRIPT; source(scriptfile)"
+ echo "$R_SCRIPT" | $R --vanilla >scan_rda_files.log 2>&1 &
+
+STEP 3: Collect rda objects to update.
+
+ cd <dir/you/want/to/search>
+
+ R="$HOME/bin/R-3.2"
+ R_SCRIPT="scriptfile <- system.file('scripts', 'Find_and_update_objects', "
+ R_SCRIPT="$R_SCRIPT 'collect_rda_objects_to_update.R', "
+ R_SCRIPT="$R_SCRIPT package='SummarizedExperiment', mustWork=TRUE)"
+ R_SCRIPT="$R_SCRIPT; source(scriptfile)"
+ echo "$R_SCRIPT" | $R --vanilla >collect_rda_objects_to_update.log 2>&1 &
+
+STEP 4: Update rda objects.
+
+ cd <dir/you/want/to/search>
+
+ #To update the "old" serialized SummarizedExperiment objects located in
+ # https://hedgehog.fhcrc.org/bioc-data/trunk/experiment/pkgs
+ #replace the above command with
+ # svn co https://hedgehog.fhcrc.org/bioc-data/trunk/experiment/pkgs
+ # cp path/to/pkgs_RDA_OBJECTS_TO_UPDATE pkgs/RDA_OBJECTS_TO_UPDATE
+ # cd pkgs
+
+ R="$HOME/bin/R-3.2"
+ R_SCRIPT="scriptfile <- system.file('scripts', 'Find_and_update_objects', "
+ R_SCRIPT="$R_SCRIPT 'update_rda_objects.R', "
+ R_SCRIPT="$R_SCRIPT package='SummarizedExperiment', mustWork=TRUE)"
+ R_SCRIPT="$R_SCRIPT; source(scriptfile)"
+ echo "$R_SCRIPT" | $R --vanilla >update_rda_objects.log 2>&1 &
+
diff --git a/inst/scripts/Find_and_update_objects/collect_rda_objects_to_update.R b/inst/scripts/Find_and_update_objects/collect_rda_objects_to_update.R
new file mode 100644
index 0000000..0d07e43
--- /dev/null
+++ b/inst/scripts/Find_and_update_objects/collect_rda_objects_to_update.R
@@ -0,0 +1,133 @@
+### =========================================================================
+### collect_rda_objects_to_update.R
+### -------------------------------------------------------------------------
+###
+### This script performs STEP 3 of the "Find and update objects" procedure
+### described in the README file located in the same folder.
+###
+### Before you run this script, make sure you performed STEPS 1 & 2.
+### See README file for more information.
+###
+### Then to run STEP 3 in "batch" mode:
+###
+### cd <dir/you/want/to/search> # RDA_OBJECTS file should be here
+### R CMD BATCH collect_rda_objects_to_update.R \
+### >collect_rda_objects_to_update.log 2>&1 &
+###
+### The output of STEP 3 is a file created in the current directory and named
+### RDA_OBJECTS_TO_UPDATE. It is a subset of input file RDA_OBJECTS.
+###
+
+INFILE <- "RDA_OBJECTS"
+OUTFILE <- "RDA_OBJECTS_TO_UPDATE"
+
+library(BiocInstaller)
+library(SummarizedExperiment)
+
+if (FALSE) {
+### Unfortunately, loading all the required packages in the main process will
+### sometimes hit the maximal number of DLLs that can be loaded ("maximal
+### number of DLLs reached..." infamous error).
+.check_classes <- function(classes, package)
+{
+ suppressWarnings(suppressPackageStartupMessages(
+ library(package, character.only=TRUE, quietly=TRUE)
+ ))
+ sapply(classes, function(class) {
+ extends(class, "SummarizedExperiment") ||
+ extends(class, "RangedSummarizedExperiment")
+ })
+}
+}
+
+### We check the classes in a subprocess to work around the "maximal number
+### of DLLs reached..." infamous error.
+.check_classes <- function(classes, package)
+{
+ classes_in1string <- paste0("\"", classes, "\"")
+ classes_in1string <- paste0("c(",
+ paste(classes_in1string, collapse=", "),
+ ")")
+ outfile <- file.path(tempdir(), paste0(package, "_class_summary"))
+ input <- c("suppressWarnings(suppressPackageStartupMessages(",
+ sprintf(" library(%s)", "SummarizedExperiment"),
+ "))",
+ "suppressWarnings(suppressPackageStartupMessages(",
+ sprintf(" library(%s)", package),
+ "))",
+ sprintf("classes <- %s", classes_in1string),
+ "ok <- sapply(classes, function(class) {",
+ " extends(class, \"SummarizedExperiment\") ||",
+ " extends(class, \"RangedSummarizedExperiment\")",
+ "})",
+ "class_summary <- data.frame(class=classes, ok=unname(ok))",
+ sprintf("write.table(class_summary, file=\"%s\", sep=\"\t\")", outfile)
+ )
+ command <- file.path(R.home("bin"), "R")
+ args <- c("--vanilla", "--slave")
+ system2(command, args=args, input=input)
+ class_summary <- read.table(outfile, stringsAsFactors=FALSE)
+ file.remove(outfile)
+ stopifnot(identical(class_summary[ , "class"], classes)) # sanity check
+ setNames(class_summary[ , "ok"], classes)
+}
+
+collectRdaObjectsToUpdate <- function(rda_objects, outfile="")
+{
+ rda_objects2 <- unique(rda_objects[ , c("objclass", "objclass_pkg")])
+ objclass2 <- rda_objects2[ , "objclass"]
+ objclass_pkg2 <- rda_objects2[ , "objclass_pkg"]
+ idx <- which(duplicated(objclass2))
+ if (length(idx) != 0L) {
+ msg <- c("the following classes are defined in more than 1 package: ",
+ paste0(unique(objclass2[idx]), collapse=", "))
+ warning(msg)
+ }
+ pkg2class <- split(objclass2, objclass_pkg2)
+ pkg2class[c(".", ".GlobalEnv")] <- NULL
+ pkgs <- names(pkg2class)
+
+ ## Install missing packages.
+ installed_pkgs <- rownames(installed.packages())
+ missing_pkgs <- setdiff(pkgs, installed_pkgs)
+ if (length(missing_pkgs) != 0L) {
+ biocLite(missing_pkgs)
+ installed_pkgs <- rownames(installed.packages())
+ missing_pkgs <- setdiff(pkgs, installed_pkgs)
+ if (length(missing_pkgs) != 0L) {
+ ## Some packages could not be installed.
+ pkgs <- intersect(pkgs, installed_pkgs)
+ pkg2class <- pkg2class[pkgs]
+ }
+ }
+
+ ## Check classes, one package at a time.
+ class2ok <- unlist(
+ lapply(seq_along(pkgs),
+ function(i) {
+ pkg <- pkgs[[i]]
+ cat("[", i , "/", length(pkgs), "] Check classes defined ",
+ "in package ", pkg, " ... ", sep="")
+ ans <- .check_classes(pkg2class[[pkg]], pkg)
+ cat("OK\n")
+ ans
+ }
+ )
+ )
+
+ ## Write output to file.
+ objclass <- rda_objects[ , "objclass"]
+ ok <- class2ok[objclass]
+ ok[is.na(ok)] <- FALSE
+ rda_objects_to_update <- rda_objects[ok, , drop=FALSE]
+ rda_objects_to_update <- do.call(
+ paste,
+ c(as.list(rda_objects_to_update), list(sep="\t"))
+ )
+ writeLines(rda_objects_to_update, con=outfile)
+}
+
+rda_objects <- read.table(INFILE, stringsAsFactors=FALSE)
+colnames(rda_objects) <- c("rda_file", "objname", "objclass", "objclass_pkg")
+collectRdaObjectsToUpdate(rda_objects, outfile=OUTFILE)
+
diff --git a/inst/scripts/Find_and_update_objects/data_store_RDA_OBJECTS_TO_UPDATE b/inst/scripts/Find_and_update_objects/data_store_RDA_OBJECTS_TO_UPDATE
new file mode 100644
index 0000000..d9e6e4f
--- /dev/null
+++ b/inst/scripts/Find_and_update_objects/data_store_RDA_OBJECTS_TO_UPDATE
@@ -0,0 +1,30 @@
+# This file contains the list of rda objects to update located in
+# https://hedgehog.fhcrc.org/bioc-data/trunk/experiment/data_store
+# It was obtained by running STEPS 1 & 2 & 3 of the "Find and update objects"
+# procedure on May 26, 2015. See README file for more information.
+# To update the objects listed in this file:
+# 1. Get a working copy of the above URL.
+# 2. Copy this file to the working copy and rename it RDA_OBJECTS_TO_UPDATE.
+# 3. Run STEP 4 (see README file for more information).
+./geuvPack/data/geuFPKM.rda geuFPKM SummarizedExperiment GenomicRanges
+./bsseqData/data/BS.cancer.ex.fit.rda BS.cancer.ex.fit BSseq bsseq
+./bsseqData/data/BS.cancer.ex.rda BS.cancer.ex BSseq bsseq
+./fission/data/fission.RData fission SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_010_04.RData dream4_010_04 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_100_01.RData dream4_100_01 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_010_01.RData dream4_010_01 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_010_05.RData dream4_010_05 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_010_02.RData dream4_010_02 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_100_04.RData dream4_100_04 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_010_03.RData dream4_010_03 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_100_05.RData dream4_100_05 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_100_02.RData dream4_100_02 SummarizedExperiment GenomicRanges
+./DREAM4/data/dream4_100_03.RData dream4_100_03 SummarizedExperiment GenomicRanges
+./COSMIC.67/data/cosmic_67.rda cosmic_67 CollapsedVCF VariantAnnotation
+./parathyroidSE/data/parathyroidGenesSE.RData parathyroidGenesSE SummarizedExperiment GenomicRanges
+./parathyroidSE/data/parathyroidExonsSE.RData parathyroidExonsSE SummarizedExperiment GenomicRanges
+./RRBSdata/data/rrbs.RData rrbs BSraw BiSeq
+./airway/data/airway.RData airway SummarizedExperiment GenomicRanges
+./dsQTL/data/DSQ_2.rda DSQ_2 SummarizedExperiment GenomicRanges
+./dsQTL/data/DSQ_17.rda DSQ_17 SummarizedExperiment GenomicRanges
+./dsQTL/data/DHStop5_hg19.rda DHStop5_hg19 SummarizedExperiment GenomicRanges
diff --git a/inst/scripts/Find_and_update_objects/pkgs_RDA_OBJECTS_TO_UPDATE b/inst/scripts/Find_and_update_objects/pkgs_RDA_OBJECTS_TO_UPDATE
new file mode 100644
index 0000000..d10769a
--- /dev/null
+++ b/inst/scripts/Find_and_update_objects/pkgs_RDA_OBJECTS_TO_UPDATE
@@ -0,0 +1,9 @@
+# This file contains the list of rda objects to update located in
+# https://hedgehog.fhcrc.org/bioc-data/trunk/experiment/pkgs
+# It was obtained by running STEPS 1 & 2 & 3 of the "Find and update objects"
+# procedure on May 26, 2015. See README file for more information.
+# To update the objects listed in this file:
+# 1. Get a working copy of the above URL.
+# 2. Copy this file to the working copy and rename it RDA_OBJECTS_TO_UPDATE.
+# 3. Run STEP 4 (see README file for more information).
+./pasilla/data/pasillaDEXSeqDataSet.RData dxd DEXSeqDataSet DEXSeq
diff --git a/inst/scripts/Find_and_update_objects/scan_rda_files.R b/inst/scripts/Find_and_update_objects/scan_rda_files.R
new file mode 100644
index 0000000..5bcd019
--- /dev/null
+++ b/inst/scripts/Find_and_update_objects/scan_rda_files.R
@@ -0,0 +1,68 @@
+### =========================================================================
+### scan_rda_files.R
+### -------------------------------------------------------------------------
+###
+### This script performs STEP 2 of the "Find and update objects" procedure
+### described in the README file located in the same folder.
+###
+### Before you run this script, make sure you performed STEP 1, that is, you
+### need to generate input file RDA_FILES. This can be achieved with
+### something like:
+###
+### cd <dir/you/want/to/search>
+### find . -type d -name '.svn' -prune -o -type f -print | \
+### grep -Ei '\.(rda|RData)$' >RDA_FILES
+###
+### See README file for more information.
+###
+### Then to run STEP 2 in "batch" mode:
+###
+### cd <dir/you/want/to/search> # RDA_FILES file should be here
+### R CMD BATCH scan_rda_files.R >scan_rda_files.log 2>&1 &
+###
+### This can take a couple of hours to complete...
+###
+### The output of STEP 2 is a file created in the current directory and named
+### RDA_OBJECTS. It has 1 line per serialized object and the 4 following
+### fields (separated by tabs):
+### 1. Path to rda file (as found in input file RDA_FILES).
+### 2. Name of object in rda file.
+### 3. Class of object in rda file.
+### 4. Package where class of object is defined.
+###
+
+INFILE <- "RDA_FILES"
+OUTFILE <- "RDA_OBJECTS"
+
+scanRdaFiles <- function(rda_files, outfile="")
+{
+ cat("", file=outfile) # create (or overwrite) empty output file
+ for (i in seq_along(rda_files)) {
+ rda_file <- rda_files[[i]]
+
+ cat("[", i , "/", length(rda_files), "] Loading ", rda_file, " ... ",
+ sep="")
+ envir <- new.env(parent=emptyenv())
+ load(rda_file, envir=envir)
+ cat("OK\n")
+
+ for (objname in names(envir)) {
+ obj <- get(objname, envir=envir)
+ objclass <- class(obj)
+ objclass_pkg <- attr(objclass, "package")
+
+ ## Fix 'objclass' and 'objclass_pkg' (they both need to be
+ ## character vectors of length 1 before we pass them to paste()).
+ objclass <- objclass[[1L]]
+ if (is.null(objclass_pkg))
+ objclass_pkg <- "."
+ outline <- paste(rda_file, objname, objclass, objclass_pkg,
+ sep="\t")
+ cat(outline, "\n", sep="", file=OUTFILE, append=TRUE)
+ }
+ }
+}
+
+rda_files <- read.table(INFILE, stringsAsFactors=FALSE)[[1L]]
+scanRdaFiles(rda_files, outfile=OUTFILE)
+
diff --git a/inst/scripts/Find_and_update_objects/update_rda_objects.R b/inst/scripts/Find_and_update_objects/update_rda_objects.R
new file mode 100644
index 0000000..fd9aa14
--- /dev/null
+++ b/inst/scripts/Find_and_update_objects/update_rda_objects.R
@@ -0,0 +1,70 @@
+### =========================================================================
+### update_rda_objects.R
+### -------------------------------------------------------------------------
+###
+### This script performs STEP 4 of the "Find and update objects" procedure
+### described in the README file located in the same folder.
+###
+### Before you run this script, make sure you performed STEPS 1 & 2 & 3.
+### See README file for more information.
+###
+### Then to run STEP 4 in "batch" mode:
+###
+### cd <dir/you/want/to/search> # RDA_OBJECTS_TO_UPDATE file should be here
+### R CMD BATCH update_rda_objects.R >update_rda_objects.log 2>&1 &
+###
+
+INFILE <- "RDA_OBJECTS_TO_UPDATE"
+
+library(SummarizedExperiment)
+
+.update_objects <- function(envir)
+{
+ updated <- FALSE
+ for (objname in names(envir)) {
+ obj <- get(objname, envir=envir, inherits=FALSE)
+ objclass <- class(obj)
+ objclass_pkg <- attr(objclass, "package")
+ if (!is.null(objclass_pkg)) {
+ suppressWarnings(suppressPackageStartupMessages(
+ library(objclass_pkg, character.only=TRUE, quietly=TRUE)
+ ))
+ }
+ if (!SummarizedExperiment:::.has_SummarizedExperiment_internal_structure(obj))
+ next()
+
+ cat(" Updating ", objname, " ... ", sep="")
+ obj <- updateObject(obj)
+ validObject(obj, complete=TRUE)
+ assign(objname, obj, envir=envir, inherits=FALSE)
+ cat("OK\n")
+ updated <- TRUE
+ }
+ updated
+}
+
+updateRdaObjects <- function(rda_objects)
+{
+ rda_files <- unique(rda_objects[ , "rda_file"])
+ for (i in seq_along(rda_files)) {
+ rda_file <- rda_files[[i]]
+
+ cat("[", i , "/", length(rda_files), "] Loading ", rda_file, " ... ",
+ sep="")
+ envir <- new.env(parent=emptyenv())
+ load(rda_file, envir=envir)
+ cat("OK\n")
+
+ if (.update_objects(envir)) {
+ cat(" Saving updated objects to ", rda_file, " ... ", sep="")
+ save(list=names(envir), file=rda_file, envir=envir, compress="xz")
+ cat("OK\n")
+ }
+ }
+}
+
+rda_objects_to_update <- read.table(INFILE, stringsAsFactors=FALSE)
+colnames(rda_objects_to_update) <- c("rda_file", "objname",
+ "objclass", "objclass_pkg")
+updateRdaObjects(rda_objects_to_update)
+
diff --git a/inst/unitTests/test_Assays-class.R b/inst/unitTests/test_Assays-class.R
new file mode 100644
index 0000000..1376417
--- /dev/null
+++ b/inst/unitTests/test_Assays-class.R
@@ -0,0 +1,88 @@
+test_bind_Assays <- function() {
+ ## unnamed -- map by position
+ l1 <- list(matrix(1, 3, 4), matrix(2, 3, 4))
+ l2 <- list(matrix(3, 3, 4), matrix(4, 3, 4))
+ a1 <- Assays(l1)
+ a2 <- Assays(l2)
+
+ target <- Map(rbind, l1, l2)
+ current <- rbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+
+ target <- Map(cbind, l1, l2)
+ current <- cbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+
+ ## named -- map by name
+ l1 <- list(x=matrix(1, 3, 4), y=matrix(2, 3, 4))
+ l2 <- list(y=matrix(4, 3, 4), x=matrix(3, 3, 4))
+ a1 <- Assays(l1)
+ a2 <- Assays(l2)
+
+ target <- Map(rbind, l1, l2[match(names(l2), names(l1))])
+ current <- rbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+
+ target <- Map(cbind, l1, l2[match(names(l2), names(l1))])
+ current <- cbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+}
+
+test_bind_higher_order_Assays <- function() {
+ ## unnamed -- map by position
+ l1 <- list(array(1, dim = c(3, 4, 5, 6)),
+ array(2, dim = c(3, 4, 5, 6)))
+ l2 <- list(array(4, dim = c(3, 4, 5, 6)),
+ array(3, dim = c(3, 4, 5, 6)))
+ a1 <- Assays(l1)
+ a2 <- Assays(l2)
+
+ target <- Map(arbind, l1, l2)
+ current <- rbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+
+ target <- Map(acbind, l1, l2)
+ current <- cbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+
+ ## named -- map by name
+ l1 <- list(x = array(1, dim = c(3, 4, 5, 6)),
+ y = array(2, dim = c(3, 4, 5, 6)))
+ l2 <- list(y = array(4, dim = c(3, 4, 5, 6)),
+ x = array(3, dim = c(3, 4, 5, 6)))
+ a1 <- Assays(l1)
+ a2 <- Assays(l2)
+
+ target <- Map(arbind, l1, l2[match(names(l2), names(l1))])
+ current <- rbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+
+ target <- Map(acbind, l1, l2[match(names(l2), names(l1))])
+ current <- cbind(a1, a2)
+ checkTrue(is(current, "ShallowSimpleListAssays"))
+ checkIdentical(as(target, "SimpleList"), as(current, "SimpleList"))
+}
+
+test_bind_error_on_incompatible_dimension_Assays <- function() {
+ l1 <- list(x = array(1, dim = c(3, 4, 5, 6)),
+ y = array(2, dim = c(3, 4, 5, 6)))
+ l2 <- list(y = matrix(4, 3, 4), x = matrix(3, 3, 4))
+ a1 <- Assays(l1)
+ a2 <- Assays(l2)
+
+ ## arbind
+ checkException(rbind(a1, a2), silent = TRUE)
+ checkException(arbind(l1[[1]], l2[[1]]), silent = TRUE)
+
+ ## acbind
+ checkException(cbind(a1, a2), silent = TRUE)
+ checkException(acbind(l1[[1]], l2[[1]]), silent = TRUE)
+}
+
diff --git a/inst/unitTests/test_RangedSummarizedExperiment-class.R b/inst/unitTests/test_RangedSummarizedExperiment-class.R
new file mode 100644
index 0000000..88a1ced
--- /dev/null
+++ b/inst/unitTests/test_RangedSummarizedExperiment-class.R
@@ -0,0 +1,375 @@
+library(digest)
+
+.singleDispatch <-
+ c("duplicated", "end", "end<-", "granges", "ranges",
+ "seqinfo", "seqinfo<-", "seqnames", "start", "start<-",
+ "strand", "width", "width<-")
+
+.twoDispatch <- c("pcompare", "Compare")
+
+.otherFuns <- c("is.unsorted", "order", "rank", "sort")
+
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+mList <- list(M1, M2)
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+test_RangedSummarizedExperiment_construction <- function()
+{
+ ## empty-ish
+ m1 <- matrix(0, 0, 0)
+ checkTrue(validObject(new("RangedSummarizedExperiment")))
+
+ ## substance
+ for (i in seq_along(rseList)) {
+ rse <- rseList[[i]]
+ checkTrue(validObject(rse))
+ checkIdentical(SimpleList(m=mList[[i]]), assays(rse))
+ checkIdentical(rowRangesList[[i]], rowRanges(rse))
+ checkIdentical(DataFrame(x=letters[1:3]), colData(rse))
+ }
+
+ ## array in assays slot
+ ss <- rseList[[1]]
+ assays(ss) <- SimpleList(array(1:5, c(5,3,2)))
+ checkTrue(validObject(ss))
+ checkTrue(all(dim(assays(ss[1:3,1:2])[[1]]) == c(3, 2, 2)))
+}
+
+test_RangedSummarizedExperiment_getters <- function()
+{
+ for (i in seq_along(rseList)) {
+ rse <- rseList[[i]]
+ rowRanges <- rowRangesList[[i]]
+
+ ## dim, dimnames
+ checkIdentical(c(length(rowRanges), nrow(colData)), dim(rse))
+ checkIdentical(list(NULL, NULL), dimnames(rse))
+
+ ## row / col / metadata
+ checkIdentical(rowRanges, rowRanges(rse))
+ checkIdentical(colData, colData(rse))
+ checkIdentical(list(), metadata(rse))
+ }
+}
+
+test_RangedSummarizedExperiment_setters <- function()
+{
+ for (i in seq_along(rseList)) {
+ rse <- rseList[[i]]
+ rowRanges <- rowRangesList[[i]]
+
+ ## row / col / metadata<-
+ ss1 <- rse
+ revData <- rev(rowRanges)
+ rowRanges(ss1) <- revData
+ checkIdentical(revData, rowRanges(ss1))
+ checkException(rowRanges(ss1) <- rowRanges(rse)[1:2,,drop=FALSE],
+ "incorrect row dimensions", TRUE)
+ revData <- colData[rev(seq_len(nrow(colData))),,drop=FALSE]
+ colData(ss1) <- revData
+ checkIdentical(revData, colData(ss1))
+ checkException(colData(ss1) <- colData(rse)[1:2,,drop=FALSE],
+ "incorrect col dimensions", TRUE)
+ lst <- list("foo", "bar")
+ metadata(ss1) <- lst
+ checkIdentical(lst, metadata(ss1))
+
+ ## assay / assays
+ ss1 <- rse
+ assay(ss1) <- assay(ss1)+1
+ checkIdentical(assay(rse)+1, assay(ss1))
+ ss1 <- rse
+ assay(ss1, 1) <- assay(ss1, 1) + 1
+ checkIdentical(assay(rse, "m") + 1, assay(ss1, "m"))
+ ss1 <- rse
+ assay(ss1, "m") <- assay(ss1, "m") + 1
+ checkIdentical(assay(rse, "m")+1, assay(ss1, "m"))
+
+ ## dimnames<-
+ ss1 <- rse
+ dimnames <- list(letters[seq_len(nrow(ss1))],
+ LETTERS[seq_len(ncol(ss1))])
+ rownames(ss1) <- dimnames[[1]]
+ colnames(ss1) <- dimnames[[2]]
+ checkIdentical(dimnames, dimnames(ss1))
+ rowRanges1 <- rowRanges
+ names(rowRanges1) <- dimnames[[1]]
+ checkIdentical(rowRanges1, rowRanges(ss1))
+ colData1 <- colData
+ row.names(colData1) <- dimnames[[2]]
+ checkIdentical(colData1, colData(ss1))
+ ss1 <- rse
+ dimnames(ss1) <- dimnames
+ checkIdentical(dimnames, dimnames(ss1))
+ dimnames(ss1) <- NULL
+ checkIdentical(list(NULL, NULL), dimnames(ss1))
+ }
+}
+
+test_RangedSummarizedExperiment_subset <- function()
+{
+ for (i in seq_along(rseList)) {
+ rse <- rseList[[i]]
+ rowRanges <- rowRangesList[[i]]
+
+ ## numeric
+ ss1 <- rse[2:3,]
+ checkIdentical(c(2L, ncol(rse)), dim(ss1))
+ checkIdentical(rowRanges(ss1), rowRanges(rse)[2:3,])
+ checkIdentical(colData(ss1), colData(rse))
+ ss1 <- rse[,2:3]
+ checkIdentical(c(nrow(rse), 2L), dim(ss1))
+ checkIdentical(rowRanges(ss1), rowRanges(rse))
+ checkIdentical(colData(ss1), colData(rse)[2:3,,drop=FALSE])
+ ss1 <- rse[2:3, 2:3]
+ checkIdentical(c(2L, 2L), dim(ss1))
+ checkIdentical(rowRanges(ss1), rowRanges(rse)[2:3,,drop=FALSE])
+ checkIdentical(colData(ss1), colData(rse)[2:3,,drop=FALSE])
+
+ ## character
+ ss1 <- rse
+ dimnames(ss1) <- list(LETTERS[seq_len(nrow(ss1))],
+ letters[seq_len(ncol(ss1))])
+ ridx <- c("B", "C")
+ checkIdentical(rowRanges(ss1[ridx,]), rowRanges(ss1)[ridx,])
+ checkIdentical(rowRanges(ss1["C",]), rowRanges(ss1)["C",,drop=FALSE])
+ checkException(ss1[LETTERS,], "i-index out of bounds", TRUE)
+ cidx <- c("b", "c")
+ checkIdentical(colData(ss1[,cidx]), colData(ss1)[cidx,,drop=FALSE])
+ checkIdentical(colData(ss1[,"a"]), colData(ss1)["a",,drop=FALSE])
+ checkException(ss1[,letters], "j-index out of bounds", TRUE)
+
+ ## logical
+ ss1 <- rse
+ dimnames(ss1) <- list(LETTERS[seq_len(nrow(ss1))],
+ letters[seq_len(ncol(ss1))])
+ checkEquals(ss1, ss1[TRUE,])
+ checkIdentical(c(0L, ncol(ss1)), dim(ss1[FALSE,]))
+ checkEquals(ss1, ss1[,TRUE])
+ checkIdentical(c(nrow(ss1), 0L), dim(ss1[,FALSE]))
+ idx <- c(TRUE, FALSE) # recycling
+ ss2 <- ss1[idx,]
+ checkIdentical(rowRanges(ss1)[idx,,drop=FALSE], rowRanges(ss2))
+ ss2 <- ss1[,idx]
+ checkIdentical(colData(ss1)[idx,,drop=FALSE], colData(ss2))
+
+ ## Rle
+ ss1 <- rse
+ rle <- rep(c(TRUE, FALSE), each=3, length.out=nrow(ss1))
+ checkIdentical(rowRanges(ss1[rle]), rowRanges(ss1[Rle(rle)]))
+ checkIdentical(assays(ss1[rle]), assays(ss1[Rle(rle)]))
+ }
+
+ ## 0 columns
+ se <- SummarizedExperiment(rowRanges=GRanges("chr1", IRanges(1:10, width=1)))
+ checkIdentical(dim(se[1:5, ]), c(5L, 0L))
+ ## 0 rows
+ se <- SummarizedExperiment(colData=DataFrame(samples=1:10))
+ checkIdentical(dim(se[ ,1:5]), c(0L, 5L))
+}
+
+test_RangedSummarizedExperiment_subsetassign <- function()
+{
+ for (i in seq_along(rseList)) {
+ rse <- rseList[[i]]
+ dimnames(rse) <- list(LETTERS[seq_len(nrow(rse))],
+ letters[seq_len(ncol(rse))])
+ ## rows
+ ss1 <- rse
+ ss1[1:2,] <- ss1[2:1,]
+ checkIdentical(rowRanges(rse)[2:1,], rowRanges(ss1)[1:2,])
+ checkIdentical(rowRanges(rse[-(1:2),]), rowRanges(ss1)[-(1:2),])
+ checkIdentical(colData(rse), colData(ss1))
+ checkIdentical(c(metadata(rse), metadata(rse)), metadata(ss1))
+ ## Rle
+ ss1rle <- ss1Rle <- rse
+ rle <- rep(c(TRUE, FALSE), each=3, length.out=nrow(ss1))
+ ss1rle[rle,] <- ss1rle[rle,]
+ ss1Rle[Rle(rle),] <- ss1Rle[Rle(rle),]
+ checkIdentical(rowRanges(ss1rle), rowRanges(ss1Rle))
+ checkIdentical(assays(ss1rle), assays(ss1Rle))
+ ## cols
+ ss1 <- rse
+ ss1[,1:2] <- ss1[,2:1,drop=FALSE]
+ checkIdentical(colData(rse)[2:1,,drop=FALSE],
+ colData(ss1)[1:2,,drop=FALSE])
+ checkIdentical(colData(rse)[-(1:2),,drop=FALSE],
+ colData(ss1)[-(1:2),,drop=FALSE])
+ checkIdentical(rowRanges(rse), rowRanges(ss1))
+ checkIdentical(c(metadata(rse), metadata(rse)), metadata(ss1))
+ }
+
+ ## full replacement
+ ss1 <- ss2 <- rseList[[1]]
+ rowRanges(ss2) <- rev(rowRanges(ss2))
+ ss1[,] <- ss2
+ checkIdentical(ss1, ss2)
+}
+
+quiet <- suppressWarnings
+test_RangedSummarizedExperiment_cbind <- function()
+## requires matching ranges
+{
+ ## empty
+ se <- SummarizedExperiment()
+ empty <- cbind(se, se)
+ checkTrue(all.equal(se, empty))
+
+ ## different ranges
+ se1 <- rseList[[1]]
+ se2 <- se1[2:4]
+ rownames(se2) <- month.name[seq_len(nrow(se2))]
+ checkException(quiet(cbind(se1, se2)), silent=TRUE)
+
+ ## same ranges
+ se1 <- rseList[[1]]
+ se2 <- se1[,1:2]
+ colnames(se2) <- month.name[seq_len(ncol(se2))]
+ res <- cbind(se1, se2)
+ checkTrue(nrow(res) == 5)
+ checkTrue(ncol(res) == 5)
+ ## rowRanges
+ rowData(se1) <- DataFrame("one"=1:5)
+ rowData(se2) <- DataFrame("two"=6:10)
+ res <- quiet(cbind(se1, se2))
+ checkIdentical(names(mcols(rowRanges(res))), c("one", "two"))
+ rowData(se2) <- DataFrame("one"=6:10, "two"=6:10)
+ checkException(cbind(se1, se2), silent=TRUE)
+ ## colData
+ checkTrue(nrow(colData(res)) == 5)
+ ## assays
+ se1 <- rseList[[1]]
+ se2 <- se1[,1:2]
+ assays(se1) <- SimpleList("m"=matrix(rep("m", 15), nrow=5),
+ "a"=array(rep("a", 30), c(5,3,2)))
+ assays(se2) <- SimpleList("m"=matrix(LETTERS[1:10], nrow=5),
+ "a"=array(LETTERS[1:20], c(5,2,2)))
+ res <- cbind(se1, se2) ## same variables
+ checkTrue(nrow(res) == 5)
+ checkTrue(ncol(res) == 5)
+ checkTrue(all.equal(dim(assays(res)$m), c(5L, 5L)))
+ checkTrue(all.equal(dim(assays(res)$a), c(5L, 5L, 2L)))
+ names(assays(se1)) <- c("mm", "aa")
+ checkException(cbind(se1, se2), silent=TRUE) ## different variables
+}
+
+test_RangedSummarizedExperiment_rbind <- function()
+## requires matching samples
+{
+ ## empty
+ se <- SummarizedExperiment()
+ empty <- rbind(se, se)
+ checkTrue(all.equal(se, empty))
+
+ ## different samples
+ se1 <- rseList[[1]]
+ se2 <- se1[,1]
+ checkException(quiet(rbind(se1, se2)), silent=TRUE)
+
+ ## same samples
+ se1 <- rseList[[1]]
+ se2 <- se1
+ rownames(se2) <- LETTERS[seq_len(nrow(se2))]
+ res <- rbind(se1, se2)
+ checkTrue(nrow(res) == 10)
+ checkTrue(ncol(res) == 3)
+ ## rowRanges
+ rowData(se1) <- DataFrame("one"=1:5)
+ rowData(se2) <- DataFrame("two"=6:10)
+ checkException(rbind(se1, se2), silent=TRUE)
+ ## colDat
+ se1 <- rseList[[1]]
+ se2 <- se1
+ colData(se2) <- DataFrame("one"=1:3, "two"=4:6)
+ res <- quiet(rbind(se1, se2))
+ checkTrue(ncol(colData(res)) == 3)
+ ## assays
+ se1 <- rseList[[1]]
+ se2 <- se1
+ assays(se1) <- SimpleList("m"=matrix(rep("m", 15), nrow=5),
+ "a"=array(rep("a", 30), c(5,3,2)))
+ assays(se2) <- SimpleList("m"=matrix(LETTERS[1:15], nrow=5),
+ "a"=array(LETTERS[1:30], c(5,3,2)))
+ res <- rbind(se1, se2) ## same variables
+ checkTrue(nrow(res) == 10)
+ checkTrue(ncol(res) == 3)
+ checkTrue(all.equal(dim(assays(res)$m), c(10L, 3L)))
+ checkTrue(all.equal(dim(assays(res)$a), c(10L, 3L, 2L)))
+ names(assays(se1)) <- c("mm", "aa")
+ checkException(rbind(se1, se2), silent=TRUE) ## different variables
+}
+
+test_RangedSummarizedExperiment_GRanges_API <- function()
+{
+ ## are we targetting the correct API? signature for
+ ## RangedSummarizedExperiment method should match signature for
+ ## GenomicRanges or similar, as in each test below
+
+ for (.fun in .singleDispatch) {
+ generic <- getGeneric(.fun)
+ method <- getMethod(.fun, "RangedSummarizedExperiment")
+ checkIdentical("x", generic at signature)
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+
+ ## FIXME: pcompare, Compare
+
+ .sig <- "RangedSummarizedExperiment"
+ for (.fun in .otherFuns) {
+ generic <- getGeneric(.fun)
+ method <- getMethod(.fun, "RangedSummarizedExperiment")
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+}
+
+test_RangedSummarizedExperiment_GRanges_values <- function()
+{
+ x <- rseList[[1]]
+ isAssign <- grep("<-$", .singleDispatch, value=TRUE)
+ .funs <- setdiff(.singleDispatch, isAssign)
+ ## 'exp' created after manual inspection of results
+ exp <- setNames(c("02dde", "80339", "49a3f", "86757", "77198",
+ "ec53a", "35e2c", "625d9", "3c90a"), .funs)
+ obs <- sapply(.funs, function(.fun) {
+ substr(digest(getGeneric(.fun)(x)), 1, 5)
+ })
+ checkIdentical(exp, obs)
+
+ .funs <- isAssign
+ .gets <- sub("<-$", "", isAssign)
+ for (i in seq_along(isAssign)) {
+ ## self-assignment isomorphism
+ value <- getGeneric(.gets[[i]])(x)
+ x1 <- do.call(isAssign[[i]], list(x, value=value))
+ checkIdentical(x, x1)
+ }
+}
+
+test_RangedSummarizedExperiment_split <- function()
+{
+ gr <- GRanges(Rle(c("A", "B"), c(2, 3)), IRanges(1:5, 10))
+ se <- SummarizedExperiment(M1, rowRanges=gr, colData=colData)
+ ## FIXME: unname should not be necessary
+ obs <- split(se, seqnames(se))
+ exp <- SimpleList(A=se[1:2], B=se[3:5])
+ checkEquals(obs, exp)
+}
+
diff --git a/inst/unitTests/test_SummarizedExperiment-class.R b/inst/unitTests/test_SummarizedExperiment-class.R
new file mode 100644
index 0000000..3d590d8
--- /dev/null
+++ b/inst/unitTests/test_SummarizedExperiment-class.R
@@ -0,0 +1,339 @@
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+mList <- list(M1, M2)
+assaysList <- list(M1=SimpleList(m=M1), M2=SimpleList(m=M2))
+rowData1 <- DataFrame(id1=LETTERS[1:5])
+rowData2 <- S4Vectors:::make_zero_col_DataFrame(3L)
+rowDataList <- list(rowData1, rowData2)
+colData0 <- DataFrame(x=letters[1:3])
+
+se0List <-
+ list(SummarizedExperiment(
+ assays=assaysList[["M1"]],
+ rowData=rowData1,
+ colData=colData0),
+ SummarizedExperiment(
+ assays=assaysList[["M2"]],
+ colData=colData0))
+
+
+test_SummarizedExperiment_construction <- function()
+{
+ ## empty-ish
+ m1 <- matrix(0, 0, 0)
+ checkTrue(validObject(new("SummarizedExperiment")))
+ checkTrue(validObject(SummarizedExperiment()), "empty constructor")
+ checkTrue(validObject(SummarizedExperiment(SimpleList())))
+ checkTrue(validObject(SummarizedExperiment(assays=SimpleList(m1))),
+ "0x0 constructor")
+ checkException(SummarizedExperiment(assays=SimpleList(m1, matrix())),
+ "assays dim mismatch", TRUE)
+
+ ## substance
+ for (i in seq_along(se0List)) {
+ se0 <- se0List[[i]]
+ checkTrue(validObject(se0))
+ checkIdentical(SimpleList(m=mList[[i]]), assays(se0))
+ checkIdentical(rowDataList[[i]], rowData(se0))
+ checkIdentical(colData0, colData(se0))
+ }
+
+ ## array in assays slot
+ ss <- se0List[[1]]
+ assays(ss) <- SimpleList(array(1:5, c(5,3,2)))
+ checkTrue(validObject(ss))
+ checkTrue(all(dim(assays(ss[1:3,1:2])[[1]]) == c(3, 2, 2)))
+
+ ## matrix-of-list in assay slot
+ m <- matrix(list(), 2, 3, dimnames=list(LETTERS[1:2], letters[1:3]))
+ checkTrue(validObject(se <- SummarizedExperiment(m)))
+ checkIdentical(m, assay(se))
+ checkIdentical(m[,1:2], assay(se[,1:2]))
+
+ ## DataFrame in assay slot
+ df <- DataFrame(a=1:3, b=1:3, row.names=LETTERS[1:3])
+ checkTrue(validObject(SummarizedExperiment(list(df))))
+}
+
+test_SummarizedExperiment_construction_colnames <- function()
+{
+ colnames <- LETTERS[1:3]
+
+ checkException(SummarizedExperiment(
+ assays=matrix(0, 2, 3, dimnames=list(NULL, colnames)),
+ colData=DataFrame(row.names=letters[1:3])),
+ "assay colnames() differ from colData rownames()", TRUE)
+
+ checkTrue(validObject(SummarizedExperiment(matrix(0, 2, 3))),
+ "NULL dimnames on assays-only construction")
+ se <- SummarizedExperiment(matrix(0, 2, 3))
+ checkTrue(is.null(colnames(se)))
+
+ checkTrue(validObject(SummarizedExperiment(
+ matrix(0, 2, 3), colData=DataFrame(x=1:3)[,FALSE])),
+ "NULL dimnames on assays and colData")
+ se <- SummarizedExperiment(matrix(0, 2, 3),
+ colData=DataFrame(x=1:3)[,FALSE])
+ checkTrue(is.null(colnames(se)))
+
+ ## dimnames from colData rownames
+ se <- SummarizedExperiment(matrix(0, 2, 3),
+ colData=DataFrame(row.names=colnames))
+ checkIdentical(colnames(se), colnames)
+ checkTrue(is.null(colnames(assay(se, withDimnames=FALSE))),
+ "don't replace NULL colnames")
+
+ ## when colData rownames == NULL, take dimnames from assay colnames
+ colnames <- LETTERS[1:3]
+ se <- SummarizedExperiment(matrix(0, 2, 3, dimnames=list(NULL, colnames)),
+ colData=DataFrame(x=colnames)[,FALSE])
+ checkIdentical(colnames(se), colnames)
+ checkIdentical(colnames(assay(se, withDimnames=FALSE)), colnames,
+ "don't remove non-NULL colnames")
+
+ ## matching colData rownames and assay colnames
+ se <- SummarizedExperiment(matrix(0, 2, 3, dimnames=list(NULL, colnames)),
+ colData=DataFrame(row.names=colnames))
+ checkIdentical(colnames(se), colnames)
+ checkIdentical(colnames(assay(se, withDimnames=FALSE)), colnames)
+}
+
+test_SummarizedExperiment_getters <- function()
+{
+ for (i in seq_along(se0List)) {
+ se0 <- se0List[[i]]
+
+ ## dim, dimnames
+ checkIdentical(c(nrow(mList[[i]]), nrow(colData0)), dim(se0))
+ checkIdentical(list(NULL, NULL), dimnames(se0))
+
+ ## col / metadata
+ checkIdentical(rowDataList[[i]], rowData(se0))
+ checkIdentical(colData0, colData(se0))
+ checkIdentical(list(), metadata(se0))
+ }
+
+ ## assays
+ m0 <- matrix(0L, 0, 0, dimnames=list(NULL, NULL))
+ m1 <- matrix(0, 0, 0, dimnames=list(NULL, NULL))
+ a <- SimpleList(a=m0, b=m1)
+ checkIdentical(a, assays(SummarizedExperiment(assays=a)))
+ ## assay
+ checkException(
+ assay(SummarizedExperiment()), "0-length assay", TRUE)
+ checkIdentical(m0,
+ assay(SummarizedExperiment(assays=a)), "default assay")
+ checkIdentical(m1,
+ assay(SummarizedExperiment(assays=a), 2),
+ "assay, numeric index")
+ checkException(
+ assay(SummarizedExperiment(assays=a), 3),
+ "invalid assay index", TRUE)
+ checkIdentical(m1,
+ assay(SummarizedExperiment(assays=a), "b"),
+ "assay, character index")
+ checkException(
+ assay(SummarizedExperiment(assays=a), "c"),
+ "invalid assay name", TRUE)
+}
+
+test_SummarizedExperiment_setters <- function()
+{
+ for (i in seq_along(se0List)) {
+ se0 <- se0List[[i]]
+
+ ## row / col / metadata<-
+ se1 <- se0
+ rowData <- rowDataList[[i]]
+
+ rowData <- rowData[rev(seq_len(nrow(rowData))),,drop=FALSE]
+ rowData(se1) <- rowData
+ checkIdentical(rowData, rowData(se1))
+
+ colData <- colData0[rev(seq_len(nrow(colData0))),,drop=FALSE]
+ colData(se1) <- colData
+ checkIdentical(colData, colData(se1))
+
+ ## The rowData (alias for mcols) setter recycles the supplied
+ ## DataFrame. This is consistent with what the mcols/elementMetadata
+ ## setter does on Vector objects in general.
+ rowData(se1) <- rowData(se0)[1:2,,drop=FALSE]
+ idx <- rep(1:2, length.out=length(se1))
+ target_se1_rowData <- rowData(se0)[idx,,drop=FALSE]
+ checkIdentical(target_se1_rowData, rowData(se1))
+
+ ## The colData setter does NOT recycle the supplied DataFrame.
+ checkException(colData(se1) <- colData(se0)[1:2,,drop=FALSE],
+ "incorrect col dimensions", TRUE)
+
+ lst <- list("foo", "bar")
+ metadata(se1) <- lst
+ checkIdentical(lst, metadata(se1))
+
+ ## assay / assays
+ se1 <- se0
+ assay(se1) <- assay(se1)+1
+ checkIdentical(assay(se0)+1, assay(se1))
+ se1 <- se0
+ assay(se1, 1) <- assay(se1, 1) + 1
+ checkIdentical(assay(se0, "m") + 1, assay(se1, "m"))
+ se1 <- se0
+ assay(se1, "m") <- assay(se1, "m") + 1
+ checkIdentical(assay(se0, "m")+1, assay(se1, "m"))
+
+ ## dimnames<-
+ se1 <- se0
+ dimnames <- list(letters[seq_len(nrow(se1))],
+ LETTERS[seq_len(ncol(se1))])
+ rownames(se1) <- dimnames[[1]]
+ colnames(se1) <- dimnames[[2]]
+ checkIdentical(dimnames, dimnames(se1))
+ colData1 <- colData0
+ row.names(colData1) <- dimnames[[2]]
+ checkIdentical(colData1, colData(se1))
+ se1 <- se0
+ dimnames(se1) <- dimnames
+ checkIdentical(dimnames, dimnames(se1))
+ dimnames(se1) <- NULL
+ checkIdentical(list(NULL, NULL), dimnames(se1))
+ }
+}
+
+test_SummarizedExperiment_subset <- function()
+{
+ for (i in seq_along(se0List)) {
+ se0 <- se0List[[i]]
+
+ ## numeric
+ se1 <- se0[2:3,]
+ checkIdentical(c(2L, ncol(se0)), dim(se1))
+ checkIdentical(rowData(se1), rowData(se0)[2:3,,drop=FALSE])
+ checkIdentical(colData(se1), colData(se0))
+ se1 <- se0[,2:3]
+ checkIdentical(c(nrow(se0), 2L), dim(se1))
+ checkIdentical(rowData(se1), rowData(se0))
+ checkIdentical(colData(se1), colData(se0)[2:3,,drop=FALSE])
+ se1 <- se0[2:3, 2:3]
+ checkIdentical(c(2L, 2L), dim(se1))
+ checkIdentical(colData(se1), colData(se0)[2:3,,drop=FALSE])
+
+ ## character
+ se1 <- se0
+ dimnames(se1) <- list(LETTERS[seq_len(nrow(se1))],
+ letters[seq_len(ncol(se1))])
+ ridx <- c("B", "C")
+ checkException(se1[LETTERS,], "i-index out of bounds", TRUE)
+ cidx <- c("b", "c")
+ checkIdentical(colData(se1[,cidx]), colData(se1)[cidx,,drop=FALSE])
+ checkIdentical(colData(se1[,"a"]), colData(se1)["a",,drop=FALSE])
+ checkException(se1[,letters], "j-index out of bounds", TRUE)
+
+ ## logical
+ se1 <- se0
+ dimnames(se1) <- list(LETTERS[seq_len(nrow(se1))],
+ letters[seq_len(ncol(se1))])
+ checkEquals(se1, se1[TRUE,])
+ checkIdentical(c(0L, ncol(se1)), dim(se1[FALSE,]))
+ checkEquals(se1, se1[,TRUE])
+ checkIdentical(c(nrow(se1), 0L), dim(se1[,FALSE]))
+ idx <- c(TRUE, FALSE) # recycling
+ se2 <- se1[idx,]
+ se2 <- se1[,idx]
+ checkIdentical(colData(se1)[idx,,drop=FALSE], colData(se2))
+
+ ## Rle
+ se1 <- se0
+ rle <- rep(c(TRUE, FALSE), each=3, length.out=nrow(se1))
+ checkIdentical(assays(se1[rle]), assays(se1[Rle(rle)]))
+ }
+
+ ## 0 columns
+ se <- SummarizedExperiment(matrix(integer(0), nrow=5))
+ checkIdentical(dim(se[1:5, ]), c(5L, 0L))
+ ## 0 rows
+ se <- SummarizedExperiment(colData=DataFrame(samples=1:10))
+ checkIdentical(dim(se[ ,1:5]), c(0L, 5L))
+}
+
+test_SummarizedExperiment_subsetassign <- function()
+{
+ for (i in seq_along(se0List)) {
+ se0 <- se0List[[i]]
+ dimnames(se0) <- list(LETTERS[seq_len(nrow(se0))],
+ letters[seq_len(ncol(se0))])
+ ## rows
+ se1 <- se0
+ se1[1:2,] <- se1[2:1,]
+ checkIdentical(colData(se0), colData(se1))
+ checkIdentical(c(metadata(se0), metadata(se0)), metadata(se1))
+ ## Rle
+ se1rle <- se1Rle <- se0
+ rle <- rep(c(TRUE, FALSE), each=3, length.out=nrow(se1))
+ se1rle[rle,] <- se1rle[rle,]
+ se1Rle[Rle(rle),] <- se1Rle[Rle(rle),]
+ checkIdentical(assays(se1rle), assays(se1Rle))
+ ## cols
+ se1 <- se0
+ se1[,1:2] <- se1[,2:1,drop=FALSE]
+ checkIdentical(colData(se0)[2:1,,drop=FALSE],
+ colData(se1)[1:2,,drop=FALSE])
+ checkIdentical(colData(se0)[-(1:2),,drop=FALSE],
+ colData(se1)[-(1:2),,drop=FALSE])
+ checkIdentical(c(metadata(se0), metadata(se0)), metadata(se1))
+ }
+
+ ## full replacement
+ se1 <- se2 <- se0List[[1]]
+ se1[,] <- se2
+ checkIdentical(se1, se2)
+}
+
+test_SummarizedExperiment_assays_4d <- function()
+{
+ ## construction/validation
+ A <- array(0, c(3, 2, 5, 4), list(c("a1", "a2", "a3"),
+ c("b1", "b2"),
+ NULL,
+ c("d1", "d2", "d3", "d4")))
+ B <- array(0, c(3, 2, 6), list(c("a1", "a2", "a3"),
+ c("b1", "oops"),
+ NULL))
+ assays0 <- SimpleList(A=A, B=B)
+ checkException(SummarizedExperiment(assays0))
+
+ dimnames(B)[1:2] <- dimnames(A)[1:2]
+ C <- array(0, c(3, 2, 4), list(NULL,
+ c("b1", "b2"),
+ c("z1", "z2", "z3", "z4")))
+
+ assays0 <- SimpleList(A=A, B=B, C=C)
+ se <- SummarizedExperiment(assays0)
+ checkTrue(validObject(se, complete=TRUE))
+
+ ## dimnames
+ checkIdentical(dimnames(A)[1:2], dimnames(se))
+ checkIdentical(dimnames(B)[1:2], dimnames(se))
+ for (i in seq_along(assays(se))) {
+ checkIdentical(assays0[[i]], assay(se, i, withDimnames=FALSE))
+ checkIdentical(dimnames(se), dimnames(assay(se, i))[1:2])
+ }
+
+ ## [
+ se2 <- se[3:2, ]
+ checkIdentical(A[3:2, , , , drop=FALSE], assay(se2, 1, withDimnames=FALSE))
+ checkIdentical(B[3:2, , , drop=FALSE], assay(se2, 2, withDimnames=FALSE))
+ checkIdentical(C[3:2, , , drop=FALSE], assay(se2, 3, withDimnames=FALSE))
+
+ ## [<-
+ A1 <- A; A1[1, , , ] <- A[1, , , , drop=FALSE] + 1
+ assays(se[1, ])[[1]] <- 1 + assays(se[1, ])[[1]]
+ checkIdentical(assays(se)[[1]], A1)
+
+ ## [, [<- don't support more than 4 dimensions
+ a <- array(0, c(3, 3, 3, 3, 3),
+ list(LETTERS[1:3], letters[1:3], NULL, NULL, NULL))
+ assays <- SimpleList(a=a)
+ se <- SummarizedExperiment(assays)
+ checkException(se[1,], silent=TRUE)
+}
+
diff --git a/inst/unitTests/test_coverage-methods.R b/inst/unitTests/test_coverage-methods.R
new file mode 100644
index 0000000..6300188
--- /dev/null
+++ b/inst/unitTests/test_coverage-methods.R
@@ -0,0 +1,56 @@
+###
+
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+test_interfaces <- function()
+{
+ generic_functions <- "coverage"
+ for (fun in generic_functions) {
+ generic <- getGeneric(fun)
+ method <- getMethod(fun, "RangedSummarizedExperiment")
+ checkIdentical("x", generic at signature)
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+}
+
+test_coverage_RangedSummarizedExperiment <- function()
+{
+ for (i in 1:2) {
+ x <- rseList[[i]]
+
+ target <- coverage(rowRanges(x))
+ current <- coverage(x)
+ checkIdentical(target, current)
+
+ weight <- runif(length(x))
+ ## Issues a warning (in BioC 3.3) when rowRanges(x) is a GRangesList
+ ## object, which reveals a problem with how the "coverage" method for
+ ## GRangesList objects handles the 'weight' argument. The warning is
+ ## expected and healthy, don't try to suppress it here. It will go
+ ## away when we fix the "coverage" method for GRangesList objects
+ ## (defined in the GenomicRanges package).
+ target <- coverage(rowRanges(x), weight=weight)
+ current <- coverage(x, weight=weight)
+ checkIdentical(target, current)
+ }
+}
+
diff --git a/inst/unitTests/test_findOverlaps-methods.R b/inst/unitTests/test_findOverlaps-methods.R
new file mode 100644
index 0000000..edcd3ce
--- /dev/null
+++ b/inst/unitTests/test_findOverlaps-methods.R
@@ -0,0 +1,92 @@
+###
+
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+test_interfaces <- function()
+{
+ fun <- "findOverlaps"
+ signatures <- list(
+ c("RangedSummarizedExperiment", "Vector"),
+ c("Vector", "RangedSummarizedExperiment"),
+ c("RangedSummarizedExperiment", "RangedSummarizedExperiment")
+ )
+ generic <- getGeneric(fun)
+ for (sig in signatures) {
+ method <- getMethod(fun, sig)
+ checkIdentical(c("query", "subject"), generic at signature)
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+}
+
+test_findOverlaps_methods <- function()
+{
+ identical_SummarizedExperiment <- function(x, y) {
+ x at assays <- as(assays(x), "SimpleListAssays")
+ y at assays <- as(assays(y), "SimpleListAssays")
+ identical(x, y)
+ }
+ for (i in 1:2) {
+ x <- rseList[[i]]
+ for (j in 1:2) {
+ y <- rseList[[j]]
+
+ ## findOverlaps
+ target <- findOverlaps(rowRanges(x), rowRanges(y))
+ current <- findOverlaps(x, rowRanges(y))
+ checkIdentical(target, current)
+ current <- findOverlaps(rowRanges(x), y)
+ checkIdentical(target, current)
+ current <- findOverlaps(x, y)
+ checkIdentical(target, current)
+
+ ## countOverlaps
+ target <- countOverlaps(rowRanges(x), rowRanges(y))
+ current <- countOverlaps(x, rowRanges(y))
+ checkIdentical(target, current)
+ current <- countOverlaps(rowRanges(x), y)
+ checkIdentical(target, current)
+ current <- countOverlaps(x, y)
+ checkIdentical(target, current)
+
+ ## overlapsAny
+ target <- overlapsAny(rowRanges(x), rowRanges(y))
+ current <- overlapsAny(x, rowRanges(y))
+ checkIdentical(target, current)
+ current <- overlapsAny(rowRanges(x), y)
+ checkIdentical(target, current)
+ current <- overlapsAny(x, y)
+ checkIdentical(target, current)
+
+ ## subsetByOverlaps
+ target <- subsetByOverlaps(x, rowRanges(y))
+ current <- subsetByOverlaps(x, rowRanges(y))
+ checkTrue(identical_SummarizedExperiment(target, current))
+ current <- subsetByOverlaps(x, y)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ target <- subsetByOverlaps(rowRanges(x), rowRanges(y))
+ current <- subsetByOverlaps(rowRanges(x), y)
+ checkIdentical(target, current)
+ }
+ }
+}
+
diff --git a/inst/unitTests/test_inter-range-methods.R b/inst/unitTests/test_inter-range-methods.R
new file mode 100644
index 0000000..cee69db
--- /dev/null
+++ b/inst/unitTests/test_inter-range-methods.R
@@ -0,0 +1,52 @@
+###
+
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10), Rle(c("+", "-"), 3:2)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+test_interfaces <- function()
+{
+ generic_functions <- c("isDisjoint", "disjointBins")
+ for (fun in generic_functions) {
+ generic <- getGeneric(fun)
+ method <- getMethod(fun, "RangedSummarizedExperiment")
+ checkIdentical("x", generic at signature)
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+}
+
+test_inter_range_methods <- function()
+{
+ #for (i in 1:2) {
+ for (i in 1L) {
+ x <- rseList[[i]]
+
+ ## isDisjoint
+ target <- isDisjoint(rowRanges(x))
+ current <- isDisjoint(x)
+ checkIdentical(target, current)
+
+ ## disjointBins
+ target <- disjointBins(rowRanges(x))
+ current <- disjointBins(x)
+ checkIdentical(target, current)
+ }
+}
+
diff --git a/inst/unitTests/test_intra-range-methods.R b/inst/unitTests/test_intra-range-methods.R
new file mode 100644
index 0000000..ff6087f
--- /dev/null
+++ b/inst/unitTests/test_intra-range-methods.R
@@ -0,0 +1,94 @@
+###
+
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10), Rle(c("+", "-"), 3:2)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+test_interfaces <- function()
+{
+ generic_functions <- c("shift", "narrow", "resize",
+ "flank", "promoters",
+ "restrict", "trim")
+ for (fun in generic_functions) {
+ generic <- getGeneric(fun)
+ method <- getMethod(fun, "RangedSummarizedExperiment")
+ checkIdentical("x", generic at signature)
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+}
+
+test_intra_range_methods <- function()
+{
+ identical_SummarizedExperiment <- function(x, y) {
+ x at assays <- as(assays(x), "SimpleListAssays")
+ y at assays <- as(assays(y), "SimpleListAssays")
+ identical(x, y)
+ }
+ #for (i in 1:2) {
+ for (i in 1L) {
+ ## shift
+ target <- rseList[[i]]
+ rowRanges(target) <- shift(rowRanges(target), 50)
+ current <- shift(rseList[[i]], 50)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ ## narrow
+ target <- rseList[[i]]
+ rowRanges(target) <- narrow(rowRanges(target), 2, -2)
+ current <- narrow(rseList[[i]], 2, -2)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ ## resize
+ target <- rseList[[i]]
+ rowRanges(target) <- resize(rowRanges(target), 8)
+ current <- resize(rseList[[i]], 8)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ ## flank
+ target <- rseList[[i]]
+ rowRanges(target) <- flank(rowRanges(target), 5, both=TRUE)
+ current <- flank(rseList[[i]], 5, both=TRUE)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ ## promoters
+ target <- rseList[[i]]
+ rowRanges(target) <- promoters(rowRanges(target),
+ upstream=20, downstream=5)
+ current <- promoters(rseList[[i]], upstream=20, downstream=5)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ ## restrict
+ target <- rseList[[i]]
+ rowRanges(target) <- restrict(rowRanges(target), start=2, end=3,
+ keep.all.ranges=TRUE)
+ current <- restrict(rseList[[i]], start=2, end=3,
+ keep.all.ranges=TRUE)
+ checkTrue(identical_SummarizedExperiment(target, current))
+
+ ## trim
+ suppressWarnings(seqlengths(rseList[[i]]) <- 8)
+ target <- rseList[[i]]
+ rowRanges(target) <- trim(rowRanges(target))
+ current <- trim(rseList[[i]])
+ checkTrue(identical_SummarizedExperiment(target, current))
+ seqlengths(rseList[[i]]) <- NA
+ }
+}
+
diff --git a/inst/unitTests/test_makeSummarizedExperimentFromDataFrame.R b/inst/unitTests/test_makeSummarizedExperimentFromDataFrame.R
new file mode 100644
index 0000000..a16aca2
--- /dev/null
+++ b/inst/unitTests/test_makeSummarizedExperimentFromDataFrame.R
@@ -0,0 +1,56 @@
+##
+
+rowNames <- paste0("GENE", letters[5:1])
+
+range_info <- list(chr="chr2", start = 11:15, end = 12:16,
+ strand = c("+", "-", "+", "*", "."))
+expr_info <- list(expr0 = 3:7, expr1 = 8:12, expr2 = 12:16)
+
+df <- as.data.frame(c(range_info, expr_info), row.names = rowNames)
+DF <- DataFrame(c(range_info, expr_info), row.names = rowNames)
+
+test_makeSummarizedExperimentFromDataFrame <- function()
+{
+ validObject(makeSummarizedExperimentFromDataFrame(df))
+ validObject(makeSummarizedExperimentFromDataFrame(DF))
+
+ rangesA <- GRanges(as.data.frame(range_info, row.names = rowNames))
+ rangesB <- rowRanges(makeSummarizedExperimentFromDataFrame(df))
+ # Check rowRanges to be identical
+ checkIdentical(rangesA, rangesB)
+ # Check assay matrix and expr_info matrix are identical
+ checkIdentical(assay(makeSummarizedExperimentFromDataFrame(df)),
+ as.matrix(as.data.frame(expr_info, row.names = rowNames)))
+ checkIdentical(assay(makeSummarizedExperimentFromDataFrame(DF)),
+ as.matrix(as.data.frame(expr_info, row.names = rowNames)))
+
+ checkEquals(makeSummarizedExperimentFromDataFrame(df),
+ makeSummarizedExperimentFromDataFrame(DF))
+
+ checkException(
+ makeSummarizedExperimentFromDataFrame(
+ cbind(df, expr3 = letters[seq_len(nrow(df))])))
+
+ checkException(
+ makeSummarizedExperimentFromDataFrame(
+ cbind(DF, DataFrame(expr3 = letters[seq_len(nrow(df))]))))
+
+ checkIdentical(nrow(df),
+ length(rowRanges(
+ makeSummarizedExperimentFromDataFrame(df))))
+
+ checkIdentical(nrow(DF),
+ length(rowRanges(
+ makeSummarizedExperimentFromDataFrame(DF))))
+
+ checkIdentical(colnames(makeSummarizedExperimentFromDataFrame(df)),
+ names(expr_info))
+ checkIdentical(rownames(makeSummarizedExperimentFromDataFrame(df)),
+ rowNames)
+
+ checkIdentical(colnames(makeSummarizedExperimentFromDataFrame(DF)),
+ names(expr_info))
+ checkIdentical(rownames(makeSummarizedExperimentFromDataFrame(DF)),
+ rowNames)
+}
+
diff --git a/inst/unitTests/test_makeSummarizedExperimentFromExpressionSet.R b/inst/unitTests/test_makeSummarizedExperimentFromExpressionSet.R
new file mode 100644
index 0000000..711b4d7
--- /dev/null
+++ b/inst/unitTests/test_makeSummarizedExperimentFromExpressionSet.R
@@ -0,0 +1,187 @@
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+test_SummarizedExperiment_GenomicRanges_coercion <- function()
+{
+ eset1 <- ExpressionSet()
+
+ checkTrue(validObject(eset1))
+
+ se1 <- as(eset1, "RangedSummarizedExperiment")
+
+ checkTrue(validObject(se1))
+
+ data("sample.ExpressionSet", package = "Biobase")
+
+ eset2 <- sample.ExpressionSet
+ checkTrue(validObject(eset2))
+
+ se2 <- as(eset2, "RangedSummarizedExperiment")
+
+ checkTrue(validObject(se2))
+
+ checkIdentical(experimentData(eset2),
+ metadata(se2)$experimentData)
+
+ checkIdentical(annotation(eset2),
+ metadata(se2)$annotation)
+
+ checkIdentical(protocolData(eset2),
+ metadata(se2)$protocolData)
+
+ eset2Assays <- SimpleList(as.list(assayData(eset2)))
+ se2Assays <- assays(se2)
+ checkIdentical(eset2Assays$exprs, se2Assays$exprs)
+ checkIdentical(eset2Assays$se.exprs, se2Assays$se.exprs)
+
+ checkIdentical(featureNames(eset2), rownames(se2))
+
+ checkIdentical(sampleNames(eset2), colnames(se2))
+}
+
+test_GenomicRanges_SummarizedExperiment_coercion <- function()
+{
+ ## empty SE
+ simpleSE <- SummarizedExperiment()
+
+ eset1 <- as(simpleSE, "ExpressionSet")
+
+ checkTrue(validObject(eset1))
+
+ ## Back and forth empty ES
+ simpleES <- ExpressionSet()
+
+ simpleES2 <- as(as(simpleES, "RangedSummarizedExperiment"),
+ "ExpressionSet")
+
+ checkTrue(validObject(simpleES2))
+
+ checkEquals(as.list(assayData(simpleES)),
+ as.list(assayData(simpleES2)))
+
+ ## Simple SE
+ simpleSE <- rseList[[1]]
+ assayNames(simpleSE) <- "exprs" # No warning 'No assay named exprs..."
+ eset2 <- as(simpleSE, "ExpressionSet")
+ checkTrue(validObject(eset2))
+
+ ## The ExpressionSet features should have the data from the
+ ## SummarizedExperiment rows if they are from GRanges.
+ checkIdentical(pData(featureData(eset2)),
+ as.data.frame(rowRanges(rseList[[1]])))
+
+ # the rowRanges are retained if the object has them to begin with.
+ se2_2 <- as(eset2, "RangedSummarizedExperiment")
+ rr_se2_2 <- unname(rowRanges(se2_2))
+ rr_eset2 <- rowRanges(rseList[[1]])
+ checkEquals(rr_se2_2, rr_eset2)
+
+ simpleSE <- rseList[[2]]
+ assayNames(simpleSE) <- "exprs" # No warning 'No assay named exprs..."
+ eset3 <- as(simpleSE, "ExpressionSet")
+ checkTrue(validObject(eset3))
+
+ ## The ExpressionSet features should not have the data from the
+ ## SummarizedExperiment rows if they are from GRangesList, but they
+ ## should be empty and the same length as the number of ranges.
+ checkEquals(unname(NROW(featureData(eset3))),
+ unname(length(rowRanges(rseList[[2]]))))
+
+ data("sample.ExpressionSet", package = "Biobase")
+ eset4 <- sample.ExpressionSet
+
+ eset5 <- as(as(eset4, "RangedSummarizedExperiment"), "ExpressionSet")
+
+ checkTrue(validObject(eset5))
+
+ ## this is necessary because the order in environments is undefined.
+ compareLists <- function(x, y) {
+ nmsX <- names(x)
+ nmsY <- names(y)
+
+ reorderY <- match(nmsY, nmsX)
+
+ checkIdentical(x, y[reorderY])
+ }
+
+ compareLists(as.list(assayData(eset4)),
+ as.list(assayData(eset5)))
+
+ checkIdentical(experimentData(eset4),
+ experimentData(eset5))
+
+ checkIdentical(annotation(eset4),
+ annotation(eset5))
+
+ checkIdentical(protocolData(eset4),
+ protocolData(eset5))
+
+ checkIdentical(featureNames(eset4),
+ featureNames(eset5))
+
+ checkIdentical(sampleNames(eset4),
+ sampleNames(eset5))
+}
+
+test_GenomicRanges_SummarizedExperiment_coercion_mappingFunctions <- function()
+{
+ ## naiveRangeMapper
+ ## valid object from empty object
+ checkTrue(validObject(makeSummarizedExperimentFromExpressionSet(ExpressionSet())))
+
+ ## valid object from sample ExpressionSet
+ data("sample.ExpressionSet", package = "Biobase")
+ eset1 <- sample.ExpressionSet
+ checkTrue(validObject(makeSummarizedExperimentFromExpressionSet(eset1)))
+
+ ## makeSummarizedExperimentFromExpressionSet should be the same as `as`
+ ## with default args
+ checkEquals(makeSummarizedExperimentFromExpressionSet(eset1),
+ as(eset1, "RangedSummarizedExperiment"))
+
+ ## probeRangeMapper
+ ## valid object from empty object
+ checkTrue(validObject(
+ makeSummarizedExperimentFromExpressionSet(ExpressionSet(),
+ probeRangeMapper)))
+
+ ## valid object from sample ExpressionSet
+ se1 <- makeSummarizedExperimentFromExpressionSet(eset1, probeRangeMapper)
+ checkTrue(validObject(se1))
+
+ ## Granges returned have rownames that were from the featureNames
+ checkTrue(all(rownames(rowRanges(se1)) %in% featureNames(eset1)))
+
+ ## geneRangeMapper
+ ## valid object from empty object
+ checkTrue(validObject(
+ makeSummarizedExperimentFromExpressionSet(ExpressionSet(),
+ geneRangeMapper(NULL))))
+
+ ## valid object from sample ExpressionSet
+ se2 <- makeSummarizedExperimentFromExpressionSet(eset1,
+ geneRangeMapper("TxDb.Hsapiens.UCSC.hg19.knownGene"))
+ checkTrue(validObject(se2))
+
+ ## Granges returned have rownames that were from the featureNames
+ checkTrue(all(rownames(rowRanges(se2)) %in% featureNames(eset1)))
+}
+
diff --git a/inst/unitTests/test_nearest-methods.R b/inst/unitTests/test_nearest-methods.R
new file mode 100644
index 0000000..38aa74e
--- /dev/null
+++ b/inst/unitTests/test_nearest-methods.R
@@ -0,0 +1,70 @@
+###
+
+M1 <- matrix(1, 5, 3, dimnames=list(NULL, NULL))
+M2 <- matrix(1, 3, 3, dimnames=list(NULL, NULL))
+assaysList <- list(gr=SimpleList(m=M1), grl=SimpleList(m=M2))
+rowRangesList <-
+ list(gr=GRanges("chr1", IRanges(1:5, 10)),
+ grl=split(GRanges("chr1", IRanges(1:5, 10)), c(1,1,2,2,3)))
+names(rowRangesList[["grl"]]) <- NULL
+colData <- DataFrame(x=letters[1:3])
+
+## a list of one SE with GRanges and one with GRangesList
+rseList <-
+ list(SummarizedExperiment(
+ assays=assaysList[["gr"]],
+ rowRanges=rowRangesList[["gr"]],
+ colData=colData),
+ SummarizedExperiment(
+ assays=assaysList[["grl"]],
+ rowRanges=rowRangesList[["grl"]],
+ colData=colData))
+
+
+.GENERIC_SIGNATURES <- list(
+ precede=c("x", "subject"),
+ follow=c("x", "subject"),
+ nearest=c("x", "subject"),
+ distance=c("x", "y"),
+ distanceToNearest=c("x", "subject")
+)
+
+test_interfaces <- function()
+{
+ method_signatures <- list(
+ c("RangedSummarizedExperiment", "ANY"),
+ c("ANY", "RangedSummarizedExperiment"),
+ c("RangedSummarizedExperiment", "RangedSummarizedExperiment")
+ )
+ for (fun in names(.GENERIC_SIGNATURES)) {
+ generic <- getGeneric(fun)
+ checkIdentical(.GENERIC_SIGNATURES[[fun]], generic at signature)
+ for (sig in method_signatures) {
+ method <- getMethod(fun, sig)
+ checkIdentical(formals(generic at .Data), formals(method at .Data))
+ }
+ }
+}
+
+test_nearest_methods <- function()
+{
+ #for (i in 1:2) {
+ for (i in 1L) {
+ x <- rseList[[i]]
+ #for (j in 1:2) {
+ for (j in 1L) {
+ y <- rseList[[j]]
+ for (fun in names(.GENERIC_SIGNATURES)) {
+ fun <- get(fun)
+ target <- fun(rowRanges(x), rowRanges(y))
+ current <- fun(x, rowRanges(y))
+ checkIdentical(target, current)
+ current <- fun(rowRanges(x), y)
+ checkIdentical(target, current)
+ current <- fun(x, y)
+ checkIdentical(target, current)
+ }
+ }
+ }
+}
+
diff --git a/man/Assays-class.Rd b/man/Assays-class.Rd
new file mode 100644
index 0000000..063c706
--- /dev/null
+++ b/man/Assays-class.Rd
@@ -0,0 +1,172 @@
+\name{Assays-class}
+\docType{class}
+
+\alias{class:Assays}
+\alias{Assays-class}
+\alias{Assays}
+\alias{length,Assays-method}
+\alias{names,Assays-method}
+\alias{names<-,Assays-method}
+\alias{[[,Assays,ANY,ANY-method}
+\alias{[[<-,Assays,ANY,ANY-method}
+\alias{dim,Assays-method}
+\alias{[,Assays,ANY-method}
+\alias{[,Assays,ANY,ANY,ANY-method}
+\alias{[<-,Assays,ANY,ANY,ANY-method}
+\alias{rbind,Assays-method}
+\alias{cbind,Assays-method}
+\alias{arbind,Matrix-method}
+\alias{acbind,Matrix-method}
+
+\alias{class:SimpleListAssays}
+\alias{SimpleListAssays-class}
+\alias{SimpleListAssays}
+
+\alias{class:ShallowData}
+\alias{ShallowData-class}
+\alias{ShallowData}
+
+\alias{class:ShallowSimpleListAssays}
+\alias{ShallowSimpleListAssays-class}
+\alias{ShallowSimpleListAssays}
+\alias{coerce,SimpleList,ShallowSimpleListAssays-method}
+\alias{coerce,ShallowSimpleListAssays,SimpleList-method}
+
+\alias{class:AssaysInEnv}
+\alias{AssaysInEnv-class}
+\alias{AssaysInEnv}
+\alias{length,AssaysInEnv-method}
+\alias{names,AssaysInEnv-method}
+\alias{names<-,AssaysInEnv-method}
+\alias{[[,AssaysInEnv,ANY,ANY-method}
+\alias{[[<-,AssaysInEnv,ANY,ANY-method}
+\alias{coerce,SimpleList,AssaysInEnv-method}
+\alias{coerce,AssaysInEnv,SimpleList-method}
+
+\title{Assays objects}
+
+\description{
+ The Assays virtual class and its methods provide a formal abstraction
+ of the assays slot of \link{SummarizedExperiment} objects.
+
+ SimpleListAssays and ShallowSimpleListAssays are concrete subclasses of
+ Assays with the latter being currently the default implementation of Assays
+ objects. Other implementations (e.g. disk-based) could easily be added.
+
+ Note that these classes are not meant to be used directly by the end-user
+ and the material in this man page is aimed at package developers.
+}
+
+\details{
+ Assays objects have a list-like semantics with elements having matrix- or
+ array-like semantics (e.g., \code{dim}, \code{dimnames}).
+
+ The Assays API consists of:
+ \itemize{
+ \item (a) The \code{Assays()} constructor function.
+ \item (b) Lossless back and forth coercion from/to \link{SimpleList}.
+ The coercion method from \link{SimpleList} doesn't need (and
+ should not) validate the returned object.
+ \item (c) \code{length}, \code{names}, \code{`names<-`},
+ \code{[[}, \code{`[[<-`},
+ \code{dim}, \code{[}, \code{`[<-`}, \code{rbind}, \code{cbind}.
+ }
+ An Assays concrete subclass needs to implement (b) (required) plus,
+ optionally any of the methods in (c).
+
+ IMPORTANT: Methods that return a modified Assays object (a.k.a.
+ endomorphisms), that is, \code{[} as well as replacement methods
+ \code{names<-}, \code{[[<-}, and \code{[<-}, must respect the
+ \emph{copy-on-change contract}.
+ With objects that don't make use of references internally, the developer
+ doesn't need to take any special action for that because it's automatically
+ taken care of by R itself. However, for objects that do make use of
+ references internally (e.g. environments, external pointers, pointer to a
+ file on disk, etc...), the developer needs to be careful to implement
+ endomorphisms with copy-on-change semantics.
+ This can easily be achieved (and is what the default methods for Assays
+ objects do) by performaing a full (deep) copy of the object before modifying
+ it instead of trying to modify it in-place. Note that the full (deep) copy
+ is not always necessary in order to achieve copy-on-change semantics: it's
+ enough (and often preferrable for performance reasons) to copy only the
+ parts of the objects that need to be modified.
+
+ Assays has currently 3 implementations which are formalized by concrete
+ subclasses SimpleListAssays, ShallowSimpleListAssays, and AssaysInEnv.
+ ShallowSimpleListAssays is the default. AssaysInEnv is a \emph{broken}
+ alternative to ShallowSimpleListAssays that does NOT respect the
+ \emph{copy-on-change contract}. It is only provided for illustration
+ purposes (see source file Assays-class.R for the details).
+
+ A little more detail about ShallowSimpleListAssays: a small reference
+ class hierarchy (not exported from the \pkg{GenomicRanges} name space)
+ defines a reference class ShallowData with a single field \code{data}
+ of type \code{ANY}, and a derived class ShallowSimpleListAssays
+ that specializes the type of \code{data} as \link{SimpleList}, and
+ \code{contains=c("ShallowData", "Assays")}. The assays slot of a
+ \link{SummarizedExperiment} object contains an instance of
+ ShallowSimpleListAssays.
+}
+
+\author{Martin Morgan, \url{mtmorgan at fhcrc.org}}
+
+\seealso{
+ \itemize{
+ \item \link{SummarizedExperiment} objects.
+
+ \item \link[S4Vectors]{SimpleList} objects in the \pkg{S4Vectors} package.
+ }
+}
+
+\examples{
+## ---------------------------------------------------------------------
+## DIRECT MANIPULATION OF Assays OBJECTS
+## ---------------------------------------------------------------------
+m1 <- matrix(runif(24), ncol=3)
+m2 <- matrix(runif(24), ncol=3)
+a <- Assays(SimpleList(m1, m2))
+a
+
+as(a, "SimpleList")
+
+length(a)
+a[[2]]
+dim(a)
+
+b <- a[-4, 2]
+b
+length(b)
+b[[2]]
+dim(b)
+
+names(a)
+names(a) <- c("a1", "a2")
+names(a)
+a[["a2"]]
+
+rbind(a, a)
+cbind(a, a)
+
+## ---------------------------------------------------------------------
+## COPY-ON-CHANGE CONTRACT
+## ---------------------------------------------------------------------
+
+## ShallowSimpleListAssays objects have copy-on-change semantics but not
+## AssaysInEnv objects. For example:
+ssla <- as(SimpleList(m1, m2), "ShallowSimpleListAssays")
+aie <- as(SimpleList(m1, m2), "AssaysInEnv")
+
+## No names on 'ssla' and 'aie':
+names(ssla)
+names(aie)
+
+ssla2 <- ssla
+aie2 <- aie
+names(ssla2) <- names(aie2) <- c("A1", "A2")
+
+names(ssla) # still NULL (as expected)
+
+names(aie) # changed! (because the names<-,AssaysInEnv method is not
+ # implemented in a way that respects the copy-on-change
+ # contract)
+}
diff --git a/man/RangedSummarizedExperiment-class.Rd b/man/RangedSummarizedExperiment-class.Rd
new file mode 100644
index 0000000..061fd68
--- /dev/null
+++ b/man/RangedSummarizedExperiment-class.Rd
@@ -0,0 +1,335 @@
+\name{RangedSummarizedExperiment-class}
+\docType{class}
+
+% Class
+\alias{class:RangedSummarizedExperiment}
+\alias{RangedSummarizedExperiment-class}
+\alias{RangedSummarizedExperiment}
+
+% Constructor
+\alias{SummarizedExperiment}
+\alias{SummarizedExperiment,SimpleList-method}
+\alias{SummarizedExperiment,ANY-method}
+\alias{SummarizedExperiment,list-method}
+\alias{SummarizedExperiment,missing-method}
+
+% Coercion
+\alias{coerce,RangedSummarizedExperiment,SummarizedExperiment-method}
+\alias{coerce,SummarizedExperiment,RangedSummarizedExperiment-method}
+
+% Accessors
+\alias{rowRanges}
+\alias{rowRanges,RangedSummarizedExperiment-method}
+\alias{rowRanges<-}
+\alias{rowRanges<-,SummarizedExperiment,GenomicRanges-method}
+\alias{rowRanges<-,SummarizedExperiment,GRangesList-method}
+\alias{names,RangedSummarizedExperiment-method}
+\alias{names<-,RangedSummarizedExperiment-method}
+\alias{dimnames,RangedSummarizedExperiment-method}
+\alias{dimnames<-,RangedSummarizedExperiment,list-method}
+
+% GenomicRanges compatibility methods
+\alias{Compare,ANY,RangedSummarizedExperiment-method}
+\alias{Compare,RangedSummarizedExperiment,ANY-method}
+\alias{Compare,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+\alias{pcompare,ANY,RangedSummarizedExperiment-method}
+\alias{pcompare,RangedSummarizedExperiment,ANY-method}
+\alias{pcompare,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+\alias{duplicated,RangedSummarizedExperiment-method}
+\alias{elementMetadata,RangedSummarizedExperiment-method}
+\alias{elementMetadata<-,RangedSummarizedExperiment-method}
+\alias{end,RangedSummarizedExperiment-method}
+\alias{end<-,RangedSummarizedExperiment-method}
+\alias{granges,RangedSummarizedExperiment-method}
+\alias{is.unsorted,RangedSummarizedExperiment-method}
+\alias{mcols,RangedSummarizedExperiment-method}
+\alias{mcols<-,RangedSummarizedExperiment-method}
+\alias{order,RangedSummarizedExperiment-method}
+\alias{ranges,RangedSummarizedExperiment-method}
+\alias{ranges<-,RangedSummarizedExperiment-method}
+\alias{rank,RangedSummarizedExperiment-method}
+\alias{seqinfo,RangedSummarizedExperiment-method}
+\alias{seqinfo<-,RangedSummarizedExperiment-method}
+\alias{seqnames,RangedSummarizedExperiment-method}
+\alias{sort,RangedSummarizedExperiment-method}
+\alias{split,RangedSummarizedExperiment-method}
+\alias{split,RangedSummarizedExperiment,ANY-method}
+\alias{start,RangedSummarizedExperiment-method}
+\alias{start<-,RangedSummarizedExperiment-method}
+\alias{strand,RangedSummarizedExperiment-method}
+\alias{strand<-,RangedSummarizedExperiment,ANY-method}
+\alias{subset,RangedSummarizedExperiment-method}
+\alias{width,RangedSummarizedExperiment-method}
+\alias{width<-,RangedSummarizedExperiment-method}
+
+\alias{updateObject,SummarizedExperiment-method}
+
+\title{RangedSummarizedExperiment objects}
+
+\description{
+
+ The RangedSummarizedExperiment class is a matrix-like container where rows
+ represent ranges of interest (as a \link{GRanges} or \link{GRangesList}
+ object) and columns represent samples (with sample data summarized as a
+ \link{DataFrame}). A RangedSummarizedExperiment contains one or more
+ assays, each represented by a matrix-like object of numeric or other mode.
+
+ RangedSummarizedExperiment is a subclass of \link{SummarizedExperiment} and,
+ as such, all the methods documented in \code{?\link{SummarizedExperiment}}
+ also work on a RangedSummarizedExperiment object. The methods documented
+ below are additional methods that are specific to RangedSummarizedExperiment
+ objects.
+}
+
+\usage{
+
+## Constructor
+
+SummarizedExperiment(assays, ...)
+\S4method{SummarizedExperiment}{SimpleList}(assays, rowData=NULL, rowRanges=GRangesList(),
+ colData=DataFrame(), metadata=list())
+\S4method{SummarizedExperiment}{ANY}(assays, ...)
+\S4method{SummarizedExperiment}{list}(assays, ...)
+\S4method{SummarizedExperiment}{missing}(assays, ...)
+
+## Accessors
+
+rowRanges(x, ...)
+rowRanges(x, ...) <- value
+
+## Subsetting
+
+\S4method{subset}{RangedSummarizedExperiment}(x, subset, select, ...)
+
+## rowRanges access
+## see 'GRanges compatibility', below
+}
+
+\arguments{
+
+ \item{assays}{A \code{list} or \code{SimpleList} of matrix-like elements,
+ or a matrix-like object. All elements of the list must have the same
+ dimensions, and dimension names (if present) must be consistent
+ across elements and with the row names of \code{rowRanges} and
+ \code{colData}.}
+
+ \item{rowData}{A \link[S4Vectors]{DataFrame} object describing
+ the rows. Row names, if present, become the row names of the
+ SummarizedExperiment object. The number of rows of the
+ \link[S4Vectors]{DataFrame} must equal the number of rows of the
+ matrices in \code{assays}.}
+
+ \item{rowRanges}{A \link[GenomicRanges]{GRanges} or
+ \link[GenomicRanges]{GRangesList} object describing the ranges of
+ interest. Names, if present, become the row names of the
+ SummarizedExperiment object. The length of the
+ \link[GenomicRanges]{GRanges} or \link[GenomicRanges]{GRangesList}
+ must equal the number of rows of the matrices in \code{assays}.
+ If \code{rowRanges} is missing, a \link{SummarizedExperiment}
+ instance is returned.}
+
+ \item{colData}{An optional \link{DataFrame} describing the
+ samples. Row names, if present, become the column names of the
+ RangedSummarizedExperiment.}
+
+ \item{metadata}{An optional \code{list} of arbitrary content
+ describing the overall experiment.}
+
+ \item{...}{For \code{SummarizedExperiment}, S4 methods \code{list}
+ and \code{matrix}, arguments identical to those of the
+ \code{SimpleList} method.
+
+ For \code{rowRanges}, ignored.
+
+ }
+
+ \item{x}{A RangedSummarizedExperiment object. The \code{rowRanges} setter
+ will also accept a \link{SummarizedExperiment} object and will first
+ coerce it to RangedSummarizedExperiment before it sets \code{value} on
+ it.}
+
+ \item{value}{A \link[GenomicRanges]{GRanges} or
+ \link[GenomicRanges]{GRangesList} object.}
+
+ \item{subset}{An expression which, when evaluated in the
+ context of \code{rowRanges(x)}, is a logical vector indicating
+ elements or rows to keep: missing values are taken as false.}
+
+ \item{select}{An expression which, when evaluated in the
+ context of \code{colData(x)}, is a logical vector indicating
+ elements or rows to keep: missing values are taken as false.}
+
+}
+
+\details{
+
+ The rows of a RangedSummarizedExperiment object represent ranges
+ (in genomic coordinates) of interest. The ranges of interest are
+ described by a \link{GRanges} or a \link{GRangesList} object, accessible
+ using the \code{rowRanges} function, described below. The \link{GRanges}
+ and \link{GRangesList} classes contains sequence (e.g., chromosome) name,
+ genomic coordinates, and strand information. Each range can be
+ annotated with additional data; this data might be used to describe
+ the range or to summarize results (e.g., statistics of differential
+ abundance) relevant to the range. Rows may or may not have row names;
+ they often will not.
+
+}
+
+\section{Constructor}{
+
+ RangedSummarizedExperiment instances are constructed using the
+ \code{SummarizedExperiment} function with arguments outlined above.
+
+}
+
+\section{Accessors}{
+
+ In the following code snippets, \code{x} is a RangedSummarizedExperiment
+ object.
+
+ \describe{
+
+ \item{\code{rowRanges(x)}, \code{rowRanges(x) <- value}:}{Get or set the
+ row data. \code{value} is a \code{GenomicRanges} object. Row
+ names of \code{value} must be NULL or consistent with the existing
+ row names of \code{x}.}
+
+ }
+}
+
+\section{GRanges compatibility (rowRanges access)}{
+
+ Many \link{GRanges} and \link{GRangesList} operations are supported on
+ RangedSummarizedExperiment objects, using \code{rowRanges}.
+
+ Supported operations include: \code{\link{pcompare}},
+ \code{\link{duplicated}}, \code{\link{end}}, \code{\link{end<-}},
+ \code{\link{granges}}, \code{\link{is.unsorted}}, \code{\link{match}},
+ \code{\link{mcols}}, \code{\link{mcols<-}}, \code{\link{order}},
+ \code{\link{ranges}}, \code{\link{ranges<-}}, \code{\link{rank}},
+ \code{\link{seqinfo}}, \code{\link{seqinfo<-}}, \code{\link{seqnames}},
+ \code{\link{sort}}, \code{\link{start}}, \code{\link{start<-}},
+ \code{\link{strand}}, \code{\link{strand<-}},
+ \code{\link{width}}, \code{\link{width<-}}.
+
+ See also \code{?\link[SummarizedExperiment]{shift}},
+ \code{?\link[SummarizedExperiment]{isDisjoint}},
+ \code{?\link[SummarizedExperiment]{coverage}},
+ \code{?\link[SummarizedExperiment]{findOverlaps}}, and
+ \code{?\link[SummarizedExperiment]{nearest}} for more
+ \emph{GRanges compatibility methods}.
+
+ Not all \link{GRanges} operations are supported, because
+ they do not make sense for RangedSummarizedExperiment objects
+ (e.g., length, name, as.data.frame, c, splitAsList), involve
+ non-trivial combination or splitting of rows (e.g., disjoin, gaps,
+ reduce, unique), or have not yet been implemented (Ops, map, window,
+ window<-).
+
+}
+
+\section{Subsetting}{
+
+ In the code snippets below, \code{x} is a RangedSummarizedExperiment
+ object.
+
+ \describe{
+
+ \item{\code{subset(x, subset, select)}:}{Create a subset of \code{x}
+ using an expression \code{subset} referring to columns of
+ \code{rowRanges(x)} (including \sQuote{seqnames}, \sQuote{start},
+ \sQuote{end}, \sQuote{width}, \sQuote{strand}, and
+ \code{names(rowData(x))}) and / or \code{select} referring to
+ column names of \code{colData(x)}.}
+
+ }
+
+}
+
+\section{Extension}{
+
+ RangedSummarizedExperiment is implemented as an S4 class, and can be
+ extended in the usual way, using \code{contains="RangedSummarizedExperiment"}
+ in the new class definition.
+
+}
+
+\author{Martin Morgan, \url{mtmorgan at fhcrc.org}}
+
+\seealso{
+ \itemize{
+ \item \link{SummarizedExperiment} objects.
+
+ \item \link[SummarizedExperiment]{shift},
+ \link[SummarizedExperiment]{isDisjoint},
+ \link[SummarizedExperiment]{coverage},
+ \link[SummarizedExperiment]{findOverlaps}, and
+ \link[SummarizedExperiment]{nearest} for more
+ \emph{GRanges compatibility methods}.
+
+ \item \link[GenomicRanges]{GRanges} objects in the \pkg{GenomicRanges}
+ package.
+ }
+}
+
+\examples{
+nrows <- 200; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)),
+ IRanges(floor(runif(200, 1e5, 1e6)), width=100),
+ strand=sample(c("+", "-"), 200, TRUE),
+ feature_id=sprintf("ID\%03d", 1:200))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+rse <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+rse
+dim(rse)
+dimnames(rse)
+assayNames(rse)
+head(assay(rse))
+assays(rse) <- endoapply(assays(rse), asinh)
+head(assay(rse))
+
+rowRanges(rse)
+rowData(rse) # same as 'mcols(rowRanges(rse))'
+colData(rse)
+
+rse[, rse$Treatment == "ChIP"]
+
+## cbind() combines objects with the same ranges but different samples:
+rse1 <- rse
+rse2 <- rse1[,1:3]
+colnames(rse2) <- letters[1:ncol(rse2)]
+cmb1 <- cbind(rse1, rse2)
+dim(cmb1)
+dimnames(cmb1)
+
+## rbind() combines objects with the same samples but different ranges:
+rse1 <- rse
+rse2 <- rse1[1:50,]
+rownames(rse2) <- letters[1:nrow(rse2)]
+cmb2 <- rbind(rse1, rse2)
+dim(cmb2)
+dimnames(cmb2)
+
+## Coercion to/from SummarizedExperiment:
+se0 <- as(rse, "SummarizedExperiment")
+se0
+
+as(se0, "RangedSummarizedExperiment")
+
+## Setting rowRanges on a SummarizedExperiment object turns it into a
+## RangedSummarizedExperiment object:
+se <- se0
+rowRanges(se) <- rowRanges
+se # RangedSummarizedExperiment
+
+## Sanity checks:
+stopifnot(identical(assays(se0), assays(rse)))
+stopifnot(identical(dim(se0), dim(rse)))
+stopifnot(identical(dimnames(se0), dimnames(rse)))
+stopifnot(identical(rowData(se0), rowData(rse)))
+stopifnot(identical(colData(se0), colData(rse)))
+}
diff --git a/man/SummarizedExperiment-class.Rd b/man/SummarizedExperiment-class.Rd
new file mode 100644
index 0000000..0d49063
--- /dev/null
+++ b/man/SummarizedExperiment-class.Rd
@@ -0,0 +1,454 @@
+\name{SummarizedExperiment-class}
+\docType{class}
+
+% Class
+\alias{class:SummarizedExperiment}
+\alias{SummarizedExperiment-class}
+
+% Accessors
+\alias{length,SummarizedExperiment-method}
+\alias{names,SummarizedExperiment-method}
+\alias{names<-,SummarizedExperiment-method}
+\alias{rowData}
+\alias{rowData,SummarizedExperiment-method}
+\alias{rowData<-}
+\alias{rowData<-,SummarizedExperiment-method}
+\alias{colData}
+\alias{colData,SummarizedExperiment-method}
+\alias{colData<-}
+\alias{colData<-,SummarizedExperiment,DataFrame-method}
+\alias{assays}
+\alias{assays,SummarizedExperiment-method}
+\alias{assays<-}
+\alias{assays<-,SummarizedExperiment,SimpleList-method}
+\alias{assays<-,SummarizedExperiment,list-method}
+\alias{assay}
+\alias{assay,SummarizedExperiment,missing-method}
+\alias{assay,SummarizedExperiment,numeric-method}
+\alias{assay,SummarizedExperiment,character-method}
+\alias{assay<-}
+\alias{assay<-,SummarizedExperiment,missing-method}
+\alias{assay<-,SummarizedExperiment,numeric-method}
+\alias{assay<-,SummarizedExperiment,character-method}
+\alias{assayNames}
+\alias{assayNames,SummarizedExperiment-method}
+\alias{assayNames<-}
+\alias{assayNames<-,SummarizedExperiment,character-method}
+\alias{dim,SummarizedExperiment-method}
+\alias{dimnames,SummarizedExperiment-method}
+\alias{dimnames<-,SummarizedExperiment,list-method}
+\alias{dimnames<-,SummarizedExperiment,NULL-method}
+
+% Subsetting
+\alias{[,SummarizedExperiment-method}
+\alias{[,SummarizedExperiment,ANY-method}
+\alias{[,SummarizedExperiment,ANY,ANY,ANY-method}
+\alias{[<-,SummarizedExperiment,ANY,ANY,SummarizedExperiment-method}
+\alias{extractROWS,SummarizedExperiment,ANY-method}
+\alias{replaceROWS,SummarizedExperiment-method}
+
+% Quick colData access
+\alias{[[,SummarizedExperiment,ANY,missing-method}
+\alias{[[<-,SummarizedExperiment,ANY,missing-method}
+\alias{$,SummarizedExperiment-method}
+\alias{$<-,SummarizedExperiment-method}
+
+% Display
+\alias{show,SummarizedExperiment-method}
+
+% Combine
+\alias{rbind,SummarizedExperiment-method}
+\alias{cbind,SummarizedExperiment-method}
+
+% On-disk realization
+\alias{realize,SummarizedExperiment-method}
+
+\title{SummarizedExperiment objects}
+
+\description{
+
+ The SummarizedExperiment class is a matrix-like container where rows
+ represent features of interest (e.g. genes, transcripts, exons, etc...)
+ and columns represent samples (with sample data summarized as a
+ \link{DataFrame}). A SummarizedExperiment object contains one or more
+ assays, each represented by a matrix-like object of numeric or other mode.
+
+ Note that SummarizedExperiment is the parent of the
+ \link{RangedSummarizedExperiment} class which means that all the methods
+ documented below also work on a \link{RangedSummarizedExperiment} object.
+}
+
+\usage{
+
+## Constructor
+
+# See ?RangedSummarizedExperiment for the constructor function.
+
+## Accessors
+
+assayNames(x, ...)
+assayNames(x, ...) <- value
+assays(x, ..., withDimnames=TRUE)
+assays(x, ..., withDimnames=TRUE) <- value
+assay(x, i, ...)
+assay(x, i, ...) <- value
+rowData(x, ...)
+rowData(x, ...) <- value
+colData(x, ...)
+colData(x, ...) <- value
+#dim(x)
+#dimnames(x)
+#dimnames(x) <- value
+
+## Quick colData access
+
+\S4method{$}{SummarizedExperiment}(x, name)
+\S4method{$}{SummarizedExperiment}(x, name) <- value
+\S4method{[[}{SummarizedExperiment,ANY,missing}(x, i, j, ...)
+\S4method{[[}{SummarizedExperiment,ANY,missing}(x, i, j, ...) <- value
+
+## Subsetting
+
+\S4method{[}{SummarizedExperiment}(x, i, j, ..., drop=TRUE)
+\S4method{[}{SummarizedExperiment,ANY,ANY,SummarizedExperiment}(x, i, j) <- value
+
+## Combining
+
+\S4method{cbind}{SummarizedExperiment}(..., deparse.level=1)
+\S4method{rbind}{SummarizedExperiment}(..., deparse.level=1)
+
+## On-disk realization
+\S4method{realize}{SummarizedExperiment}(x)
+}
+
+\arguments{
+
+ \item{x}{A SummarizedExperiment object.}
+
+ \item{...}{
+ For \code{assay}, \code{...} may contain \code{withDimnames}, which is
+ forwarded to \code{assays}.
+
+ For \code{rowData}, arguments passed thru \code{...} are forwarded to
+ \code{\link[S4Vectors]{mcols}}.
+
+ For \code{cbind}, \code{rbind}, \code{...} contains SummarizedExperiment
+ objects to be combined.
+
+ For other accessors, ignored.
+ }
+
+ \item{i, j}{
+ For \code{assay}, \code{assay<-}, \code{i} is an integer or
+ numeric scalar; see \sQuote{Details} for additional constraints.
+
+ For \code{[,SummarizedExperiment},
+ \code{[,SummarizedExperiment<-}, \code{i}, \code{j} are subscripts
+ that can act to subset the rows and columns of \code{x}, that is the
+ \code{matrix} elements of \code{assays}.
+
+ For \code{[[,SummarizedExperiment},
+ \code{[[<-,SummarizedExperiment}, \code{i} is a scalar index (e.g.,
+ \code{character(1)} or \code{integer(1)}) into a column of
+ \code{colData}.
+ }
+
+ \item{name}{A symbol representing the name of a column of
+ \code{colData}.}
+
+ \item{withDimnames}{A \code{logical(1)}, indicating whether dimnames
+ should be applied to extracted assay elements. Setting
+ \code{withDimnames=FALSE} increases the speed and memory efficiency
+ with which assays are extracted. \code{withDimnames=TRUE} in the
+ getter \code{assays<-} allows efficient complex assignments (e.g.,
+ updating names of assays, \code{names(assays(x, withDimnames=FALSE))
+ = ...} is more efficient than \code{names(assays(x)) = ...}); it
+ does not influence actual assignment of dimnames to assays.}
+
+ \item{drop}{A \code{logical(1)}, ignored by these methods.}
+
+ \item{value}{An object of a class specified in the S4 method
+ signature or as outlined in \sQuote{Details}.}
+
+ \item{deparse.level}{See \code{?base::\link[base]{cbind}} for a description of
+ this argument.}
+
+}
+
+\details{
+
+ The SummarizedExperiment class is meant for numeric and other
+ data types derived from a sequencing experiment. The structure is
+ rectangular like a \code{matrix}, but with additional annotations on
+ the rows and columns, and with the possibility to manage several
+ assays simultaneously.
+
+ The rows of a SummarizedExperiment object represent features
+ of interest. Information about these features is stored in a
+ \link{DataFrame} object, accessible using the function
+ \code{rowData}. The \link{DataFrame} must have as many rows
+ as there are rows in the SummarizedExperiment object, with each row
+ of the \link{DataFrame} providing information on the feature in the
+ corresponding row of the SummarizedExperiment object. Columns of the
+ \link{DataFrame} represent different attributes of the features
+ of interest, e.g., gene or transcript IDs, etc.
+
+ Each column of a SummarizedExperiment object represents a sample.
+ Information about the samples are stored in a \link{DataFrame},
+ accessible using the function \code{colData}, described below.
+ The \link{DataFrame} must have as many rows as there are
+ columns in the SummarizedExperiment object, with each row of the
+ \link{DataFrame} providing information on the sample in the
+ corresponding column of the SummarizedExperiment object.
+ Columns of the \link{DataFrame} represent different sample
+ attributes, e.g., tissue of origin, etc. Columns of the
+ \link{DataFrame} can themselves be annotated (via the
+ \code{\link[S4Vectors]{mcols}} function). Column names typically
+ provide a short identifier unique to each sample.
+
+ A SummarizedExperiment object can also contain information about
+ the overall experiment, for instance the lab in which it was conducted,
+ the publications with which it is associated, etc. This information is
+ stored as a \code{list} object, accessible using the \code{metadata}
+ function. The form of the data associated with the experiment is left to
+ the discretion of the user.
+
+ The SummarizedExperiment container is appropriate for matrix-like
+ data. The data are accessed using the \code{assays} function,
+ described below. This returns a \link{SimpleList} object. Each
+ element of the list must itself be a matrix (of any mode) and must
+ have dimensions that are the same as the dimensions of the
+ SummarizedExperiment in which they are stored. Row and column
+ names of each matrix must either be \code{NULL} or match those of the
+ SummarizedExperiment during construction. It is convenient for
+ the elements of \link{SimpleList} of assays to be named.
+
+}
+
+\section{Constructor}{
+
+ SummarizedExperiment instances are constructed using the
+ \code{SummarizedExperiment} function documented in
+ \code{?\link{RangedSummarizedExperiment}}.
+
+}
+
+\section{Accessors}{
+
+ In the following code snippets, \code{x} is a SummarizedExperiment
+ object.
+
+ \describe{
+
+ \item{\code{assays(x)}, \code{assays(x) <- value}:}{Get or set the
+ assays. \code{value} is a \code{list} or \code{SimpleList}, each
+ element of which is a matrix with the same dimensions as
+ \code{x}.}
+
+ \item{\code{assay(x, i)}, \code{assay(x, i) <- value}:}{A convenient
+ alternative (to \code{assays(x)[[i]]}, \code{assays(x)[[i]] <-
+ value}) to get or set the \code{i}th (default first) assay
+ element. \code{value} must be a matrix of the same dimension as
+ \code{x}, and with dimension names \code{NULL} or consistent with
+ those of \code{x}.}
+
+ \item{\code{assayNames(x)}, \code{assayNames(x) <- value}:}{Get or
+ set the names of \code{assay()} elements.}
+
+ \item{\code{rowData(x)}, \code{rowData(x) <- value}:}{Get or set the
+ row data. \code{value} is a \link{DataFrame} object. Row
+ names of \code{value} must be NULL or consistent with the existing
+ row names of \code{x}.}
+
+ \item{\code{colData(x)}, \code{colData(x) <- value}:}{Get or set the
+ column data. \code{value} is a \link{DataFrame} object. Row
+ names of \code{value} must be NULL or consistent with the existing
+ column names of \code{x}.}
+
+ \item{\code{metadata(x)}, \code{metadata(x) <- value}:}{Get or set
+ the experiment data. \code{value} is a \code{list} with arbitrary
+ content.}
+
+ \item{\code{dim(x)}:}{Get the dimensions (features of interest x samples)
+ of the SummarizedExperiment.}
+
+ \item{\code{dimnames(x)}, \code{dimnames(x) <- value}:}{Get or set
+ the dimension names. \code{value} is usually a list of length 2,
+ containing elements that are either \code{NULL} or vectors of
+ appropriate length for the corresponding dimension. \code{value}
+ can be \code{NULL}, which removes dimension names. This method
+ implies that \code{rownames}, \code{rownames<-}, \code{colnames},
+ and \code{colnames<-} are all available.}
+
+ }
+}
+
+\section{Subsetting}{
+
+ In the code snippets below, \code{x} is a SummarizedExperiment object.
+
+ \describe{
+
+ \item{\code{x[i,j]}, \code{x[i,j] <- value}:}{Create or replace a
+ subset of \code{x}. \code{i}, \code{j} can be \code{numeric},
+ \code{logical}, \code{character}, or \code{missing}. \code{value}
+ must be a SummarizedExperiment object with dimensions,
+ dimension names, and assay elements consistent with the subset
+ \code{x[i,j]} being replaced.}
+
+ }
+
+ Additional subsetting accessors provide convenient access to
+ \code{colData} columns
+
+ \describe{
+
+ \item{\code{x$name}, \code{x$name <- value}}{Access or replace
+ column \code{name} in \code{x}.}
+
+ \item{\code{x[[i, ...]]}, \code{x[[i, ...]] <- value}}{Access or
+ replace column \code{i} in \code{x}.}
+
+ }
+
+}
+
+\section{Combining}{
+
+ In the code snippets below, \code{...} are SummarizedExperiment objects
+ to be combined.
+
+ \describe{
+
+ \item{\code{cbind(...)}:}{
+ \code{cbind} combines objects with the same features of interest
+ but different samples (columns in \code{assays}).
+ The colnames in \code{colData(SummarizedExperiment)} must match or
+ an error is thrown.
+ Duplicate columns of \code{rowData(SummarizedExperiment)} must
+ contain the same data.
+
+ Data in \code{assays} are combined by name matching; if all assay
+ names are NULL matching is by position. A mixture of names and NULL
+ throws an error.
+
+ \code{metadata} from all objects are combined into a \code{list}
+ with no name checking.
+ }
+
+ \item{\code{rbind(...)}:}{
+ \code{rbind} combines objects with the same samples
+ but different features of interest (rows in \code{assays}).
+ The colnames in \code{rowData(SummarizedExperiment)} must match or
+ an error is thrown.
+ Duplicate columns of \code{colData(SummarizedExperiment)} must
+ contain the same data.
+
+ Data in \code{assays} are combined by name matching; if all assay
+ names are NULL matching is by position. A mixture of names and NULL
+ throws an error.
+
+ \code{metadata} from all objects are combined into a \code{list}
+ with no name checking.
+ }
+
+ }
+
+}
+
+\section{Implementation and Extension}{
+
+ This section contains advanced material meant for package developers.
+
+ SummarizedExperiment is implemented as an S4 class, and can be extended in
+ the usual way, using \code{contains="SummarizedExperiment"} in the new
+ class definition.
+
+ In addition, the representation of the \code{assays} slot of
+ SummarizedExperiment is as a virtual class Assays. This
+ allows derived classes (\code{contains="Assays"}) to easily implement
+ alternative requirements for the assays, e.g., backed by file-based
+ storage like NetCDF or the \code{ff} package, while re-using the existing
+ SummarizedExperiment class without modification.
+ See \link{Assays} for more information.
+
+ The current \code{assays} slot is implemented as a reference class
+ that has copy-on-change semantics. This means that modifying non-assay
+ slots does not copy the (large) assay data, and at the same time the
+ user is not surprised by reference-based semantics. Updates to
+ non-assay slots are very fast; updating the assays slot itself can be
+ 5x or more faster than with an S4 instance in the slot. One useful
+ technique when working with \code{assay} or \code{assays} function is
+ use of the \code{withDimnames=FALSE} argument, which benefits speed
+ and memory use by not copying dimnames from the row- and colData
+ elements to each assay.
+}
+
+\author{Martin Morgan, \url{mtmorgan at fhcrc.org}}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item \link[S4Vectors]{DataFrame}, \link[S4Vectors]{SimpleList}, and
+ \link[S4Vectors]{Annotated} objects in the \pkg{S4Vectors} package.
+
+ \item The \code{\link[S4Vectors]{metadata}} and
+ \code{\link[S4Vectors]{mcols}} accessors in the \pkg{S4Vectors}
+ package.
+
+ \item \code{\link{saveHDF5SummarizedExperiment}} and
+ \code{\link{loadHDF5SummarizedExperiment}} for saving/loading a
+ HDF5-based SummarizedExperiment object to/from disk.
+
+ \item The \code{\link[DelayedArray]{realize}} generic function in the
+ \pkg{DelayedArray} package for more information about on-disk
+ realization of objects carrying delayed operations.
+ }
+}
+
+\examples{
+nrows <- 200; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+se0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ colData=colData)
+se0
+dim(se0)
+dimnames(se0)
+assayNames(se0)
+head(assay(se0))
+assays(se0) <- endoapply(assays(se0), asinh)
+head(assay(se0))
+
+rowData(se0)
+colData(se0)
+
+se0[, se0$Treatment == "ChIP"]
+
+## cbind() combines objects with the same features of interest
+## but different samples:
+se1 <- se0
+se2 <- se1[,1:3]
+colnames(se2) <- letters[1:ncol(se2)]
+cmb1 <- cbind(se1, se2)
+dim(cmb1)
+dimnames(cmb1)
+
+## rbind() combines objects with the same samples but different
+## features of interest:
+se1 <- se0
+se2 <- se1[1:50,]
+rownames(se2) <- letters[1:nrow(se2)]
+cmb2 <- rbind(se1, se2)
+dim(cmb2)
+dimnames(cmb2)
+
+## ---------------------------------------------------------------------
+## ON-DISK REALIZATION
+## ---------------------------------------------------------------------
+setRealizationBackend("HDF5Array")
+cmb3 <- realize(cmb2)
+assay(cmb3, withDimnames=FALSE) # an HDF5Matrix object
+}
diff --git a/man/coverage-methods.Rd b/man/coverage-methods.Rd
new file mode 100644
index 0000000..186da4f
--- /dev/null
+++ b/man/coverage-methods.Rd
@@ -0,0 +1,80 @@
+\name{coverage-methods}
+
+\alias{coverage-methods}
+
+\alias{coverage}
+\alias{coverage,RangedSummarizedExperiment-method}
+
+
+\title{Coverage of a RangedSummarizedExperiment object}
+
+\description{
+ This man page documents the \code{coverage} method for
+ \link{RangedSummarizedExperiment} objects.
+}
+
+\usage{
+\S4method{coverage}{RangedSummarizedExperiment}(x, shift=0L, width=NULL, weight=1L,
+ method=c("auto", "sort", "hash"))
+}
+
+\arguments{
+ \item{x}{
+ A \link{RangedSummarizedExperiment} object.
+ }
+ \item{shift, width, weight, method}{
+ See \code{?\link[GenomicRanges]{coverage}} in the \pkg{GenomicRanges}
+ package.
+ }
+}
+
+\details{
+ This method operates on the \code{rowRanges} component of the
+ \link{RangedSummarizedExperiment} object, which can be a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+
+ More precisely, on \link{RangedSummarizedExperiment} object \code{x},
+ \code{coverage(x, ...)} is equivalent to \code{coverage(rowRanges(x), ...)}.
+
+ See \code{?\link[GenomicRanges]{coverage}} in the \pkg{GenomicRanges}
+ package for the details of how \code{coverage} operates on a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+}
+
+\value{
+ See \code{?\link[GenomicRanges]{coverage}} in the \pkg{GenomicRanges}
+ package.
+}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item The \link[GenomicRanges]{coverage} man page in the
+ \pkg{GenomicRanges} package where the \code{coverage} methods
+ for \link[GenomicRanges]{GenomicRanges} and
+ \link[GenomicRanges]{GRangesList} objects are documented.
+ }
+}
+
+\examples{
+nrows <- 20; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(5, 15)),
+ IRanges(sample(1000L, 20), width=100),
+ strand=Rle(c("+", "-"), c(12, 8)),
+ seqlengths=c(chr1=1800, chr2=1300))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+rse <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+
+cvg <- coverage(rse)
+cvg
+stopifnot(identical(cvg, coverage(rowRanges(rse))))
+}
+
+\keyword{methods}
+\keyword{utilities}
diff --git a/man/findOverlaps-methods.Rd b/man/findOverlaps-methods.Rd
new file mode 100644
index 0000000..ef0fe83
--- /dev/null
+++ b/man/findOverlaps-methods.Rd
@@ -0,0 +1,105 @@
+\name{findOverlaps-methods}
+
+\alias{findOverlaps-methods}
+
+\alias{findOverlaps}
+\alias{findOverlaps,RangedSummarizedExperiment,Vector-method}
+\alias{findOverlaps,Vector,RangedSummarizedExperiment-method}
+\alias{findOverlaps,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+
+
+\title{Finding overlapping ranges in RangedSummarizedExperiment objects}
+
+\description{
+ This man page documents the \code{findOverlaps} methods for
+ \link{RangedSummarizedExperiment} objects.
+
+ \link{RangedSummarizedExperiment} objects also support
+ \code{countOverlaps}, \code{overlapsAny}, and \code{subsetByOverlaps}
+ thanks to the default methods defined in the \pkg{IRanges} package and
+ to the \code{findOverlaps} methods defined in this package and documented
+ below.
+}
+
+\usage{
+\S4method{findOverlaps}{RangedSummarizedExperiment,Vector}(query, subject,
+ maxgap=0L, minoverlap=1L,
+ type=c("any", "start", "end", "within", "equal"),
+ select=c("all", "first", "last", "arbitrary"),
+ ignore.strand=FALSE)
+\S4method{findOverlaps}{Vector,RangedSummarizedExperiment}(query, subject,
+ maxgap=0L, minoverlap=1L,
+ type=c("any", "start", "end", "within", "equal"),
+ select=c("all", "first", "last", "arbitrary"),
+ ignore.strand=FALSE)
+}
+
+\arguments{
+ \item{query, subject}{
+ One of these two arguments must be a \link{RangedSummarizedExperiment}
+ object.
+ }
+ \item{maxgap, minoverlap, type}{
+ See \code{?\link[GenomicRanges]{findOverlaps}} in the \pkg{GenomicRanges}
+ package.
+ }
+ \item{select, ignore.strand}{
+ See \code{?\link[GenomicRanges]{findOverlaps}} in the \pkg{GenomicRanges}
+ package.
+ }
+}
+
+\details{
+ These methods operate on the \code{rowRanges} component of the
+ \link{RangedSummarizedExperiment} object, which can be a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+
+ More precisely, if any of the above functions is passed a
+ \link{RangedSummarizedExperiment} object thru the \code{query} and/or
+ \code{subject} argument, then it behaves as if \code{rowRanges(query)}
+ and/or \code{rowRanges(subject)} had been passed instead.
+
+ See \code{?\link[GenomicRanges]{findOverlaps}} in the \pkg{GenomicRanges}
+ package for the details of how \code{findOverlaps} and family operate on
+ \link[GenomicRanges]{GenomicRanges} and \link[GenomicRanges]{GRangesList}
+ objects.
+}
+
+\value{
+ See \code{?\link[GenomicRanges]{findOverlaps}} in the \pkg{GenomicRanges}
+ package.
+}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item The \link[GenomicRanges]{findOverlaps} man page in the
+ \pkg{GenomicRanges} package where the \code{findOverlaps} family
+ of methods for \link[GenomicRanges]{GenomicRanges} and
+ \link[GenomicRanges]{GRangesList} objects is documented.
+ }
+}
+
+\examples{
+nrows <- 20; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(5, 15)),
+ IRanges(sample(1000L, 20), width=100),
+ strand=Rle(c("+", "-"), c(12, 8)))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+rse0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+rse1 <- shift(rse0, 100)
+
+hits <- findOverlaps(rse0, rse1)
+hits
+stopifnot(identical(hits, findOverlaps(rowRanges(rse0), rowRanges(rse1))))
+stopifnot(identical(hits, findOverlaps(rse0, rowRanges(rse1))))
+stopifnot(identical(hits, findOverlaps(rowRanges(rse0), rse1)))
+}
+
+\keyword{methods}
+\keyword{utilities}
diff --git a/man/inter-range-methods.Rd b/man/inter-range-methods.Rd
new file mode 100644
index 0000000..e2cf611
--- /dev/null
+++ b/man/inter-range-methods.Rd
@@ -0,0 +1,95 @@
+\name{inter-range-methods}
+
+\alias{inter-range-methods}
+
+\alias{isDisjoint}
+\alias{isDisjoint,RangedSummarizedExperiment-method}
+
+\alias{disjointBins}
+\alias{disjointBins,RangedSummarizedExperiment-method}
+
+
+\title{Inter range transformations of a RangedSummarizedExperiment object}
+
+\description{
+ This man page documents the \emph{inter range transformations} that are
+ supported on \link{RangedSummarizedExperiment} objects.
+}
+
+\usage{
+\S4method{isDisjoint}{RangedSummarizedExperiment}(x, ignore.strand=FALSE)
+
+\S4method{disjointBins}{RangedSummarizedExperiment}(x, ignore.strand=FALSE)
+}
+
+\arguments{
+ \item{x}{
+ A \link{RangedSummarizedExperiment} object.
+ }
+ \item{ignore.strand}{
+ See \code{?\link[GenomicRanges]{isDisjoint}} in the
+ \pkg{GenomicRanges} package.
+ }
+}
+
+\details{
+ These transformations operate on the \code{rowRanges} component of the
+ \link{RangedSummarizedExperiment} object, which can be a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+
+ More precisely, any of the above functions performs the following
+ transformation on \link{RangedSummarizedExperiment} object \code{x}:
+\preformatted{ f(rowRanges(x), ...)
+}
+ where \code{f} is the name of the function and \code{...} any additional
+ arguments passed to it.
+
+ See \code{?\link[GenomicRanges]{isDisjoint}} in the \pkg{GenomicRanges}
+ package for the details of how these transformations operate on a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+}
+
+\value{
+ See \code{?\link[GenomicRanges]{isDisjoint}} in the
+ \pkg{GenomicRanges} package.
+}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item The \link[GenomicRanges]{isDisjoint} man page in the
+ \pkg{GenomicRanges} package where \emph{inter range transformations}
+ of a \link[GenomicRanges]{GenomicRanges} or
+ \link[GenomicRanges]{GRangesList} object are documented.
+ }
+}
+
+\examples{
+nrows <- 20; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(5, 15)),
+ IRanges(sample(1000L, 20), width=100),
+ strand=Rle(c("+", "-"), c(12, 8)))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+rse0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+rse1 <- shift(rse0, 99*start(rse0))
+
+isDisjoint(rse0) # FALSE
+isDisjoint(rse1) # TRUE
+
+bins0 <- disjointBins(rse0)
+bins0
+stopifnot(identical(bins0, disjointBins(rowRanges(rse0))))
+
+bins1 <- disjointBins(rse1)
+bins1
+stopifnot(all(bins1 == bins1[1]))
+}
+
+\keyword{methods}
+\keyword{utilities}
diff --git a/man/intra-range-methods.Rd b/man/intra-range-methods.Rd
new file mode 100644
index 0000000..5dc7956
--- /dev/null
+++ b/man/intra-range-methods.Rd
@@ -0,0 +1,151 @@
+\name{intra-range-methods}
+
+\alias{intra-range-methods}
+
+\alias{shift}
+\alias{shift,RangedSummarizedExperiment-method}
+
+\alias{narrow}
+\alias{narrow,RangedSummarizedExperiment-method}
+
+\alias{resize}
+\alias{resize,RangedSummarizedExperiment-method}
+
+\alias{flank}
+\alias{flank,RangedSummarizedExperiment-method}
+
+\alias{promoters}
+\alias{promoters,RangedSummarizedExperiment-method}
+
+\alias{restrict}
+\alias{restrict,RangedSummarizedExperiment-method}
+
+\alias{trim,RangedSummarizedExperiment-method}
+
+
+\title{Intra range transformations of a RangedSummarizedExperiment object}
+
+\description{
+ This man page documents the \emph{intra range transformations} that are
+ supported on \link{RangedSummarizedExperiment} objects.
+}
+
+\usage{
+\S4method{shift}{RangedSummarizedExperiment}(x, shift=0L, use.names=TRUE)
+
+\S4method{narrow}{RangedSummarizedExperiment}(x, start=NA, end=NA, width=NA, use.names=TRUE)
+
+\S4method{resize}{RangedSummarizedExperiment}(x, width, fix="start", use.names=TRUE,
+ ignore.strand=FALSE)
+
+\S4method{flank}{RangedSummarizedExperiment}(x, width, start=TRUE, both=FALSE,
+ use.names=TRUE, ignore.strand=FALSE)
+
+\S4method{promoters}{RangedSummarizedExperiment}(x, upstream=2000, downstream=200)
+
+\S4method{restrict}{RangedSummarizedExperiment}(x, start=NA, end=NA, keep.all.ranges=FALSE,
+ use.names=TRUE)
+
+\S4method{trim}{RangedSummarizedExperiment}(x, use.names=TRUE)
+}
+
+\arguments{
+ \item{x}{
+ A \link{RangedSummarizedExperiment} object.
+ }
+ \item{shift, use.names}{
+ See \code{?\link[GenomicRanges]{shift}} in the \pkg{GenomicRanges}
+ package.
+ }
+ \item{start, end, width, fix}{
+ See \code{?\link[GenomicRanges]{shift}} in the \pkg{GenomicRanges}
+ package.
+ }
+ \item{ignore.strand, both}{
+ See \code{?\link[GenomicRanges]{shift}} in the \pkg{GenomicRanges}
+ package.
+ }
+ \item{upstream, downstream}{
+ See \code{?\link[GenomicRanges]{shift}} in the \pkg{GenomicRanges}
+ package.
+ }
+ \item{keep.all.ranges}{
+ See \code{?\link[GenomicRanges]{shift}} in the \pkg{GenomicRanges}
+ package.
+ }
+}
+
+\details{
+ These transformations operate on the \code{rowRanges} component of the
+ \link{RangedSummarizedExperiment} object, which can be a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+
+ More precisely, any of the above functions performs the following
+ transformation on \link{RangedSummarizedExperiment} object \code{x}:
+\preformatted{ rowRanges(x) <- f(rowRanges(x), ...)
+}
+ where \code{f} is the name of the function and \code{...} any additional
+ arguments passed to it.
+
+ See \code{?\link[GenomicRanges]{shift}} in the \pkg{GenomicRanges}
+ package for the details of how these transformations operate on a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item The \link[GenomicRanges]{shift} man page in the
+ \pkg{GenomicRanges} package where \emph{intra range transformations}
+ of a \link[GenomicRanges]{GenomicRanges} or
+ \link[GenomicRanges]{GRangesList} object are documented.
+ }
+}
+
+\examples{
+nrows <- 20; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(5, 15)),
+ IRanges(sample(1000L, 20), width=100),
+ strand=Rle(c("+", "-"), c(12, 8)))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+rse0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+
+rse1 <- shift(rse0, 1)
+stopifnot(identical(
+ rowRanges(rse1),
+ shift(rowRanges(rse0), 1)
+))
+
+se2 <- narrow(rse0, start=10, end=-15)
+stopifnot(identical(
+ rowRanges(se2),
+ narrow(rowRanges(rse0), start=10, end=-15)
+))
+
+se3 <- resize(rse0, width=75)
+stopifnot(identical(
+ rowRanges(se3),
+ resize(rowRanges(rse0), width=75)
+))
+
+se4 <- flank(rse0, width=20)
+stopifnot(identical(
+ rowRanges(se4),
+ flank(rowRanges(rse0), width=20)
+))
+
+se5 <- restrict(rse0, start=200, end=700, keep.all.ranges=TRUE)
+stopifnot(identical(
+ rowRanges(se5),
+ restrict(rowRanges(rse0), start=200, end=700, keep.all.ranges=TRUE)
+))
+}
+
+\keyword{methods}
+\keyword{utilities}
diff --git a/man/makeSummarizedExperimentFromDataFrame.Rd b/man/makeSummarizedExperimentFromDataFrame.Rd
new file mode 100644
index 0000000..b3087b8
--- /dev/null
+++ b/man/makeSummarizedExperimentFromDataFrame.Rd
@@ -0,0 +1,87 @@
+\name{makeSummarizedExperimentFromDataFrame}
+
+\alias{makeSummarizedExperimentFromDataFrame}
+
+\title{Make a RangedSummarizedExperiment from a data.frame or DataFrame}
+
+\description{
+ \code{makeSummarizedExperimentFromDataFrame} uses \code{data.frame}
+ or \code{DataFrame} column names to create a \link{GRanges} object for the
+ \code{rowRanges} of the resulting \link{SummarizedExperiment} object.
+ It requires that non-range data columns be coercible into a \code{numeric}
+ \code{matrix} for the \link{SummarizedExperiment} constructor. All columns
+ that are not part of the row ranges attribute are assumed to be experiment
+ data; thus, keeping metadata columns will not be supported. Note that this
+ function only returns \link{SummarizedExperiment} objects with a single
+ assay.
+
+ If metadata columns are to be kept, one can first construct the row ranges
+ attribute by using the \link{makeGRangesFromDataFrame} function and
+ subsequently creating the \link{SummarizedExperiment}.
+}
+
+\usage{
+makeSummarizedExperimentFromDataFrame(df,
+ ...,
+ seqinfo = NULL,
+ starts.in.df.are.0based = FALSE)
+}
+\arguments{
+ \item{df}{
+ A data.frame or \link[S4Vectors]{DataFrame} object. If not, then
+ the function first tries to turn \code{df} into a data frame with
+ \code{as.data.frame(df)}.
+ }
+ \item{...}{
+ Additional arguments passed on to \link{makeGRangesFromDataFrame}
+ }
+ \item{seqinfo}{
+ Either \code{NULL}, or a \link{Seqinfo} object, or a character vector
+ of seqlevels, or a named numeric vector of sequence lengths.
+ When not \code{NULL}, it must be compatible with the genomic ranges
+ in \code{df} i.e. it must include at least the sequence levels
+ represented in \code{df}.
+ }
+ \item{starts.in.df.are.0based}{
+ \code{TRUE} or \code{FALSE} (the default).
+ If \code{TRUE}, then the start positions of the genomic ranges in
+ \code{df} are considered to be \emph{0-based} and are converted to
+ \emph{1-based} in the returned \link{GRanges} object.
+ This feature is intended to make it more convenient to handle input
+ that contains data obtained from resources using the "0-based
+ start" convention. A notorious example of such resource is the UCSC
+ Table Browser (\url{http://genome.ucsc.edu/cgi-bin/hgTables}).
+ }
+}
+\value{
+A \link{RangedSummarizedExperiment} object with rowRanges and a single assay
+}
+\author{
+ M. Ramos
+}
+\seealso{
+ \itemize{
+ \item \link{makeGRangesFromDataFrame}
+ }
+}
+
+\examples{
+## ---------------------------------------------------------------------
+## BASIC EXAMPLES
+## ---------------------------------------------------------------------
+
+# Note that rownames of the data.frame are also rownames of the result
+df <- data.frame(chr="chr2", start = 11:15, end = 12:16,
+ strand = c("+", "-", "+", "*", "."), expr0 = 3:7,
+ expr1 = 8:12, expr2 = 12:16,
+ row.names = paste0("GENE", letters[5:1]))
+df
+
+exRSE <- makeSummarizedExperimentFromDataFrame(df)
+
+exRSE
+
+assay(exRSE)
+
+rowRanges(exRSE)
+}
diff --git a/man/makeSummarizedExperimentFromExpressionSet.Rd b/man/makeSummarizedExperimentFromExpressionSet.Rd
new file mode 100644
index 0000000..28d175e
--- /dev/null
+++ b/man/makeSummarizedExperimentFromExpressionSet.Rd
@@ -0,0 +1,112 @@
+\name{makeSummarizedExperimentFromExpressionSet}
+
+\alias{makeSummarizedExperimentFromExpressionSet}
+\alias{naiveRangeMapper}
+\alias{probeRangeMapper}
+\alias{geneRangeMapper}
+\alias{coerce,ExpressionSet,RangedSummarizedExperiment-method}
+\alias{coerce,RangedSummarizedExperiment,ExpressionSet-method}
+\alias{coerce,SummarizedExperiment,ExpressionSet-method}
+
+
+\title{Make a RangedSummarizedExperiment object from an ExpressionSet and
+ vice-versa}
+
+\description{
+ Coercion between \link{RangedSummarizedExperiment} and
+ \link[Biobase]{ExpressionSet} is supported in both directions.
+
+ For going from \link[Biobase]{ExpressionSet} to
+ \link{RangedSummarizedExperiment}, the
+ \code{makeSummarizedExperimentFromExpressionSet} function is also
+ provided to let the user control how to map features to ranges.
+}
+
+\usage{
+makeSummarizedExperimentFromExpressionSet(from,
+ mapFun=naiveRangeMapper,
+ ...)
+
+## range mapping functions
+naiveRangeMapper(from)
+probeRangeMapper(from)
+geneRangeMapper(txDbPackage, key = "ENTREZID")
+}
+
+\arguments{
+ \item{from}{
+ An \link[Biobase]{ExpressionSet} object.
+ }
+ \item{mapFun}{
+ A function which takes an \link[Biobase]{ExpressionSet} object and
+ returns a \link{GRanges}, or \link{GRangesList} object which
+ corresponds to the genomic ranges used in the ExpressionSet. The
+ \link[base]{rownames} of the returned \link[GenomicRanges]{GRanges}
+ are used to match the \link[Biobase]{featureNames} of the
+ \link[Biobase]{ExpressionSet}.
+
+ The \code{naiveRangeMapper} function is used by default.
+ }
+ \item{...}{
+ Additional arguments passed to \code{mapFun}.
+ }
+ \item{txDbPackage}{
+ A character string with the Transcript Database to use for the mapping.
+ }
+ \item{key}{
+ A character string with the Gene key to use for the mapping.
+ }
+}
+
+\value{
+ \code{makeSummarizedExperimentFromExpressionSet} takes an
+ \link[Biobase]{ExpressionSet} object as input and a \emph{range mapping
+ function} that maps the features to ranges. It then returns a
+ \link{RangedSummarizedExperiment} object that corresponds to the input.
+
+ The range mapping functions return a \link{GRanges} object, with the
+ \code{rownames} corresponding to the \link[Biobase]{featureNames} of
+ the \link[Biobase]{ExpressionSet} object.
+}
+
+\author{Jim Hester, \url{james.f.hester at gmail.com}}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item \link[Biobase]{ExpressionSet} objects in the \pkg{Biobase} package.
+
+ \item \link[GenomicFeatures]{TxDb} objects in the \pkg{GenomicFeatures}
+ package.
+ }
+}
+
+\examples{
+## ---------------------------------------------------------------------
+## GOING FROM ExpressionSet TO RangedSummarizedExperiment
+## ---------------------------------------------------------------------
+
+data(sample.ExpressionSet, package="Biobase")
+
+# 2 equivalent ways of doing the naive coercion
+makeSummarizedExperimentFromExpressionSet(sample.ExpressionSet)
+as(sample.ExpressionSet, "RangedSummarizedExperiment")
+
+# using probe range mapper
+makeSummarizedExperimentFromExpressionSet(sample.ExpressionSet, probeRangeMapper)
+
+# using the gene range mapper
+makeSummarizedExperimentFromExpressionSet(sample.ExpressionSet,
+ geneRangeMapper("TxDb.Hsapiens.UCSC.hg19.knownGene"))
+
+## ---------------------------------------------------------------------
+## GOING FROM RangedSummarizedExperiment TO ExpressionSet
+## ---------------------------------------------------------------------
+
+example(RangedSummarizedExperiment) # to create 'rse'
+rse
+as(rse, "ExpressionSet")
+}
+
+\keyword{manip}
diff --git a/man/nearest-methods.Rd b/man/nearest-methods.Rd
new file mode 100644
index 0000000..ce4ba46
--- /dev/null
+++ b/man/nearest-methods.Rd
@@ -0,0 +1,149 @@
+\name{nearest-methods}
+
+\alias{nearest-methods}
+
+\alias{precede}
+\alias{precede,RangedSummarizedExperiment,ANY-method}
+\alias{precede,ANY,RangedSummarizedExperiment-method}
+\alias{precede,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+
+\alias{follow}
+\alias{follow,RangedSummarizedExperiment,ANY-method}
+\alias{follow,ANY,RangedSummarizedExperiment-method}
+\alias{follow,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+
+\alias{nearest}
+\alias{nearest,RangedSummarizedExperiment,ANY-method}
+\alias{nearest,ANY,RangedSummarizedExperiment-method}
+\alias{nearest,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+
+\alias{distance}
+\alias{distance,RangedSummarizedExperiment,ANY-method}
+\alias{distance,ANY,RangedSummarizedExperiment-method}
+\alias{distance,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+
+\alias{distanceToNearest}
+\alias{distanceToNearest,RangedSummarizedExperiment,ANY-method}
+\alias{distanceToNearest,ANY,RangedSummarizedExperiment-method}
+\alias{distanceToNearest,RangedSummarizedExperiment,RangedSummarizedExperiment-method}
+
+
+\title{Finding the nearest range neighbor in RangedSummarizedExperiment objects}
+
+\description{
+ This man page documents the \code{nearest} methods and family (i.e.
+ \code{precede}, \code{follow}, \code{distance}, and \code{distanceToNearest}
+ methods) for \link{RangedSummarizedExperiment} objects.
+}
+
+\usage{
+\S4method{precede}{RangedSummarizedExperiment,ANY}(x, subject, select=c("arbitrary", "all"),
+ ignore.strand=FALSE)
+\S4method{precede}{ANY,RangedSummarizedExperiment}(x, subject, select=c("arbitrary", "all"),
+ ignore.strand=FALSE)
+
+\S4method{follow}{RangedSummarizedExperiment,ANY}(x, subject, select=c("arbitrary", "all"),
+ ignore.strand=FALSE)
+\S4method{follow}{ANY,RangedSummarizedExperiment}(x, subject, select=c("arbitrary", "all"),
+ ignore.strand=FALSE)
+
+\S4method{nearest}{RangedSummarizedExperiment,ANY}(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+\S4method{nearest}{ANY,RangedSummarizedExperiment}(x, subject, select=c("arbitrary", "all"), ignore.strand=FALSE)
+
+\S4method{distance}{RangedSummarizedExperiment,ANY}(x, y, ignore.strand=FALSE, ...)
+\S4method{distance}{ANY,RangedSummarizedExperiment}(x, y, ignore.strand=FALSE, ...)
+
+\S4method{distanceToNearest}{RangedSummarizedExperiment,ANY}(x, subject, ignore.strand=FALSE, ...)
+\S4method{distanceToNearest}{ANY,RangedSummarizedExperiment}(x, subject, ignore.strand=FALSE, ...)
+}
+
+\arguments{
+ \item{x, subject}{
+ One of these two arguments must be a \link{RangedSummarizedExperiment}
+ object.
+ }
+ \item{select, ignore.strand}{
+ See \code{?\link[GenomicRanges]{nearest}} in the \pkg{GenomicRanges}
+ package.
+ }
+ \item{y}{
+ For the \code{distance} methods, one of \code{x} or \code{y} must be a
+ \link{RangedSummarizedExperiment} object.
+ }
+ \item{...}{Additional arguments for methods.}
+}
+
+\details{
+ These methods operate on the \code{rowRanges} component of the
+ \link{RangedSummarizedExperiment} object, which can be a
+ \link[GenomicRanges]{GenomicRanges} or \link[GenomicRanges]{GRangesList}
+ object.
+
+ More precisely, if any of the above functions is passed a
+ \link{RangedSummarizedExperiment} object thru the \code{x}, \code{subject},
+ and/or \code{y} argument, then it behaves as if \code{rowRanges(x)},
+ \code{rowRanges(subject)}, and/or \code{rowRanges(y)} had been passed
+ instead.
+
+ See \code{?\link[GenomicRanges]{nearest}} in the \pkg{GenomicRanges}
+ package for the details of how \code{nearest} and family operate on
+ \link[GenomicRanges]{GenomicRanges} and \link[GenomicRanges]{GRangesList}
+ objects.
+}
+
+\value{
+ See \code{?\link[GenomicRanges]{nearest}} in the \pkg{GenomicRanges}
+ package.
+}
+
+\seealso{
+ \itemize{
+ \item \link{RangedSummarizedExperiment} objects.
+
+ \item The \link[GenomicRanges]{nearest} man page in the
+ \pkg{GenomicRanges} package where the \code{nearest} family
+ of methods for \link[GenomicRanges]{GenomicRanges} and
+ \link[GenomicRanges]{GRangesList} objects is documented.
+ }
+}
+
+\examples{
+nrows <- 20; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(5, 15)),
+ IRanges(sample(1000L, 20), width=100),
+ strand=Rle(c("+", "-"), c(12, 8)))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+rse0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+rse1 <- shift(rse0, 100)
+
+res <- nearest(rse0, rse1)
+res
+stopifnot(identical(res, nearest(rowRanges(rse0), rowRanges(rse1))))
+stopifnot(identical(res, nearest(rse0, rowRanges(rse1))))
+stopifnot(identical(res, nearest(rowRanges(rse0), rse1)))
+
+res <- nearest(rse0) # missing subject
+res
+stopifnot(identical(res, nearest(rowRanges(rse0))))
+
+hits <- nearest(rse0, rse1, select="all")
+hits
+stopifnot(identical(
+ hits,
+ nearest(rowRanges(rse0), rowRanges(rse1), select="all")
+))
+stopifnot(identical(
+ hits,
+ nearest(rse0, rowRanges(rse1), select="all")
+))
+stopifnot(identical(
+ hits,
+ nearest(rowRanges(rse0), rse1, select="all")
+))
+}
+
+\keyword{methods}
+\keyword{utilities}
diff --git a/man/readKallisto.Rd b/man/readKallisto.Rd
new file mode 100644
index 0000000..c2627f4
--- /dev/null
+++ b/man/readKallisto.Rd
@@ -0,0 +1,120 @@
+\name{readKallisto}
+\alias{readKallisto}
+\alias{readKallistoBootstrap}
+\alias{KALLISTO_ASSAYS}
+
+\title{
+ Input kallisto or kallisto bootstrap results.
+}
+
+\description{
+ \code{readKallisto} inputs several kallisto output files into a single
+ \code{SummarizedExperiment} instance, with rows corresponding to
+ estimated transcript abundance and columns to
+ samples. \code{readKallistoBootstrap} inputs kallisto bootstrap
+ replicates of a single sample into a matrix of transcript x bootstrap
+ abundance estimates.
+}
+
+\usage{
+readKallisto(files,
+ json = file.path(dirname(files), "run_info.json"),
+ h5 = any(grepl("\\\\.h5$", files)), what = KALLISTO_ASSAYS,
+ as = c("SummarizedExperiment", "list", "matrix"))
+
+readKallistoBootstrap(file, i, j)
+}
+
+\arguments{
+
+ \item{files}{character() paths to kallisto \sQuote{abundance.tsv}
+ output files. The assumption is that files are organized in the way
+ implied by kallisto, with each sample in a distinct directory, and
+ the directory containing files abundance.tsv, run_info.json, and
+ perhaps abundance.h5.}
+
+ \item{json}{character() vector of the same length as \code{files}
+ specifying the location of JSON files produced by kallisto and
+ containing information on the run. The default assumes that json
+ files are in the same directory as the corresponding abundance
+ file.}
+
+ \item{h5}{character() vector of the same length as \code{files}
+ specifying the location of HDF5 files produced by kallisto and
+ containing bootstrap estimates. The default assumes that HDF5 files
+ are in the same directory as the corresponding abundance file.}
+
+ \item{what}{character() vector of kallisto per-sample outputs to be
+ input. See KALLISTO_ASSAYS for available values.}
+
+ \item{as}{character(1) specifying the output format. See \code{Value}
+ for additional detail.}
+
+ \item{file}{character(1) path to a single HDF5 output file.}
+
+ \item{i, j}{integer() vector of row (\code{i}) and column (\code{j})
+ indexes to input.}
+
+}
+
+\value{
+
+ A \code{SummarizedExperiment}, \code{list}, or \code{matrix},
+ depending on the value of argument \code{as}; by default a
+ \code{SummarizedExperiment}. The \code{as="SummarizedExperiment"}
+ \code{rowData(se)} the length of each transcript;
+ \code{colData(se)} includes summary information on each sample,
+ including the number of targets and bootstraps, the kallisto and index
+ version, the start time and operating system call used to create the
+ file. \code{assays()} contains one or more transcript x sample
+ matrices of parameters estimated by kallisto (see
+ \code{KALLISTO_ASSAYS}).
+
+ \code{as="list"} return value contains information simillar to
+ \code{SummarizedExperiment} with row, column and assay data as
+ elements of the list without coordination of row and column
+ annotations into an integrated data container. \code{as="matrix"}
+ returns the specified assay as a simple \emph{R} matrix.
+
+}
+
+\references{
+ \url{http://pachterlab.github.io/kallisto} software for quantifying
+ transcript abundance.
+}
+
+\author{
+ Martin Morgan \url{martin.morgan at roswellpark.org}
+}
+
+\examples{
+outputs <- system.file(package="SummarizedExperiment", "extdata",
+ "kallisto")
+files <- dir(outputs, pattern="abundance.tsv", full=TRUE, recursive=TRUE)
+stopifnot(all(file.exists(files)))
+
+## default: input 'est_counts'
+(se <- readKallisto(files, as="SummarizedExperiment"))
+str(readKallisto(files, as="list"))
+str(readKallisto(files, as="matrix"))
+
+## available assays
+KALLISTO_ASSAYS
+## one or more assay
+readKallisto(files, what=c("tpm", "eff_length"))
+
+## alternatively: read hdf5 files
+files <- sub(".tsv", ".h5", files, fixed=TRUE)
+readKallisto(files)
+
+## input all bootstraps
+xx <- readKallistoBootstrap(files[1])
+ridx <- head(which(rowSums(xx) != 0), 3)
+cidx <- c(1:5, 96:100)
+xx[ridx, cidx]
+
+## selective input of rows (transcripts) and/or bootstraps
+readKallistoBootstrap(files[1], i=c(ridx, rev(ridx)), j=cidx)
+}
+
+\keyword{file}
diff --git a/man/saveHDF5SummarizedExperiment.Rd b/man/saveHDF5SummarizedExperiment.Rd
new file mode 100644
index 0000000..05e4cfd
--- /dev/null
+++ b/man/saveHDF5SummarizedExperiment.Rd
@@ -0,0 +1,144 @@
+\name{saveHDF5SummarizedExperiment}
+
+\alias{saveHDF5SummarizedExperiment}
+\alias{loadHDF5SummarizedExperiment}
+
+\title{Save/load a HDF5-based SummarizedExperiment object}
+
+\description{
+ \code{saveHDF5SummarizedExperiment} and \code{loadHDF5SummarizedExperiment}
+ can be used to save/load a HDF5-based \link{SummarizedExperiment} object
+ to/from disk.
+}
+
+\usage{
+saveHDF5SummarizedExperiment(x, dir="my_h5_se", replace=FALSE,
+ chunk_dim=NULL, level=NULL, verbose=FALSE)
+loadHDF5SummarizedExperiment(dir="my_h5_se")
+}
+
+\arguments{
+ \item{x}{
+ A \link{SummarizedExperiment} object.
+ }
+ \item{dir}{
+ The path (as a single string) to the directory where to save the
+ HDF5-based \link{SummarizedExperiment} object or to load it from.
+ When saving, the directory will be created so should not already exist,
+ unless \code{replace} is set to \code{TRUE}.
+ }
+ \item{replace}{
+ If directory \code{dir} already exists, should it be replaced with a
+ new one? The content of the existing directory will be lost!
+ }
+ \item{chunk_dim, level}{
+ The dimensions of the chunks and the compression level to use for
+ writting the assay data to disk.
+ Passed to the internal calls to \code{HDF5Array::writeHDF5Array}.
+ See \code{?HDF5Array::\link[HDF5Array]{writeHDF5Array}} for more
+ information.
+ }
+ \item{verbose}{
+ Set to \code{TRUE} to make the function display progress.
+ }
+}
+
+\details{
+ These functions use functionalities from the \pkg{rhdf5} and \pkg{HDF5Array}
+ packages internally and so require these packages to be installed.
+
+ \code{saveHDF5SummarizedExperiment} creates the directory specified
+ thru the \code{dir} argument and then populates it with the HDF5 datasets
+ (one per assay in \code{x}) plus a serialized version of \code{x} that
+ contains pointers to these datasets. This directory provides a
+ self-contained HDF5-based representation of \code{x} that can then
+ be loaded back in R with \code{loadHDF5SummarizedExperiment}.
+ Note that this directory is \emph{relocatable} i.e. it can be moved
+ (or copied) to a different place, on the same or a different computer,
+ before calling \code{loadHDF5SummarizedExperiment} on it. For convenient
+ sharing with collaborators, it is suggested to turn it into a tarball
+ (with Unix command \code{tar}), or zip file, before the transfer.
+ Please keep in mind that \code{saveHDF5SummarizedExperiment} and
+ \code{loadHDF5SummarizedExperiment} don't know how to produce/read
+ tarballs or zip files at the moment, so the process of packaging/extracting
+ the tarball or zip file is entirely the user responsibility. It is
+ typically done from outside R.
+
+ Finally please note that, depending on the size of the data to write to
+ disk and the performance of the disk, \code{saveHDF5SummarizedExperiment}
+ can take a long time to complete. Use \code{verbose=TRUE} to see its
+ progress.
+
+ \code{loadHDF5SummarizedExperiment} is generally very fast, even if
+ the assay data is big, because all the assays in the returned object
+ are \link[HDF5Array]{HDF5Array} objects pointing to the on-disk HDF5
+ datasets located in \code{dir}. \link[HDF5Array]{HDF5Array} objects are
+ typically light-weight in memory.
+}
+
+\value{
+ \code{saveHDF5SummarizedExperiment} returns an invisible
+ \link{SummarizedExperiment} object where all the assays are
+ \link[HDF5Array]{HDF5Array} objects pointing to the HDF5 datasets
+ saved in \code{dir}. It's in fact the same obect as the object that
+ would be returned by calling \code{loadHDF5SummarizedExperiment} on
+ \code{dir}.
+}
+
+\author{Hervé Pagès}
+
+\seealso{
+ \itemize{
+ \item \link{SummarizedExperiment} and \link{RangedSummarizedExperiment}
+ objects.
+
+ \item \link[HDF5Array]{HDF5Array} objects in the \pkg{HDF5Array} package.
+
+ \item The \code{\link[HDF5Array]{writeHDF5Array}} function in the
+ \pkg{HDF5Array} package, which \code{saveHDF5SummarizedExperiment}
+ uses internally to write the assay data to disk.
+ }
+}
+
+\examples{
+nrows <- 200; ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+se0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+ colData=colData)
+se0
+
+## Save 'se0' as an HDF5-based SummarizedExperiment object:
+dir <- sub("file", "h5_se0_", tempfile())
+h5_se0 <- saveHDF5SummarizedExperiment(se0, dir)
+h5_se0
+assay(h5_se0, withDimnames=FALSE) # HDF5Matrix object
+
+h5_se0b <- loadHDF5SummarizedExperiment(dir)
+h5_se0b
+assay(h5_se0b, withDimnames=FALSE) # HDF5Matrix object
+
+## Sanity checks:
+stopifnot(is(assay(h5_se0, withDimnames=FALSE), "HDF5Matrix"))
+stopifnot(all(DelayedArray(assay(se0)) == assay(h5_se0)))
+stopifnot(is(assay(h5_se0b, withDimnames=FALSE), "HDF5Matrix"))
+stopifnot(all(DelayedArray(assay(se0)) == assay(h5_se0b)))
+
+## ---------------------------------------------------------------------
+## More sanity checks
+## ---------------------------------------------------------------------
+
+## Make a copy of directory 'dir':
+somedir <- sub("file", "somedir", tempfile())
+dir.create(somedir)
+file.copy(dir, somedir, recursive=TRUE)
+dir2 <- list.files(somedir, full.names=TRUE)
+
+## 'dir2' contains a copy of 'dir'. Call loadHDF5SummarizedExperiment()
+## on it.
+h5_se0c <- loadHDF5SummarizedExperiment(dir2)
+
+stopifnot(is(assay(h5_se0c, withDimnames=FALSE), "HDF5Matrix"))
+stopifnot(all(DelayedArray(assay(se0)) == assay(h5_se0c)))
+}
diff --git a/tests/run_unitTests.R b/tests/run_unitTests.R
new file mode 100644
index 0000000..eabf7db
--- /dev/null
+++ b/tests/run_unitTests.R
@@ -0,0 +1,2 @@
+require("SummarizedExperiment") || stop("unable to load SummarizedExperiment package")
+SummarizedExperiment:::.test()
diff --git a/vignettes/SummarizedExperiment.Rmd b/vignettes/SummarizedExperiment.Rmd
new file mode 100644
index 0000000..5702f6b
--- /dev/null
+++ b/vignettes/SummarizedExperiment.Rmd
@@ -0,0 +1,345 @@
+---
+title: "_SummarizedExperiment_ for Coordinating Experimental Assays, Samples, and Regions of Interest"
+author: "Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès"
+date: "Revised: 22 June, 2016"
+output:
+ BiocStyle::html_document:
+ toc: true
+vignette: >
+ %\VignetteIndexEntry{SummarizedExperiment}
+ %\VignetteEngine{knitr::rmarkdown}
+ \usepackage[utf8]{inputenc}
+---
+
+```{r style, echo=FALSE, results='asis'}
+BiocStyle::markdown()
+```
+
+
+# Introduction
+
+The `SummarizedExperiment` class is used to store rectangular matrices of
+experimental results, which are commonly produced by sequencing and microarray
+experiments. Each object stores observations of one or more samples, along
+with additional meta-data describing both the observations (features) and
+samples (phenotypes).
+
+A key aspect of the `SummarizedExperiment` class is the coordination of the
+meta-data and assays when subsetting. For example, if you want to exclude a
+given sample you can do for both the meta-data and assay in one operation,
+which ensures the meta-data and observed data will remain in sync. Improperly
+accounting for meta and observational data has resulted in a number of
+incorrect results and retractions so this is a very desirable
+property.
+
+`SummarizedExperiment` is in many ways similar to the historical
+`ExpressionSet`, the main distinction being that `SummarizedExperiment` is more
+flexible in it's row information, allowing both `GRanges` based as well as those
+described by arbitrary `DataFrame`s. This makes it ideally suited to a variety
+of experiments, particularly sequencing based experiments such as RNA-Seq and
+ChIp-Seq.
+
+# Anatomy of a `SummarizedExperiment`
+
+The _SummarizedExperiment_ package contains two classes:
+`SummarizedExperiment` and `RangedSummarizedExperiment`.
+
+`SummarizedExperiment` is a matrix-like container where rows represent features
+of interest (e.g. genes, transcripts, exons, etc.) and columns represent
+samples. The objects contain one or more assays, each represented by a
+matrix-like object of numeric or other mode. The rows of a
+`SummarizedExperiment` object represent features of interest. Information
+about these features is stored in a `DataFrame` object, accessible using the
+function `rowData()`. Each row of the `DataFrame` provides information on the
+feature in the corresponding row of the `SummarizedExperiment` object. Columns
+of the DataFrame represent different attributes of the features of interest,
+e.g., gene or transcript IDs, etc.
+
+`RangedSummarizedExperiment` is the child of the `SummarizedExperiment` class
+which means that all the methods on `SummarizedExperiment` also work on a
+`RangedSummarizedExperiment`.
+
+The fundamental difference between the two classes is that the rows of a
+`RangedSummarizedExperiment` object represent genomic ranges of interest
+instead of a `DataFrame` of features. The `RangedSummarizedExperiment` ranges
+are described by a `GRanges` or a `GRangesList` object, accessible using the
+`rowRanges()` function.
+
+The following graphic displays the class geometry and highlights the
+vertical (column) and horizontal (row) relationships.
+
+
+```{r include = FALSE}
+# download current version of SE diagram
+#download.file("https://docs.google.com/feeds/download/drawings/Export?id=18OcDb80FpvSGRYnFl-8vUqwNNLaNHrG1I9SWKHCselo&exportFormat=svg", "SE.svg")
+download.file("https://docs.google.com/feeds/download/drawings/Export?id=1kiC8Qlo1mhSnLDqkGiRNPSo6GWn3C2duBszCFbJCB-g&exportFormat=svg", "SE.svg")
+```
+
+![Summarized Experiment](SE.svg)
+
+## Assays
+
+The `airway` 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 `RangedSummarizedExperiment` object which contains 8 different
+experimental and assays 64,102 gene transcripts.
+
+```{r, echo=FALSE}
+suppressPackageStartupMessages(library(SummarizedExperiment))
+suppressPackageStartupMessages(data(airway, package="airway"))
+```
+
+```{r}
+library(SummarizedExperiment)
+data(airway, package="airway")
+se <- airway
+se
+```
+
+To retrieve the experiment data from a `SummarizedExperiment` object one can
+use the `assays()` accessor. An object can have multiple assay datasets
+each of which can be accessed using the `$` operator.
+The `airway` dataset contains only one assay (`counts`). Here each row
+represents a gene transcript and each column one of the samples.
+
+```{r assays, eval = FALSE}
+assays(se)$counts
+```
+
+```{r assays_table, echo = FALSE}
+knitr::kable(assays(se)$counts[1:10,])
+```
+
+## 'Row' (regions-of-interest) data
+The `rowRanges()` accessor is used to view the range information for a
+`RangedSummarizedExperiment`. (Note if this were the parent
+`SummarizedExperiment` class we'd use `rowData()`). The data are stored in a
+`GRangesList` object, where each list element corresponds to one gene
+transcript and the ranges in each `GRanges` correspond to the exons in the
+transcript.
+
+```{r rowRanges}
+rowRanges(se)
+```
+
+## 'Column' (sample) data
+
+Sample meta-data describing the samples can be accessed using `colData()`, and
+is a `DataFrame` that can store any number of descriptive columns for each
+sample row.
+
+```{r colData}
+colData(se)
+```
+
+This sample metadata can be accessed using the `$` accessor which makes it
+easy to subset the entire object by a given phenotype.
+
+```{r columnSubset}
+# subset for only those samples treated with dexamethasone
+se[, se$dex == "trt"]
+```
+
+## Experiment-wide metadata
+
+Meta-data describing the experimental methods and publication references can be
+accessed using `metadata()`.
+
+```{r metadata}
+metadata(se)
+```
+
+Note that `metadata()` is just a simple list, so it is appropriate for _any_
+experiment wide metadata the user wishes to save, such as storing model
+formulas.
+
+```{r metadata-formula}
+metadata(se)$formula <- counts ~ dex + albut
+
+metadata(se)
+```
+
+# Constructing a `SummarizedExperiment`
+
+Often, `SummarizedExperiment` or `RangedSummarizedExperiment` objects are
+returned by functions written by other packages. However it is possible to
+create them by hand with a call to the `SummarizedExperiment()` constructor.
+
+Constructing a `RangedSummarizedExperiment` with a `GRanges` as the
+_rowRanges_ argument:
+
+```{r constructRSE}
+nrows <- 200
+ncols <- 6
+counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
+rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)),
+ IRanges(floor(runif(200, 1e5, 1e6)), width=100),
+ strand=sample(c("+", "-"), 200, TRUE),
+ feature_id=sprintf("ID%03d", 1:200))
+colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+ row.names=LETTERS[1:6])
+
+SummarizedExperiment(assays=list(counts=counts),
+ rowRanges=rowRanges, colData=colData)
+```
+
+A `SummarizedExperiment` can be constructed with or without supplying
+a `DataFrame` for the _rowData_ argument:
+
+```{r constructSE}
+SummarizedExperiment(assays=list(counts=counts), colData=colData)
+```
+
+# Common operations on `SummarizedExperiment`
+
+## Subsetting
+
+- `[` Performs two dimensional subsetting, just like subsetting a matrix
+ or data frame.
+```{r 2d}
+# subset the first five transcripts and first three samples
+se[1:5, 1:3]
+```
+- `$` operates on `colData()` columns, for easy sample extraction.
+```{r colDataExtraction}
+se[, se$cell == "N61311"]
+```
+
+## Getters and setters
+
+- `rowRanges()` / (`rowData()`), `colData()`, `metadata()`
+```{r getSet}
+counts <- matrix(1:15, 5, 3, dimnames=list(LETTERS[1:5], LETTERS[1:3]))
+
+dates <- SummarizedExperiment(assays=list(counts=counts),
+ rowData=DataFrame(month=month.name[1:5], day=1:5))
+
+# Subset all January assays
+dates[rowData(dates)$month == "January", ]
+```
+
+- `assay()` versus `assays()`
+There are two accessor functions for extracting the assay data from a
+`SummarizedExperiment` object. `assays()` operates on the entire list of assay
+data as a whole, while `assay()` operates on only one assay at a time.
+`assay(x, i)` is simply a convenience function which is equivalent to
+`assays(x)[[i]]`.
+
+```{r assay_assays}
+assays(se)
+
+assays(se)[[1]][1:5, 1:5]
+
+# assay defaults to the first assay if no i is given
+assay(se)[1:5, 1:5]
+
+assay(se, 1)[1:5, 1:5]
+```
+
+## Range-based operations
+
+- `subsetByOverlaps()`
+`SummarizedExperiment` objects support all of the `findOverlaps()` methods and
+associated functions. This includes `subsetByOverlaps()`, which makes it easy
+to subset a `SummarizedExperiment` object by an interval.
+
+```{r overlap}
+# Subset for only rows which are in the interval 100,000 to 110,000 of
+# chromosome 1
+roi <- GRanges(seqnames="1", ranges=100000:1100000)
+subsetByOverlaps(se, roi)
+```
+
+# Advanced: Extending `RangedSummarizedExperiment`
+
+For representing and manipulating data in their own package, Bioconductor
+developers are encouraged to re-use existing classes defined in other
+packages like the `RangedSummarizedExperiment` or `GRanges` containers
+defined in the `SummarizedExperiment` or `GenomicRanges` infrastructure
+packages, respectively. Many Bioconductor packages are designed around
+these basic containers, that is, they define functions that take and/or
+return a `RangedSummarizedExperiment` or `GRanges` object.
+For example the `csaw` package defines various functions that operate
+on `RangedSummarizedExperiment` objects, which are used to represent the
+number of ChIP-seq reads from each BAM file overlapping pre-specified
+regions.
+
+However, sometimes re-using the `RangedSummarizedExperiment` class as-is
+does not satisfy the needs of the package and the developer makes the choice
+to extend the class in order to accomodate the special needs of the package
+and/or the specificities of the data that it deals with. For example the
+`DESeq2` package defines the `DESeqDataSet` class which extends
+`RangedSummarizedExperiment` to add the `design` and `dispersionFunction`
+slots to it.
+
+The following subsections describe in a nutshell how the developer would
+typically proceed for extending `RangedSummarizedExperiment` in his/her
+own package. Some familiarity with the S4 class system is required. Readers
+not familiar with the S4 class system are encouraged to consult the vignette
+`A quick overview of the S4 class system` located in the `S4Vectors` package
+for the basics of implementing and extending S4 classes.
+
+The approach described below allows the developer to extend
+`RangedSummarizedExperiment` it in a way that remains agnostic of its
+internals. Keeping this separation between the responsibilities of the owners
+of the parent and child classes facilitate maintenance in the long run.
+In particular, the implementation of the child class won't be affected by
+changes in the internals of the parent class.
+
+## Depend on, and import, the `SummarizedExperiment` package
+
+Add `SummarizedExperiment` to the Depends field of the DESCRIPTION file
+of the package and the `import(SummarizedExperiment)` directive to its
+NAMESPACE file.
+
+## Define and export the `RangedSummarizedExperiment` subclass
+
+Define the subclass with something like:
+```{r rseSubclass}
+setClass("MyRSESubclass",
+ contains="RangedSummarizedExperiment",
+ representation=representation(
+ slot1="integer",
+ slot2="function"
+ ## ... maybe more ...
+ )
+)
+```
+
+Export it by adding the `exportClasses(MyRSESubclass)` directive to the
+NAMESPACE file.
+
+## Construct `MyRSESubclass` instances
+
+When calling `new()` for constructing a `MyRSESubclass` instance, specify
+only the MyRSESubclass-specific slots:
+`new("MyRSESubclass", rse, slot1=value1, slot2=value2)`,
+where `rse` is a `RangedSummarizedExperiment` object.
+
+Providing a `MyRSESubclass` constructor function (named as the class itself)
+is recommended.
+
+## Define a validity method
+
+The validity method for `MyRSESubclass` only needs to take care of what's
+new in `MyRSESubclass` with respect to `RangedSummarizedExperiment`, that is,
+of the aspects of `MyRSESubclass` objects that are not already covered by the
+validity method for `RangedSummarizedExperiment` objects. This is because
+calling `validObject()` on a `MyRSESubclass` object automatically validates
+it as a `RangedSummarizedExperiment` object first and then calls the validity
+method for `MyRSESubclass` objects. In other words, validation works
+incrementally starting from the root of the class hierarchy and going in the
+parent-to-child direction.
+
+## Use the `RangedSummarizedExperiment` accessors on `MyRSESubclass` objects
+
+Like any user of `RangedSummarizedExperiment` objects, the developer of
+`MyRSESubclass` should always use the `RangedSummarizedExperiment` accessors
+to access the `RangedSummarizedExperiment`-specific parts of his/her
+`MyRSESubclass` objects.
+
+## Use `callNextMethod`
+
+In case some of the methods defined for `RangedSummarizedExperiment` objects
+need to be overwritten, the new methods should call `callNextMethod`
+internally.
--
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