code: def eighCovarianceMatrix(cfile):
      
      # precompute eigenvalue decomposition
      K = np.loadtxt(cfile+'.cov')
      K+= 1e-4*sp.eye(K.shape[0])
      S,U = la.eigh(K); S=S[::-1]; U=U[:,::-1]
      np.savetxt(cfile+'.cov.eval',S,fmt='%.6f')
      np.savetxt(cfile+'.cov.evec',U,fmt='%.6f')
docs: compute similarity matrix using plink
  
      Input:
      cfile        :   the covariance matrix will be read from cfile.cov while the eigenvalues and the eigenverctors will
                          be written to cfile.cov.eval and cfile.cov.evec respectively