-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_extData_excel.rmd
66 lines (35 loc) · 2.18 KB
/
create_extData_excel.rmd
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
---
title: "R Notebook"
author: paulbuckley
date: 22/12/2021
output: html_document
---
```{r}
library(data.table)
library(xlsx)
library(dplyr)
```
## Read files into R
```{r}
SHEET1_COV2=fread(file="/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/1_COV2_MODEL_IMMSCORES.csv")
SHEET2_GBM= fread(file="/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/2_GBM_MODEL_IMMSCORES.csv")
SHEET3=fread(file="/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/3_TESLA_MODEL_IMMSCORES.csv")
SHEET4 = fread("../../../2019_11_26-RuiTestedPeptidesCollatedData/2019_11_26-collected_tested153peptides_stats_updatedNov19.tsv")
SHEET4=SHEET4 %>% dplyr::rename(
Peptide=Mut_peptide,HLA_Allele=HLA_allele,Immunogenicity=tcell_response_updatedNov19) %>% mutate(
Immunogenicity = ifelse(Immunogenicity=='positive','Positive','Negative'))
```
# write to XLSX
```{r}
# Write the first data set in a new workbook
write.xlsx(SHEET1_COV2, file = "/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/BenchmarkingExtendedData.xlsx",
sheetName = "SARS-COV-2-BENCHMARKING", append = FALSE)
write.xlsx(SHEET4, file = "/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/BenchmarkingExtendedData.xlsx",
sheetName="GBM_FULL_DATASET", append=TRUE)
# Add a second data set in a new worksheet
write.xlsx(SHEET2_GBM, file = "/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/BenchmarkingExtendedData.xlsx",
sheetName="GBM_BENCHMARKING", append=TRUE)
# Add a third data set
write.xlsx(SHEET3, file = "/Users/paulbuckley/Dropbox/ImmunogenicityBenchmark_V2_EmergingViruses/ImmunogenicityBenchmark_V2_EmergingViruses_BIB_RR/Supp_Files/BenchmarkingExtendedData.xlsx",
sheetName="TESLADATA_BENCHMARKING", append=TRUE)
```