-
Notifications
You must be signed in to change notification settings - Fork 0
/
2geneBOX.py
35 lines (35 loc) · 1.28 KB
/
2geneBOX.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
33
34
35
import pandas as pd
import matplotlib.pyplot as plt
from scipy import stats
import seaborn as sns
from statannot import add_stat_annotation
gse107=pd.read_csv(r"C:\Users\Heather P\Desktop\github\T1\GSE107943_Box.csv")
gse119=pd.read_csv(r"C:\Users\Heather P\Desktop\github\T1\GSE119336_Box.csv")
tcga=pd.read_csv(r"C:\Users\Heather P\Desktop\github\T1\result_df - Box.csv")
#################################################################################tcga
#x = "Ward_D"
#y = "973"
#order = [1,2]
#ax = sns.boxplot(data=tcga, x=x, y=y, order=order,showfliers = False)
#add_stat_annotation(ax, data=tcga, x=x, y=y, order=order,
# box_pairs=[(1,2)],
# test='Mann-Whitney', text_format='simple', verbose=2)
#plt.ylim(0,20)
#plt.xlabel('Group')
#plt.ylabel(' ')
#plt.show()
##############################################################################gse
x = "group"
y = "CD79A"
gse119.index=gse119.iloc[:,0]
gse119=(gse119.iloc[:,1:]).T
print(gse119)
order = [1,2]
ax = sns.boxplot(data=gse119, x=x, y=y, order=order,showfliers = False)
add_stat_annotation(ax, data=gse119, x=x, y=y, order=order,
box_pairs=[(1,2)],
test='Mann-Whitney', text_format='simple', verbose=2)
plt.ylim(0,20)
plt.xlabel('group')
plt.ylabel(' ')
plt.show()