Return index array of annotations from GTFAnnotation object
Idx = getIndex(AnnotObj)
Idx = getIndex(AnnotObj,StartPos,EndPos)
Idx = getIndex(___,Name,Value)
Object of the GTFAnnotation class.
Specify optional comma-separated 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.
String or cell array of strings specifying one or more genes in AnnotObj. Only annotations whose gene field matches one of the strings are included in AnnotStruct.
String or cell array of strings specifying one or more transcripts in AnnotObj. Only annotations whose transcript field matches one of the strings are included in AnnotStruct.
Minimum number of base positions that an annotation must overlap in the range, to have its index included in Idx. This value can be any of the following:
Array of integers representing indices of elements in AnnotObj.
Retrieve Indices of Annotations from a GTFAnnotation Object
Construct a GTFAnnotation object using a GTF-formatted file that is provided with Bioinformatics Toolbox™.
GTFAnnotObj = GTFAnnotation('hum37_2_1M.gtf');
Extract indices of annotations for positions 210,000 through 220,000 from the reference sequence.
Idx = getIndex(GTFAnnotObj,210000,220000) Idx = 7 15 16 17 36 47 48 49 69 70 71 89 99 111 112 113