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
genotoul-bioinfo
metagWGS
Commits
d6933e91
Commit
d6933e91
authored
Feb 24, 2021
by
Joanna Fourquet
Browse files
authorized several steps into --step
parent
0ddd21bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.nf
View file @
d6933e91
...
...
@@ -87,12 +87,14 @@
*/
// Show help message.
if
(
params
.
help
){
helpMessage
()
exit
0
}
// Define list of available steps
// Define list of available steps.
def
defineStepList
()
{
return
[
'01_clean_qc'
,
...
...
@@ -106,7 +108,7 @@ def defineStepList() {
]
}
// Check step existence
// Check step existence
.
def
checkParameterExistence
(
list_it
,
list
)
{
nb_false_step
=
0
...
...
@@ -120,27 +122,13 @@ def checkParameterExistence(list_it, list) {
else
{
return
true
}
}
// Check number of steps
def
numberParameter
(
list_it
,
list
)
{
nb_step
=
0
filtering_step
=
false
for
(
it
in
list_it
)
{
nb_step
=
nb_step
+
1
if
(
it
==
'03_filtering'
)
{
filtering_step
=
true
}
}
if
(
nb_step
>
2
)
{
return
false
}
else
{
if
((
nb_step
==
2
)
&&
(!
filtering_step
)){
return
false
}
else
{
return
true
}
}
}
// Check number of steps.
// Set up parameters.
step
=
params
.
step
.
split
(
","
)
stepList
=
defineStepList
()
if
(!
checkParameterExistence
(
step
,
stepList
))
exit
1
,
"Unknown step ${step}, see --help for more information"
if
(!
numberParameter
(
step
,
stepList
))
exit
1
,
"You can choose one step (or two step only if one of two is 03_filtering step)"
if
(!
checkParameterExistence
(
step
,
stepList
))
exit
1
,
"Unknown step(s) upon ${step}, see --help for more information"
if
(![
'metaspades'
,
'megahit'
].
contains
(
params
.
assembly
)){
exit
1
,
"Invalid aligner option: ${params.assembly}. Valid options: 'metaspades', 'megahit'"
...
...
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