On 04/03/2015 04:37 AM, Andrea Rau wrote:
Hello,

I am the maintainer of a Bioconductor package called 'HTSFilter' that
imports DESeq2. On today's build report, I see that my package (as well
as DESeq2 and all of the other packages that import it) is showing an
error message which seems to arise from a recent change in the DESeq2
code dealing with the dimnames of a DESeqDataSet object. The error
message in my package reads:

Error in `assays<-`(`*tmp*`, value = <S4 object of class structure("SimpleList", package = 
"S4Vectors")>) :
    'dimnames' differ between assay elements

I broke assays<-,SummarizedExperiment,*-method in GenomicRanges 1.19.50. it has been fixed and problems should clear up in the next build report. The (incorrect) error about 'dimnames differ between assay elements', seen in

./DESeq2/zin2-buildsrc.html
./BiocGenerics/zin2-checksrc.html
./HTSFilter/zin2-buildsrc.html
./VariantAnnotation/zin2-checksrc.html
./bsseq/zin2-buildsrc.html
./AllelicImbalance/zin2-buildsrc.html
./TCC/zin2-buildsrc.html
./gage/zin2-buildsrc.html
./ReportingTools/zin2-checksrc.html
./MLSeq/zin2-buildsrc.html
./systemPipeR/zin2-buildsrc.html
./DiffBind/zin2-buildsrc.html
./SGSeq/zin2-buildsrc.html
./VariantFiltering/zin2-buildsrc.html
./rgsepd/zin2-buildsrc.html

will not appear.

Off-list, Michael Love asked me what exactly does get checked. The row- and column names of each incoming assay need either to be NULL, or to match the current row and column names of the SummarizedExperiment. For instance the following

> example(SummarizedExperiment)
## ...
> assays(se2) = assays(se2)                           # incoming dimnames
> assays(se2) = assays(se2, withDimnames=FALSE)       # no incoming dimnames
> m = assays(se2)[["counts"]]; rownames(m) = NULL
> assays(se2)[["counts"]] = m                         # no rownames
> assays(se2)[[1]] = assays(se2)[[1]][, c(2:6, 1)]    # out-of-order columns
Error in `assays<-`(`*tmp*`, value = <S4 object of class "SimpleList">) :
  current and replacement dimnames() differ

It doesn't seem safe to allow the dimnames to mismatch, even though earlier versions allowed this.

The documentation page has

     assays(x, ..., withDimnames=TRUE) <- value

but says

withDimnames: A 'logical(1)', indicating whether dimnames should be
          applied to extracted assay elements (this argument is ignored
          for the setter 'assays<-'). Setting 'withDimnames=FALSE'
          increases the speed and memory efficiency with which assays
          are extracted.

which may make one wonder why withDimnames=TRUE appears in the signature for assays<-. The reason involves complex assignments like

  names(assays(se2)) = "foo"

versus

  names(assays(se2, withDimanames=FALSE)) = "bar"

The second version is more efficient than the first, avoiding copying dimnames. The reason for the efficiency is a little complicated. assays() in these expressions acts as both getter and setter. The signature of the setter assays<- needs to be able to 'pass through' the withDimnames argument to the getter, even if it has no effect on the setter itself. I have updated the documentation to clarify this, inasmuch as I am able.

  assayNames(se2) = "foo"

hides the complex assignment complexity for this common use case. Probably the default should be FALSE for the setter, but symmetry and the complexity of the update scenario made me hesitant to do so. Presumably handling of dimnames will be simplified in the next release cycle, when dimnames are stored redundantly on all assay elements.

Sorry for the confusion from my flawed commits in version 1.19.50.

Martin


and seems to occur when calling the DESeq function (right after the
"gene-wise dispersion estimates" message is printed). I know that today
is the deadline for fixing errors prior to release, so the time-frame is
somewhat short to fix errors. To ensure that my package isn't withheld
from release, should I retrograde to the last stable version of DESeq2
rather than using dev?

Thanks for your help,
Andrea

Here is some code + sessionInfo that illustrate the error:

  > library(HTSFilter)
  > library(DESeq2)
  > library(Biobase)
  > data(sultan)
  > conds <- pData(sultan)$cell.line
  > dds <- DESeqDataSetFromMatrix(countData = exprs(sultan),
+        colData = data.frame(cell.line = conds),
+        design = ~ cell.line)
  > dds <- DESeq(dds)
estimating size factors
estimating dispersions
gene-wise dispersion estimates
Error in `assays<-`(`*tmp*`, value = <S4 object of class "SimpleList">) :
    'dimnames' differ between assay elements
  > sessionInfo()
R version 3.2.0 beta (2015-04-01 r68134)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252
LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils datasets
methods   base

other attached packages:
   [1] DESeq2_1.7.46             RcppArmadillo_0.4.650.1.1
Rcpp_0.11.5               GenomicRanges_1.19.50
   [5] GenomeInfoDb_1.3.16       IRanges_2.1.43 S4Vectors_0.5.22
HTSFilter_1.7.0
   [9] Biobase_2.27.3            BiocGenerics_0.13.10

loaded via a namespace (and not attached):
   [1] RColorBrewer_1.1-2    futile.logger_1.4 plyr_1.8.1
XVector_0.7.4         tools_3.2.0
   [6] futile.options_1.0.0  rpart_4.1-9 digest_0.6.8
annotate_1.45.4       RSQLite_1.0.0
[11] gtable_0.1.2          lattice_0.20-31 DBI_0.3.1
proto_0.3-10          DESeq_1.19.0
[16] cluster_2.0.1         genefilter_1.49.2 stringr_0.6.2
locfit_1.5-9.1        nnet_7.3-9
[21] grid_3.2.0            AnnotationDbi_1.29.20 XML_3.98-1.1
survival_2.38-1       BiocParallel_1.1.21
[26] foreign_0.8-61        latticeExtra_0.6-26 Formula_1.2-0
limma_3.23.11         geneplotter_1.45.0
[31] ggplot2_1.0.1         reshape2_1.4.1 lambda.r_1.1.7
edgeR_3.9.14          Hmisc_3.15-0
[36] MASS_7.3-40           scales_0.2.4 splines_3.2.0
colorspace_1.2-6      xtable_1.7-4
[41] acepack_1.3-3.3       munsell_0.4.2




        [[alternative HTML version deleted]]

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to