%%This function gets a matrix after "GenarateFreqMatrix" function and a
%%treshold number and generates a new matrix-TresholdMatrix, in the same
%%format, which  contains only the SNPs which undergo that treshold
function  [TresholdMatrix]=GenerateTreshMatrix(matrix,treshold)
n=1;
for i=1:length(matrix(:,1))
    if (matrix(i,2)>treshold)
        TresholdMatrix(n,1)=matrix(i,1);
        TresholdMatrix(n,2)=matrix(i,2);
        n=n+1;
    end   
end