hemberg-lab / SC3

A tool for the unsupervised clustering of cells from single cell RNA-Seq experiments
http://bioconductor.org/packages/SC3
GNU General Public License v3.0
119 stars 55 forks source link

Error in !isSpike(object) : invalid argument type #59

Open yicheinchang opened 6 years ago

yicheinchang commented 6 years ago

Hi,

I guess this is somehow related with #53 or 10X data. I tried to run sc3 on a 10x data set. Based on #53 , I manually convert both counts slot and logcounts slot to a standard/regular matrix. However, I am getting another error

Setting SC3 parameters...
Error in !isSpike(object) : invalid argument type

It seems the issue came from gene_filter. Set gene_filter = FALSE will make the code work. 10X data most likely will have no Spike-in. For my data set, isSpike(mySingleCellExperiment) will return NULL, which is the expected behavior.

Here is my session info:

R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblasp-r0.2.19.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C              LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] SC3_1.7.2                  Rtsne_0.13                 cowplot_0.9.1              scater_1.6.1              
 [5] SingleCellExperiment_1.0.0 SummarizedExperiment_1.8.0 DelayedArray_0.4.0         matrixStats_0.52.2        
 [9] GenomicRanges_1.30.0       GenomeInfoDb_1.14.0        IRanges_2.12.0             S4Vectors_0.16.0          
[13] ggplot2_2.2.1              Biobase_2.38.0             BiocGenerics_0.24.0        knitr_1.17                

loaded via a namespace (and not attached):
 [1] bitops_1.0-6            bit64_0.9-7             RColorBrewer_1.1-2      doParallel_1.0.11       progress_1.1.2         
 [6] tools_3.4.2             doRNG_1.6.6             R6_2.2.2                KernSmooth_2.23-15      vipor_0.4.5            
[11] DBI_0.7                 lazyeval_0.2.1          colorspace_1.3-2        gridExtra_2.3           prettyunits_1.0.2      
[16] bit_1.1-12              compiler_3.4.2          pkgmaker_0.22           caTools_1.17.1          scales_0.5.0           
[21] mvtnorm_1.0-6           DEoptimR_1.0-8          robustbase_0.92-8       stringr_1.2.0           digest_0.6.12          
[26] XVector_0.18.0          rrcov_1.4-3             pkgconfig_2.0.1         htmltools_0.3.6         WriteXLS_4.0.0         
[31] limma_3.34.4            rlang_0.1.2             RSQLite_2.0             shiny_1.0.5             bindr_0.1              
[36] gtools_3.5.0            dplyr_0.7.4             RCurl_1.95-4.8          magrittr_1.5            GenomeInfoDbData_0.99.1
[41] Matrix_1.2-11           Rcpp_0.12.14            ggbeeswarm_0.6.0        munsell_0.4.3           viridis_0.4.0          
[46] stringi_1.1.5           yaml_2.1.14             edgeR_3.20.1            zlibbioc_1.24.0         rhdf5_2.22.0           
[51] gplots_3.0.1            plyr_1.8.4              grid_3.4.2              blob_1.1.0              gdata_2.18.0           
[56] shinydashboard_0.6.1    lattice_0.20-35         locfit_1.5-9.1          rjson_0.2.15            rngtools_1.2.4         
[61] reshape2_1.4.2          codetools_0.2-15        biomaRt_2.34.0          XML_3.98-1.9            glue_1.2.0             
[66] data.table_1.10.4-3     httpuv_1.3.5            foreach_1.4.4           gtable_0.2.0            assertthat_0.2.0       
[71] mime_0.5                xtable_1.8-2            e1071_1.6-8             pcaPP_1.9-72            class_7.3-14           
[76] viridisLite_0.2.0       pheatmap_1.0.8          tibble_1.3.4            iterators_1.0.9         AnnotationDbi_1.40.0   
[81] registry_0.5            beeswarm_0.2.3          memoise_1.1.0           tximport_1.6.0          bindrcpp_0.2           
[86] cluster_2.0.6           ROCR_1.0-7             

Thanks in advance, Yi-Chien.

wikiselev commented 6 years ago

@yicheinchang sorry for a delayed response, have you figured the problem? If not, could you please share your dataset with vk6@sanger.ac.uk?

yicheinchang commented 6 years ago

Hi @wikiselev Unfortunately, I couldn't share my actual data. However, I suspected this is a 10X specific issue. Perhaps you can reproduce this issue by using the public datasets released by 10X Single Cell Gene Expression Datasets

In addition, I found a quick workaround. All you need is to explicitly set the spike-in information even when there is no spike-in in the experiment. For example,

isSpike(sce, "ERCC") <- rep(FALSE, time = nrow(sce))

Best, Yi-Chien.

wikiselev commented 6 years ago

Add this line to the 10X tutorial.