spViewPerFeature {ShortRead}R Documentation

Tools to visualize genomic data

Description

Use Snapshot-class to visulatize 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 TranscriptDb 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 visuliazed. 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) inidicating 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 createing a Snapshot object.

Value

A Snapshot instance

Author(s)

Chao-Jen Wong cwon2@fhcrc.org

See Also

Snapshot

Examples

## 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 <- loadFeatures(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(file, file))
values(bfiles) <- DataFrame(sampleGroup=factor(c("normal", "tumor")))
values(bfiles)

s <- spViewPerFeature(GRL=grl, name="YAL001C",
                      files=bfiles, multi.levels=TRUE, fac="sampleGroup")


[Package ShortRead version 1.12.4 Index]