-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenefinder_script.py
More file actions
29 lines (18 loc) · 1.12 KB
/
genefinder_script.py
File metadata and controls
29 lines (18 loc) · 1.12 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
import matplotlib.pyplot as plt
import seaborn as sns
import functions as ft
genename = "Dyrk1a" # type gene name here, first letter capital, rest small
df_small, ages, classes = ft.load_data(genename) #load data from loom file (http://mousebrain.org/downloads.html)
counts_per_age_vector = ft.calculate_total_counts_per_age(df_small, ages, genename)
## make plots of total Counts per Age
fig, axes = plt.subplots(1, 2)
sns.set(font_scale = 1, rc={"figure.figsize":(13, 8)})
sns.lineplot(ax = axes[0], data=counts_per_age_vector, x = "Ages in Embryonic Days", y = "Total Counts of %s" %genename)
sns.set(font_scale = 1, rc={"figure.figsize":(13, 8)})
sns.lineplot(ax = axes[1], data=counts_per_age_vector, x = "Ages in Embryonic Days", y = "%s Counts Normalized by Cells per Age" %genename)
### make heatmap of counts per Class per Age
counts_per_class_per_age = ft.get_counts_per_class_per_age(df_small, ages, classes, genename)
plt.figure(figsize=(60,20))
heat_map = sns.heatmap(counts_per_class_per_age, linewidth = 0.1 , annot = True, vmax = 1000)
plt.title( "HeatMap for %s Counts per Cluster per Age" %genename )
plt.show()