www.gusucode.com > bioinfo 案例源码程序 matlab代码 > bioinfo/RetrieveSegmentsFromAGTFformattedFileExample.m

    %% Retrieve Segments from a GTF-formatted File
% 
%%
% Create a GTFAnnotation object from a GTF-formatted file.

% Copyright 2015 The MathWorks, Inc.

obj = GTFAnnotation('hum37_2_1M.gtf');

%%
% Retrieve unique reference names. In this case, there is only one
% reference sequence, which is chromosome 2 (|chr2|).
ref = getReferenceNames(obj)

%%
% Get a table of all non-overlapping segments of nucleotide sequences which
% belong to |chr2|.
segments = getSegments(obj,'Reference',ref);