Skip to content

Commit

Permalink
check for empty elements using is.null instead of isEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
alexg9010 committed Jan 17, 2024
1 parent 388770d commit 70abc39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/tabix.functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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])))
Expand Down

0 comments on commit 70abc39

Please sign in to comment.