% Multialing according to SEQPDIST protocol (MATLAB).
% This function allows to execute a multialaign process for input
% sequences.
% Input: Sequences to evaluate (header and seqs).

function [treeseqpdist]= seqpdistmatrix(seq,header)
% obtain number of sequences to evaluate
n=numel(seq);
% generate name and seq vectors
for i=1:n
    Seqsalineadas(i).Header=header{i,1};
    Seqsalineadas(i).Sequence=seq{i,1};
end;
% The multialign permits seqs of multiple sizes been analized. 
% The seqpdist gives the distance matrix
% seqlinkage displays a phylogenetic array according to distance matrix,
% and different imput parameters such as bootstrap comparison and names of
% the branches.
distance=seqpdist(seq,'Alphabet','NT');
treeseqpdist=seqneighjoin(distance,'equivar',Seqsalineadas);
end