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
b316d0de
Commit
b316d0de
authored
Jul 20, 2020
by
mmassaviol
Browse files
Update megahit input functions
parent
e39591c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
generate_workflow.py
View file @
b316d0de
...
...
@@ -398,15 +398,13 @@ def generate_pipeline_files(workflow_name, output_dir, local_config="default"):
### Copy scripts and other files
NB_SCRIPTS
=
len
(
list
(
generate_prepare_report_scripts
()))
+
len
(
list
(
generate_tools_scripts
()))
NB_SCRIPTS
=
len
(
list
(
generate_prepare_report_scripts
()
[
"SCRIPTS"
]
))
+
len
(
list
(
generate_tools_scripts
()))
if
not
os
.
path
.
isdir
(
output_dir
+
"/files/scripts"
):
os
.
mkdir
(
output_dir
+
"/files/scripts"
)
if
(
NB_SCRIPTS
==
0
):
with
open
(
output_dir
+
"/files/scripts/.gitignore"
,
'w'
)
as
gitignore
:
to_write
=
"""# Ignore everything in this directory
*
# Except this file
to_write
=
"""# gitignore to force creation of scripts dir
!.gitignore
"""
gitignore
.
write
(
to_write
)
...
...
generate_workflow_snakefile.py
View file @
b316d0de
...
...
@@ -18,32 +18,7 @@ def generate(name):
# imports
result
+=
"import os
\n
"
result
+=
"import re
\n
"
result
+=
"import snakemake.utils
\n
"
result
+=
"import csv
\n
"
result
+=
"
\n
"
# Wildcards
result
+=
"#############
\n
"
result
+=
"# Wildcards #
\n
"
result
+=
"#############
\n
"
result
+=
"
\n
"
#result += "SAMPLES = config[\"samples\"]\n"
result
+=
"STEPS = config[
\"
steps
\"
]
\n
"
result
+=
"PREPARE_REPORT_OUTPUTS = config[
\"
prepare_report_outputs
\"
]
\n
"
result
+=
"PREPARE_REPORT_SCRIPTS = config[
\"
prepare_report_scripts
\"
]
\n
"
result
+=
"OUTPUTS = config[
\"
outputs
\"
]
\n
"
result
+=
"PARAMS_INFO = config[
\"
params_info
\"
]
\n
"
if
(
"stop_cases"
in
yaml
.
keys
()):
result
+=
"STOP_CASES = config[
\"
stop_cases
\"
]
\n
"
result
+=
"config = config[
\"
params
\"
]
\n
"
result
+=
"
\n
"
result
+=
"{import global_imports}
\n\n
"
# intputs
...
...
workflows/Mito_Assembler_Megahit/Mito_Assembler_Megahit.snakefile
View file @
b316d0de
...
...
@@ -22,11 +22,15 @@ def quality_check__fastqc_PE_inputs():
inputs["read2"] = raw_reads["read2"]
return inputs
def assembling__megahit_inputs():
def assembling__megahit_
SE_
inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
if (config["SeOrPe"] == "PE"):
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def assembling__megahit_PE_inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def find_mitoscaf__mitoz_findmitoscaf_inputs():
...
...
workflows/Virus_Assembler_Megahit/Virus_Assembler_Megahit.snakefile
View file @
b316d0de
...
...
@@ -22,11 +22,15 @@ def fastqc_PE_inputs():
inputs["read2"] = raw_reads["read2"]
return inputs
def megahit_inputs():
def
assembling__
megahit_
SE_
inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
if (config["SeOrPe"] == "PE"):
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def assembling__megahit_PE_inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def blast_refseq_inputs():
...
...
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