From 360af08a20b089dd6955c1097a6a9e5541665fb9 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Tue, 27 Sep 2022 14:24:36 -0400 Subject: [PATCH 1/2] Add tolower to format check --- R/methods.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/methods.R b/R/methods.R index 2fbdcbe..020347d 100644 --- a/R/methods.R +++ b/R/methods.R @@ -13,8 +13,8 @@ #' @return Output object convertFormat <- function(obj, from = c("anndata", "seurat", "sce", "loom"), to = c("anndata", "loom", "sce", "seurat", "cds"), outFile = NULL, main_layer = NULL, ...) { - from <- match.arg(from) - to <- match.arg(to) + from <- match.arg(tolower(x = from)) + to <- match.arg(tolower(x = to)) tryCatch( { From 711594ce8b8cd70cef8cac55da57c184a5084571 Mon Sep 17 00:00:00 2001 From: samuel-marsh Date: Tue, 27 Sep 2022 15:00:02 -0400 Subject: [PATCH 2/2] update with error --- R/methods.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/methods.R b/R/methods.R index 020347d..dd5738c 100644 --- a/R/methods.R +++ b/R/methods.R @@ -13,8 +13,10 @@ #' @return Output object convertFormat <- function(obj, from = c("anndata", "seurat", "sce", "loom"), to = c("anndata", "loom", "sce", "seurat", "cds"), outFile = NULL, main_layer = NULL, ...) { - from <- match.arg(tolower(x = from)) - to <- match.arg(tolower(x = to)) + from <- tolower(x = from) + from <- match.arg(from) + to <- tolower(x = to) + to <- match.arg(to) tryCatch( {