Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PileupFiles-class

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)

Rsamtools

Binary alignment (BAM), FASTA, variant call (BCF), and tabix file import

v2.6.0
Artistic-2.0 | file LICENSE
Authors
Martin Morgan, Hervé Pagès, Valerie Obenchain, Nathaniel Hayden
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.