ShortRead (version 1.30.0)

spViewPerFeature: Tools to visualize genomic data

Description

Use Snapshot-class to visualize a specific region of genomic data

Usage

spViewPerFeature(GRL, name, files, ignore.strand=FALSE, multi.levels = FALSE, fac=character(0L), ...)

Arguments

GRL
Object GRangeList containing annotation of genomic data. It can be generated by applying exonsBy() or transcriptsBy() to a TxDb instance. See examples below.
name
Character(1) specifying which element in GRL to be visualized.
files
Charactor() or BamFileList specifying the file(s) to be visualized. If multiple files, local metadata of the files can be hold by setting a DataFrame (values(files) <- DataFrame(...)). See examples below.
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 FALSE, the mean coverage of multiple files would be plotted.
fac
Character(1) indicating which column of local metadata (elementMetatdata()) should be used to group the samples. Ignore
...
Arguments used for creating a Snapshot object.

Value

Snapshot instance

See Also

Snapshot

Examples

Run this code
## 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")

Run the code above in your browser using DataLab