corr = load('corr_raw.txt');
incorr = load('incorr_raw.txt');

norm_corr=zeros(20,20);
norm_incorr=zeros(20,20);
clear sum;
for i=1:20
   s_corr= sum(corr(i,:));
   s_incorr= sum(incorr(i,:));
        for j=1:20
            if (corr(i,j)~=0 && s_corr~=0)
                norm_corr(i,j) = corr(i,j)/s_corr;
            end
            if (incorr(i,j)~=0 && s_incorr~=0)
                norm_incorr(i,j) = incorr(i,j)/s_incorr;
            end
            
        end
end

%imagesc_2(corr,incorr);
size(corr)
size(incorr)

prep_score = zeros(20,20);
for i=1:20
    for j=1:20
        if (corr(i,j)+incorr(i,j)>0)
            prep_score(i,j) = corr(i,j) / (corr(i,j)+incorr(i,j));
        end
    end
end
imagesc_2(prep_score,prep_score);
xlabel('On the antigen');
ylabel('On the antibody');
title('Precision scoring matrix for docking');
myaa('publish');

%imagesc_2mat(corr,incorr,jet(128),labels,labels,'Profile comparison');