diff --git a/R/functions.R b/R/functions.R index ce40ad4..ed4c7e7 100644 --- a/R/functions.R +++ b/R/functions.R @@ -4,7 +4,8 @@ if (sum(k_singular) > 0) warning(paste('Dropping single category variables:'), paste(colnames(df)[k_singular], collapse=', ')) - df <- df[, !k_singular] + df <- df[, !k_singular, drop=F] + return(df) } seurat2anndata <- function( @@ -52,7 +53,7 @@ seurat2anndata <- function( ) if (!is.null(outFile)) - anndata$AnnData$write(adata, outFile, compression = 'gzip') + adata$write(outFile, compression = 'gzip') adata }