PileupFiles-class: Represent BAM files for pileup summaries.

PileupFilesR Documentation

Represent BAM files for pileup summaries.

Description

Use PileupFiles() to create a reference to BAM files (and their indicies), to be used for calculating pile-up summaries.

Usage


## Constructors
PileupFiles(files, ..., param=ApplyPileupsParam())
## S4 method for signature 'character'
PileupFiles(files, ..., param=ApplyPileupsParam())
## S4 method for signature 'list'
PileupFiles(files, ..., param=ApplyPileupsParam())

## opening / closing
## open(con, ...)
## close(con, ...)

## accessors; also path()
## S4 method for signature 'PileupFiles'
isOpen(con, rw="")
plpFiles(object)
plpParam(object)

## actions
## S4 method for signature 'PileupFiles,missing'
applyPileups(files, FUN, ..., param)
## S4 method for signature 'PileupFiles,ApplyPileupsParam'
applyPileups(files, FUN, ..., param)

## display
## S4 method for signature 'PileupFiles'
show(object)

Arguments

files

For PileupFiles, a character() or list of BamFile instances representing files to be included in the pileup. Using a list of BamFile allows indicies to be specified when these are in non-standard format. All elements of ... must be the same type.

For applyPileups,PileupFiles-method, a PileupFiles instance.

...

Additional arguments, currently ignored.

con, object

An instance of PileupFiles.

FUN

A function of one argument; see applyPileups.

param

An instance of ApplyPileupsParam, to select which records to include in the pileup, and which summary information to return.

rw

character() indicating mode of file; not used for TabixFile.

Objects from the Class

Objects are created by calls of the form PileupFiles().

Fields

The PileupFiles class is implemented as an S4 reference class. It has the following fields:

files

A list of BamFile instances.

param

An instance of ApplyPileupsParam.

Functions and methods

Opening / closing:

open.PileupFiles

Opens the (local or remote) path and index of each file in the PileupFiles instance. Returns a PileupFiles instance.

close.PileupFiles

Closes each file in the PileupFiles instance; returning (invisibly) the updated PileupFiles. The instance may be re-opened with open.PileupFiles.

Accessors:

plpFiles

Returns the list of the files in the PileupFiles instance.

plpParam

Returns the ApplyPileupsParam content of the PileupFiles instance.

Methods:

applyPileups

Calculate the pileup across all files in files according to criteria in param (or plpParam(files) if param is missing), invoking FUN on each range or collection of positions. See applyPileups.

show

Compactly display the object.

Author(s)

Martin Morgan

Examples

example(applyPileups)

Bioconductor/Rsamtools documentation built on Oct. 31, 2024, 1:23 p.m.