Skip to content

Commit 44b4875

Browse files
committed
Add debugging for conga in docker
1 parent 3dc149b commit 44b4875

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

singlecell/resources/chunks/RunConga.R

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,34 @@ if (!file.exists(netRc)) {
77
invisible(Rlabkey::labkey.setCurlOptions(NETRC_FILE = netRc))
88
Rdiscvr::SetLabKeyDefaults(baseUrl = serverBaseUrl, defaultFolder = defaultLabKeyFolder)
99

10+
if (!reticulate::py_module_available(module = 'conga')) {
11+
logger::log_warn('python conga not found!')
12+
logger::log_warn(paste0('Python available: ', reticulate::py_available()))
13+
logger::log_warn('Python config')
14+
pyConfig <- reticulate::py_config()
15+
for (pn in names(pyConfig)) {
16+
logger::log_warn(paste0(pn, ': ', paste0(pyConfig[[pn]]), collapse = ','))
17+
}
18+
19+
logger::log_warn(paste0('pythonpath: ', reticulate::py_config()$pythonpath))
20+
21+
logger::log_warn('Python packages:')
22+
for (pn in reticulate::py_list_packages()$package) {
23+
logger::log_warn(pn)
24+
}
25+
26+
if ('conga' %in% reticulate::py_list_packages()$package) {
27+
tryCatch({
28+
logger::log_warn(reticulate::import('conga'))
29+
}, error = function(e){
30+
logger::log_warn("Error with reticulate::import('conga')")
31+
logger::log_warn(reticulate::py_last_error())
32+
logger::log_warn(conditionMessage(e))
33+
traceback()
34+
})
35+
}
36+
}
37+
1038
for (datasetId in names(seuratObjects)) {
1139
printName(datasetId)
1240
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]])

0 commit comments

Comments
 (0)