Skip to content

Commit

Permalink
Report missing barcode/cDNA_IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Oct 20, 2024
1 parent 518351f commit 85ff116
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/Utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ ClrNormalizeByGroup <- function(seuratObj, groupingVar, assayName = 'ADT', targe
if (!is.null(minCellsPerGroup) && !is.na(minCellsPerGroup)) {
groupValues <- as.character(seuratObj[[groupingVar, drop = TRUE]])
if (any(is.na(groupValues))) {
stop(paste0('There were NAs for the column: ', groupingVar))
missing <- unique(seuratObj$BarcodePrefix[[is.na(seuratObj[[groupingVar]])]])
stop(paste0('There were NAs for the column: ', groupingVar, '. BarcodePrefix values were: ', paste0(missing, collapse = ',')))
}

totals <- table(groupValues)
Expand Down

0 comments on commit 85ff116

Please sign in to comment.