diff --git a/R/bambu.R b/R/bambu.R index edd8a8cc..c12499a9 100644 --- a/R/bambu.R +++ b/R/bambu.R @@ -267,7 +267,7 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL, #load in the barcode clustering from file if provided iter <- seq_len(ncol(metadata(quantData_i)$countMatrix)) # iter is integer if(!is.null(clusters)){ - if(class(clusters[[i]])!="CompressedCharacterList"){ # !is.list(clusters) is FALSE for CompressedCharacterList + if(!inherits(clusters, "CompressedCharacterList") && !is.list(clusters)){ clusterMaps <- NULL for(j in seq_along(metadata(quantData_i)$sampleNames)){ #load in a file per sample name provided clusterMap <- fread(clusters[[j]], header = FALSE, @@ -288,7 +288,7 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL, if(length(quantData)>1){ iter <- clusters[[i]] #lowMemory mode }else{ - iter <- clusters#do.call(c,clusters) + iter <- do.call(c,clusters) #clusters direct assignment in Multiplex_Major_Patch is throwing error } } }