From 9faaa7f9f2ed0b68100c8ea505ba06bc9a6c7a50 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Tue, 12 Nov 2024 10:36:35 +0100 Subject: [PATCH] Update R/Seurat.R Co-authored-by: Luke Zappia --- R/Seurat.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/Seurat.R b/R/Seurat.R index ea7351b..95c218c 100644 --- a/R/Seurat.R +++ b/R/Seurat.R @@ -259,11 +259,11 @@ to_Seurat <- function( } if (!.to_seurat_is_atomic_character(layer_name)) { - stop("layer_name must be the name of one of the layers or NULL") + stop("layer_name must be character vector of length 1") } if (!layer_name %in% names(adata$layers)) { - stop("layer_name must be the name of one of the layers or NULL") + stop("layer_name '", layer_name, "' is not an item in adata$layers") } return(Matrix::t(adata$layers[[layer_name]]))