Skip to content

Commit 992cb86

Browse files
committed
Add error handling for plotting
1 parent 96c9dbf commit 992cb86

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

singlecell/resources/chunks/CiteSeqPlots.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ for (datasetId in names(seuratObjects)) {
66
print('ADT assay not present, skipping')
77
} else {
88
for (adt in rownames(seuratObj[['ADT']])) {
9-
CellMembrane::FeaturePlotAcrossReductions(seuratObj, features = paste0('adt_', adt))
9+
tryCatch({
10+
CellMembrane::FeaturePlotAcrossReductions(seuratObj, features = paste0('adt_', adt))
11+
}, error = function(e){
12+
print(conditionMessage(e))
13+
traceback()
14+
print('ADTs:')
15+
print(sort(rownames(seuratObj@assays$ADT)))
16+
stop(paste0('Error running FeaturePlotAcrossReductions for: ', datasetId))
17+
})
18+
1019
}
1120
}
1221

0 commit comments

Comments
 (0)