In this document we explore the Tableau dashboard we created earlier from many gene study analysis extracting top genes by fold change from gastrointestinal tract (GIT) pathologies strictly associated with Epstein-Barr Virus (EBV) compared to the top fold change genes we extracted from the Acute Infectious Mono (AIM) and Chronic Active Epstein-Barr Virus (CAEBV). These are all found in gene studies on the National Center for Bioinformatics Information or NCBI database online. We took 5 stimulated genes and 5 inhibited genes in the top genes of the AIM and CAEBV study under GSE85599 to compare to the 5 GIT studies on NPC with mutated LMP1 gene under GSE271486, NPC metastatic compared to normal and non-metastatic GSE299775, Gastric carcinoma or stomach cancer GSE308231 compared to peritoneal metastatic gastric carcinoma, colorectal cancer compared to knockout of the AURKA gene GSE302491, and intrahepatic cholangiocarcinoma or biliary duct cancer with hypoxic state and hypoxic state knocking out the SLC2A1 gene in GSE316921.
We compared gene relations using the filter to select the most up and down regulated or simulated and inhibited genes by foldchange values using the top genes in the pathology dataset from GSE85599 in the top middle right side of the dashboard and compared those results per selected gene of which five up and five down that are also in all the studies’ datasets. There are five studies comparing these GIT EBV associated pathology genes with.
Results:
GIT EBV associated pathology gene relationships to AIM & CAEBV
ASPM is 2.17 same as 217% in AIM & 2.39 in NPCmeta to normal But only 115% in NPCmeta/NPC stimulated and 121% in CAEBV & 118% CRC with shAURKA gene and 49% stimulated in shSLC2A1 hypoxic condition of ICC, an inverse relationship with ICC hypoxia of 0.35.
KIF11 is 260% stimulated in AIM and 296% stimulated in metastatic NPC to normal, 130% in CAEBV similar to 121% stimulated in hypoxic shSLC2A1 of ICC and 128% stimulated in NPCmeta/NPC, inversely related in ICC to hypoxic only state with 33% of gene expression or 67% inhibited. Not much change in GCPM of 113% or CRC shAURKA of 4% downregulated.
MKI67 is 221% upregulated in AIM and 278% in metaNPC to normal and 102% stimulated in metaNPC/NPC, very inhbited in ICC hypoxia with 24%, slightly upregulated in ICC with shSLC2A1 gene of 107%, and upregulated 136% in CAEBV and in GCPM by 136%.
TOP2A gene is 219% stimulated in AIM and 484% in metaNPC to normal. This gene is 125% upregulated in CAEBV and ICC hypoxic with shSLC2A1 and 130% stimulated in NPCmeta/NPC. Inhibited to 92% in GCPM, 85% in NPC LMP1mutation, ICC hypoxic only and in CRC shAURKA.
CCNA2 gene is 233% stimulated in AIM and 211% in NPCmeta/normal, and 118% upregulated in NPCmeta/NPC, 120% in CAEBV, and 114% in ICC hypoxia with shSLC2A1. Inverse relation with NPC mutated LMP1 of 83%, GCPM of 64%, and hypoxic ICC is 59%. Slight upregulation of 107% in CRC with shAURKA.
Now for five genes that are inhibited greatly in AIM or CAEBV.
GPR84 is 36% downregulated in AIM and also 50% in CRC with shAURKA, and 72% in CAEBV, and 81% in NPCmeta/NPC. But this gene is stimulated in NPCmeta/normal 249%, 180% in GCPM, 200% in hypoxic ICC and 225% in hypoxic ICC with shSLC2A1 and normal in NPC with mutated LMP1 gene.
IL1A is 31% inhibited in AIM, 46% in CAEBV, 36% in CRC with shAURKA, 59% in NPC with mutated LMP1, and 69% in NPCmeta/NPC. But inverse relationship with NPCmeta/normal with 137% stimulated, 144% in hypoxic ICC and 223% stimulated in hypoxic ICC with shSLC2A1, and close to normal with 96% downregulation in GCPM.
OLR1 is 37% inhibited in AIM and 52% in CAEBV, 43% in GCPM, 58% in hypoxic ICC with shSLC2A1, 68% in hypoxic ICC, 73% in metaNPC/NPC, and 88% in NPC with mutated LMP1. Upregulated in NPCmeta/normal, and no change at 100% in CRC with shAURKA.
PI3 is 50% downregulated in AIM, 55% in CAEBV, 41% in NPCmeta/NPC, 20% in NPCmeta/normal, and 58% in GCPM. Inverse relationship with ICC hypoxic 138% stimulated, ICC hypoxic with shSLC2A1 is 120%, 150% in CRC with shAURKA, and only 106% in NPC with mutated LMP1 gene.
PLAU is 58% inhibited in CAEBV, 42% in AIM, and ICC hypoxia 84% with shSLC2A1 is 82%. All others are inversely related by being stimulated 112% in CRC shAURKA, 203% in GCPM, 418% in NPCmeta/normal, and 110% in NPCmeta/NPC, and 107% in NPC with mutated LMP1 gene.
Now we want to read in all six total data sets of these gene studies that we found genes after filtering and combining with other genes in some of those studies.
library(rmarkdown)
library(randomForest)
## randomForest 4.7-1.2
## Type rfNews() to see new features/changes/bug fixes.
Lets read in the AIM & CAEBV.
pathMono <- "path to this file on AIM and CAEBV"
setwd(pathMono)
monoCAEBV <- read.csv("CAEBV_genes_32670_FCs.csv")
paged_table(monoCAEBV[1:10,]) # 32670X24
Now lets read in the NPC with LMP1 mutation data.
pathNPC_LMP1 <- "path to this file on NPC with LMP1 mutation"
setwd(pathNPC_LMP1)
NPC_LMP1 <- read.csv("NPCEBV_filtered.csv")
paged_table(NPC_LMP1) # 21932 X 19
Now lets read in the NPC metastatic compared to normal and NPC without metastasis.
pathNPC_metastatic <- "path to this file of NPC metastasis compared to normal and non-metastatic"
setwd(pathNPC_metastatic)
NPC_metastatic <- read.csv("EBV_nasopharyngealCarcinoma_NPC_GSE299775_foldchanges.csv")
# 18677 X 35
paged_table(NPC_metastatic[1:10,])
Now read in the gastric carcinoma peritoneal metastasis dataset.
pathGCPM <- "path to your file on the GCPM dataset"
setwd(pathGCPM)
GCPM <- read.csv("allGenes_ready_GCPM_23552k_noNaNsInfs_ordered.csv")
# 23552 X 10
paged_table(GCPM[1:10,])
Now lets read in the colorectal carcinoma with the short hairpin knockout of the AURKA gene as shAURKA.
pathCRC <- "path to your CRC file"
setwd(pathCRC)
CRC <- read.csv("colorectal cancer GSE302491 all genes/Data1_allGenesAndFCs.csv")
# 16122 X 28
paged_table(CRC[1:10,])
And now for the biliary tract cancer or ICC for intrahepatic cholangiocarcinoma.
pathICC <- "your path to the ICC file"
setwd(pathICC)
ICC <- read.csv("allData_FCs_36242X19.csv")
# 36242 X 19
paged_table(ICC[1:10,])
Lets make a character string vector of the 10 genes we want to extract from each of these data sets.
relationalGenes <- c(
"ASPM", "KIF11","MKI67","TOP2A","CCNA2",
"GPR84","IL1A","OLR1","PI3","PLAU"
)
relationalGenes
## [1] "ASPM" "KIF11" "MKI67" "TOP2A" "CCNA2" "GPR84" "IL1A" "OLR1" "PI3"
## [10] "PLAU"
Get these 10 genes from each dataset.
monoCAEBV10 <- monoCAEBV[which(monoCAEBV$gene %in% relationalGenes),] #10X24
NPC_metastatic10 <- NPC_metastatic[which(NPC_metastatic$ID_REF %in% relationalGenes),] #10X35
NPC_LMP1_10 <- NPC_LMP1[which(NPC_LMP1$gene_name %in% relationalGenes),] #10X19
ICC10 <- ICC[which(ICC$Gene %in% relationalGenes),] #10X19
GCPM10 <- GCPM[which(GCPM$Gene_ID %in% relationalGenes),] #10X10
CRC10 <- CRC[which(CRC$Gene_Symbol %in% relationalGenes),] #10X28
Next we want only the gene symbol ID and the actual samples. We will do this to each of these datasets of 10 genes by removing all other columns like the means and fold changes and for the CRC dataset selecting only the counts, tpm, or fpkm samples that were used. We used all for CRC but lets just select one since they run the same in magnitude for the most part, we will choose the fpkm for fragments per kilomillion.
colnames(CRC10)
## [1] "Gene_Symbol" "fpkm_PL1" "fpkm_PL2"
## [4] "fpkm_PL3" "fpkm_SH1" "fpkm_SH2"
## [7] "fpkm_SH3" "tpm_PL1" "tpm_PL2"
## [10] "tpm_PL3" "tpm_SH1" "tpm_SH2"
## [13] "tpm_SH3" "read_count_PL1" "read_count_PL2"
## [16] "read_count_PL3" "read_count_SH1" "read_count_SH2"
## [19] "read_count_SH3" "fpkm_baseline_mean" "fpkm_AURKA_ko_mean"
## [22] "tpm_baseline_mean" "tpm_AURKA_ko_mean" "count_baseline_mean"
## [25] "count_AURKA_ko_mean" "fpkm_FC" "tpm_FC"
## [28] "counts_FC"
CRC10_a <- CRC10[,c(1:7)]
paged_table(CRC10_a)
colnames(GCPM10)
## [1] "GC1" "GC2" "GC3" "PM1"
## [5] "PM2" "PM3" "Gene_ID" "GC_mean"
## [9] "PM_mean" "FC_PM_over_GC"
GCPM10_a <- GCPM10[,c(1:7)]
paged_table(GCPM10_a)
colnames(ICC10)
## [1] "Gene" "CAFSHNCCTRL_1"
## [3] "CAFSHNCCTRL_2" "CAFSHNCCTRL_3"
## [5] "CAFSHNCHYPO_1" "CAFSHNCHYPO_2"
## [7] "CAFSHNCHYPO_3" "CAFSHSLCCTRL_1"
## [9] "CAFSHSLCCTRL_2" "CAFSHSLCCTRL_3"
## [11] "CAFSHSLCHYPO_1" "CAFSHSLCHYPO_2"
## [13] "CAFSHSLCHYPO_3" "WT_noHypoxia_Mean"
## [15] "WT_Hypoxia_Mean" "shSLC2A1_noHypoxia_Mean"
## [17] "shSLC2A1_Hypoxia_Mean" "WT_Foldchange"
## [19] "shSLC2A1_Foldchange"
ICC10_a <- ICC[,c(1:13)]
paged_table(ICC10_a)
colnames(monoCAEBV10)
## [1] "ID" "gene" "GSM2279022_AIM"
## [4] "GSM2279023_AIM" "GSM2279024_AIM" "GSM2279025_CAEBV"
## [7] "GSM2279026_AIM" "GSM2279027_CAEBV" "GSM2279028_CAEBV"
## [10] "GSM2279029_CAEBV" "GSM2279030_CAEBV" "GSM2279031_healthy"
## [13] "GSM2279032_healthy" "GSM2279033_healthy" "GSM2279034_healthy"
## [16] "GSM2279035_healthy" "GSM2279036_healthy" "GSM2279037_AIM"
## [19] "GSM2279038_AIM" "AIM_mean" "CAEBV_mean"
## [22] "healthy_mean" "FC_AIM_healthy" "FC_CAEBV_healthy"
monoCAEBV10_a <- monoCAEBV10[,c(2:19)]
paged_table(monoCAEBV10_a)
colnames(NPC_LMP1_10)
## [1] "gene_id" "gene_name" "description"
## [4] "locus" "HNE_1_MUT_LMP1_1_count" "HNE_1_MUT_LMP1_2_count"
## [7] "HNE_1_MUT_LMP1_3_count" "HNE_1_WT_LMP1_1_count" "HNE_1_WT_LMP1_2_count"
## [10] "HNE_1_WT_LMP1_3_count" "HNE_1_MUT_LMP1_1_FPKM" "HNE_1_MUT_LMP1_2_FPKM"
## [13] "HNE_1_MUT_LMP1_3_FPKM" "HNE_1_WT_LMP1_1_FPKM" "HNE_1_WT_LMP1_2_FPKM"
## [16] "HNE_1_WT_LMP1_3_FPKM" "EBV_mean" "baseline_mean"
## [19] "FoldchangeEBV_baseline"
Also, only use fpkm samples in the NPC mutated LMP1 gene.
NPC_LMP1_10_a <- NPC_LMP1_10[,c(2,11:16)]
paged_table(NPC_LMP1_10_a)
colnames(NPC_metastatic10)
## [1] "ID_REF" "GSM9045905_MET"
## [3] "GSM9045906_MET" "GSM9045909_MET"
## [5] "GSM9045910_MET" "GSM9045911_MET"
## [7] "GSM9045912_MET" "GSM9045913_MET"
## [9] "GSM9045914_MET" "GSM9045915_MET"
## [11] "GSM9045918_MET" "GSM9045919_MET"
## [13] "GSM9045928_MET" "GSM9045929_MET"
## [15] "GSM9045930_MET" "GSM9045907_nonMET"
## [17] "GSM9045908_nonMET" "GSM9045916_nonMET"
## [19] "GSM9045917_nonMET" "GSM9045923_nonMET"
## [21] "GSM9045924_nonMET" "GSM9045926_nonMET"
## [23] "GSM9045927_nonMET" "GSM9045931_nonMET"
## [25] "GSM9045932_nonMET" "GSM9045920_Normal"
## [27] "GSM9045921_Normal" "GSM9045922_Normal"
## [29] "GSM9045925_Normal" "MET_mean"
## [31] "nonMET_mean" "Normal_mean"
## [33] "MET_Normal_FoldChange" "nonMET_Normal_FoldChange"
## [35] "MET_nonMET_FoldChange"
NPC_metastatic10_a <- NPC_metastatic10[,c(1:29)]
paged_table(NPC_metastatic10_a)
We are going to stop here due to the timing of this project but it will be resaved, this was 3 hours to find genes on Tableau dashboard and prepare the document this much. We will return to this document later and make the matrices of each of these data tables of 10 genes and order the genes alphabetically, and then test the accuracy in prediction of class of each of these study classes including grouping all normal or healthy samples together. After combining all matrices together with row bind after alphabatized and adding a class feature to those matrices adjusting names of the healthy or normal samples where we had them available. We will see if some of these pathologies using these 10 genes of 5 stimulated and 5 inhibited in common with the AIM and CAEBV data shows shifting in classification towards other pathologies or one other pathology or only to itself or healthy. We will break down the samples in each class for each dataset as well to see how balanced these samples will be when classifying.
Thanks so much.
====================================
Part 2, 7/16/2026 1030pm
We are going to prepare the matrices of these genes.We just reviewed late and realized too much time to finish tonight. We will do some tomorrow morning if time permits.
We are working with the ’_a’ datasets of 10 genes each from these 6 studies one is the study of genes we found relationships to the other 5 studies.
paged_table(CRC10_a)
This table above on colorectal cancer has fpkm used for 3 samples of CRC and 3 samples of CRC with the AURKA gene knocked out with a short hairpin. No healthy samples in that study.
paged_table(GCPM10_a)
The above table shows 3 samples of gastric carcinoma and 3 samples of gastric carcinoma that metastasized to the peritoneal lining. No healthy samples.
paged_table(ICC10_a)
This study looked at biliary cancer as ICC for intrahepatic cholangiocarcinoma that has ICC, then hypoxic state of ICC, and then ICC with the SLC2A1 gene knocked out with the short hairpin of SLC2A1, and the hypoxic state of the last class for 4 classes in the study, 3 samples each, and no healthy samples.
paged_table(monoCAEBV10_a)
The above table is of acute infectious mono and chronic active EBV, there are healthy samples in this study to use, this study has 3 classes in it for mono, EBV, or healthy.
paged_table(NPC_LMP1_10_a)
The study above uses NPC commercial cell line and then mutates the EBV LMP1 change to it, with 3 samples each, there are no healthy samples in this data.
paged_table(NPC_metastatic10_a)
The above table has NPC cells, then metastatic NPC cells, and a few normal or healthy cells in this study for a total of 3 classes.
Now when we make the matrices for these 6 tables to combine them and classify by class, we can group the healthy samples from the NPC metastatic study and the mono & EBV study. We can see how well these top 10 genes are as features in classifying these groups of GI tract EBV associated pathologies and their feature classes after making each into a matrix and then combining the 6 matrices and running random Forest to classify.
Lets make the CRC matrix.
colnames(CRC10_a)
## [1] "Gene_Symbol" "fpkm_PL1" "fpkm_PL2" "fpkm_PL3" "fpkm_SH1"
## [6] "fpkm_SH2" "fpkm_SH3"
Lets make the matrix for CRC study.
class_CRC <- c("CRC","CRC","CRC",
"CRC with inhibited AURKA", "CRC with inhibited AURKA", "CRC with inhibited AURKA")
CRC10_mx <- data.frame(t(CRC10_a[,2:7]))
colnames(CRC10_mx) <- CRC10_a$Gene_Symbol
CRC10_mx$class <- class_CRC
paged_table(CRC10_mx)
Now to order by column name alphabetized and class at the end.
colnames(CRC10_mx)
## [1] "ASPM" "IL1A" "KIF11" "MKI67" "OLR1" "PI3" "PLAU" "GPR84" "TOP2A"
## [10] "CCNA2" "class"
CRC10_mx1 <- CRC10_mx[,c(1,10,8,2,3,4,5,6,7,9,11)]
colnames(CRC10_mx1)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "OLR1" "PI3" "PLAU"
## [10] "TOP2A" "class"
Now we will create the matrix for the GC data.
colnames(GCPM10_a)
## [1] "GC1" "GC2" "GC3" "PM1" "PM2" "PM3" "Gene_ID"
There are 3 GC and 3 PM samples.
classGCPM <- c("GC","GC","GC",
"PM","PM","PM")
GCPM10_mx <- data.frame(t(GCPM10_a[,1:6]))
colnames(GCPM10_mx) <- GCPM10_a$Gene_ID
GCPM10_mx$class <- classGCPM
paged_table(GCPM10_mx)
Lets alphabetize the columns by gene and keep class at the end.
colnames(GCPM10_mx)
## [1] "PLAU" "GPR84" "MKI67" "KIF11" "ASPM" "IL1A" "TOP2A" "CCNA2" "PI3"
## [10] "OLR1" "class"
GCPM10_mx1 <- GCPM10_mx[,c(5,8,2,6,4,3,9,1,10,7,11)]
colnames(GCPM10_mx1)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "PI3" "PLAU" "OLR1"
## [10] "TOP2A" "class"
Lets make the matrix to the ICC10_a table of biliary cancer.
colnames(ICC10_a)
## [1] "Gene" "CAFSHNCCTRL_1" "CAFSHNCCTRL_2" "CAFSHNCCTRL_3"
## [5] "CAFSHNCHYPO_1" "CAFSHNCHYPO_2" "CAFSHNCHYPO_3" "CAFSHSLCCTRL_1"
## [9] "CAFSHSLCCTRL_2" "CAFSHSLCCTRL_3" "CAFSHSLCHYPO_1" "CAFSHSLCHYPO_2"
## [13] "CAFSHSLCHYPO_3"
There was an error earlier in the ICC10_a dataset where all genes were used and not filtered by relationalGenes of 10.
ICC10_a1 <- ICC10[,1:13]
classICC <- c("ICC","ICC","ICC",
"ICC hypoxia","ICC hypoxia","ICC hypoxia",
"ICC with SLC2A1 inhibited","ICC with SLC2A1 inhibited","ICC with SLC2A1 inhibited",
"ICC with SLC2A1 inhibited and hypoxia","ICC with SLC2A1 inhibited and hypoxia",
"ICC with SLC2A1 inhibited and hypoxia")
ICC10_mx <- data.frame(t(ICC10_a1[,2:13]))
colnames(ICC10_mx) <- ICC10_a1$Gene
ICC10_mx$class <- classICC
paged_table(ICC10_mx)
colnames(ICC10_mx)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "OLR1" "PI3" "PLAU"
## [10] "TOP2A" "class"
ICC10_mx1 <- ICC10_mx[,c(1,2,3,4,5,6,8,9,7,10,11)]
colnames(ICC10_mx1)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "PI3" "PLAU" "OLR1"
## [10] "TOP2A" "class"
Now lets make the matrix for the mono and EBV dataset.
colnames(monoCAEBV10_a)
## [1] "gene" "GSM2279022_AIM" "GSM2279023_AIM"
## [4] "GSM2279024_AIM" "GSM2279025_CAEBV" "GSM2279026_AIM"
## [7] "GSM2279027_CAEBV" "GSM2279028_CAEBV" "GSM2279029_CAEBV"
## [10] "GSM2279030_CAEBV" "GSM2279031_healthy" "GSM2279032_healthy"
## [13] "GSM2279033_healthy" "GSM2279034_healthy" "GSM2279035_healthy"
## [16] "GSM2279036_healthy" "GSM2279037_AIM" "GSM2279038_AIM"
classMonoEBV <- c("AIM" , "AIM" , "AIM",
"CAEBV" , "AIM" , "CAEBV" , "CAEBV" ,
"CAEBV" , "CAEBV" , "healthy", "healthy",
"healthy", "healthy", "healthy", "healthy",
"AIM" , "AIM" )
MonoEBV10_mx <- data.frame(t(monoCAEBV10_a[,2:18]))
colnames(MonoEBV10_mx) <- monoCAEBV10_a$gene
MonoEBV10_mx$class <- classMonoEBV
paged_table(MonoEBV10_mx)
colnames(MonoEBV10_mx)
## [1] "MKI67" "KIF11" "TOP2A" "ASPM" "CCNA2" "GPR84" "PLAU" "PI3" "OLR1"
## [10] "IL1A" "class"
MonoEBV10_mx1 <- MonoEBV10_mx[,c(4,5,6,10,2,1,8,7,9,3,11)]
colnames(MonoEBV10_mx1)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "PI3" "PLAU" "OLR1"
## [10] "TOP2A" "class"
Now we need two more of the data tables into matrices.
colnames(NPC_LMP1_10_a)
## [1] "gene_name" "HNE_1_MUT_LMP1_1_FPKM" "HNE_1_MUT_LMP1_2_FPKM"
## [4] "HNE_1_MUT_LMP1_3_FPKM" "HNE_1_WT_LMP1_1_FPKM" "HNE_1_WT_LMP1_2_FPKM"
## [7] "HNE_1_WT_LMP1_3_FPKM"
classNPC_LMP1 <- c("NPC mutated LMP1","NPC mutated LMP1","NPC mutated LMP1",
"NPC","NPC","NPC")
NPC_LMP1_mx <- data.frame(t(NPC_LMP1_10_a[,2:7]))
colnames(NPC_LMP1_mx) <- NPC_LMP1_10_a$gene_name
NPC_LMP1_mx$class <- classNPC_LMP1
paged_table(NPC_LMP1_mx)
Order column names alphabetically like the others.
colnames(NPC_LMP1_mx)
## [1] "PLAU" "PI3" "GPR84" "MKI67" "OLR1" "ASPM" "TOP2A" "CCNA2" "KIF11"
## [10] "IL1A" "class"
NPC_LMP1_mx1 <- NPC_LMP1_mx[,c(6,8,3,10,9,4,2,1,5,7,11)]
colnames(NPC_LMP1_mx1)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "PI3" "PLAU" "OLR1"
## [10] "TOP2A" "class"
Now lets make the NPC and metastatic NPC with healthy or normal samples for a matrix.
colnames(NPC_metastatic10_a)
## [1] "ID_REF" "GSM9045905_MET" "GSM9045906_MET"
## [4] "GSM9045909_MET" "GSM9045910_MET" "GSM9045911_MET"
## [7] "GSM9045912_MET" "GSM9045913_MET" "GSM9045914_MET"
## [10] "GSM9045915_MET" "GSM9045918_MET" "GSM9045919_MET"
## [13] "GSM9045928_MET" "GSM9045929_MET" "GSM9045930_MET"
## [16] "GSM9045907_nonMET" "GSM9045908_nonMET" "GSM9045916_nonMET"
## [19] "GSM9045917_nonMET" "GSM9045923_nonMET" "GSM9045924_nonMET"
## [22] "GSM9045926_nonMET" "GSM9045927_nonMET" "GSM9045931_nonMET"
## [25] "GSM9045932_nonMET" "GSM9045920_Normal" "GSM9045921_Normal"
## [28] "GSM9045922_Normal" "GSM9045925_Normal"
classNPC_mets <- c( "MET" , "MET" , "MET" , "MET" ,
"MET" , "MET" , "MET" , "MET" , "MET" ,
"MET" , "MET" , "MET" , "MET" , "MET" ,
"nonMET" ,"nonMET" ,"nonMET", "nonMET", "nonMET",
"nonMET", "nonMET" ,"nonMET", "nonMET", "nonMET",
"healthy", "healthy" ,"healthy", "healthy")
NPC_mets_mx <- data.frame(t(NPC_metastatic10_a[2:29]))
colnames(NPC_mets_mx) <- NPC_metastatic10_a$ID_REF
NPC_mets_mx$class <- classNPC_mets
paged_table(NPC_mets_mx)
Lets alphabatize the gene names like the others.
colnames(NPC_mets_mx)
## [1] "TOP2A" "KIF11" "CCNA2" "ASPM" "PLAU" "MKI67" "GPR84" "OLR1" "IL1A"
## [10] "PI3" "class"
NPC_mets_mx1 <- NPC_mets_mx[,c(4,3,7,9,2,6,10,5,8,1,11)]
colnames(NPC_mets_mx1)
## [1] "ASPM" "CCNA2" "GPR84" "IL1A" "KIF11" "MKI67" "PI3" "PLAU" "OLR1"
## [10] "TOP2A" "class"
Lets now row bind these 6 datasets to do machine learning on.
dataML <- rbind(MonoEBV10_mx1, CRC10_mx1, GCPM10_mx1, ICC10_mx1, NPC_mets_mx1, NPC_LMP1_mx1)
paged_table(dataML)
table(dataML$class)
##
## AIM CAEBV
## 6 5
## CRC CRC with inhibited AURKA
## 3 3
## GC healthy
## 3 10
## ICC ICC hypoxia
## 3 3
## ICC with SLC2A1 inhibited ICC with SLC2A1 inhibited and hypoxia
## 3 3
## MET nonMET
## 14 10
## NPC NPC mutated LMP1
## 3 3
## PM
## 3
Lets just see real quick how well these 10 genes can classify 15 classes within these 6 GIT & EBV pathology datasets.
dataML$class <- as.factor(dataML$class)
set.seed(1267)
inTrain <- sample(1:75, .75*75)
training <- dataML[inTrain,]
testing <- dataML[-inTrain,]
table(training$class)
##
## AIM CAEBV
## 3 4
## CRC CRC with inhibited AURKA
## 3 2
## GC healthy
## 3 7
## ICC ICC hypoxia
## 2 3
## ICC with SLC2A1 inhibited ICC with SLC2A1 inhibited and hypoxia
## 2 3
## MET nonMET
## 13 4
## NPC NPC mutated LMP1
## 3 2
## PM
## 2
table(testing$class)
##
## AIM CAEBV
## 3 1
## CRC CRC with inhibited AURKA
## 0 1
## GC healthy
## 0 3
## ICC ICC hypoxia
## 1 0
## ICC with SLC2A1 inhibited ICC with SLC2A1 inhibited and hypoxia
## 1 0
## MET nonMET
## 1 6
## NPC NPC mutated LMP1
## 0 1
## PM
## 1
rf <- randomForest(training[1:10], training$class, mtry=5, ntree=5000, confusion=T)
rf$confusion
## AIM CAEBV CRC CRC with inhibited AURKA GC
## AIM 2 0 0 0 0
## CAEBV 0 3 0 0 0
## CRC 0 0 3 0 0
## CRC with inhibited AURKA 0 0 1 1 0
## GC 0 0 0 0 2
## healthy 0 0 0 0 0
## ICC 0 0 0 0 0
## ICC hypoxia 0 0 0 0 0
## ICC with SLC2A1 inhibited 0 0 0 0 0
## ICC with SLC2A1 inhibited and hypoxia 0 0 0 0 0
## MET 0 1 0 0 0
## nonMET 0 0 0 0 0
## NPC 0 0 0 0 0
## NPC mutated LMP1 0 0 0 0 0
## PM 0 0 0 0 2
## healthy ICC ICC hypoxia
## AIM 0 0 0
## CAEBV 1 0 0
## CRC 0 0 0
## CRC with inhibited AURKA 0 0 0
## GC 0 0 0
## healthy 6 0 0
## ICC 0 1 1
## ICC hypoxia 0 0 2
## ICC with SLC2A1 inhibited 0 0 0
## ICC with SLC2A1 inhibited and hypoxia 0 0 1
## MET 0 0 0
## nonMET 0 0 0
## NPC 0 0 0
## NPC mutated LMP1 0 0 0
## PM 0 0 0
## ICC with SLC2A1 inhibited
## AIM 0
## CAEBV 0
## CRC 0
## CRC with inhibited AURKA 0
## GC 0
## healthy 0
## ICC 0
## ICC hypoxia 1
## ICC with SLC2A1 inhibited 0
## ICC with SLC2A1 inhibited and hypoxia 2
## MET 0
## nonMET 0
## NPC 0
## NPC mutated LMP1 0
## PM 0
## ICC with SLC2A1 inhibited and hypoxia MET
## AIM 0 1
## CAEBV 0 0
## CRC 0 0
## CRC with inhibited AURKA 0 0
## GC 0 0
## healthy 0 1
## ICC 0 0
## ICC hypoxia 0 0
## ICC with SLC2A1 inhibited 2 0
## ICC with SLC2A1 inhibited and hypoxia 0 0
## MET 0 11
## nonMET 0 4
## NPC 0 0
## NPC mutated LMP1 0 0
## PM 0 0
## nonMET NPC NPC mutated LMP1 PM
## AIM 0 0 0 0
## CAEBV 0 0 0 0
## CRC 0 0 0 0
## CRC with inhibited AURKA 0 0 0 0
## GC 0 0 0 1
## healthy 0 0 0 0
## ICC 0 0 0 0
## ICC hypoxia 0 0 0 0
## ICC with SLC2A1 inhibited 0 0 0 0
## ICC with SLC2A1 inhibited and hypoxia 0 0 0 0
## MET 1 0 0 0
## nonMET 0 0 0 0
## NPC 0 0 3 0
## NPC mutated LMP1 0 2 0 0
## PM 0 0 0 0
## class.error
## AIM 0.3333333
## CAEBV 0.2500000
## CRC 0.0000000
## CRC with inhibited AURKA 0.5000000
## GC 0.3333333
## healthy 0.1428571
## ICC 0.5000000
## ICC hypoxia 0.3333333
## ICC with SLC2A1 inhibited 1.0000000
## ICC with SLC2A1 inhibited and hypoxia 1.0000000
## MET 0.1538462
## nonMET 1.0000000
## NPC 1.0000000
## NPC mutated LMP1 1.0000000
## PM 1.0000000
For this rough model of 15 classes, it wasn’t too too bad, where the healthy samples were correctly predicted 86% accuracy, while most NPC samples and PM and ICC with SLC2A1 inhibited were not accurate at all with 0% accuracy. Some accuracies up to 67% for the other classes. There will be better results when feature selected as these samples had pathologies and their mutated state or altered state such as hypoxia or inhibition or mutation.
Lets see how well it predicts.
predicted <- predict(rf, testing)
results <- data.frame(predicted=predicted, actual=testing$class)
results
## predicted actual
## GSM2279023_AIM AIM AIM
## GSM2279024_AIM AIM AIM
## GSM2279030_CAEBV CAEBV CAEBV
## GSM2279031_healthy healthy healthy
## GSM2279033_healthy healthy healthy
## GSM2279035_healthy healthy healthy
## GSM2279037_AIM AIM AIM
## fpkm_SH3 CRC with inhibited AURKA CRC with inhibited AURKA
## PM1 GC PM
## CAFSHNCCTRL_3 ICC hypoxia ICC
## CAFSHSLCCTRL_1 ICC with SLC2A1 inhibited ICC with SLC2A1 inhibited
## GSM9045906_MET MET MET
## GSM9045908_nonMET MET nonMET
## GSM9045916_nonMET MET nonMET
## GSM9045917_nonMET MET nonMET
## GSM9045923_nonMET MET nonMET
## GSM9045931_nonMET healthy nonMET
## GSM9045932_nonMET healthy nonMET
## HNE_1_MUT_LMP1_2_FPKM NPC NPC mutated LMP1
Not all samples were included in the testing set, but for the mono, chronic active EBV, and the first few healthy samples and one CRC with AURKA inibited were correctly classified. There were study classifications that were correct but not for the sample within the study such as peritoneal metastasis predicted as less severe gastric carcinoma. And biliary cancer as that with hypoxia and one with SLC2A1 inhibited but that was correct for latter. The NPC, many non metastatic NPC were misclassified as more severe metastatic NPC. And a few non metastatic NPC misclassified as less severe healthy class. There was one NPC mutation with the LMP1 gene of EBV that was misclassified as only NPC wild type or unaltered.