Description Usage Arguments Value Examples
Read a track object from a BED, bedGraph, 
WIG or BigWig file to RleList
| 1 | importData(files, format = NA, ranges = GRanges())
 | 
| files | The path to the files to read. | 
| format | The format of import file. Could be BAM, BED, bedGraph, WIG or BigWig | 
| ranges | An object of  | 
a list of RleList.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #import a BED file
bedfile <- system.file("tests", "test.bed", package="rtracklayer",
                       mustWork=TRUE)
dat <- importData(files=bedfile, format="BED",
                  ranges=GRanges("chr7", IRanges(127471197, 127474697)))
##import a WIG file
wigfile <- system.file("tests", "step.wig", package = "rtracklayer",
                       mustWork=TRUE)
dat <- importData(files=wigfile, format="WIG", 
                  ranges=GRanges("chr19", 
                                 IRanges(59104701, 59110920)))
##import a BigWig file
if(.Platform$OS.type!="windows"){
  ##this is because we are using rtracklayer::import
  bwfile <- system.file("tests", "test.bw", package = "rtracklayer",
                        mustWork=TRUE)
  dat <- importData(files=bwfile, format="BigWig", 
                    ranges=GRanges("chr19", IRanges(1500, 2700)))
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.