read_bgz | R Documentation |
Read a compressed bgz file into R.
read_bgz(
path,
method = c("data.table", "utils"),
nrows = NULL,
header = TRUE,
verbose = TRUE,
...
)
path |
Path to bgz-compressed file. |
method |
Method to use to import bgz file. |
nrows |
The maximum number of rows to read. Unlike |
header |
Does the first data line contain column names? Defaults according to whether every non-empty field on the first data line is type character. If so, or TRUE is supplied, any empty column names are given a default name. |
verbose |
Be chatty and report timings? |
... |
Additional arguments passed to fread or read.delim2. |
NOTE: Packages like Rsamtools and seqminer aren't great for this because they require that the bgz file it also indexed already.
Other tabix functions:
construct_tabix_path()
,
construct_vcf_path()
,
convert()
,
index
,
query_table()
,
query_vcf()
,
run_bgzip()
tmp <- tempfile(fileext = ".tsv.gz")
data.table::fwrite(echodata::BST1, file = tmp, sep = "\t")
path <- Rsamtools::bgzip(file = tmp, overwrite=TRUE)
dat <- echotabix::read_bgz(path=path, method="utils")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.