-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_ressler2024.R
96 lines (81 loc) · 5.29 KB
/
run_ressler2024.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
############################### PATH TO DATA ############################################
# change the path to data you downloaded from GEO, or the pre-processed `Seurat` object
# we recommend having it in the `data` subfolder
##########################################################################################
local_path_to_single_cell_data <- file.path("..","data","20241005_Ressler2024_NeoBCC.Rds")
##########################################################################################
############################### BCR- TCR- Seq accessibility ##############################
# change the path to the TCR and BCR-Seq data
# Please note that due to confidentiality and possible patient identification with genomic data, BCR- and TCR-Seq data are only available upon request (EGA)
# As default, plots requiring BCR- or TCR-Seq data won't be run.
# Code is however available.
# You can change the non-run default changing the `accessibility` parameter to `unlock`.
##########################################################################################
accessibility <- "lock"
##########################################################################################
local_path_to_BCR_data <- file.path("..","data","100_CombinedBCR.Rds")
local_path_to_TCR_data <- file.path("..","data","100_CombinedTCR.Rds")
############################### PATH TO DATA ############################################
# if you cloned the github repository, you don't need to change anything here
# path to the McPAS table
path_to_McPAS <- file.path("..","metadata","McPAS-TCR.csv")
# path to CBioplanet gene sets for enrichment analysis
path_to_CBioplanet <- file.path("..","metadata","CBioPlanet.csv")
##########################################################################################
##########################################################################################
############################### RUN the analysis #########################################
##########################################################################################
# create a directory to save all notebooks figure by figure
dir.create("notebook")
notebook_dir <- "notebook"
rmarkdown::render(input = file.path("notebook_template","Figure3.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data),
output_format = "html_document",
output_file = "Figure3.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","Figure4.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data,
accessibility = accessibility,
path_to_TCR = local_path_to_TCR_data,
McPAS = path_to_McPAS),
output_format = "html_document",
output_file = "Figure4.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","Figure5.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data,
accessibility = accessibility,
path_to_BCR = local_path_to_BCR_data),
output_format = "html_document",
output_file = "Figure5.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","ExtendedData_Figure6.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data),
output_format = "html_document",
output_file = "ExtendedData_Figure6.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","ExtendedData_Figure7.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data,
accessibility = accessibility,
path_to_TCR = local_path_to_TCR_data,
McPAS = path_to_McPAS),
output_format = "html_document",
output_file = "ExtendedData_Figure7.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","ExtendedData_Figure8.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data,
path_to_CBioplanet = path_to_CBioplanet),
output_format = "html_document",
output_file = "ExtendedData_Figure8.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","ExtendedData_Figure9.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data),
output_format = "html_document",
output_file = "ExtendedData_Figure9.html",
output_dir = notebook_dir)
rmarkdown::render(input = file.path("notebook_template","ExtendedData_Figure10.Rmd"),
params = list(path_to_data = local_path_to_single_cell_data,
accessibility = accessibility,
path_to_BCR = local_path_to_BCR_data),
output_format = "html_document",
output_file = "ExtendedData_Figure10.html",
output_dir = notebook_dir)