Skip to content
Snippets Groups Projects
Commit 81b2a391 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Update rank order.

parent 8c613d61
Branches
No related merge requests found
Histone_TFSEE/cluster1_enriched_tfs.png

92.4 KiB

Histone_TFSEE/cluster2_enriched_tfs.png

79.2 KiB

Histone_TFSEE/cluster3_enriched_tfs.png

79.4 KiB | W: | H:

Histone_TFSEE/cluster3_enriched_tfs.png

85.8 KiB | W: | H:

Histone_TFSEE/cluster3_enriched_tfs.png
Histone_TFSEE/cluster3_enriched_tfs.png
Histone_TFSEE/cluster3_enriched_tfs.png
Histone_TFSEE/cluster3_enriched_tfs.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -8,30 +8,30 @@ import matplotlib.pyplot as plt
tfsee = pd.read_csv('clustering_tfs.csv')
tfsee_cluster1 = tfsee[tfsee['cluster'] == 0]
tfsee_cluster2 = tfsee[tfsee['cluster'] == 1]
tfsee_cluster1['early'] = tfsee_cluster1[['ES_D0','ES_D2','ES_D5']].mean(axis=1)
tfsee_cluster1['late'] = tfsee_cluster1[['ES_D7','ES_D10']].mean(axis=1)
tfsee_cluster1['diff'] = tfsee_cluster1['early'] - tfsee_cluster1['late']
tfsee_cluster1['rank'] = tfsee_cluster1['diff'].rank()
tfsee_cluster2['early'] = tfsee_cluster2[['ES_D0','ES_D2','ES_D5']].mean(axis=1)
tfsee_cluster2['late'] = tfsee_cluster2[['ES_D7','ES_D10']].mean(axis=1)
tfsee_cluster2['diff'] = tfsee_cluster2['early'] - tfsee_cluster2['late']
tfsee_cluster2['rank'] = tfsee_cluster2['diff'].rank()
x = list(tfsee_cluster1['rank'])
x = list(tfsee_cluster2['rank'])
z = np.polyfit(tfsee_cluster1['rank'], tfsee_cluster1['diff'], 3)
z = np.polyfit(tfsee_cluster2['rank'], tfsee_cluster2['diff'], 3)
f = np.poly1d(z)
x_new = np.linspace(1, 24, num=len(x)*10)
x_new = np.linspace(1, 19, num=len(x)*10)
plt.figure(figsize=(25,20))316A45
plt.figure(figsize=(25,20))
plt.plot(x_new, f(x_new), color = 'k', linewidth=4.0)
plt.scatter(x=tfsee_cluster1['rank'], y=tfsee_cluster1['diff'], color='#316A45', s=600)
plt.scatter(x=tfsee_cluster2['rank'], y=tfsee_cluster2['diff'], color='#316A45', s=600)
plt.ylim([-1.5,4.5])
plt.xlim([0,25])
plt.xlim([0,20])
plt.suptitle('Early Enriched TFS', fontsize=8, fontweight='bold')
plt.xlabel('Rank Order',fontsize=8, fontweight='bold')
plt.ylabel('delta z',fontsize=8, fontweight='bold')
plt.savefig('cluster1_enriched_tfs.png')
plt.savefig('cluster2_enriched_tfs.png')
plt.clf()
......@@ -48,14 +48,14 @@ x = list(tfsee_cluster3['rank'])
z = np.polyfit(tfsee_cluster3['rank'], tfsee_cluster3['diff'], 3)
f = np.poly1d(z)
x_new = np.linspace(1, 17, num=len(x)*10)
x_new = np.linspace(1, 24, num=len(x)*10)
plt.figure(figsize=(25,20))
plt.plot(x_new, f(x_new), color = 'k', linewidth=4.0)
plt.scatter(x=tfsee_cluster3['rank'], y=tfsee_cluster3['diff'], color='#3999CA', s=600)
plt.ylim([-1.5,4.5])
plt.xlim([0,20])
plt.xlim([0,25])
plt.suptitle('Late Enriched TFS', fontsize=8, fontweight='bold')
plt.xlabel('Rank Order',fontsize=8, fontweight='bold')
plt.ylabel('delta z',fontsize=8, fontweight='bold')
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment