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
UNLOCK
MGnify
Commits
d362d5b3
Commit
d362d5b3
authored
Jun 07, 2021
by
Koehorst, Jasper
Browse files
output check for existence
parent
ca720fc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
run.py
View file @
d362d5b3
...
...
@@ -44,18 +44,21 @@ def run_command(command):
return
result
.
stdout
.
decode
(
'ascii'
)
def
conversion
(
identifier
):
if
os
.
path
.
isfile
(
"./genome/"
+
identifier
+
"/"
+
identifier
+
".conversion.ttl"
):
return
# "-tool", "conversion", "-f", fasta.getAbsolutePath(), "-gff2rdf", "-i", gff.getAbsolutePath(), "-o", output.getAbsolutePath(), "-id", "MGYG-HGUT-00001", "-codon", "11", "-topology", "linear"
command
=
"java -jar ./MGnifyParser.jar -tool conversion -f ./genome/"
+
identifier
+
"/"
+
identifier
+
".fna -gff2rdf -i ./genome/"
+
identifier
+
"/"
+
identifier
+
".gff -id "
+
identifier
+
" -codon 11 -topology linear -o ./genome/"
+
identifier
+
"/"
+
identifier
+
".conversion.ttl"
print
(
command
)
os
.
system
(
command
)
def
interproscan
(
identifier
):
command
=
"java -jar ./MGnifyParser.jar -tool interpro -i ./genome/"
+
identifier
+
"/"
+
identifier
+
".conversion.ttl -o ./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.ttl -tsv ./genome/"
+
identifier
+
"/"
+
identifier
+
"_InterProScan.tsv -version InterProScan-v5_35-74_0"
;
if
os
.
path
.
isfile
(
"./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.ttl"
):
return
command
=
"java -jar ./MGnifyParser.jar -tool interpro -i ./genome/"
+
identifier
+
"/"
+
identifier
+
".conversion.ttl -o ./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.ttl -tsv ./genome/"
+
identifier
+
"/"
+
identifier
+
"_InterProScan.tsv -version InterProScan-v5_35-74_0"
print
(
command
)
os
.
system
(
command
)
def
eggnog
(
identifier
):
command
=
"java -jar ./MGnifyParser.jar -tool eggnog -i ./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.ttl -o ./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.eggnog.ttl -tsv ./genome/"
+
identifier
+
"/"
+
identifier
+
"_eggNOG.tsv -v v2-db5.0"
;
if
os
.
path
.
isfile
(
"./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.eggnog.ttl"
):
return
command
=
"java -jar ./MGnifyParser.jar -tool eggnog -i ./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.ttl -o ./genome/"
+
identifier
+
"/"
+
identifier
+
".interproscan.eggnog.ttl -tsv ./genome/"
+
identifier
+
"/"
+
identifier
+
"_eggNOG.tsv -v v2-db5.0"
print
(
command
)
os
.
system
(
command
)
...
...
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