forked from paulrbuckley/ImmunogenicityBenchmarkingOTB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_repitope_OTB_NEOANTIGEN_GBM.R
27 lines (24 loc) · 1.18 KB
/
run_repitope_OTB_NEOANTIGEN_GBM.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
# Title : TODO
# Objective : TODO
# Created by: paulbuckley
# Created on: 22/03/2021
options(java.parameters="-Xmx60G") ## allow JAVA to use large memory space
library(tidyverse)
library(data.table)
library(Repitope)
FullDataset = Epitope_Import(OtherFileNames = list("GBM_TestData_ForRepitope.csv"))
# Read in feature set for training MHCI Human Repitope model.
featureDF_MHCI <- fst::read_fst("FeatureDF_MHCI_Weighted.10000_RepitopeV3.fst", as.data.table=T)
# Read in feature set for the test GBM data.
featureDF_Test_Peps = fst::read_fst("FeatureDF_NEOANTIGEN_GBM_EPsWeighted.10000.fst", as.data.table=T)
# Generate Out the box MHCI Human model
MHCI_HUMAN_MODEL=Immunogenicity_TrainModels(
featureDF=featureDF_MHCI[Peptide%in%MHCI_Human$Peptide,],
metadataDF=MHCI_Human[,.(Peptide, Immunogenicity)],
featureSet=MHCI_Human_MinimumFeatureSet,
seedSet = 1:5,
coreN = parallel::detectCores(logical = T)-4
)
# Use model to predict for unseen test peptides
ALL_PREDICTIONS = Immunogenicity_Predict(list(featureDF_Test_Peps[Peptide%in%FullDataset$Peptide,]),MHCI_HUMAN_MODEL)
write.csv(ALL_PREDICTIONS$ScoreDT_1,file= "NEOANTIGEN_GBM/REPITOPE_OTB/ALL_PREDICTIONS.csv",quote=F,row.names = F)