import sys
import numpy as np
from scipy.stats.stats import pearsonr
X = np.loadtxt(open(sys.argv[1],"r"),delimiter="\t")
XT=X.T
highlist=[]
midlist=[]
lowlist=[]
nonlist=[]
highdict={}
middict={}
lowdict={}
nondict={}
constlist=[]
constc=0
#print(XT.shape)
for i in range(1,XT.shape[0]):
if np.max(XT[i])==np.min(XT[i]):
print 'constan para:',i
constc+=1
constlist.append(i)
else:
tmpres = pearsonr(XT[0],XT[i])[0]
print i,tmpres
if abs(tmpres)>0.8:
highlist.append(i)
highdict[i]=tmpres
elif abs(tmpres)>0.4:
midlist.append(i)
middict[i]=tmpres
#print i,attrlist[i],tmpres
elif abs(tmpres)>0.3:
lowlist.append(i)
lowdict[i]=tmpres
else:
nonlist.append(i)
nondict[i]=tmpres