-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheatmap.py
32 lines (26 loc) · 961 Bytes
/
heatmap.py
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
# Copyright (C) 2018 Ahmad A. A. (https://github.com/bbpgrs/)
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sbn
import common as cmn
import os
import logging
def show_heatmap():
"""
"""
#combined_file_path = os.path.join(cmn.DL_DIR, cmn.PTEN_CORR_FNAME)
combined_file_path = os.path.join("ref", cmn.PTEN_CORR_FNAME)
if os.path.isfile(combined_file_path):
logging.info("Found combined PTEN correlation file, generating heatmap ...")
df = pd.read_csv(combined_file_path, sep="\t", index_col=0)
sbn.heatmap(df, cmap='RdYlGn', xticklabels=1, yticklabels=1)
plt.subplots_adjust(bottom=0.21, top=0.98)
sbn.clustermap(df, cmap='RdYlGn', xticklabels=1, yticklabels=1, method="ward")
plt.subplots_adjust(bottom=0.21, top=0.98)
plt.show()
else:
logging.warning("Combined PTEN correlation file not found.")
def run():
"""
"""
show_heatmap()