From ecbe7b991c6ac5648b07c6fd0f70dff737a2e455 Mon Sep 17 00:00:00 2001 From: Lambda Moses Date: Thu, 14 Nov 2024 01:55:53 -0500 Subject: [PATCH] Deal with directory names that contain digits --- R/read.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/read.R b/R/read.R index 9101f13..e613eed 100644 --- a/R/read.R +++ b/R/read.R @@ -340,7 +340,7 @@ readVisiumHD <- function(data_dir, bin_size = c(2L, 8L, 16L), grep("binned_out|square|um$", dirs_check) |> any() if (sanity_passed) { # match sample names with bin_size - samples <- grep(paste0(bin_size, collapse = "|"), dirs_check, value = TRUE) + samples <- grep(paste0(paste0(bin_size, collapse = "|"), "um$"), dirs_check, value = TRUE) } else { stop("data_dir should contain or be `square_0xxum`") }