-
Notifications
You must be signed in to change notification settings - Fork 0
/
FigureS8B_RNAITHSaturation.R
57 lines (16 loc) · 1.23 KB
/
FigureS8B_RNAITHSaturation.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
library(ggplot2)
setwd("E:\\project\\escc_multiregion\\rna_analysis\\rna_ith_saturation")
patient_id_update_frame <- read.table(file = "E:\\project\\escc_multiregion\\sample_info\\updated_sample_id_index_list.xls", sep = "\t", header = T,stringsAsFactors = F)
updated_patient_id_array <- unique(patient_id_update_frame$updated_patient_id)
names(updated_patient_id_array) <- unique(patient_id_update_frame$patient_id)
ith_frame = read.table(file = "escc.all_patient_wise_ith_values_saturation_matrix.xls",sep = "\t",header = TRUE)
ith_frame$updated_patient_id <- updated_patient_id_array[ith_frame$patient_id]
ggplot(ith_frame,aes(x = sample_count,y = ith_score)) +
geom_point(col = "#41b6e6") +
geom_line(aes(x = sample_count,y = mean_value),size = 1,col = "#ff585d") +
geom_line(aes(x = sample_count,y = mean_value + std_value),size = 1,col = "#ffb549") +
geom_line(aes(x = sample_count,y = mean_value - std_value),size = 1,col = "#ffb549") +
theme(panel.border = element_rect(fill = NA),strip.background = element_blank()) +
facet_wrap(updated_patient_id ~ .,nrow = 5) +
xlab("Number of Samples") +
ylab("Gene Expression ITH")