forked from zitunstu24/GeneExpressionProfiling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2_genotype_specific_expression.R
executable file
·103 lines (84 loc) · 2.82 KB
/
2_genotype_specific_expression.R
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
library(dplyr)
library(UpSetR)
library(ComplexHeatmap)
library(openxlsx)
rm(list=ls())
set.seed(123)
combined.logFC = read.csv("inputs/combined.logFC.csv")
row.names(combined.logFC) = combined.logFC$X
combined.logFC = combined.logFC[, -1]
######################################################################################
######################################################################################
# heat response of different genotypes on pollen #
######################################################################################
######################################################################################
pollen = combined.logFC[, c("e3.1", "e5.1", "e5.2", "e9.1")]
colnames(pollen) = c("Ha.3017","Moneymaker", "Red Setter","Ha.3042")
condition <- function(x) {
ifelse(x == 0, 0, 1)
}
upset.pollen <-
as.data.frame(lapply(pollen, condition))
pdf("outputs/genotypes_response_in_pollen.pdf",
width = 6.13,
height = 5.60)
upset(
upset.pollen,
nsets = 4,
sets.x.label = "significant genes",
mb.ratio = c(0.7, 0.3),
point.size = 2, line.size = 0.75,
matrix.color = "black", main.bar.color = "black",
text.scale = c(1.3, 1.3, 1, 1, 2, 1.3),
order.by = "freq"
)
dev.off()
pollen_mat = as.matrix(pollen)
pdf("outputs/genotypes_response_in_pollen_heatmap.pdf",
width = 6.13,
height = 5.60)
Heatmap(
pollen_mat, name = "logFC",
show_row_names = FALSE,
column_names_gp = gpar(fontsize = 9),
column_names_rot = 0
)
dev.off()
######################################################################################
######################################################################################
# heat response of different genotypes on leaf #
######################################################################################
######################################################################################
colnames(combined.logFC)
leaf = combined.logFC[, c("e1.1", "e2.2", "e6.1", "e10.2")]
colnames(leaf) = c("M82","Jinlingmeiyu", "Moneymaker","LA1698")
condition <- function(x) {
ifelse(x == 0, 0, 1)
}
upset.leaf <-
as.data.frame(lapply(leaf, condition))
pdf("outputs/genotypes_response_in_leaf.pdf",
width = 6.13,
height = 5.60)
upset(
upset.leaf,
nsets = 4,
sets.x.label = "significant genes",
mb.ratio = c(0.7, 0.3),
point.size = 2, line.size = 0.75,
matrix.color = "black", main.bar.color = "black",
text.scale = c(1.3, 1.3, 1, 1, 2, 1.3),
order.by = "freq"
)
dev.off()
leaf_mat = as.matrix(leaf)
pdf("outputs/genotypes_response_in_leaf_heatmap.pdf",
width = 6.13,
height = 5.60)
Heatmap(
leaf_mat, name = "logFC",
show_row_names = FALSE,
column_names_gp = gpar(fontsize = 9),
column_names_rot = 0
)
dev.off()