Skip to content

Commit

Permalink
fix to tbmate.R idx inference
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanding Zhou committed Sep 16, 2020
1 parent 64218b9 commit 731b571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/tbmate.R
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ infer_idx <- function(tbk_fname) {
file.exists(file.path(dirname(tbk_fname), 'idx.gz.tbi'))) {
idx_fname <- file.path(dirname(tbk_fname), 'idx.gz')
} else {
hdr <- tbk_hdrs(tbk_fname)
if (file.exists(hdr$msg)) {
hdr <- tbk_hdrs(tbk_fname)[[1]]
if (!is.null(hdr$msg) && file.exists(hdr$msg)) {
idx_fname <- hdr$msg
}
stop("Cannot locate index file. Provide through idx_fname.\n")
Expand Down

0 comments on commit 731b571

Please sign in to comment.