This is a detailed tutorial for regulation strength heatmap. For a brief tutorial on every step, see main.ipynb.
from dictys.net import network
from dictys.plot.static import fig_heatmap_top
d0=network.from_file('../../data/static.h5')
#TF-cell type pairs
tf=[('HLF','Progenitor'),('MYCN','Progenitor'),('GATA1','Erythroid'),('GATA2','Erythroid'),('FOXO4','Erythroid'),('TAL1','Erythroid'),('KLF1','Erythroid'),('GFI1B','Erythroid'),('HOXA7','GMP'),('MAFB','Mono'),('CEBPA','Mono'),('CEBPE','Mono'),('IRF4','pDC'),('PAX5','CLP'),('ERG','CLP'),('SPIB','B'),('MAF','CD8CM'),('GATA3','NK')]
#Number of top targets for each TF
ntop=10
fig,fig_colorbar,net=fig_heatmap_top(d0,tf,ntop=ntop)
Annotating select top targets
#Only activated targets (no repression)
direction=1
#Target genes to annotate
gann='FOS,CD164,GYPC,GFI1B,KLF1,CDK1,CD47,GYPA,E2F2,KLF5,CXCL16,CEBPA,IRF8,KLF4,GPR183,ITM2C,IKZF1,SPI1,USF1,EBF1,CD9,IDI1,KLRB1,ETS1,CD44,IL2RG'.split(',')
fig,fig_colorbar,net=fig_heatmap_top(d0,tf,ntop=ntop,direction=direction,gann=gann)
#Aspect ratio for each tile
aspect=1
#Target genes to annotate
gann='all'
fig,fig_colorbar,net=fig_heatmap_top(d0,tf,ntop=ntop,direction=direction,gann=gann,aspect=aspect)
net.head()
HLF-Progenitor | MYCN-Progenitor | GATA1-Erythroid | GATA2-Erythroid | FOXO4-Erythroid | TAL1-Erythroid | KLF1-Erythroid | GFI1B-Erythroid | HOXA7-GMP | MAFB-Mono | CEBPA-Mono | CEBPE-Mono | IRF4-pDC | PAX5-CLP | ERG-CLP | SPIB-B | MAF-CD8CM | GATA3-NK | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CFH | 1.000000 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 |
GATA3 | 0.981242 | 0.174046 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 |
HLA-DPA1 | 0.823214 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.332927 | 0.0 | 0.0 |
HLA-DPB1 | 0.782403 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.355228 | 0.0 | 0.0 |
FOXO3 | 0.773258 | 0.000000 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.000000 | 0.0 | 0.0 |