Description Usage Arguments Value See Also Examples
Read a track
object from a BED, bedGraph, WIG or BigWig file
1 2 3 4 5 6 7 | importScore(
file,
file2,
format = c("BED", "bedGraph", "WIG", "BigWig"),
ranges = GRanges(),
ignore.strand = TRUE
)
|
file |
The path to the file to read. |
file2 |
The path to the second file to read. |
format |
The format of import file. Could be BED, bedGraph, WIG or BigWig |
ranges |
An object of |
ignore.strand |
ignore the strand or not when do filter. default TRUE |
a track
object
See Also as importBam
, track
,
viewTracks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #import a BED file
bedfile <- system.file("tests", "test.bed", package="rtracklayer",
mustWork=TRUE)
dat <- importScore(file=bedfile, format="BED",
ranges=GRanges("chr7", IRanges(127471197, 127474697)))
##import a WIG file
wigfile <- system.file("tests", "step.wig", package = "rtracklayer",
mustWork=TRUE)
dat <- importScore(file=wigfile, format="WIG")
##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 <- importScore(file=bwfile, format="BigWig")
}
##import 2 file
wigfile1 <- system.file("extdata", "cpsf160.repA_+.wig", package="trackViewer",
mustWork=TRUE)
wigfile2 <- system.file("extdata", "cpsf160.repA_-.wig", package="trackViewer",
mustWork=TRUE)
dat <- importScore(wigfile1, wigfile2, format="WIG",
ranges=GRanges("chr11", IRanges(122817703, 122889073)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.