| Title: | Import WIG Data into R in Long Format |
|---|---|
| Description: | Import WIG data into R in long format. |
| Authors: | Ramiro Magno [aut, cre] (ORCID: <https://orcid.org/0000-0001-5226-3441>) |
| Maintainer: | Ramiro Magno <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-31 08:18:22 UTC |
| Source: | https://github.com/ramiromagno/wig |
import_wig reads a WIG (wiggle) file and
expands the data into long format, i.e., the each observation in the returned
tibble pertains the position of one single base.
import_wig(file_path, n = -1L)import_wig(file_path, n = -1L)
file_path |
A path to a WIG file. |
n |
The (maximal) number of lines to read. Negative values indicate that one should read up to the end of input on the connection. |
A tibble of three variables: chr, chromosome; pos, genomic
position; and val, value. Chromosome positions are 1-relative, i.e. the
first base is 1, as specified in WIG files.
# Import a WIG file wig_file <- system.file( "extdata", file = 'hg19-pik3ca.wig', package = "wig", mustWork = TRUE) import_wig(wig_file)# Import a WIG file wig_file <- system.file( "extdata", file = 'hg19-pik3ca.wig', package = "wig", mustWork = TRUE) import_wig(wig_file)