Skip to content

Commit 405f1b2

Browse files
committed
Add debugging for celltypist in docker
1 parent e1c8606 commit 405f1b2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

singlecell/resources/chunks/RunCelltypist.R

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
if (!reticulate::py_module_available(module = 'celltypist')) {
2+
logger::log_warn('python celltypist not found!')
3+
logger::log_warn(paste0('Python available: ', reticulate::py_available()))
4+
logger::log_warn('Python config')
5+
pyConfig <- reticulate::py_config()
6+
for (pn in names(pyConfig)) {
7+
logger::log_warn(paste0(pn, ': ', paste0(pyConfig[[pn]]), collapse = ','))
8+
}
9+
10+
logger::log_warn(paste0('pythonpath: ', reticulate::py_config()$pythonpath))
11+
12+
logger::log_warn('Python packages:')
13+
for (pn in reticulate::py_list_packages()$package) {
14+
logger::log_warn(pn)
15+
}
16+
17+
if ('conga' %in% reticulate::py_list_packages()$package) {
18+
tryCatch({
19+
logger::log_warn(reticulate::import('celltypist'))
20+
}, error = function(e){
21+
logger::log_warn("Error with reticulate::import('celltypist')")
22+
logger::log_warn(reticulate::py_last_error())
23+
logger::log_warn(conditionMessage(e))
24+
traceback()
25+
})
26+
}
27+
}
28+
129
for (datasetId in names(seuratObjects)) {
230
printName(datasetId)
331
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]])

0 commit comments

Comments
 (0)