From 1992ee7bc812ce79ee395b834da50029363ae2fb Mon Sep 17 00:00:00 2001 From: Anand Mayakonda Date: Mon, 10 Jun 2024 10:41:31 +0200 Subject: [PATCH] fix typo for #1028 --- R/ntcounts.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ntcounts.R b/R/ntcounts.R index 4a0f4d7..4c2523e 100644 --- a/R/ntcounts.R +++ b/R/ntcounts.R @@ -28,8 +28,8 @@ bamreadcounts = function(bam = NULL, loci = NULL, zerobased = FALSE, mapq = 10, stop("BAM file does not exist: ", x) } - if(!file.exists(paste0(bam , ".bai"))){ - stop("Index file for ", bam, " not found!") + if(!file.exists(paste0(x , ".bai"))){ + stop("Index file for ", x, " not found!") } gsub(pattern = "\\.bam$", replacement = "", x = basename(x), ignore.case = TRUE)