Hi,
I want to get into Single Cell RNA-Seq and found already a good tutorial (https://www.bioconductor.org/help/workflows/simpleSingleCell/). There a package called SingleCellExperiment is introduced. However, the package does not seem to work for me. I had problems with the installation (it always said that it is not available for R version 3.4.2), so I downloaded it and installed it, then it appeared in my package list.
However, the SingleCellExperiment function always returns the following error:
Error in checkSlotAssignment(object, name, value) : assignment of an object of class “GRangesList” is not valid for slot ‘rowRanges’ in an object of class “SingleCellExperiment”; is(value, "GenomicRanges_OR_GRangesList") is not TRUE
I also tried to reproduce the example on the help page, however, the same error is returned. Here the example:
library(SingleCellExperiment)
ncells <- 100 u <- matrix(rpois(20000, 5), ncol=ncells) v <- log2(u + 1) pca <- matrix(runif(ncells*5), ncells) tsne <- matrix(rnorm(ncells*2), ncells) sce <- SingleCellExperiment(assays=list(counts=u, logcounts=v), reducedDims=SimpleList(PCA=pca, tSNE=tsne))
Below my sessionInfo:
R version 3.4.2 (2017-09-28) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows 7 (build 7601) Service Pack 1 Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets [8] methods base other attached packages: [1] mgcv_1.8-22 nlme_3.1-131 [3] readxl_1.0.0 R.utils_2.5.0 [5] R.oo_1.21.0 R.methodsS3_1.7.1 [7] BiocInstaller_1.26.1 SingleCellExperiment_0.99.4 [9] SummarizedExperiment_1.6.5 DelayedArray_0.2.7 [11] matrixStats_0.52.2 Biobase_2.36.2 [13] GenomicRanges_1.28.6 GenomeInfoDb_1.12.3 [15] IRanges_2.10.5 S4Vectors_0.14.7 [17] BiocGenerics_0.22.1 magrittr_1.5 loaded via a namespace (and not attached): [1] Rcpp_0.12.13 XVector_0.16.0 zlibbioc_1.22.0 [4] lattice_0.20-35 rlang_0.1.2 tools_3.4.2 [7] grid_3.4.2 tibble_1.3.4 Matrix_1.2-11 [10] GenomeInfoDbData_0.99.0 bitops_1.0-6 RCurl_1.95-4.8 [13] cellranger_1.1.0 compiler_3.4.2
I must admit that I still cannot reproduce the error. Here is the full set of commands I am running:
Perhaps you could try re-installing SingleCellExperiment from
biocLite
? I have a suspicion that the package was built using the old GenomicRanges classes, and probably failed when those class names disappeared in the latest version of the package. If this is the case, there should have been a version bump for SingleCellExperiment - I wonder why that didn't happen.I suggest re-installing the packages that lead from SingleCellExperiment to S4Vectors -- I think SingleCellExperiment, SummarizedExperiment, GenomicRanges, IRanges, S4Vectors, and GenomeInfoDb, XVector for good measure.
Can't tell which one of the packages produced the problem, but re-installing all of the mentioned packages resolved the issue for me - THANKS a lot for the fast help!