-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplot_HiC_pers.py
More file actions
47 lines (30 loc) · 1.13 KB
/
Copy pathplot_HiC_pers.py
File metadata and controls
47 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rcParams['text.usetex'] = True
def plot_pers(ff, fname):
print('plotting pers pairs', ff)
pers_pairs = np.loadtxt(ff, delimiter=',')
plt.hist2d(pers_pairs[:,0], pers_pairs[:,1], bins=100,norm=mpl.colors.LogNorm(),cmap=mpl.cm.jet)
cbar = plt.colorbar()
cbar.set_label(r'\#pairs')
plt.rc('xtick',labelsize=14)
plt.rc('ytick',labelsize=14)
plt.xlabel('birth', fontsize=16)
plt.ylabel('death', fontsize=16)
plt.tight_layout()
plt.savefig('figures/'+fname+'.png', format = 'png')
plt.cla()
plt.clf()
ff = 'Datasets/HiC/Dory_control_H1_pers_data.txt'
plot_pers(ff, 'HiC_control_H1')
pers_pairs = np.loadtxt(ff, delimiter=',')
ff = 'Datasets/HiC/Dory_control_H2_pers_data.txt'
plot_pers(ff, 'HiC_control_H2')
pers_pairs = np.loadtxt(ff, delimiter=',')
ff = 'Datasets/HiC/Dory_auxin_H1_pers_data.txt'
plot_pers(ff, 'HiC_auxin_H1')
pers_pairs = np.loadtxt(ff, delimiter=',')
ff = 'Datasets/HiC/Dory_auxin_H2_pers_data.txt'
plot_pers(ff, 'HiC_auxin_H2')
pers_pairs = np.loadtxt(ff, delimiter=',')