Commit 2b776d1c authored by Simon Gosset's avatar Simon Gosset
Browse files

test ajout transposon

parent 39048633
......@@ -28,7 +28,7 @@ construct_id2 = function(organism, uniprot, sequence, mainpath) {
setwd(mainpath)
cat("\n CAT 1 :",mainpath)
command <- paste("python", "thesaurusPy.py", paste0("\"", uniprot, "\""), paste0("\"",sortie, "\""), organisme, sep = " ")
command <- paste("python3", "thesaurusPy.py", paste0("\"", uniprot, "\""), paste0("\"",sortie, "\""), organisme, sep = " ")
cat("\n CAT 2 :",command)
system(command)
......@@ -92,7 +92,7 @@ format_database = function(organism,organismID, putative, file, uniprot, pathrac
path <- paste(system.file(package = "appinetwork"), "biogridPy.py", sep = "/")
file.copy(path, pathracine)
path.copy <- paste(pathracine, "biogridPy.py", sep = "/")
command <- paste("python", "biogridPy.py", paste0("\"", uniprotfile, "\""), paste0("\"",sortie, "\""), putative, sep = " ")
command <- paste("python3", "biogridPy.py", paste0("\"", uniprotfile, "\""), paste0("\"",sortie, "\""), putative, sep = " ")
system(command)
file.remove(path.copy)
......
......@@ -26,7 +26,7 @@ construct_id = function(organism, uniprot, sequence, mainpath) {
setwd(mainpath)
cat("\n CAT 1 :",mainpath)
command <- paste("python", "thesaurusPy.py", paste0("\"", uniprot, "\""), paste0("\"",sortie, "\""), organisme, sep = " ")
command <- paste("python3", "thesaurusPy.py", paste0("\"", uniprot, "\""), paste0("\"",sortie, "\""), organisme, sep = " ")
cat("\n CAT 2 :",command)
system(command)
......
......@@ -39,6 +39,8 @@ ORF = 'NA'
Iso = 'NA'
ISO = 'NA'
NIso = 'NA'
Putative = "FALSE"
Transposon = "FALSE"
for i in fichier :
......@@ -120,6 +122,21 @@ for i in fichier :
else :
Biogrid = 'NA'
# Recuperation du RecName : Putative, Transposon
elif i[0:13] == "DE RecName:" :
if Putative == "FALSE" :
Putative = re.search(r"(DE RecName:)(\s)*(Full=Putative)(.)*", i)
if Putative is not None:
Putative = "TRUE"
else :
Putative = "FALSE"
if Transposon == "FALSE" :
Transposon = re.search(r"(DE RecName:)(\s)*(Full=Transposon)(.)*", i)
if Transposon is not None:
Transposon = "TRUE"
else :
Transposon = "FALSE"
# Recuperation du nombre d'isoformes
elif i[0:2] == "CC" :
if NIso == 'NA' :
......@@ -400,7 +417,7 @@ for i in fichier :
for B in range(0,b) :
Biogrid = str(BIOGRID[B]) + ';'
ligne = ID + "\t" + Biogrid + "\t" + Name + "\t" + Ref + "\t" + NameProt + "\t" + ORF + "\t" + Iso + "\t" + NIso
ligne = ID + "\t" + Biogrid + "\t" + Name + "\t" + Ref + "\t" + NameProt + "\t" + ORF + "\t" + Iso + "\t" + NIso + "\t" + Putative + "\t" + Transposon
donnees.append(ligne)
ligne = 'NA'
......@@ -416,6 +433,8 @@ for i in fichier :
ISO = 'NA'
NIso = 'NA'
test = 0
Putative = "FALSE"
Transposon = "FALSE"
fichier.close()
......@@ -423,7 +442,7 @@ fichier.close()
sortie = open(thesaurus,'w')
sortie.write("Uniprot-ID\tBiogrid-ID\tGene-Name\tRef-Seq\tProtein-Name\tGene-ID\tOld-Uniprot-IDs\tIsoformes")
sortie.write("Uniprot-ID\tBiogrid-ID\tGene-Name\tRef-Seq\tProtein-Name\tGene-ID\tOld-Uniprot-IDs\tIsoformes\tPutative\tTransposon")
N = len(donnees)
for i in range(0,N) :
......
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