
order=[0,1,2,4,5,3,6,7,8,9,10,11,12,13,14,15,16]
dfh=open('50kb_Diffint_met_up_down_anchor_ave_sorted_rowcolnorm.txt_X10.txt','r')
rfh=open('50kb_Diffint_met_up_down_anchor_ave_sorted_rowcolnorm.txt_X10_reorder.txt','w')
count=0
for i in dfh:
	count+=1
	line=i.split()
	if count!=2:
		for a in order:
			rfh.write(line[a])
			if a!=16:
				rfh.write('\t')
		rfh.write('\n')
