When processing only single samples, the code fails at line #324 of countUMI.R. This is because cm is of class numeric instead of a matrix for single sample inputs.
Suggested edit: check if cm generated in line #311 is a matrix and if not convert to one. Below was the solution I used for the time being
if (class(cm) == 'numeric'){
cm <- as.matrix(cm)
colnames(cm) <- colnames(expr)[2]
}
When processing only single samples, the code fails at line #324 of countUMI.R. This is because
cm
is of classnumeric
instead of a matrix for single sample inputs. Suggested edit: check ifcm
generated in line #311 is a matrix and if not convert to one. Below was the solution I used for the time beingif (class(cm) == 'numeric'){ cm <- as.matrix(cm) colnames(cm) <- colnames(expr)[2] }