Commit 26173fc5 authored by Simon Gosset's avatar Simon Gosset
Browse files

modif thesaurus col put et transp

parent 2b776d1c
......@@ -183,7 +183,7 @@ format_database = function(organism,organismID, putative, file, uniprot, pathrac
# eliminate putative proteins
if (putative == " TRUE") {
thesaurusNotranNoPut<-thesaurusNotranNoPut[thesaurusNotranNoPut[,5]=="FALSE",]
thesaurusNotranNoPut <- thesaurusNotranNoPut[thesaurusNotranNoPut[,5] == "FALSE",]
Tab.putatives<-thesaurus[thesaurus[,5]==" TRUE",]
Tab.putatives[,2]<-unlist(apply(Tab.putatives,c(1,2), strsplit,split=";")[,2])
for (i in 1:dim(Tab.putatives)[1]) {
......@@ -195,20 +195,21 @@ format_database = function(organism,organismID, putative, file, uniprot, pathrac
}
uniprotthesaurusNotranNoPut<-unlist(apply(thesaurusNotranNoPut,c(1,2), strsplit,split=";")[,2]) # new
biogridA<-irefindex[,1]
biogridB<-irefindex[,2]
prsbar <- txtProgressBar(min = 1, max = dim(thesaurusNotranNoPut)[1], style = 3)
if (length(thesaurus_data[1,]) != 6) {
putative_col = rep(NA, length(thesaurus_data[,1]))
thesaurus_data = cbind(thesaurus_data, putative_col)
colnames(thesaurus_data)[9] = "Putative"
thesaurus_data = cbind(thesaurus_data, putative_col)
colnames(thesaurus_data)[10] = "Transposon"
}
# if (length(thesaurus_data[1,]) != 6) {
# putative_col = rep(NA, length(thesaurus_data[,1]))
# thesaurus_data = cbind(thesaurus_data, putative_col)
# colnames(thesaurus_data)[9] = "Putative"
#
# thesaurus_data = cbind(thesaurus_data, putative_col)
# colnames(thesaurus_data)[10] = "Transposon"
# }
# print(thesaurus_data[1:10,])
# print(thesaurusNotranNoPut[thesaurusNotranNoPut[,5]==" TRUE",])
......@@ -239,7 +240,7 @@ format_database = function(organism,organismID, putative, file, uniprot, pathrac
irefindex[irefindex[,2]==uniprotthesaurusNotranNoPut[i][u],4]<-thesaurusNotranNoPut[i,3]
irefindex[irefindex[,2]==uniprotthesaurusNotranNoPut[i][u],15]<-thesaurusNotranNoPut[i,4]
irefindex[irefindex[,2]==uniprotthesaurusNotranNoPut[i][u],2]<-thesaurusNotranNoPut[i,1]
thesaurus_data[!is.na(thesaurus_data[,1]) & thesaurus_data[,1]==thesaurusNotranNoPut[i,1],9:10] = thesaurusNotranNoPut[i,5:6]
thesaurus_data[!is.na(thesaurus_data[,1]) & thesaurus_data[,1]== thesaurusNotranNoPut[i,1], 9:10 ] = thesaurusNotranNoPut[i,5:6]
}
setTxtProgressBar(prsbar, i)
}
......@@ -257,12 +258,12 @@ format_database = function(organism,organismID, putative, file, uniprot, pathrac
print(database.path)
organism <- gsub(" ", "-", organism)
outfilename <- paste(organism, "_biogrid.txt",sep="")
write.table(irefindex, file = outfilename, row.names = F, col.names = T, quote = F, sep = "\t")
write.table(thesaurus_data, file = sortie, row.names = F, col.names = T, quote = F, sep = "\t")
......
rm(list = ls())
library(appinetwork)
source("tfit.R")
source("assembly_intermediary_window.R")
source("intact_window.R")
source("biogrid_window_opt.R")
source("interface.R")
source("thesaurus_window.R")
source("build_network_window.R")
source("irefindex_window.R")
source("clustering_tfit_window.R")
source("methods.R")
interface()
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