Skip to content

Commit d46d297

Browse files
committed
Better reporting
1 parent ef3f51a commit d46d297

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

singlecell/resources/chunks/DimPlots.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ for (datasetId in names(seuratObjects)) {
44

55
for (field in fieldNames) {
66
if (!(field %in% names(seuratObj@meta.data))) {
7+
print(paste0('Field missing, skipping: ', field))
78
next
89
}
910

11+
if (length((unique(seuratObj@meta.data))) <= 1) {
12+
next
13+
} else {
14+
print(paste0('Object has one or fewer values, skipping: ', field))
15+
}
16+
1017
P1 <- Seurat::DimPlot(seuratObj, group.by = field, reduction = 'tsne')
1118
P2 <- Seurat::DimPlot(seuratObj, group.by = field, reduction = 'umap')
1219

0 commit comments

Comments
 (0)