Skip to content

Commit

Permalink
Fix tabix index; #1494
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast committed Oct 5, 2023
1 parent 5676cad commit 364fe42
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,10 @@ MultiGetReadsInRegion <- function(
for (i in seq_along(along.with = fragment.list)) {
tbx.path <- GetFragmentData(object = fragment.list[[i]], slot = "path")
cellmap <- GetFragmentData(object = fragment.list[[i]], slot = "cells")
tabix.file <- TabixFile(file = tbx.path)
tabix.file <- TabixFile(
file = tbx.path,
index = GetIndexFile(fragment = tbx.path, verbose = FALSE)
)
open(con = tabix.file)
reads <- GetReadsInRegion(
cellmap = cellmap,
Expand Down Expand Up @@ -1573,7 +1576,10 @@ CutMatrix <- function(
for (i in seq_along(along.with = fragments)) {
fragment.path <- GetFragmentData(object = fragments[[i]], slot = "path")
cellmap <- GetFragmentData(object = fragments[[i]], slot = "cells")
tabix.file <- TabixFile(file = fragment.path)
tabix.file <- TabixFile(
file = fragment.path,
index = GetIndexFile(fragment = fragment.path, verbose = FALSE)
)
open(con = tabix.file)
# remove regions that aren't in the fragment file
seqnames.in.both <- intersect(
Expand Down Expand Up @@ -1641,7 +1647,10 @@ MultiRegionCutMatrix <- function(
cellmap <- colnames(x = object)
names(x = cellmap) <- cellmap
}
tabix.file <- TabixFile(file = frag.path)
tabix.file <- TabixFile(
file = frag.path,
index = GetIndexFile(fragment = frag.path, verbose = FALSE)
)
open(con = tabix.file)
# remove regions that aren't in the fragment file
common.seqlevels <- intersect(
Expand Down

0 comments on commit 364fe42

Please sign in to comment.