| Title: | Read bigWig and bigBed Files |
|---|---|
| Description: | Read bigWig and bigBed files using "libBigWig" <https://github.com/dpryan79/libBigWig>. Provides lightweight access to the binary bigWig and bigBed formats developed by the UCSC Genome Browser group. |
| Authors: | Jay Hesselberth [aut, cre], RNA Bioscience Initiative [fnd, cph], Devon Ryan [cph] |
| Maintainer: | Jay Hesselberth <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-06-18 22:10:54 UTC |
| Source: | https://github.com/cran/cpp11bigwig |
Columns are automatically typed based on the autoSql schema embedded
in the bigBed file. Integer types (uint, int) become R integers,
floating point types (float, double) become R doubles, and all
other types (including array types like int[blockCount]) remain
as character strings.
read_bigbed(bbfile, chrom = NULL, start = NULL, end = NULL)read_bigbed(bbfile, chrom = NULL, start = NULL, end = NULL)
bbfile |
path or URL for a bigBed file. Remote files
( |
chrom |
read data for specific chromosome |
start |
start position for data |
end |
end position for data |
tibble
https://github.com/dpryan79/libBigWig
https://github.com/brentp/bw-python
bb <- system.file("extdata", "test.bb", package = "cpp11bigwig") read_bigbed(bb) read_bigbed(bb, chrom = "chr10")bb <- system.file("extdata", "test.bb", package = "cpp11bigwig") read_bigbed(bb) read_bigbed(bb, chrom = "chr10")
Read data from bigWig files.
read_bigwig( bwfile, chrom = NULL, start = NULL, end = NULL, as = NULL, fill = 0 )read_bigwig( bwfile, chrom = NULL, start = NULL, end = NULL, as = NULL, fill = 0 )
bwfile |
path or URL for a bigWig file. Remote files
( |
chrom |
read data for specific chromosome |
start |
start position for data |
end |
end position for data |
as |
return data as a specific type. One of |
fill |
value used for bases with no data when |
When as = "Rle", the result is an S4Vectors::Rle whose expanded
length equals the queried range, i.e. end - start when both are
supplied, otherwise the extent of the returned data for each
chromosome. Bases with no data in the file are set to fill. bigWig
coordinates are 0-based and half-open, so element i corresponds to
genomic position start + i - 1. A single-chromosome query returns a
bare Rle; a multi-chromosome query returns a named
IRanges::RleList.
A tibble, GRanges, or Rle/RleList depending on as.
https://github.com/dpryan79/libBigWig
https://github.com/brentp/bw-python
bw <- system.file("extdata", "test.bw", package = "cpp11bigwig") read_bigwig(bw) read_bigwig(bw, chrom = "10") read_bigwig(bw, chrom = "1", start = 100, end = 130) read_bigwig(bw, as = "GRanges") read_bigwig(bw, chrom = "1", start = 100, end = 130, as = "Rle")bw <- system.file("extdata", "test.bw", package = "cpp11bigwig") read_bigwig(bw) read_bigwig(bw, chrom = "10") read_bigwig(bw, chrom = "1", start = 100, end = 130) read_bigwig(bw, as = "GRanges") read_bigwig(bw, chrom = "1", start = 100, end = 130, as = "Rle")