Skip to content

Commit bb1221b

Browse files
committed
Ensure SEURAT_MAX_THREADS is an integer
1 parent bf1760a commit bb1221b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

SequenceAnalysis/resources/queries/sequenceanalysis/outputfiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function beforeInsert(row, errors){
1919
beforeUpsert(row, errors);
2020
}
2121

22-
function beforeUpdate(row, errors){
22+
function beforeUpdate(row, oldRow, errors){
2323
beforeUpsert(row, errors);
2424
}
2525

singlecell/resources/chunks/Functions.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,10 @@ options('Seurat.memsafe' = TRUE)
180180

181181
if (Sys.getenv('SEURAT_MAX_THREADS') != '') {
182182
print(paste0('Setting future::plan workers to: ', Sys.getenv('SEURAT_MAX_THREADS')))
183-
future::plan(strategy='multisession', workers=Sys.getenv('SEURAT_MAX_THREADS'))
183+
mt <- as.integer(Sys.getenv('SEURAT_MAX_THREADS'))
184+
if (is.na(mt)) {
185+
stop(paste0('SEURAT_MAX_THREAD is not an integer: ', mt <- Sys.getenv('SEURAT_MAX_THREADS')))
186+
}
187+
188+
future::plan(strategy='multisession', workers=mt)
184189
}

0 commit comments

Comments
 (0)