Commit ee7f21ff authored by Sayed Rzgar Hosseini's avatar Sayed Rzgar Hosseini
Browse files

Upload New File

parent c01545eb
######################################################################################################################################################################################################
anchor_breast<-read.csv("./Tables/Table10.csv")$Gene
anchor_colorectal<-read.csv("./Tables/Table11.csv")$Gene
Candidate_Breast<-read.csv("./Tables/Table8.csv")$x
Candidate_Colorectal<-read.csv("./Tables/Table9.csv")$x
######################################################################################################################################################################################################
PPI<-read.csv("./Tables/Table25.csv")
library(STRINGdb)
string_db <- STRINGdb$new(version="11", species=9606,score_threshold=400, input_directory="")
proteins = string_db$get_proteins()
proteins$protein_external_id = toupper(proteins$protein_external_id)
PPIs = string_db$get_interactions(proteins$protein_external_id)
PPIs$from = sub(".*[.]", '', PPIs$from)
PPIs$to = sub(".*[.]", '', PPIs$to)
x<-character(length(PPIs$from))
y<-character(length(PPIs$to))
for (i in 1:length(PPIs$from)){
x[i]<-proteins$preferred_name[which(proteins$protein_external_id==paste0("9606.",PPIs$from[i]))]
y[i]<-proteins$preferred_name[which(proteins$protein_external_id==paste0("9606.",PPIs$to[i]))]
print(i)
}
######################################################################################################################################################################################################PPIs_breast1<-list()
PPIs_breast2<-list()
PPIs_colorectal<-list()
alls_breast<-c()
for (i in 1:40){
selA<-intersect(which(x==as.character(anchor_breast$Gene[i])),which(PPIs$combined_score>900))
setA<-y[selA]
selB<-intersect(which(y==as.character(anchor_breast$Gene[i])),which(PPIs$combined_score>900))
setB<-x[selB]
PPIs_breast[[i]]<-unique(union(setA,setB))
alls_breast<-c(alls_breast,PPIs_breast[[i]])
print(paste(i,j))
}
unique(alls_breast)
intersect(unique(alls_breast),Candidate_Breast)
alls_colorectal<-c()
for (i in 1:43){
selA<-intersect(which(x==as.character(anchor_colorectal$Gene[i])),which(PPIs$combined_score>975))
setA<-intersect(y[selA],as.character(Colorectal_Genes))
selB<-intersect(which(y==as.character(anchor_colorectal$Gene[i])),which(PPIs$combined_score>975))
setB<-intersect(x[selB],as.character(Colorectal_Genes))
PPIs_colorectal[[i]]<-unique(union(setA,setB))
alls_colorectal<-c(alls_colorectal,unique(PPIs_colorectal[[i]]))
print(paste(i,j))
}
unique(alls_colorectal)
intersect(unique(alls_colorectal),Candidate_Colorectal)
######################################################################################################################################################################################################
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment