spViewPerFeature: Tools to visualize genomic data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/spViewPerFeature.R

Description

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

Usage

1
2

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

A Snapshot instance

Author(s)

Chao-Jen Wong cwon2@fhcrc.org

See Also

Snapshot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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")

ShortRead documentation built on Nov. 8, 2020, 8:02 p.m.