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

    %% Convert aligned sequences to CIGAR strings
% This example shows how to convert aligned strings to CIGAR strings

% Copyright 2015 The MathWorks, Inc.


%%
% Create a cell array of aligned strings, create a string specifying a
% reference sequence, and then convert the alignment to CIGAR strings:
aln = ['ACG-ATGC'; 'ACGT-TGC'; '  GTAT-C']
%%
%
ref =  'ACGTATGC';
[cigar, start] = align2cigar(aln, ref)