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
116 stars 55 forks source link

'sc3' is not a slot in class "SCESet" #35

Closed slowkow closed 7 years ago

slowkow commented 7 years ago

Hello,

Here's what happens when I follow your tutorial with my data:

library(scater)
library(sc3)

sce <- newSCESet(
  countData = counts,
  phenoData = new("AnnotatedDataFrame", data = meta)
)

sce <- calculateQCMetrics(sce)

sce <- sc3(
  object  = sce,
  ks      = 5:16,
  biology = TRUE,
  n_cores = 20,
  svm_max = 1e4
)
Setting SC3 parameters...
Error in (function (cl, name, valueClass)  :
‘sc3’ is not a slot in class “SCESet”
In addition: Warning message:
Removed 6774 rows containing non-finite values (stat_density).
class(sce)
[1] "SCESet"
attr(,"package")
[1] "scater"

Session info

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.5 (Santiago)

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

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

other attached packages:
 [1] SC3_1.3.15            scater_1.0.4          WGCNA_1.51
 [4] dynamicTreeCut_1.63-1 viridis_0.3.4         stringr_1.2.0
 [7] sitools_1.4           scde_1.99.4           flexmix_2.3-13
[10] lattice_0.20-34       scales_0.4.1          Rtsne_0.11
[13] reshape2_1.4.2        readr_1.0.0           RColorBrewer_1.1-2
[16] pheatmap_1.0.8        org.Hs.eg.db_3.3.0    MASS_7.3-45
[19] limma_3.28.21         liger_0.1             largeVis_0.1.10.2
[22] Matrix_1.2-7.1        GO.db_3.3.0           AnnotationDbi_1.34.4
[25] IRanges_2.6.1         S4Vectors_0.10.3      Biobase_2.32.0
[28] BiocGenerics_0.18.0   gridExtra_2.2.1       ggrepel_0.6.5
[31] ggplot2_2.2.1         fastcluster_1.1.22    dplyr_0.5.0
[34] doMC_1.3.4            iterators_1.0.8       foreach_1.4.3
[37] dendsort_0.3.3        data.table_1.10.4     BiocParallel_1.6.6

loaded via a namespace (and not attached):
 [1] minqa_1.2.4               colorspace_1.3-1
 [3] rjson_0.2.15              class_7.3-14
 [5] modeltools_0.2-21         htmlTable_1.7
 [7] RcppArmadillo_0.7.700.0.0 MatrixModels_0.4-1
 [9] mvtnorm_1.0-6             codetools_0.2-15
[11] splines_3.3.2             extRemes_2.0-8
[13] Lmoments_1.2-3            tximport_1.0.3
[15] doParallel_1.0.10         robustbase_0.92-7
[17] impute_1.46.0             knitr_1.15.1
[19] Formula_1.2-1             nloptr_1.0.4
[21] Cairo_1.5-9               pbkrtest_0.4-6
[23] cluster_2.0.5             shinydashboard_0.5.3
[25] shiny_1.0.1               rrcov_1.4-3
[27] assertthat_0.1            lazyeval_0.2.0
[29] acepack_1.4.1             htmltools_0.3.5
[31] quantreg_5.29             tools_3.3.2
[33] gtable_0.2.0              doRNG_1.6
[35] Rcpp_0.12.10              gdata_2.17.0
[37] preprocessCore_1.34.0     nlme_3.1-128
[39] lme4_1.1-12               mime_0.5
[41] pacman_0.4.1              rngtools_1.2.4
[43] WriteXLS_4.0.0            gtools_3.5.0
[45] XML_3.98-1.5              distillery_1.0-2
[47] DEoptimR_1.0-8            edgeR_3.14.0
[49] zlibbioc_1.18.0           pcaMethods_1.64.0
[51] rhdf5_2.16.0              SparseM_1.74
[53] memoise_1.0.0             pkgmaker_0.22
[55] biomaRt_2.28.0            rpart_4.1-10
[57] latticeExtra_0.6-28       stringi_1.1.2
[59] RSQLite_1.1               highr_0.6
[61] Rook_1.1-1                pcaPP_1.9-61
[63] e1071_1.6-8               caTools_1.17.1
[65] matrixStats_0.51.0        bitops_1.0-6
[67] RMTstat_0.3               ROCR_1.0-7
[69] labeling_0.3              plyr_1.8.4
[71] magrittr_1.5              R6_2.2.0
[73] gplots_3.0.1              Hmisc_4.0-0
[75] DBI_0.5-1                 whisker_0.3-2
[77] foreign_0.8-67            mgcv_1.8-16
[79] survival_2.40-1           RCurl_1.95-4.8
[81] nnet_7.3-12               tibble_1.2
[83] janitor_0.2.1             car_2.1-4
[85] KernSmooth_2.23-15        digest_0.6.12
[87] xtable_1.8-2              httpuv_1.3.3
[89] dbscan_0.9-8              brew_1.0-6
[91] munsell_0.4.3             registry_0.3
wikiselev commented 7 years ago

Hi,

You need to update the scater package, the current version is 1.2.0.

Cheers, Vlad

slowkow commented 7 years ago

Hi Vlad, thanks for the quick reply.

Now I get:

Setting SC3 parameters...
Error in sc3_prepare.SCESet(object, exprs_values, ks, gene_filter, pct_dropout_min,  :
  no slot of name "logged" for this object of class "SCESet"

Versions:

 [1] SC3_1.3.16            scater_1.3.42
wikiselev commented 7 years ago

Hi Kamil,

Thanks for reporting that! Turned out the "logged" slot has been recently removed from the scater object. So I need to update SC3 now. Will try to do it today and let you know once it's ready.

Thanks again, Cheers, Vlad

wikiselev commented 7 years ago

Actually, for your purposes, if you are using the latest version of Bioconductor (but not the development one!), you can install both SC3 and scater using it and they should work fine together. The conflict appears only in the newest versions which are still in the development. So you need SC3_1.3.15 and scater_1.2.0 and they are both available via the latest version of Bioconductor.

wikiselev commented 7 years ago

Hi Kamil,

Yes, please use the current release versions of both packages (as mentioned in the above comment) for the moment.

Resolving the conflict in the development versions may take some time.

Thanks again for bringing this up! Cheers, Vlad

slowkow commented 7 years ago

Thanks! It works after running:

# Upgrade to Bioconductor 3.4
biocLite("BiocUpgrade")
biocLite(c("SC3", "scater"))

Now I have the versions you mentioned:

SC3_1.3.15
scater_1.2.0

And the code seems to be running. I hope it works!


Aside:

In the future, you might consider tagging your commits. For example, when you have finished working on release 1.1.4, create a tag called 1.1.4 with git tag 1.1.4 and git push --tags. Alternatively, you can tag a specific commit in the history.

After the tags are set and published on github, you can install any version with devtools::install_github("user/package@1.2.3")

wikiselev commented 7 years ago

Great, I am glad it worked! Thanks for letting me know about tagging for github. But ideally I would want to have a stable version on Bioconductor and don't bother people with the development stuff. So basically your last try was the right one that most people should do by default.

But anyway thanks for catching it for me since it would have become a bug in the stable version with the new Bioconductor release in a month time.

wikiselev commented 7 years ago

The newest version of SC3 (SC3_1.3.17) is now compatible with all versions of scater. It is available on the release branch of Bioconductor.