View source: R/spViewPerFeature.R
spViewPerFeature | R Documentation |
Use Snapshot
-class to visualize a specific region of genomic data
spViewPerFeature(GRL, name, files, ignore.strand=FALSE,
multi.levels = FALSE, fac=character(0L), ...)
GRL |
Object |
name |
Character(1) specifying which element in |
files |
Charactor() or |
ignore.strand |
Logical(1) indicating whether to ignore the strand of the genomic data. |
multi.levels |
Logical(1) indicating whether to plot the
coverage of multiple files on different panels. If |
fac |
Character(1) indicating which column of local metadata
( |
... |
Arguments used for creating a |
A Snapshot
instance
Chao-Jen Wong cwon2@fhcrc.org
Snapshot
## Example 1
library(GenomicFeatures)
txdbFile <- system.file("extdata", "sacCer2_sgdGene.sqlite",
package="yeastNagalakshmi")
## either use a txdb file quaried from UCSC or use existing TxDb packages.
txdb <- loadDb(txdbFile)
grl <- exonsBy(txdb, by="gene")
file <- system.file("extdata", "SRR002051.chrI-V.bam",
package="yeastNagalakshmi")
s <- spViewPerFeature(GRL=grl, name="YAL001C", files=file)
## Example 2
## multi-files: using 'BamFileList' and setting up the 'DataFrame'
## holding the phenotype data
bfiles <- BamFileList(c(a=file, b=file))
values(bfiles) <- DataFrame(sampleGroup=factor(c("normal", "tumor")))
values(bfiles)
s <- spViewPerFeature(GRL=grl, name="YAL001C",
files=bfiles, multi.levels=TRUE, fac="sampleGroup")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.