SeqFrame-methods: SeqFrame

Description Usage Arguments Details Value Examples

Description

method for coerce spread sheet like data into SeqFrame. data type include data.fame, comma seperated file, tab delimited file and file formats representing annotated genomic intervals, i.e. gff, bed, bed15, bedGraph, wig and bigWig format. Also include a facility for coercing flowFrame into SeqFrame.

Usage

1
SeqFrame(df=NULL,keyword=NULL,file=character(0),con=character(0),annotation=data.frame(),)

Arguments

df

data.frame to be converted to SeqFrame. if data.frame have data have columns, i.e. "chr", "start","end","symbol";"strand" is optional.it will put into annotation slot, one can use annotation() method to access the corresponding genomic annotation. One can also construct SeqFrame without annotation information for simple visulization.

annotation

a data.frame containing annotation information, need to have at least five columns i.e. "chr", "start","end","symbol";"strand" is optional.

keyword

a list including descriptions for the columns. see keyword in flowFrame for detail.

file

comma seperated file, tab delimited file. Header is required. if data have columns, i.e. "chr", "start","end","symbol";"strand" is optional. it will put into annotation slot, else it is simply converted to seqFrame with empty annotation, for simple visulization. then it needs to be all numbers.

con

filename to file formats representing annotated genomic intervals, i.e. gff, bed, bed15, bedGraph, wig and bigWig format. File type is automatically detected by file extension.

Details

SeqFrame is the anolog of flowFrame in flowCore. It provide an accessor for spread sheet like genomic data to be viewed as events in flow cytometry.

the required field for annotation is "chr", "start","end","symbol". Optionally "strand" (if not present, will be repalced with "*"). Information will be feed into annotation slot of SeqFrame. Users can use annotation method to retrieve the corresponding genomic annotation. One can create SeqFrame without annotation, for simple visulization of the data.

Value

A SeqFrame containing data and annotation. Users can use all flowCore and flowViz visulization functions to subset, split data based on its geometric property, and use annotation to access the corresponding annotation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# csv file
csv.file=system.file("extdata", "NGO-GVO-methylation.csv",package="SeqFrame")
csv=SeqFrame(file=csv.file); csv
test.csv=csv[200:210,];test.csv
annotation(test.csv);exprs(test.csv)

# bigWig file
bw.file=system.file("tests", "test.bw", package = "rtracklayer")
bw=SeqFrame(con=bw.file)
exprs(bw);annotation(bw)

# bedGraph
bedGraph.file=system.file("tests", "test.bedGraph", package = "rtracklayer")
bg=SeqFrame(con=bedGraph.file)
exprs(bg); annotation(bg)

# bed.file
bed.file=system.file("tests", "test.bed", package = "rtracklayer")
bed=SeqFrame(con=bed.file)
exprs(bed)

sheng-liu/SeqFrame documentation built on May 29, 2019, 9:22 p.m.