-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from rki-mf1/dev
Dev
- Loading branch information
Showing
12 changed files
with
158 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ Author: [email protected] | |
|
||
// Parameters sanity checking | ||
|
||
Set valid_params = ['max_cores', 'cores', 'max_memory', 'memory', 'profile', 'help', 'input', 'input_type', 'list', 'host', 'own', 'control', 'keep', 'rm_rrna', 'bbduk', 'bbduk_kmer', 'bbduk_qin', 'reads_rna', 'min_clip', 'dcs_strict', 'output', 'multiqc_dir', 'nf_runinfo_dir', 'databases', 'cleanup_work_dir','condaCacheDir', 'singularityCacheDir', 'singularityCacheDir', 'cloudProcess', 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process', 'publish_dir_mode', 'no_intermediate', 'skip_qc'] // don't ask me why there is also 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process' | ||
Set valid_params = ['max_cores', 'cores', 'max_memory', 'memory', 'profile', 'help', 'input', 'input_type', 'list', 'host', 'own', 'control', 'keep', 'rm_rrna', 'bwa', 'bbduk', 'bbduk_kmer', 'bbduk_qin', 'reads_rna', 'min_clip', 'dcs_strict', 'output', 'multiqc_dir', 'nf_runinfo_dir', 'databases', 'cleanup_work_dir','condaCacheDir', 'singularityCacheDir', 'singularityCacheDir', 'cloudProcess', 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process', 'publish_dir_mode', 'no_intermediate', 'skip_qc'] // don't ask me why there is also 'conda-cache-dir', 'singularity-cache-dir', 'cloud-process' | ||
def parameter_diff = params.keySet() - valid_params | ||
if (parameter_diff.size() != 0){ | ||
exit 1, "ERROR: Parameter(s) $parameter_diff is/are not valid in the pipeline!\n" | ||
|
@@ -275,6 +275,7 @@ def helpMSG() { | |
Reads are assigned to a combined index for decontamination and keeping. The use of this parameter can prevent | ||
false positive hits and the accidental removal of reads due to (poor quality) mappings. | ||
${c_green}--rm_rrna ${c_reset} Clean your data from rRNA [default: $params.rm_rrna] | ||
${c_green}--bwa${c_reset} Add this flag to use BAW MEM instead of minimap2 for decontamination of short reads [default: $params.bwa] | ||
${c_green}--bbduk${c_reset} Add this flag to use bbduk instead of minimap2 for decontamination of short reads [default: $params.bbduk] | ||
${c_green}--bbduk_kmer${c_reset} Set kmer for bbduk [default: $params.bbduk_kmer] | ||
${c_green}--bbduk_qin${c_reset} Set quality ASCII encoding for bbduk [default: $params.bbduk_qin; options are: 64, 33, auto] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
process { | ||
withLabel: smallTask { container = 'nanozoo/samtools:1.14--d8fb865' } | ||
withLabel: minimap2 { container = 'nanozoo/minimap2:2.26--d9ef6b6' } | ||
withLabel: bbmap { container = 'nanozoo/bbmap:38.79--8e915d7' } | ||
withLabel: multiqc { container = 'nanozoo/multiqc:1.9--aba729b' } | ||
withLabel: fastqc { container = 'nanozoo/fastqc:0.11.9--f61b8b4' } | ||
withLabel: nanoplot { container = 'nanozoo/nanoplot:1.32.0--1ae6f5d' } | ||
withLabel: quast { container = 'nanozoo/quast:5.0.2--e7f0cfe' } | ||
withLabel: bed_samtools { container = 'nanozoo/bed_samtools:2.30.0--cc7d1b9' } | ||
withLabel: seqkit { container = 'nanozoo/seqkit:2.6.1--022e008' } | ||
withLabel: smallTask { container = 'nanozoo/samtools:1.14--d8fb865' } | ||
withLabel: minimap2 { container = 'nanozoo/minimap2:2.26--d9ef6b6' } | ||
withLabel: bwa { container = 'nanozoo/bwa:0.7.18--0eff897' } | ||
withLabel: bbmap { container = 'nanozoo/bbmap:38.79--8e915d7' } | ||
withLabel: multiqc { container = 'nanozoo/multiqc:1.9--aba729b' } | ||
withLabel: fastqc { container = 'nanozoo/fastqc:0.11.9--f61b8b4' } | ||
withLabel: nanoplot { container = 'nanozoo/nanoplot:1.32.0--1ae6f5d' } | ||
withLabel: quast { container = 'nanozoo/quast:5.0.2--e7f0cfe' } | ||
withLabel: bed_samtools { container = 'nanozoo/bed_samtools:2.30.0--cc7d1b9' } | ||
withLabel: seqkit { container = 'nanozoo/seqkit:2.6.1--022e008' } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
process { | ||
withLabel: minimap2 { cpus = 24; memory = 24.GB } | ||
withLabel: bbmap { cpus = 24; memory = 24.GB } | ||
withLabel: smallTask { cpus = 1; memory = 2.GB } | ||
withLabel: pysam { cpus = 2; memory = 4.GB } | ||
withLabel: fastqc { cpus = {2 * task.attempt}; memory = {4.GB * task.attempt } ; maxRetries = 3 ; errorStrategy = { task.exitStatus in 130..140 ? 'retry' : 'terminate' } } | ||
withLabel: multiqc { cpus = 4; memory = 4.GB } | ||
withLabel: nanoplot{ cpus = 8; memory = 8.GB } | ||
withLabel: quast{ cpus = 8; memory = 8.GB } | ||
withLabel: minimap2 { cpus = 24; memory = {24.GB * task.attempt}; maxRetries = 4 ; errorStrategy = { task.exitStatus in 1 || 130..140 ? 'retry' : 'terminate' }; } | ||
withLabel: bwa { cpus = 24; memory = {24.GB * task.attempt}; maxRetries = 3 ; errorStrategy = { task.exitStatus in 130..140 ? 'retry' : 'terminate' } } | ||
withLabel: bbmap { cpus = 24; memory = {24.GB * task.attempt}; maxRetries = 6 ; errorStrategy = { task.exitStatus in 1 || 130..140 ? 'retry' : 'terminate' }; } | ||
withLabel: smallTask { cpus = 1; memory = 2.GB } | ||
withLabel: pysam { cpus = 2; memory = 4.GB } | ||
withLabel: fastqc { cpus = 2; memory = {4.GB * task.attempt } ; maxRetries = 3 ; errorStrategy = { task.exitStatus in 130..140 ? 'retry' : 'terminate' }; } | ||
withLabel: multiqc { cpus = 4; memory = 4.GB } | ||
withLabel: nanoplot { cpus = 8; memory = 8.GB } | ||
withLabel: quast { cpus = 8; memory = 8.GB } | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: bwa | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
dependencies: | ||
- bwa=0.7.18 | ||
- samtools=1.20 | ||
- htslib=1.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
process bwa_index { | ||
label 'bwa' | ||
|
||
input: | ||
path(fasta) | ||
|
||
output: | ||
path(bwa) , emit: index | ||
|
||
script: | ||
""" | ||
mkdir bwa | ||
bwa \\ | ||
index \\ | ||
-p bwa/db \\ | ||
$fasta | ||
""" | ||
|
||
stub: | ||
""" | ||
mkdir bwa | ||
touch bwa/db.{amb,ann,bwt,pac,sa} | ||
""" | ||
} | ||
|
||
process bwa { | ||
label 'bwa' | ||
|
||
input: | ||
tuple val(name), path(input) | ||
path(db_index) | ||
path(db) | ||
|
||
|
||
output: | ||
tuple val(name), val('raw'), path("${name}.bam"), emit: bam // input just for naming | ||
|
||
script: | ||
""" | ||
INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` | ||
bwa mem \\ | ||
-t $task.cpus \\ | ||
\$INDEX \\ | ||
$input \\ | ||
| samtools view -bhS -@ $task.cpus > ${name}.bam | ||
""" | ||
stub: | ||
""" | ||
touch ${name}.bam | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ nextflow_pipeline { | |
script "../../clean.nf" | ||
|
||
test("Stub") { | ||
tag "minimap2" | ||
options "-stub-run" | ||
|
||
when { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ nextflow_pipeline { | |
script "../../clean.nf" | ||
|
||
test("Stub") { | ||
tag "minimap2" | ||
options "-stub-run" | ||
|
||
when { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters