%%%%%%%%%%第二个文件：去冗余后的数据提取，共有47个蛋白质%%%%%%%%%
clc
clear
close all
load sample.mat
fid=fopen('0.3.1');
a=fgetl(fid);
set=[];
while ~feof(fid)
   if ~isempty(findstr(a,'>'))
       s=length(sample);
       a=a(2:end);
       for i=1:s
           if strcmp(sample(i).ID,a)
               set=[set; sample(i)];
           end
       end
   end
   a=fgetl(fid);
end
fclose(fid);
%%%%%%%%%%%%%%%%%%find index%%%%%%%%%%%%%%
n=size(set,1);
m=size(sample,1);
cout=0;
for i=1:n
    schar=set(i).ID;
    for j=1:m
        if schar==sample(j).ID
        set(i).index=j;
        break
        end
    end
end 
% save('set.mat','set');
%%%%%%%%%%%%%%%%%%read SS%%%%%%%%%%%%%%%%%
n=size(set,1);
for i=1:n
    ind=set(i).index;
    nm=['C:\Users\user\Documents\MATLAB\Glypredictor\SS\',num2str(ind),'.ss2'];
    temp=importdata(nm);
    set(i).SS=temp.data;
end
%%%%%%%%%
save('set.mat','set');