Skip to content
Snippets Groups Projects
Commit 122fd1b6 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 1.10.1

parent fb309692
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ Description: The SummarizedExperiment container contains one or more assays,
each represented by a matrix-like object of numeric or other mode.
The rows typically represent genomic ranges of interest and the columns
represent samples.
Version: 1.10.0
Version: 1.10.1
Encoding: UTF-8
Author: Martin Morgan, Valerie Obenchain, Jim Hester, Hervé Pagès
Maintainer: Bioconductor Package Maintainer <maintainer@bioconductor.org>
......@@ -27,4 +27,4 @@ Collate: Assays-class.R SummarizedExperiment-class.R
makeSummarizedExperimentFromDataFrame.R
makeSummarizedExperimentFromLoom.R readKallisto.R zzz.R
NeedsCompilation: no
Packaged: 2018-05-01 00:28:59 UTC; biocbuild
Packaged: 2018-05-11 00:29:37 UTC; biocbuild
......@@ -126,24 +126,31 @@ setMethod("SummarizedExperiment", "SimpleList",
}
}
## 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"))
}
## validate the assay rownames and colnames
.validate_names <- function(nms, expected_nms, what1, what2)
{
if (is.null(nms))
return()
if (!is.character(nms))
stop(wmsg(what1, " must be NULL or a character vector"))
if (!is.null(attributes(nms)))
stop(wmsg(what1, " must be NULL or a character vector",
" with no attributes"))
if (!identical(nms, expected_nms))
stop(wmsg(what1, " must be NULL or identical to ", what2))
}
test
}, logical(1))
for(i in seq_along(assays)) {
a <- assays[[i]]
rownames <- rownames(a)
.validate_names(rownames, ans_rownames,
"assay rownames()",
"rowData rownames() / rowRanges names()")
colnames <- colnames(a)
.validate_names(colnames, ans_colnames,
"assay colnames()",
"colData rownames()")
}
assays <- Assays(assays)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment