GenomicFiles instead.
Use BamFileViews() to reference a set of disk-based BAM files to be
processed
BamFileViews(fileList,
fileSample=DataFrame(row.names=make.unique(basename(path(fileList)))),
fileRange, fileExperiment = list(), yieldSize = NA_integer_,
.views_on_file = new.env(parent=emptyenv()), ...):
This constructor is a generic function with dispatch on argument
fileList. Methods exist for BamFileList and character
(vector of file names).
GenomicFileViews objects
work on BamFileViews objects. See ?GenomicFileViews for details.
"[": Subset the object by fileRange or fileSample.
fileList
with the option to provide MAP and REDUCE functions across ranges
and / or files.
fileRange
with the option to provide MAP and REDUCE functions across ranges
and / or files.
fileList.
Ranges in the fileRange slot take precedence over ranges
in param. The return value is a SummarizedExperiment
object.
fileList.
Ranges in the fileRange slot take precedence over ranges
in param. The return value is a list of data.frames,
one per file.
fileList.
Ranges in the fileRange slot take precedence over ranges
in param. The return value is a list of lists, one per file.
fileList:
A character() vector of BAM path names or a
BamFileList.
fileSample:
A DataFrame instance with as many rows as
length(fileList), containing sample information associated
with each path.
fileRange:
A GRanges, or missing instance with
ranges defined on the spaces of the BAM files. Ranges are not
validated against the BAM files.
fileExperiment:
A list() containing additional information about the experiment.
yieldSize: An integer specifying number of records to process
.views_on_file: An enviornment; currently under development
...: Additional arguments.
x, object: An instance of BamFileViews.
value: An object of appropriate type to replace content.
i:
During subsetting, a logical or numeric index into fileRange.
j:
During subsetting, a logical or numeric index into fileSample
and fileList.
file: An instance of BamFileViews.
index: Not used.
param:
An optional ScanBamParam instance to further
influence scanning or counting.
GenomicFileViews class:
library(RNAseqData.HNRNPC.bam.chr14)
fls <- RNAseqData.HNRNPC.bam.chr14_BAMFILES
gr <- GRanges("chr14", IRanges(1:10*5, width = 2))
bfv <- BamFileViews(fls, fileRange = gr)
## Dimensions of the object are ranges by samples (files).
bfv
bfv[1:5,]
fileList(bfv)
fileRange(bfv)
Run the code above in your browser using DataLab