Class: BioMap
Return basebybase alignment coverage of reference sequence
in BioMap
object
Cov
= getBaseCoverage(BioObj
, StartPos
, EndPos
)Cov
= getBaseCoverage(BioObj
, StartPos
, EndPos
, R
)Cov
= getBaseCoverage(..., Name,Value)
[Cov
, BinStart
]
= getBaseCoverage(...)
returns Cov
= getBaseCoverage(BioObj
, StartPos
, EndPos
)Cov
,
a row vector of nonnegative integers. This vector indicates the basebybase
alignment coverage of a range or set of ranges in the reference sequence
in BioObj
, a BioMap
object.
The range or set of ranges are defined by StartPos
and EndPos
. StartPos
and EndPos
can
be two nonnegative integers such that StartPos
is
less than EndPos
, and both integers are
smaller than the length of the reference sequence. StartPos
and EndPos
can
also be two column vectors representing a set of ranges (overlapping
or segmented). When StartPos
and EndPos
specify
a segmented range, Cov
contains NaN
values
for base positions between segments.
selects
the reference where Cov
= getBaseCoverage(BioObj
, StartPos
, EndPos
, R
)getBaseCoverage
calculates
the coverage.
returns
alignment coverage information with additional options specified by
one or more Cov
= getBaseCoverage(..., Name,Value
)Name,Value
pair arguments.
[
returns Cov
, BinStart
]
= getBaseCoverage(...)BinStart
,
a row vector of positive integers specifying the start position of
each bin (when binning occurs).

Object of the 

Either of the following:


Either of the following:


Positive integer indexing the 
Specify optional commaseparated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.

Positive integer specifying the bin width, in number of base
pairs (bp). Bins are centered within
 

Positive integer specifying the number of equalwidth bins to
use to span the requested region. Bins are centered within
 

String specifying the binning algorithm. Choices are:
Default:  

Specifies whether to return the alignment coverage for the base
positions between segments, instead of within segments. If Default:  

Logical specifying whether short reads are spliced during mapping
(as in mRNAtogenome mapping). N symbols in the Default: 

Row vector of nonnegative integers. This vector specifies the
number of read sequences that align with each base position or bin
in the requested regions. A set of ranges can be overlapping or segmented.
For a range, the length of 

Row vector of positive integers specifying the start position
of each bin. 
Construct a BioMap
object, and then return
the alignment coverage of each of the first 12 base positions of the
reference sequence:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Return the number of reads that align to each of % the first 12 base positions of the reference sequence cov = getBaseCoverage(BMObj1, 1, 12)
cov = 1 1 2 2 3 4 4 4 5 5 5 5
Construct a BioMap
object, and then return
the alignment coverage of the range between 1 and 1000, on a binbybin
basis, using bins with a width of 100 bp:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Return the number of reads that align to each 100bp bin % in the 1:1000 range of the reference sequence. Also return the % start position of each bin [cov, bin_starts] = getBaseCoverage(BMObj1, 1, 1000, 'binWidth', 100)
cov = 17 20 41 44 45 48 48 45 46 42 bin_starts = 1 101 201 301 401 501 601 701 801 901
align2cigar
 BioMap
 cigar2align
 getAlignment
 getCompactAlignment
 getCounts
 getIndex