% After you have proccessed thet SPs hit counts (with read_data function),
% you can now analyse the most leading hits of a given SP.

% Sent:
% --- the data structure.

% Do:
% --- 1) For the SR where a hit was found - convert the relevant frames into a Proteins (PPs) - using the "Translate" function
% --- 2) Save the PPs in a cell array of strings in the data structure. 

% Then:
% --- The PPs and the SP that was found can then be proccessed by "sp_pp_aline" function

function data = sr2pp(dna,data)

% read all SR
SR = textread(dna,'%s\n','bufsize', 200000);
N = length(data);
% go over the leading SPs that were found on the Short read data
for i = 1:N
    M = length(data(i).SR_id);
    % go over the number of SR, and translate tp PP (according to the Frame)
    for j = 1:M
        seq = SR{data(i).SR_id(j)};
        frame = data(i).Frame_id(j);
        data(i).PP{j} = Translate(seq,frame);
    end

end
