Count
= getCounts(BioObj
, StartPos
, EndPos
)GroupCount
= getCounts(BioObj
, StartPos
, EndPos
, Groups
)GroupCount
= getCounts(BioObj
, StartPos
, EndPos
, Groups
, R
)
... = getCounts(..., Name,Value)
returns Count
= getCounts(BioObj
, StartPos
, EndPos
)Count
,
a nonnegative integer specifying the number of read sequences in BioObj
,
a BioMap
object, that align to a specific range
or set of ranges in the reference sequence. 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).
By default, getCounts
counts each read
only once. Therefore, if a read spans multiple ranges, that read instance
is counted only once. When StartPos
and EndPos
specify
overlapping ranges, the overlapping ranges are considered as one range.
specifies GroupCount
= getCounts(BioObj
, StartPos
, EndPos
, Groups
)Groups
,
a row vector of integers or character vectors, the same size as StartPos
and EndPos
.
This vector indicates the group to which each range belongs. GroupCount
is
a column vector containing a number of elements equal to the number
of unique elements in Groups
. GroupCount
specifies
the number of reads that align to each group, in the ascending order
of unique groups in Groups
.
Each group is treated independently. Therefore, a read can be counted in more than one group.
specifies
a reference for each of the segmented ranges defined by GroupCount
= getCounts(BioObj
, StartPos
, EndPos
, Groups
, R
)StartPos
, EndPos
,
and Groups
.
... = getCounts(...,
returns
counts with additional options specified by one or more Name,Value
)Name,Value
pair
arguments.

Object of the 

Either of the following:


Either of the following:


Row vector of integers or character vectors, the same size as 

Vector of positive integers 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
.

Logical that specifies whether to treat the ranges defined by
Default:  

Specifies the minimum number of base positions that a read must overlap in a range or set of ranges, to be counted. This value can be any of the following:
Default:  

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

Character vector specifying the method to measure the abundance of reads. Choices are:
Default: 

Either of the following:


Column vector containing a number of elements equal to the number
of unique elements in 
Construct a BioMap
object, and then return
the number of reads that align to at least one base position in two
ranges of the reference sequence:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Return the number of reads that align to the segmented range 1:50 and 71:100 counts_1 = getCounts(BMObj1,[1;71],[50;100])
counts_1 = 37
Construct a BioMap
object, and then return
the number of reads that align to at least one base position in two
independent ranges 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 ranges, % 1:50 and 71:100, independent of each other counts_2 = getCounts(BMObj1,[1;71],[50;100],'independent',true)
counts_2 = 20 21
Notice that the total number of reads reported in counts_2
is
greater than the number of reads reported in counts_1
.
This difference occurs because there are four reads that span the
two ranges, and are counted twice in the second example.
Construct a BioMap
object, and then return
the number of reads that align to two separate groups of ranges of
the reference sequence:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Return the number of reads that align to a group containing range 30:60, % and also the number of reads that align to a group containing range 1:10 % and range 50:60 counts_3 = getCounts(BMObj1,[1;30;50],[10;60;60],[2 1 2])
counts_3 = 25 22
Construct a BioMap
object, and then return
the total number of reads aligned to the reference sequence:
% Construct a BioMap object from a SAM file BMObj1 = BioMap('ex1.sam'); % Return the number of sequences that align to the entire reference sequence getCounts(BMObj1,min(getStart(BMObj1)),max(getStop(BMObj1)))
ans = 1482
align2cigar
 BioMap
 cigar2align
 getAlignment
 getBaseCoverage
 getCompactAlignment
 getIndex