dviraran / SingleR

SingleR: Single-cell RNA-seq cell types Recognition (legacy version)
GNU General Public License v3.0
266 stars 98 forks source link

CreateSinglerSeuratObject error #41

Open drtrix90 opened 5 years ago

drtrix90 commented 5 years ago

I'm getting the following output when i try to run CreateSinglerSeuratObject:

> singler = CreateSinglerSeuratObject(org18_singleR,
+                                     min.genes = 500, technology = "10X", project.name = "org18",
+                                     species = "Human",fine.tune=F,
+                                     normalize.gene.length = F, min.cells = 5, npca = 10,
+                                     regress.out = "nUMI", reduce.seurat.object = T)
[1] "org18"
[1] "Reading single-cell data..."
[1] "Create Seurat object..."
Performing log-normalization
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating gene means
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating gene variance to mean ratios
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Regressing out: nUMI
  |======================================================================================| 100%
Time Elapsed:  48.5627040863037 secs
Scaling data matrix
  |======================================================================================| 100%
[1] "Creat SingleR object..."
[1] "Dimensions of counts data: 17636x12871"
[1] "Annotating data with HPCA..."
[1] "Variable genes method: de"
[1] "Number of DE genes:3342"
[1] "Number of cells: 12871"
Error in makeCluster(numCores) : could not find function "makeCluster"

I just re-installed SingleR in order to convert to the new S4 format and use the browser interface. When I installed I did get this "possible error" which might be related:

> devtools::install_github('dviraran/SingleR')
Downloading GitHub repo dviraran/SingleR@master
Skipping 3 packages not available: GSEABase, GSVA, singscore
✔  checking for file ‘/private/var/folders/sh/qplsh1hj1rncjz_h9wtk4j8c0000gn/T/RtmpHMjK4z/remotes12ee22a6238ec/dviraran-SingleR-f53ff05/DESCRIPTION’ ...
─  preparing ‘SingleR’: (416ms)
✔  checking DESCRIPTION meta-information
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘SingleR_0.2.2.tar.gz’ (17s)

* installing *source* package ‘SingleR’ ...
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Note: possible error in 'calculateSingScores(sc.data.gl, ': unused argument (numCores = numCores) 
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (SingleR)

Any help would be appreciated, love the package otherwise! Thanks!

dviraran commented 5 years ago

This all seems related to some fixes I made recently. I hope I didn't mess up to much stuff...

So after the reinstall, you don't have the first issue anymore?

Regarding the second issue, I just deployed a fix for that.

drtrix90 commented 5 years ago

No, I guess I wrote that in the wrong order. First I re-installed SingleR, got the "possible error" and now I am unable to use the CreateSinglerSeuratObject function.

I just tried it again and the installation "possible error" is gone, but this error:

Error in makeCluster(numCores) : could not find function "makeCluster"

still persists.

Thanks for your help!

dviraran commented 5 years ago

ok. I fixed the NAMESPACE file. Should work now (if you reinstall).

drtrix90 commented 5 years ago

Now I'm getting this error at the same step:

Error in registerDoParallel(cl) : could not find function "registerDoParallel"

dviraran commented 5 years ago

sorry about that. Added this as well now...

drtrix90 commented 5 years ago

Now I get this error when trying to install the package...


Downloading GitHub repo dviraran/SingleR@master
Skipping 3 packages not available: GSEABase, GSVA, singscore
✔  checking for file ‘/private/var/folders/sh/qplsh1hj1rncjz_h9wtk4j8c0000gn/T/RtmpczxeGd/remotes1334728f77a0b/dviraran-SingleR-4785077/DESCRIPTION’ ...
─  preparing ‘SingleR’: (968ms)
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘SingleR_0.2.2.tar.gz’ (17.7s)

* installing *source* package ‘SingleR’ ...
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error : object ‘registerDoParallel’ is not exported by 'namespace:parallel'
ERROR: lazy loading failed for package ‘SingleR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/SingleR’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/sh/qplsh1hj1rncjz_h9wtk4j8c0000gn/T//RtmpczxeGd/file133477c973bfd/SingleR_0.2.2.tar.gz’ had non-zero exit status```
dviraran commented 5 years ago

Eventually we'll get there... please try now

drtrix90 commented 5 years ago

Slightly different this time :)

> devtools::install_github('dviraran/SingleR')
Downloading GitHub repo dviraran/SingleR@master
Skipping 3 packages not available: GSEABase, GSVA, singscore
✔  checking for file ‘/private/var/folders/sh/qplsh1hj1rncjz_h9wtk4j8c0000gn/T/RtmpczxeGd/remotes1334753f53ed3/dviraran-SingleR-99aff7c/DESCRIPTION’ ...
─  preparing ‘SingleR’: (1s)
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘SingleR_0.2.2.tar.gz’ (18s)

* installing *source* package ‘SingleR’ ...
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘doParallel’
ERROR: lazy loading failed for package ‘SingleR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/SingleR’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/sh/qplsh1hj1rncjz_h9wtk4j8c0000gn/T//RtmpczxeGd/file13347395d6df9/SingleR_0.2.2.tar.gz’ had non-zero exit status
dviraran commented 5 years ago

:) added it to the description...

drtrix90 commented 5 years ago

Hmm the package installs fine but still get this message when running the create object function:

Error in registerDoParallel(cl) : could not find function "registerDoParallel"

dviraran commented 5 years ago

not sure what I'm doing wrong. Anyway, changed it to explicitly call doParallel::registerDoParallel

drtrix90 commented 5 years ago

same error :(

dviraran commented 5 years ago

hmmm.. can you try to install doParallel, load the library, and then run SingleR? I am not sure why this is failing. Maybe also restart RStudio?

drtrix90 commented 5 years ago

Looks like that did it, thanks for your help!