Interaction

We try to find the relationship between the number of interaction sites in proteins and their interaction partners. An example file is ex.txt. It looks like

prot_name   chain_name  num_db  num_ip
1fft    A   273 3
1fft    B   314 2
1fft    C   0   2
...
3d31    C   0   2
3eam    A   1   2

Info

num_db: number of interaction sites from databases. num_ip: number of interaction partners.

Python

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
import pypropel as pp

from pypropel.util.Reader import Reader as pfreader
df = pfreader().generic(to('data/binning/ex.txt'), header=0)
print(df)

fig, axes = plt.subplots(nrows=2, ncols=1, figsize=(6, 4), sharey=False, sharex='all')
pp.plot.binning(
    df=df,
    key='num_db',
    num_bins=10,
    ax=axes[0],
).draw()
pp.plot.binning(
    df=df,
    key='num_ip',
    num_bins=10,
    ax=axes[1],
).draw()
plt.show()

Image title
Fig 1. Binning of interaction sites and partners