-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GO enrichment with all significant GOs and GOSemSim script
- Loading branch information
Lazzat Aibekova
authored and
Lazzat Aibekova
committed
Jun 25, 2019
1 parent
8f1a66e
commit d788911
Showing
54 changed files
with
61,625 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
library(GOSemSim) | ||
library(org.Dm.eg.db) | ||
#Reference for Fly | ||
d = godata('org.Dm.eg.db', ont = "BP", computeIC = FALSE) | ||
contrast = read.csv("contrasts_mite_life_stages.csv", header = F) | ||
similarities_upregulated = c() | ||
similarities_downregulated = c() | ||
|
||
for (id in 1:length(contrast$V1)) | ||
{ | ||
first_contrast = toString(contrast$V1[id]) | ||
second_contrast = toString(contrast$V2[id]) | ||
|
||
#UP-REGULATED | ||
filename = paste("./GO_enrichment_microbiome_output/contrast_", first_contrast, "_", second_contrast, "_upregulated", ".csv", sep = "") | ||
GO1 = read.csv(filename, header = T) | ||
GO1ID = as.character(GO1[,1]) | ||
|
||
filename = paste("./GO_enrichment_output/contrast_", first_contrast, "_", second_contrast, "_upregulated", ".csv", sep = "") | ||
GO2 = read.csv(filename, header = T) | ||
GO2ID = as.character(GO2[,1]) | ||
|
||
similarities_upregulated[id] = mgoSim(GO1ID, GO2ID, semData = d, measure = "Wang", combine = "BMA") | ||
|
||
#DOWN-REGULATED | ||
filename = paste("./GO_enrichment_microbiome_output/contrast_", first_contrast, "_", second_contrast, "_downregulated", ".csv", sep = "") | ||
GO1 = read.csv(filename, header = T) | ||
GO1ID = as.character(GO1[,1]) | ||
|
||
filename = paste("./GO_enrichment_output/contrast_", first_contrast, "_", second_contrast, "_downregulated", ".csv", sep = "") | ||
GO2 = read.csv(filename, header = T) | ||
GO2ID = as.character(GO2[,1]) | ||
|
||
similarities_downregulated[id] = mgoSim(GO1ID, GO2ID, semData = d, measure = "Wang", combine = "BMA") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.