Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mmassaviol
WAWmassaviol
Commits
a494a12b
Commit
a494a12b
authored
Nov 25, 2019
by
mmassaviol
Browse files
Update snakefile generation tools
parent
b2994849
Changes
2
Hide whitespace changes
Inline
Side-by-side
generate_tool_snakefile.py
View file @
a494a12b
...
...
@@ -43,21 +43,21 @@ def generate(name):
size_inputs
=
len
(
cmd_inputs
)
if
(
size_inputs
==
0
):
result
+=
"
\t\t
**"
+
name
+
"_inputs(),
\n
"
#
if(size_inputs == 0):
result
+=
"
\t\t
**"
+
name
+
"_inputs(),
\n
"
for
input
in
cmd_inputs
:
if
"name"
in
input
:
if
input
[
'name'
]
==
"reads"
:
result
+=
"
\t\t
**"
+
name
+
"_inputs(),
\n
"
#
if input['name'] == "reads":
#
result += "\t\t**" + name + "_inputs(),\n"
el
if
"directory"
in
input
:
if
"directory"
in
input
:
result
+=
"
\t\t
"
+
input
[
'name'
]
+
" = "
+
result_dir
+
" +
\"
/
\"
"
+
" +
\"
"
+
input
[
'directory'
]
+
"
\"
,
\n
"
el
if
"file"
in
input
:
if
"file"
in
input
:
result
+=
"
\t\t
"
+
input
[
'name'
]
+
" = "
+
result_dir
+
" +
\"
/
\"
"
+
" +
\"
"
+
input
[
'file'
]
+
"
\"
,
\n
"
...
...
generate_workflow_snakefile.py
View file @
a494a12b
...
...
@@ -146,14 +146,14 @@ def generate(name):
result
+=
"{import global_rules}
\n
"
print
(
result
)
#
print(result)
#
path_snakefile = PATH_INPUT + "/" + name + "/" + name + ".snakefile"
#
f = open(path_snakefile, "w")
#
f.write(result)
#
f.close()
path_snakefile
=
PATH_INPUT
+
"/"
+
name
+
"/"
+
name
+
".snakefile"
f
=
open
(
path_snakefile
,
"w"
)
f
.
write
(
result
)
f
.
close
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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