% SEND:
% --- file name in fasta format (that is each entry begins with a line that starts with ">" )

% GET:
% --- Seq: the seq cell array
% --- Info: cell array of the first line in the fasta file


function [seq info] = read_fasta(file)


fid1 = fopen(file, 'r'); 

c = 0; % count the number of sequences
seq = [];
while 1
    
    tline = fgetl(fid1);
    
    % EOF
    if tline == -1
        break;
    end
    
    % SKIP empty lines
    if isempty(tline)
        continue;
    end
    
    % Sequence
    if strcmp(tline(1), '>')
        c = c + 1;
        seq{c} = [];
        info{c} = tline;
        continue;
    end
    seq{c} = [seq{c} tline];
    
    
end
fclose(fid1);