PileupFiles {Rsamtools} | R 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 For |
... |
Additional arguments, currently ignored. |
con , object |
An instance of |
FUN |
A function of one argument; see |
param |
An instance of |
rw |
character() indicating mode of file; not used for
|
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
andindex
of each file in thePileupFiles
instance. Returns aPileupFiles
instance.- close.PileupFiles
Closes each file in the
PileupFiles
instance; returning (invisibly) the updatedPileupFiles
. The instance may be re-opened withopen.PileupFiles
.
Accessors:
- plpFiles
Returns the
list
of the files in thePileupFiles
instance.- plpParam
Returns the
ApplyPileupsParam
content of thePileupFiles
instance.
Methods:
- applyPileups
Calculate the pileup across all files in
files
according to criteria inparam
(orplpParam(files)
ifparam
is missing), invokingFUN
on each range or collection of positions. SeeapplyPileups
.- show
Compactly display the object.
Author(s)
Martin Morgan
Examples
example(applyPileups)