Represent BAM files for pileup summaries.

Share:

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## 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
## S3 method for class 'PileupFiles'
open(con, ...)
## S3 method for class 'PileupFiles'
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

1

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.