Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
metagWGS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
genotoul-bioinfo
metagWGS
Commits
30233108
Commit
30233108
authored
3 years ago
by
Celine Noirot
Browse files
Options
Downloads
Patches
Plain Diff
Add skip_clean if type=HiFi to avoid db download
Add check SR parameters
parent
26537612
No related branches found
No related tags found
3 merge requests
!15
DSL2
,
!13
DSL2 version
,
!12
Merge dsl2 in dev to finalize dsl1 to dsl2 transition
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main_dsl2.nf
+29
-3
29 additions, 3 deletions
main_dsl2.nf
subworkflows/00_databases.nf
+6
-3
6 additions, 3 deletions
subworkflows/00_databases.nf
with
35 additions
and
6 deletions
main_dsl2.nf
+
29
−
3
View file @
30233108
...
...
@@ -23,7 +23,7 @@ include { DATABASES } from './subworkflows/00_databases'
Options:
01_clean_qc options:
--skip_
01_
clean
_qc
Skip 01_clean_qc step.
--skip_clean Skip 01_clean_qc step.
--adapter1 Sequence of adapter 1. Default: Illumina TruSeq adapter.
--adapter2 Sequence of adapter 2. Default: Illumina TruSeq adapter.
--skip_sickle Skip sickle process.
...
...
@@ -72,6 +72,13 @@ include { DATABASES } from './subworkflows/00_databases'
"""
.
stripIndent
()
}
// Show help message.
if
(
params
.
help
){
helpMessage
()
exit
0
}
def
getAndCheckHeader
()
{
File
file
=
new
File
(
params
.
input
)
...
...
@@ -115,12 +122,29 @@ workflow {
// Check mandatory parameters
////////////
// Start check samplesheet
////////////
if
(
params
.
input
)
{
ch_input
=
file
(
params
.
input
)
}
else
{
exit
1
,
'Input samplesheet not specified!'
}
skip_clean
=
params
.
skip_clean
if
(
params
.
type
==
'SR'
)
{
if
(![
'metaspades'
,
'megahit'
].
contains
(
params
.
assembly
)){
exit
1
,
"Invalid short read aligner option: ${params.assembly}. Valid options: 'metaspades', 'megahit'"
}
if
(![
"solexa"
,
"illumina"
,
"sanger"
].
contains
(
params
.
quality_type
)){
exit
1
,
"Invalid quality_type option: ${params.quality_type}. Valid options:'solexa','illumina','sanger'"
}
if
(!(
params
.
skip_removal_host
)
&&
!(
params
.
host_fasta
)
&&
!(
params
.
skip_clean
))
{
exit
1
,
"You must specify --host_fasta or skip cleaning host step with option --skip_removal_host or skip all clean and qc modules with --skip_clean"
}
}
else
{
skip_clean
=
true
}
println
(
params
)
header
=
getAndCheckHeader
()
Channel
.
from
(
file
(
params
.
input
)
...
...
@@ -142,12 +166,14 @@ Channel.from(file(params.input)
}
.
set
{
ch_inputs
}
ch_inputs
.
view
{
it
->
"FF ${it} "
}
////////////
// End check samplesheet
////////////
DATABASES
()
DATABASES
(
skip_clean
)
ch_kaiju_db
=
DATABASES
.
out
.
kaiju_db
ch_eggnog_db
=
DATABASES
.
out
.
eggnog
ch_taxonomy
=
DATABASES
.
out
.
taxonomy
...
...
This diff is collapsed.
Click to expand it.
subworkflows/00_databases.nf
+
6
−
3
View file @
30233108
workflow
DATABASES
{
take
:
skip_clean
main:
ch_kaiju_db
=
Channel
.
empty
()
if
(!
params
.
skip_clean
&&
!
params
.
skip_kaiju
)
{
//kaiju_db
if
(!
skip_clean
&&
!
params
.
skip_kaiju
)
{
//kaiju_db
if
(!
params
.
kaiju_db_dir
&&
params
.
kaiju_db_url
)
{
INDEX_KAIJU
(
params
.
kaiju_db
)
ch_kaiju_db
=
INDEX_KAIJU
.
out
.
kaiju_db
println
(
"INDEX_KAIJU"
)
INDEX_KAIJU
(
params
.
kaiju_db_url
)
ch_kaiju_db
=
INDEX_KAIJU
.
out
.
kaiju_db_dir
}
else
if
(
params
.
kaiju_db_dir
)
{
if
(
file
(
params
.
kaiju_db_dir
+
"/kaiju_db*.fmi"
).
size
==
1
)
{
println
(
"Creating kaiju_db channel"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment