From ed0b089d5bf0f1349e027ea20b19efc232f489cf Mon Sep 17 00:00:00 2001 From: Alexander Blume Date: Tue, 16 Jan 2024 16:20:16 +0100 Subject: [PATCH] check for empty elements using is.null instead of isEmpty --- R/tabix.functions.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tabix.functions.R b/R/tabix.functions.R index cdad401..79e00b4 100644 --- a/R/tabix.functions.R +++ b/R/tabix.functions.R @@ -311,7 +311,7 @@ makeTabixHeader <- function(slotList) { } ) # then we remove slots we don't need in the header (as the @.Data slot) - tabixHead <- tabixHead[!S4Vectors::isEmpty(tabixHead)] + tabixHead <- tabixHead[!is.null(tabixHead)] return(tabixHead) @@ -388,7 +388,7 @@ readTabixHeader <- function(tbxFile) { } ) - headerVals <- headerVals[!isEmpty(headerVals)] + headerVals <- headerVals[!is.null(headerVals)] # parse the object class class <- unlist(sapply((strsplit(gsub("#", "", h),split = ":")), function(x) if(x[1]=="Class") return(x[2])))