diff --git a/Data_Annotation/GO_enrichment/GO_enrichment.R b/Data_Annotation/GO_enrichment/GO_enrichment.R new file mode 100644 index 0000000000000000000000000000000000000000..025c166df6f52bc169d17e8fecbd8b50c0e2bfde --- /dev/null +++ b/Data_Annotation/GO_enrichment/GO_enrichment.R @@ -0,0 +1,31 @@ +library(clusterProfiler) +library(org.Hs.eg.db) +library(AnnotationDbi) + +data <- read.table("C:/Users/Emre/Desktop/ensembl.txt", sep = "\n", header = TRUE) + +genes_to_test <- data$ENSEMBLE_ID + +GO_results <- enrichGO(gene = genes_to_test, OrgDb = "org.Hs.eg.db", keyType = "ENSEMBL", ont = "BP") + +as.data.frame(GO_results) + +fit <- plot(barplot(GO_results, showCategory = 15)) +fit + + +GO_results2 <- enrichGO(gene = genes_to_test, OrgDb = "org.Hs.eg.db", keyType = "ENSEMBL", ont = "MF") + +as.data.frame(GO_results2) + +fit2 <- plot(barplot(GO_results2, showCategory = 15)) +fit2 + + +GO_results3 <- enrichGO(gene = genes_to_test, OrgDb = "org.Hs.eg.db", keyType = "ENSEMBL", ont = "CC") + +as.data.frame(GO_results3) + +fit3 <- plot(barplot(GO_results3, showCategory = 15)) +fit3 +