Skip to content

Commit 4993b6d

Browse files
committed
Allow setting function argument to null
1 parent ef85fc9 commit 4993b6d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

singlecell/resources/chunks/Functions.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ bindArgs <- function(fun, seuratObj, allowableArgNames = NULL, disallowedArgName
3030
}
3131

3232
print(paste0('Binding argument: ', name, ': ', displayVal))
33-
boundArgs[[name]] <- val
33+
if (all(is.null(val))) {
34+
boundArgs[name] <- list(NULL)
35+
} else {
36+
boundArgs[[name]] <- val
37+
}
3438
}
3539
}
3640

singlecell/resources/web/singlecell/panel/cDNAImportPanel.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Ext4.define('SingleCell.panel.cDNAImportPanel', {
313313
if (r.application === 'CITE-Seq') {
314314
fieldName = 'citeseqReadsetId';
315315
}
316-
else if (r.application === 'Cell Hashing') {
316+
else if (r.application === 'Cell Hashing' || r.application === 'Cell Hashing/CITE-seq') {
317317
fieldName = 'hashingReadsetId';
318318
}
319319
else if (r.librarytype === '10x 5\' GEX') {
@@ -323,8 +323,8 @@ Ext4.define('SingleCell.panel.cDNAImportPanel', {
323323
fieldName = 'tcrReadsetId';
324324
}
325325
else {
326-
console.error('Unknown row type')
327-
console.error(row)
326+
console.error('Unknown row type: ' + r.application);
327+
console.error(r);
328328
}
329329

330330
r.doInsert = !(plateToCDNAMap[r.plateId] ? plateToCDNAMap[r.plateId].map(r => r[fieldName]).filter(r => !!r).filter(getUnique).join('') : null);

0 commit comments

Comments
 (0)