Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GNet
APPINetwork
Commits
2b776d1c
Commit
2b776d1c
authored
May 09, 2022
by
Simon Gosset
Browse files
test ajout transposon
parent
39048633
Changes
3
Hide whitespace changes
Inline
Side-by-side
R/biogrid_window_opt.R
View file @
2b776d1c
...
...
@@ -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
(
"python
3
"
,
"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
(
"python
3
"
,
"biogridPy.py"
,
paste0
(
"\""
,
uniprotfile
,
"\""
),
paste0
(
"\""
,
sortie
,
"\""
),
putative
,
sep
=
" "
)
system
(
command
)
file.remove
(
path.copy
)
...
...
R/thesaurus_window.R
View file @
2b776d1c
...
...
@@ -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
(
"python
3
"
,
"thesaurusPy.py"
,
paste0
(
"\""
,
uniprot
,
"\""
),
paste0
(
"\""
,
sortie
,
"\""
),
organisme
,
sep
=
" "
)
cat
(
"\n CAT 2 :"
,
command
)
system
(
command
)
...
...
inst/thesaurusPy.py
View file @
2b776d1c
...
...
@@ -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
\t
Biogrid-ID
\t
Gene-Name
\t
Ref-Seq
\t
Protein-Name
\t
Gene-ID
\t
Old-Uniprot-IDs
\t
Isoformes"
)
sortie
.
write
(
"Uniprot-ID
\t
Biogrid-ID
\t
Gene-Name
\t
Ref-Seq
\t
Protein-Name
\t
Gene-ID
\t
Old-Uniprot-IDs
\t
Isoformes
\t
Putative
\t
Transposon
"
)
N
=
len
(
donnees
)
for
i
in
range
(
0
,
N
)
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment