Class: GFFAnnotation
Retrieve subset of elements from GFFAnnotation
object
NewObj = getSubset(AnnotObj,StartPos,EndPos)
NewObj = getSubset(AnnotObj,Subset)
NewObj = getSubset(___,Name,Value)
returns NewObj
= getSubset(AnnotObj
,StartPos
,EndPos
)NewObj
,
a new object containing a subset of the elements from AnnotObj
that
falls within each reference sequence range specified by StartPos
and EndPos
.
returns NewObj
= getSubset(AnnotObj
,Subset
)NewObj
,
a new object containing a subset of elements specified by Subset
,
a vector of integers.
returns NewObj
= getSubset(___,Name,Value
)NewObj
,
a new object containing a subset of the elements from AnnotObj
,
using any of the input arguments from the previous syntaxes and additional
options specified by one or more Name,Value
pair
arguments.
|
Object of the |
|
Nonnegative integer specifying the start of a range in each
reference sequence in |
|
Nonnegative integer specifying the end of a range in each reference
sequence in |
|
Vector of positive integers equal or less than the number of
entries in the object. Use the vector |
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
|
Character vector or cell array of character vectors specifying
one or more reference sequences in |
|
Character vector or cell array of character vectors specifying
one or more features in |
|
Minimum number of base positions that an annotation must overlap
in the range, to be included in
Default: |
|
Object of the |
Construct a GFFAnnotation
object using
a GFF-formatted file that is provided with Bioinformatics Toolbox™.
GFFAnnotObj = GFFAnnotation('tair8_1.gff');
Create a subset of data containing only protein features.
subsetGFF1 = getSubset(GFFAnnotObj,'Feature','protein')
subsetGFF1 = GFFAnnotation with properties: FieldNames: {1x9 cell} NumEntries: 200
Construct a GFFAnnotation
object using
a GFF-formatted file that is provided with Bioinformatics Toolbox.
GFFAnnotObj = GFFAnnotation('tair8_1.gff');
Retrieve a subset of data from the first to fifth elements of GFFAnnotObj
.
subsetGFF2 = getSubset(GFFAnnotObj,[1:5]) subsetGFF2 = GFFAnnotation with properties: FieldNames: {1x9 cell} NumEntries: 5
Retrieve only the first, fifth and eighth elements of GFFAnnotObj
.
subsetGFF3 = getSubset(GFFAnnotObj,[1 5 8]) subsetGFF3 = GFFAnnotation with properties: FieldNames: {1x9 cell} NumEntries: 3
The getSubset
method selects
annotations from the range specified by StartPos
and EndPos
for
all reference sequences in AnnotObj
unless you
use the Reference
name-value pair argument to
limit the reference sequences.
After creating a subsetted object, you can access
the number of entries, range of reference sequence covered by annotations,
field names, and reference names. To access the values of all fields,
create a structure of the data using the getData
method.