SingleCellExperiment function in SingleCellExperiment package returns error (when reproducing example)
2
1
Entering edit mode
@walter-f-baumann-12439
Last seen 6.4 years ago

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     

 

R bioconductor singlecellexperiment single cell • 5.5k views
ADD COMMENT
1
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 17 hours ago
The city by the bay

You're mixing BioC-devel packages (SingleCellExperiment) with BioC-release packages (everything else). If you want to use SingleCellExperiment, you'll need to update to BioC-devel:

library(BiocInstaller)
useDevel()
biocLite()

Packages currently in BioC-devel will become the next BioC-release, which is coming up next month. Workflows are traditionally re-built with BioC-devel packages in preparation for an imminent release.

ADD COMMENT
0
Entering edit mode
lahrmannu • 0
@lahrmannu-14249
Last seen 6.4 years ago

Hi there,

because I have exactly the same problem, I'd like to add that it doesn't seem to be a simple "version mix" issue. I have latest linux, latest R and latest bioc devel updates (run: library(BiocInstaller) -> useDevel() -> biocValid() -> biocLite()) (all a couple of minutest old) and the error remains.

Below my sessionInfo:

> sessionInfo()

R version 3.4.2 (2017-09-28)

Platform: x86_64-pc-linux-gnu (64-bit)

Running under: Ubuntu 16.04.3 LTS

Matrix products: default

BLAS: /usr/lib/libblas/libblas.so.3.6.0

LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              

 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=en_US.UTF-8    

 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   

 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 

 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:

[1] parallel  stats4    stats     graphics  grDevices utils     datasets

[8] methods   base     

other attached packages:

 [1] SingleCellExperiment_0.99.4 SummarizedExperiment_1.7.10

 [3] DelayedArray_0.3.21         matrixStats_0.52.2         

 [5] Biobase_2.37.2              GenomicRanges_1.29.15      

 [7] GenomeInfoDb_1.13.5         IRanges_2.11.19            

 [9] S4Vectors_0.15.14           BiocGenerics_0.23.4        

[11] BiocInstaller_1.27.6       

loaded via a namespace (and not attached):

 [1] lattice_0.20-35         bitops_1.0-6            grid_3.4.2             

 [4] zlibbioc_1.23.0         XVector_0.17.2          Matrix_1.2-11          

 [7] tools_3.4.2             RCurl_1.95-4.8          compiler_3.4.2         

[10] GenomeInfoDbData_0.99.1

 

ADD COMMENT
0
Entering edit mode

I must admit that I still cannot reproduce the error. Here is the full set of commands I am running:

library(BiocInstaller)
useDevel() # This fails when devel is already in use.
biocValid(fix=TRUE)
library(SingleCellExperiment)
example(SingleCellExperiment) # this works.

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.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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!

ADD REPLY

Login before adding your answer.

Traffic: 594 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6