aertslab/cisTopic

Error of the 'runCGSModels' function in cisTopic v0.3.0

Van1yu3 opened this issue · 4 comments

I notice that this package has been updated to version 0.3.0. However, the function ‘runCGSModels’, which is said to be equivalent to ‘runModels’ in the version 0.2.1, return some error.

More specifically, I tried running the tutorial on simulated single cell epigenomes from melanoma cell line , and changed the function ‘runModels’ in the tutorial to ‘runCGSModels’. The error message is returned as follows:

cisTopicObject_tmp <- runCGSModels(cisTopicObject, topic=c(2, 5:15, 20, 25), seed=987, nCores=13, burnin = 120, iterations = 150, addModels=FALSE)

[1] "Formatting data..."
[1] "Exporting data..."
[1] "Running models..."
Error in do.ply(i) :
task 1 failed - "cannot coerce type 'closure' to vector of type 'double'"

Moreover, when I reset the argument ‘nCores=1’, the error message is different from the previous one:

cisTopicObject_tmp <- runCGSModels(cisTopicObject, topic=c(2, 5:15, 20, 25), seed=987, nCores=1, burnin = 120, iterations = 150, addModels=FALSE)

[1] "Formatting data..."
[1] "Running models..."

| | 0%Error in lda.collapsed.gibbs.sampler(cellList, topic, regionList, num.iterations = iterations, :
object 'iterations' not found

Therefore, there probably exists some bug in the cisTopic v0.3.0. Hope that my error message helps.

Hi @Van1yu3 !

There was indeed a bug in the function, it should be solved now! Thanks a ton for noticing :)

Cheers,

C

Hi @cbravo93 !

Thank you for your efforts! After I reinstalled the package, sadly I encountered the same error when nCores=13:
cisTopicObject_tmp <- runCGSModels(cisTopicObject, topic=c(2, 5:15, 20, 25), seed=987, nCores=13, burnin = 120, iterations = 150, addModels=FALSE)

[1] "Formatting data..."in = 120, iterations = 150, addModels=FALSE)
[1] "Exporting data..."
[1] "Running models..."
Error in do.ply(i) :
task 1 failed - "cannot coerce type 'closure' to vector of type 'double'"

and another new error when nCores=1:
cisTopicObject_tmp <- runCGSModels(cisTopicObject, topic=c(2, 5:15, 20, 25), seed=987, nCores=1, burnin = 120, iterations = 150, addModels=FALSE)

[1] "Formatting data..."n = 120, iterations = 150, addModels=FALSE)
[1] "Running models..."
| | 0%Error in as.double(eta) :
cannot coerce type 'closure' to vector of type 'double'

Thanks a lot!

Hi @Van1yu3 !

Can you reinstall and try again?

Thanks!

Hi @cbravo93 !

Everything goes well this time. Thank you for your effort!