- bamClose
signature(object = "bamReader"):
Closes connection to BAM-file.
%
- bamCopy
signature(object = "bamReader",
writer="bamWriter",refids,verbose):
Copies all aligns for given refids from reader to writer.
When no refids are given, aligns for all refids are copied.
refids refer to Reference-ID's returned by 'getRefData' (ID column).
Missing matches (from refids into Reference-ID's) will terminate
the function with an error.
%
- bamSave
signature(object = "bamReader",
writer="bamWriter"): Copies all aligns from reader to writer.
%
- bamSort
signature(object = "bamReader", prefix="character",
byName=FALSE, maxmem=1e+9, path=dirname(filename(object))):
Sorting an existing BAM-file.
%
- createIndex
signature(object = "bamReader",
idx_filename="character"): Creates an index file for opened
BAM-file.
Therefore the BAM-file must be position-sorted.
idx_filename will be the name of the new BAM-index file.
idx_filename is an optional argument. The standard value is
"bam_filename.bam".bai.
%
- loadIndex
signature(object="bamReader",
filename="character"): Loads index from given index file.
A loaded index is a prerequisite for random access to
a BAM file.
%
- indexInitialized
signature(object="bamReader"):
Returns TRUE when a loaded BAM index is present in
bamReader.
%- create.index
Deprecated. See "createIndex".
%
- load.index
Deprecated. See "loadIndex".
%
- index.initialized
Deprecated. See "indexInitialized".
%
- filename
signature(object = "bamReader"):
Returns filename of opened BAM-file.
%
- getHeader
signature(object = "bamReader"):
Returns object of class bamHeader which contains binary
representation of bam-header data.
%
- getHeaderText
signature(object = "bamReader"):
Returns object of class bamHeaderText which contains textual
representation of bam-header data.
%
- getNextAlign
signature(object = "bamReader"):
Returns object of class bamAlign which contains data of next
Align from file.
When EOF is reached the function returns NULL.
%
- getRefCoords
signature(object="bamReader",
sn="character"):
Helper function takes a sequence name and returns coordinates of
entire reference sequence for usage with bamRange, gapList or
siteList function.
The function returns a vector of length 3.
The vector elements are named "refid","start","stop".
%
- getRefCount
signature(object = "bamReader"):
Returns number of reference sequences.
%
- getRefData
signature(object = "bamReader"):
Returns data frame which contains three columns:
For each reference sequence, the corresponding row contains the
Reference-ID (1st column, refID), the Reference name (2nd column,
refName) and the length of the Reference sequence (3rd column,
refLength).
%
- isOpen
signature(object = "bamReader"):
Returns TRUE when file connection is open.
%
- rangeSegCount
signature(object = "bamReader",
coords="numeric", segments="numeric", complex="logical"):
Counts alignments for specified genomic segment regions
(genes, exons, ...)
%
- rewind
signature(object = "bamReader"):
Resets current file position. The subsequent call to
getNextAlign will return the first align in the BAM-file.
%
- initialize
signature(.Object = "bamReader"):
Initializes object and opens BAM-file for reading