Query by genomic coordinates.

query_tabular(
  fullSS_tabix,
  chrom,
  start_pos,
  end_pos,
  local = "infer",
  verbose = TRUE
)

Arguments

fullSS_tabix

Path to tabix file.

chrom

Chromosome to query.

start_pos

Minimum genomic position to query.

end_pos

Maximum genomic position to query.

local

Whether fullSS_tabix is stored locally or on a remote server/website. By default ("infer") will infer local status and use the appropriate method.

verbose

Print messages.

Value

data.table with the queried subset of genomic data.

Examples

if (FALSE) {
BST1 <- echodata::BST1

#### local ####
fullSS_path <- echodata::example_fullSS()
fullSS_tabix <- convert(fullSS_path = fullSS_path, start_col = "BP")
tab <- query_tabular(
    fullSS_tabix = fullSS_tabix,
    chrom = BST1$CHR[1],
    start_pos = min(BST1$POS),
    end_pos = max(BST1$POS)
)

#### remote ####
fullSS_tabix <- file.path(
    "https://egg2.wustl.edu/roadmap/data/byFileType",
    "chromhmmSegmentations/ChmmModels/coreMarks/jointModel/final",
    "E099_15_coreMarks_dense.bed.bgz"
)
tab <- query_tabular(
    fullSS_tabix = fullSS_tabix,
    chrom = BST1$CHR[1],
    start_pos = min(BST1$POS),
    end_pos = max(BST1$POS)
)
}