Learn R Programming

GenomicFiles (version 1.2.1)

GenomicFiles: GenomicFiles objects

Description

The GenomicFiles class is a matrix-like container where rows represent ranges of interest and columns represent files. The class is designed for byFile or byRange queries and can be thought of as a precursor (or skeleton) of the SummarizedExperiment class.

GenomicFiles has slots for files, rowData, colData and exptData. In contrast to SummarizedExperiment, GenomicFiles does not contain an assays slot and the rowData is a DataFrame instead of a GenomicRanges.

Arguments

Constructor

GenomicFiles(rowData, files, colData=DataFrame(), exptData=SimpleList(), ...):

Accessors

In the code below, x is a GenomicFiles object.
rowData, rowData(x) <- value
Get or set the rowData on x. value can be a GRanges or GRangesList representing ranges or indices defined on the spaces (position) of the files.
files(x), files(x) <- value
Get or set the files on x. value can be a character() of file paths or a List of file objects such as BamFile, BigWigFile etc.
colData, colData(x) <- value
Get or set the colData on x. value must be a DataFrame instance describing the files. The number of rows must match the number of files. Row names, if present, become the column names of the GenomicFiles.
exptData, exptData(x) <- value
Get or set the exptData on x. value must be a SimpleList of arbitrary content describing the overall experiment.
dimnames, dimnames(x) <- value
Get or set the row and column names on x.

Methods

In the code below, x is a GenomicFiles object.
[
Subset the object by fileRange or fileSample.
show
Compactly display the object.
reduceByFile
Extract, manipulate and combine data defined in rowData within the files specified in files. See ?reduceByFile for details.
reduceByRange
Extract, manipulate and combine data defined in rowData across the files specified in files. See ?reduceByRange for details.

See Also

Examples

Run this code
library(RNAseqData.HNRNPC.bam.chr14)
fls <- RNAseqData.HNRNPC.bam.chr14_BAMFILES
gr <- GRanges("chr14", IRanges(2e5*1:3, width=1e5, names=LETTERS[1:3]))
colData <- DataFrame(method=rep("RNASeq", length(fls)), 
                     format=rep("bam", length(fls)))
gf <- GenomicFiles(gr, fls, colData=colData)
gf

dimnames(gf)
dim(gf[1, 5:8]) 

Run the code above in your browser using DataLab