'
+ )
+ .collectFile(name:"headers.vcf", newLine:true)
+
+ input[0] = vcf.combine(header)
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.vcf.collect { it.collect { it instanceof Map ? it : file(it).name }},
+ process.out.versions
+ ).match("bcf") }
+ )
+ }
+
+ }
+
+ test("sarscov2 - [vcf, tbi, vcf2, tbi2, []] - stub") {
+
+ config "./vcf.config"
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true),
+ []
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match("stub") }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap b/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap
new file mode 100644
index 00000000..72b06878
--- /dev/null
+++ b/modules/nf-core/bcftools/annotate/tests/main.nf.test.snap
@@ -0,0 +1,79 @@
+{
+ "bcf": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_ann.bcf"
+ ]
+ ],
+ [
+ "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T09:21:58.526449656"
+ },
+ "vcf": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_vcf.vcf.gz"
+ ]
+ ],
+ [
+ "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-02T16:47:47.127427579"
+ },
+ "stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,ea2b798edb5c1c0d46938f313a97a901"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-02T16:43:43.707474961"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/annotate/tests/tags.yml b/modules/nf-core/bcftools/annotate/tests/tags.yml
new file mode 100644
index 00000000..f97a1afc
--- /dev/null
+++ b/modules/nf-core/bcftools/annotate/tests/tags.yml
@@ -0,0 +1,2 @@
+bcftools/annotate:
+ - "modules/nf-core/bcftools/annotate/**"
diff --git a/modules/nf-core/bcftools/annotate/tests/vcf.config b/modules/nf-core/bcftools/annotate/tests/vcf.config
new file mode 100644
index 00000000..cb809f61
--- /dev/null
+++ b/modules/nf-core/bcftools/annotate/tests/vcf.config
@@ -0,0 +1,6 @@
+process {
+ withName: 'BCFTOOLS_ANNOTATE' {
+ ext.prefix = { "${meta.id}_vcf" }
+ ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type z"
+ }
+}
diff --git a/modules/nf-core/bcftools/concat/main.nf b/modules/nf-core/bcftools/concat/main.nf
index a5830a25..d64640b3 100644
--- a/modules/nf-core/bcftools/concat/main.nf
+++ b/modules/nf-core/bcftools/concat/main.nf
@@ -36,7 +36,7 @@ process BCFTOOLS_CONCAT {
stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
- touch ${prefix}.vcf.gz
+ echo "" | gzip > ${prefix}.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test b/modules/nf-core/bcftools/concat/tests/main.nf.test
index bf1a5f3f..d5d9f787 100644
--- a/modules/nf-core/bcftools/concat/tests/main.nf.test
+++ b/modules/nf-core/bcftools/concat/tests/main.nf.test
@@ -34,10 +34,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(
- process.out.vcf,
- process.out.versions
- ).match() }
+ { assert snapshot(process.out).match() }
)
}
@@ -63,10 +60,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(
- process.out.vcf,
- process.out.versions
- ).match() }
+ { assert snapshot(process.out).match() }
)
}
@@ -96,10 +90,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(
- file(process.out.vcf[0][1]).name,
- process.out.versions
- ).match() }
+ { assert snapshot(process.out).match() }
)
}
diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap
index 7344e6e3..90d3fc06 100644
--- a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap
+++ b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap
@@ -1,43 +1,101 @@
{
"sarscov2 - [[vcf1, vcf2], []]": {
"content": [
- [
- [
- {
- "id": "test3"
- },
- "test3.vcf.gz:md5,4bcd0afd89f56c5d433f6b6abc44d0a6"
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
]
- ],
- [
- "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
- ]
+ }
],
- "timestamp": "2023-11-29T13:52:27.03724666"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T13:22:49.766749302"
},
"sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]]": {
"content": [
- [
- [
- {
- "id": "test3"
- },
- "test3.vcf.gz:md5,4bcd0afd89f56c5d433f6b6abc44d0a6"
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
]
- ],
- [
- "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
- ]
+ }
],
- "timestamp": "2023-11-29T13:52:21.468988293"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T13:22:41.119912312"
},
"sarscov2 - [[vcf1, vcf2], [tbi1, tbi2]] - stub": {
"content": [
- "test3.vcf.gz",
- [
- "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
- ]
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,24ae05eb858733b40fbd3f89743a6d09"
+ ]
+ }
],
- "timestamp": "2023-11-29T13:41:04.716017811"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T13:22:59.90466392"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/filter/main.nf b/modules/nf-core/bcftools/filter/main.nf
index 1a40cb93..cc9a2361 100644
--- a/modules/nf-core/bcftools/filter/main.nf
+++ b/modules/nf-core/bcftools/filter/main.nf
@@ -43,6 +43,7 @@ process BCFTOOLS_FILTER {
"""
stub:
+ def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" :
@@ -53,8 +54,10 @@ process BCFTOOLS_FILTER {
if ("$vcf" == "${prefix}.${extension}") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
+ def create_file = extension.endsWith(".gz") ? "echo '' | gzip > ${prefix}.${extension}" : "touch ${prefix}.${extension}"
+
"""
- touch ${prefix}.${extension}
+ ${create_file}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/bcftools/filter/meta.yml b/modules/nf-core/bcftools/filter/meta.yml
index 5b111fc3..deb93b13 100644
--- a/modules/nf-core/bcftools/filter/meta.yml
+++ b/modules/nf-core/bcftools/filter/meta.yml
@@ -21,7 +21,7 @@ input:
- vcf:
type: file
description: VCF input file
- pattern: "*.{vcf}"
+ pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}"
output:
- meta:
type: map
@@ -31,7 +31,7 @@ output:
- vcf:
type: file
description: VCF filtered output file
- pattern: "*.{vcf}"
+ pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}"
- versions:
type: file
description: File containing software versions
diff --git a/modules/nf-core/bcftools/filter/tests/main.nf.test b/modules/nf-core/bcftools/filter/tests/main.nf.test
new file mode 100644
index 00000000..eaf100e8
--- /dev/null
+++ b/modules/nf-core/bcftools/filter/tests/main.nf.test
@@ -0,0 +1,82 @@
+nextflow_process {
+
+ name "Test Process BCFTOOLS_FILTER"
+ script "../main.nf"
+ process "BCFTOOLS_FILTER"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "bcftools"
+ tag "bcftools/filter"
+
+ config "./nextflow.config"
+
+ test("sarscov2 - vcf") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [id:"vcf_test"],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match("vcf") }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcf - bcf output") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [id:"bcf_test"],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match("bcf output") }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcf - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [id:"vcf_test"],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match("vcf - stub") }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/bcftools/filter/tests/main.nf.test.snap b/modules/nf-core/bcftools/filter/tests/main.nf.test.snap
new file mode 100644
index 00000000..f8e17aa0
--- /dev/null
+++ b/modules/nf-core/bcftools/filter/tests/main.nf.test.snap
@@ -0,0 +1,101 @@
+{
+ "vcf": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "vcf_test"
+ },
+ "vcf_test.vcf.gz:md5,8e722884ffb75155212a3fc053918766"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "vcf_test"
+ },
+ "vcf_test.vcf.gz:md5,8e722884ffb75155212a3fc053918766"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.02.0"
+ },
+ "timestamp": "2024-03-27T16:57:32.940161987"
+ },
+ "bcf output": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "bcf_test"
+ },
+ "bcf_test.bcf.gz:md5,c8a304c8d2892039201154153c8cd536"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "bcf_test"
+ },
+ "bcf_test.bcf.gz:md5,c8a304c8d2892039201154153c8cd536"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.02.0"
+ },
+ "timestamp": "2024-03-27T16:45:14.586866398"
+ },
+ "vcf - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "vcf_test"
+ },
+ "vcf_test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "vcf_test"
+ },
+ "vcf_test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,7dc77043f9afb848d942d47a7bc19f67"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.02.0"
+ },
+ "timestamp": "2024-03-27T17:05:52.80837892"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/filter/tests/nextflow.config b/modules/nf-core/bcftools/filter/tests/nextflow.config
new file mode 100644
index 00000000..4e960c8d
--- /dev/null
+++ b/modules/nf-core/bcftools/filter/tests/nextflow.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = {"--no-version${meta.id == 'bcf_test' ? ' --output-type b' : ' --output-type z'}"}
+}
diff --git a/modules/nf-core/bcftools/filter/tests/tags.yml b/modules/nf-core/bcftools/filter/tests/tags.yml
new file mode 100644
index 00000000..d5e01080
--- /dev/null
+++ b/modules/nf-core/bcftools/filter/tests/tags.yml
@@ -0,0 +1,2 @@
+bcftools/filter:
+ - "modules/nf-core/bcftools/filter/**"
diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf
index c982944c..246148d6 100644
--- a/modules/nf-core/bcftools/sort/main.nf
+++ b/modules/nf-core/bcftools/sort/main.nf
@@ -49,9 +49,9 @@ process BCFTOOLS_SORT {
args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" :
args.contains("--output-type v") || args.contains("-Ov") ? "vcf" :
"vcf"
-
+ def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch"
"""
- touch ${prefix}.${extension}
+ ${create_cmd} ${prefix}.${extension}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/bcftools/sort/tests/main.nf.test b/modules/nf-core/bcftools/sort/tests/main.nf.test
new file mode 100644
index 00000000..8a496dda
--- /dev/null
+++ b/modules/nf-core/bcftools/sort/tests/main.nf.test
@@ -0,0 +1,54 @@
+nextflow_process {
+
+ name "Test Process BCFTOOLS_SORT"
+ script "../main.nf"
+ process "BCFTOOLS_SORT"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "bcftools"
+ tag "bcftools/sort"
+
+ test("sarscov2 - vcf") {
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match("vcf") }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcf - stub") {
+ options "-stub"
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+}
diff --git a/modules/nf-core/bcftools/sort/tests/main.nf.test.snap b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap
new file mode 100644
index 00000000..6200cc42
--- /dev/null
+++ b/modules/nf-core/bcftools/sort/tests/main.nf.test.snap
@@ -0,0 +1,68 @@
+{
+ "vcf": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,8e722884ffb75155212a3fc053918766"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-02T16:55:21.237927554"
+ },
+ "sarscov2 - vcf - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168"
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,622bd32d4ff0fac3360cd534ae0f0168"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T12:32:50.506309198"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/sort/tests/tags.yml b/modules/nf-core/bcftools/sort/tests/tags.yml
new file mode 100644
index 00000000..6e9520dd
--- /dev/null
+++ b/modules/nf-core/bcftools/sort/tests/tags.yml
@@ -0,0 +1,2 @@
+bcftools/sort:
+ - "modules/nf-core/bcftools/sort/**"
diff --git a/modules/nf-core/bedtools/genomecov/main.nf b/modules/nf-core/bedtools/genomecov/main.nf
index 7a4d9c45..954e8913 100644
--- a/modules/nf-core/bedtools/genomecov/main.nf
+++ b/modules/nf-core/bedtools/genomecov/main.nf
@@ -11,6 +11,7 @@ process BEDTOOLS_GENOMECOV {
tuple val(meta), path(intervals), val(scale)
path sizes
val extension
+ val sort
output:
tuple val(meta), path("*.${extension}"), emit: genomecov
@@ -26,6 +27,7 @@ process BEDTOOLS_GENOMECOV {
if (!args_list.contains('-bg') && (scale > 0 && scale != 1)) {
args += " -bg"
}
+ def sort_cmd = sort ? '| bedtools sort' : ''
def prefix = task.ext.prefix ?: "${meta.id}"
if (intervals.name =~ /\.bam/) {
@@ -34,6 +36,7 @@ process BEDTOOLS_GENOMECOV {
genomecov \\
-ibam $intervals \\
$args \\
+ $sort_cmd \\
> ${prefix}.${extension}
cat <<-END_VERSIONS > versions.yml
@@ -48,6 +51,7 @@ process BEDTOOLS_GENOMECOV {
-i $intervals \\
-g $sizes \\
$args \\
+ $sort_cmd \\
> ${prefix}.${extension}
cat <<-END_VERSIONS > versions.yml
diff --git a/modules/nf-core/bedtools/genomecov/tests/main.nf.test b/modules/nf-core/bedtools/genomecov/tests/main.nf.test
index 21e69aed..8213cff9 100644
--- a/modules/nf-core/bedtools/genomecov/tests/main.nf.test
+++ b/modules/nf-core/bedtools/genomecov/tests/main.nf.test
@@ -15,13 +15,14 @@ nextflow_process {
"""
input[0] = [
[ id:'test' ], // meta map
- file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true),
+ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.bam", checkIfExists: true),
1
]
// sizes
input[1] = []
// extension
input[2] = "txt"
+ input[3] = true
"""
}
}
@@ -41,13 +42,14 @@ nextflow_process {
"""
input[0] = [
[ id:'test'],
- file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true),
+ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.bam", checkIfExists: true),
0.5
]
// sizes
input[1] = file('dummy_chromosome_sizes')
// extension
input[2] = 'txt'
+ input[3] = false
"""
}
}
@@ -67,13 +69,14 @@ nextflow_process {
"""
input[0] = [
[ id:'test'],
- file(params.test_data['sarscov2']['genome']['baits_bed'], checkIfExists: true),
+ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/bed/baits.bed", checkIfExists: true),
0.5
]
// sizes
- input[1] = file(params.test_data['sarscov2']['genome']['genome_sizes'], checkIfExists: true)
+ input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.sizes", checkIfExists: true)
// extension
input[2] = 'txt'
+ input[3] = false
"""
}
}
@@ -95,13 +98,14 @@ nextflow_process {
"""
input[0] = [
[ id:'test' ], // meta map
- file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true),
+ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.bam", checkIfExists: true),
1
]
// sizes
input[1] = []
// extension
input[2] = 'txt'
+ input[3] = false
"""
}
}
diff --git a/modules/nf-core/bwa/index/environment.yml b/modules/nf-core/bwa/index/environment.yml
index 5d3cb323..126e0034 100644
--- a/modules/nf-core/bwa/index/environment.yml
+++ b/modules/nf-core/bwa/index/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::bwa=0.7.17
+ - bioconda::bwa=0.7.18
diff --git a/modules/nf-core/bwa/index/main.nf b/modules/nf-core/bwa/index/main.nf
index 24b5a2ea..2e48b6ca 100644
--- a/modules/nf-core/bwa/index/main.nf
+++ b/modules/nf-core/bwa/index/main.nf
@@ -4,8 +4,8 @@ process BWA_INDEX {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/bwa:0.7.17--hed695b0_7' :
- 'biocontainers/bwa:0.7.17--hed695b0_7' }"
+ 'https://depot.galaxyproject.org/singularity/bwa:0.7.18--he4a0461_0' :
+ 'biocontainers/bwa:0.7.18--he4a0461_0' }"
input:
tuple val(meta), path(fasta)
diff --git a/modules/nf-core/bwa/index/meta.yml b/modules/nf-core/bwa/index/meta.yml
index 730628d0..4c7d30f3 100644
--- a/modules/nf-core/bwa/index/meta.yml
+++ b/modules/nf-core/bwa/index/meta.yml
@@ -43,3 +43,4 @@ authors:
maintainers:
- "@drpatelh"
- "@maxulysse"
+ - "@gallvp"
diff --git a/modules/nf-core/bwa/index/tests/main.nf.test.snap b/modules/nf-core/bwa/index/tests/main.nf.test.snap
index e51ad5bf..7c8f0465 100644
--- a/modules/nf-core/bwa/index/tests/main.nf.test.snap
+++ b/modules/nf-core/bwa/index/tests/main.nf.test.snap
@@ -17,7 +17,7 @@
]
],
"1": [
- "versions.yml:md5,0f20525da90e7489a7ebb02adca3265f"
+ "versions.yml:md5,a64462ac7dfb21f4ade9b02e7f65c5bb"
],
"index": [
[
@@ -34,10 +34,14 @@
]
],
"versions": [
- "versions.yml:md5,0f20525da90e7489a7ebb02adca3265f"
+ "versions.yml:md5,a64462ac7dfb21f4ade9b02e7f65c5bb"
]
}
],
- "timestamp": "2023-10-17T17:20:20.180927714"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-16T11:40:09.925307"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/bwa/mem/environment.yml b/modules/nf-core/bwa/mem/environment.yml
index 3f136d0a..3aa9f0cc 100644
--- a/modules/nf-core/bwa/mem/environment.yml
+++ b/modules/nf-core/bwa/mem/environment.yml
@@ -4,7 +4,7 @@ channels:
- bioconda
- defaults
dependencies:
- - bwa=0.7.17
+ - bwa=0.7.18
# renovate: datasource=conda depName=bioconda/samtools
- - samtools=1.19.2
- - htslib=1.19.1
+ - samtools=1.20
+ - htslib=1.20.0
diff --git a/modules/nf-core/bwa/mem/main.nf b/modules/nf-core/bwa/mem/main.nf
index 54ec0f16..9c815f0c 100644
--- a/modules/nf-core/bwa/mem/main.nf
+++ b/modules/nf-core/bwa/mem/main.nf
@@ -4,17 +4,21 @@ process BWA_MEM {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:a34558545ae1413d94bde4578787ebef08027945-0' :
- 'biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:a34558545ae1413d94bde4578787ebef08027945-0' }"
+ 'https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:1bd8542a8a0b42e0981337910954371d0230828e-0' :
+ 'biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:1bd8542a8a0b42e0981337910954371d0230828e-0' }"
input:
- tuple val(meta), path(reads)
+ tuple val(meta) , path(reads)
tuple val(meta2), path(index)
+ tuple val(meta3), path(fasta)
val sort_bam
output:
- tuple val(meta), path("*.bam"), emit: bam
- path "versions.yml" , emit: versions
+ tuple val(meta), path("*.bam") , emit: bam, optional: true
+ tuple val(meta), path("*.cram") , emit: cram, optional: true
+ tuple val(meta), path("*.csi") , emit: csi, optional: true
+ tuple val(meta), path("*.crai") , emit: crai, optional: true
+ path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@@ -24,6 +28,13 @@ process BWA_MEM {
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def samtools_command = sort_bam ? 'sort' : 'view'
+ def extension = args2.contains("--output-fmt sam") ? "sam" :
+ args2.contains("--output-fmt cram") ? "cram":
+ sort_bam && args2.contains("-O cram")? "cram":
+ !sort_bam && args2.contains("-C") ? "cram":
+ "bam"
+ def reference = fasta && extension=="cram" ? "--reference ${fasta}" : ""
+ if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output"
"""
INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'`
@@ -32,7 +43,7 @@ process BWA_MEM {
-t $task.cpus \\
\$INDEX \\
$reads \\
- | samtools $samtools_command $args2 --threads $task.cpus -o ${prefix}.bam -
+ | samtools $samtools_command $args2 ${reference} --threads $task.cpus -o ${prefix}.${extension} -
cat <<-END_VERSIONS > versions.yml
"${task.process}":
@@ -42,9 +53,19 @@ process BWA_MEM {
"""
stub:
+ def args = task.ext.args ?: ''
+ def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
+ def samtools_command = sort_bam ? 'sort' : 'view'
+ def extension = args2.contains("--output-fmt sam") ? "sam" :
+ args2.contains("--output-fmt cram") ? "cram":
+ sort_bam && args2.contains("-O cram")? "cram":
+ !sort_bam && args2.contains("-C") ? "cram":
+ "bam"
"""
- touch ${prefix}.bam
+ touch ${prefix}.${extension}
+ touch ${prefix}.csi
+ touch ${prefix}.crai
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/bwa/mem/meta.yml b/modules/nf-core/bwa/mem/meta.yml
index 440fb1f9..1532c261 100644
--- a/modules/nf-core/bwa/mem/meta.yml
+++ b/modules/nf-core/bwa/mem/meta.yml
@@ -37,6 +37,10 @@ input:
type: file
description: BWA genome index files
pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}"
+ - fasta:
+ type: file
+ description: Reference genome in FASTA format
+ pattern: "*.{fasta,fa}"
- sort_bam:
type: boolean
description: use samtools sort (true) or samtools view (false)
@@ -46,6 +50,18 @@ output:
type: file
description: Output BAM file containing read alignments
pattern: "*.{bam}"
+ - cram:
+ type: file
+ description: Output CRAM file containing read alignments
+ pattern: "*.{cram}"
+ - csi:
+ type: file
+ description: Optional index file for BAM file
+ pattern: "*.{csi}"
+ - crai:
+ type: file
+ description: Optional index file for CRAM file
+ pattern: "*.{crai}"
- versions:
type: file
description: File containing software versions
@@ -53,6 +69,8 @@ output:
authors:
- "@drpatelh"
- "@jeremy1805"
+ - "@matthdsm"
maintainers:
- "@drpatelh"
- "@jeremy1805"
+ - "@matthdsm"
diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test b/modules/nf-core/bwa/mem/tests/main.nf.test
index 2696e4bf..463b76f8 100644
--- a/modules/nf-core/bwa/mem/tests/main.nf.test
+++ b/modules/nf-core/bwa/mem/tests/main.nf.test
@@ -35,7 +35,8 @@ nextflow_process {
]
]
input[1] = BWA_INDEX.out.index
- input[2] = false
+ input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ input[3] = false
"""
}
}
@@ -43,7 +44,14 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(process.out).match() }
+ { assert snapshot(
+ process.out.cram,
+ process.out.csi,
+ process.out.crai,
+ process.out.versions,
+ file(process.out.bam[0][1]).name
+ ).match()
+ }
)
}
@@ -75,7 +83,8 @@ nextflow_process {
]
]
input[1] = BWA_INDEX.out.index
- input[2] = true
+ input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ input[3] = true
"""
}
}
@@ -83,7 +92,14 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(process.out).match() }
+ { assert snapshot(
+ process.out.cram,
+ process.out.csi,
+ process.out.crai,
+ process.out.versions,
+ file(process.out.bam[0][1]).name
+ ).match()
+ }
)
}
@@ -116,7 +132,8 @@ nextflow_process {
]
]
input[1] = BWA_INDEX.out.index
- input[2] = false
+ input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ input[3] = false
"""
}
}
@@ -124,7 +141,14 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(process.out).match() }
+ { assert snapshot(
+ process.out.cram,
+ process.out.csi,
+ process.out.crai,
+ process.out.versions,
+ file(process.out.bam[0][1]).name
+ ).match()
+ }
)
}
@@ -157,7 +181,104 @@ nextflow_process {
]
]
input[1] = BWA_INDEX.out.index
- input[2] = true
+ input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.cram,
+ process.out.csi,
+ process.out.crai,
+ process.out.versions,
+ file(process.out.bam[0][1]).name
+ ).match()
+ }
+ )
+ }
+
+ }
+
+ test("Paired-End - no fasta") {
+
+ setup {
+ run("BWA_INDEX") {
+ script "../../index/main.nf"
+ process {
+ """
+ input[0] = [
+ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
+ ]
+ ]
+ input[1] = BWA_INDEX.out.index
+ input[2] = [[:],[]]
+ input[3] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.cram,
+ process.out.csi,
+ process.out.crai,
+ process.out.versions,
+ file(process.out.bam[0][1]).name
+ ).match()
+ }
+ )
+ }
+
+ }
+
+ test("Single-end - stub") {
+ options "-stub"
+ setup {
+ run("BWA_INDEX") {
+ script "../../index/main.nf"
+ process {
+ """
+ input[0] = [
+ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+ }
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
+ ]
+ ]
+ input[1] = BWA_INDEX.out.index
+ input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ input[3] = false
"""
}
}
@@ -165,9 +286,56 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(process.out).match() }
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ file(process.out.csi[0][1]).name,
+ process.out.versions
+ ).match() }
)
}
+ }
+
+ test("Paired-end - stub") {
+ options "-stub"
+ setup {
+ run("BWA_INDEX") {
+ script "../../index/main.nf"
+ process {
+ """
+ input[0] = [
+ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+ }
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
+ ]
+ ]
+ input[1] = BWA_INDEX.out.index
+ input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ input[3] = false
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ file(process.out.csi[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
}
}
diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test.snap b/modules/nf-core/bwa/mem/tests/main.nf.test.snap
index e4fd8cc0..038ee7b7 100644
--- a/modules/nf-core/bwa/mem/tests/main.nf.test.snap
+++ b/modules/nf-core/bwa/mem/tests/main.nf.test.snap
@@ -1,142 +1,140 @@
{
"Single-End": {
"content": [
- {
- "0": [
- [
- {
- "id": "test",
- "single_end": true
- },
- "test.bam:md5,a74710a0345b4717bb4431bf9c257120"
- ]
- ],
- "1": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ],
- "bam": [
- [
- {
- "id": "test",
- "single_end": true
- },
- "test.bam:md5,a74710a0345b4717bb4431bf9c257120"
- ]
- ],
- "versions": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ]
- }
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ],
+ "test.bam"
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T11:11:48.440661587"
+ "timestamp": "2024-05-20T08:44:32.953673185"
},
"Single-End Sort": {
"content": [
- {
- "0": [
- [
- {
- "id": "test",
- "single_end": true
- },
- "test.bam:md5,cb1e038bc4d990683fa485d632550b54"
- ]
- ],
- "1": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ],
- "bam": [
- [
- {
- "id": "test",
- "single_end": true
- },
- "test.bam:md5,cb1e038bc4d990683fa485d632550b54"
- ]
- ],
- "versions": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ]
- }
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ],
+ "test.bam"
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T11:11:56.086493265"
+ "timestamp": "2024-05-20T08:44:45.27066093"
},
"Paired-End": {
"content": [
- {
- "0": [
- [
- {
- "id": "test",
- "single_end": false
- },
- "test.bam:md5,aea123a3828a99da1906126355f15a12"
- ]
- ],
- "1": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ],
- "bam": [
- [
- {
- "id": "test",
- "single_end": false
- },
- "test.bam:md5,aea123a3828a99da1906126355f15a12"
- ]
- ],
- "versions": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ]
- }
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ],
+ "test.bam"
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T11:12:03.474974773"
+ "timestamp": "2024-05-20T08:44:57.706852274"
},
"Paired-End Sort": {
"content": [
- {
- "0": [
- [
- {
- "id": "test",
- "single_end": false
- },
- "test.bam:md5,4682087bcdc3617384b375093fecd8dd"
- ]
- ],
- "1": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ],
- "bam": [
- [
- {
- "id": "test",
- "single_end": false
- },
- "test.bam:md5,4682087bcdc3617384b375093fecd8dd"
- ]
- ],
- "versions": [
- "versions.yml:md5,c32f719a68bb2966c8511d808154d42d"
- ]
- }
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ],
+ "test.bam"
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T11:12:10.721510817"
+ "timestamp": "2024-05-20T08:45:10.376505036"
+ },
+ "Single-end - stub": {
+ "content": [
+ "test.bam",
+ "test.csi",
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-20T08:46:07.182072398"
+ },
+ "Paired-End - no fasta": {
+ "content": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ],
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-20T08:45:53.813076501"
+ },
+ "Paired-end - stub": {
+ "content": [
+ "test.bam",
+ "test.csi",
+ [
+ "versions.yml:md5,478b816fbd37871f5e8c617833d51d80"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-20T08:46:18.412916364"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/bwamem2/index/tests/main.nf.test b/modules/nf-core/bwamem2/index/tests/main.nf.test
new file mode 100644
index 00000000..dbf11132
--- /dev/null
+++ b/modules/nf-core/bwamem2/index/tests/main.nf.test
@@ -0,0 +1,31 @@
+nextflow_process {
+
+ name "Test Process BWAMEM2_INDEX"
+ tag "modules_nfcore"
+ tag "modules"
+ tag "bwamem2"
+ tag "bwamem2/index"
+ script "../main.nf"
+ process "BWAMEM2_INDEX"
+
+ test("BWAMEM2 index") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/bwamem2/index/tests/main.nf.test.snap b/modules/nf-core/bwamem2/index/tests/main.nf.test.snap
new file mode 100644
index 00000000..69b268ee
--- /dev/null
+++ b/modules/nf-core/bwamem2/index/tests/main.nf.test.snap
@@ -0,0 +1,47 @@
+{
+ "BWAMEM2 index": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8",
+ "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e",
+ "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567",
+ "genome.fasta.bwt.2bit.64:md5,d097a1b82dee375d41a1ea69895a9216",
+ "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,9ffd13d12e7108ed15c58566bc4717d6"
+ ],
+ "index": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8",
+ "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e",
+ "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567",
+ "genome.fasta.bwt.2bit.64:md5,d097a1b82dee375d41a1ea69895a9216",
+ "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,9ffd13d12e7108ed15c58566bc4717d6"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.02.0"
+ },
+ "timestamp": "2024-03-18T12:59:39.132616"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bwamem2/index/tests/tags.yml b/modules/nf-core/bwamem2/index/tests/tags.yml
new file mode 100644
index 00000000..3953018e
--- /dev/null
+++ b/modules/nf-core/bwamem2/index/tests/tags.yml
@@ -0,0 +1,2 @@
+bwamem2/index:
+ - modules/nf-core/bwamem2/index/**
diff --git a/modules/nf-core/bwamem2/mem/main.nf b/modules/nf-core/bwamem2/mem/main.nf
index 29f90778..729428c4 100644
--- a/modules/nf-core/bwamem2/mem/main.nf
+++ b/modules/nf-core/bwamem2/mem/main.nf
@@ -10,11 +10,16 @@ process BWAMEM2_MEM {
input:
tuple val(meta), path(reads)
tuple val(meta2), path(index)
+ tuple val(meta3), path(fasta)
val sort_bam
output:
- tuple val(meta), path("*.bam"), emit: bam
- path "versions.yml" , emit: versions
+ tuple val(meta), path("*.sam") , emit: sam , optional:true
+ tuple val(meta), path("*.bam") , emit: bam , optional:true
+ tuple val(meta), path("*.cram") , emit: cram, optional:true
+ tuple val(meta), path("*.crai") , emit: crai, optional:true
+ tuple val(meta), path("*.csi") , emit: csi , optional:true
+ path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@@ -24,6 +29,13 @@ process BWAMEM2_MEM {
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def samtools_command = sort_bam ? 'sort' : 'view'
+
+ def extension_pattern = /(--output-fmt|-O)+\s+(\S+)/
+ def extension_matcher = (args2 =~ extension_pattern)
+ def extension = extension_matcher.getCount() > 0 ? extension_matcher[0][2].toLowerCase() : "bam"
+ def reference = fasta && extension=="cram" ? "--reference ${fasta}" : ""
+ if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output"
+
"""
INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'`
@@ -33,7 +45,7 @@ process BWAMEM2_MEM {
-t $task.cpus \\
\$INDEX \\
$reads \\
- | samtools $samtools_command $args2 -@ $task.cpus -o ${prefix}.bam -
+ | samtools $samtools_command $args2 -@ $task.cpus ${reference} -o ${prefix}.${extension} -
cat <<-END_VERSIONS > versions.yml
"${task.process}":
@@ -43,9 +55,28 @@ process BWAMEM2_MEM {
"""
stub:
+
+ def args = task.ext.args ?: ''
+ def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
+ def samtools_command = sort_bam ? 'sort' : 'view'
+ def extension_pattern = /(--output-fmt|-O)+\s+(\S+)/
+ def extension_matcher = (args2 =~ extension_pattern)
+ def extension = extension_matcher.getCount() > 0 ? extension_matcher[0][2].toLowerCase() : "bam"
+ def reference = fasta && extension=="cram" ? "--reference ${fasta}" : ""
+ if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output"
+
+ def create_index = ""
+ if (extension == "cram") {
+ create_index = "touch ${prefix}.crai"
+ } else if (extension == "bam") {
+ create_index = "touch ${prefix}.csi"
+ }
+
"""
- touch ${prefix}.bam
+ touch ${prefix}.${extension}
+ ${create_index}
+
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
diff --git a/modules/nf-core/bwamem2/mem/meta.yml b/modules/nf-core/bwamem2/mem/meta.yml
index 04891b26..931f7129 100644
--- a/modules/nf-core/bwamem2/mem/meta.yml
+++ b/modules/nf-core/bwamem2/mem/meta.yml
@@ -37,6 +37,15 @@ input:
type: file
description: BWA genome index files
pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}"
+ - meta3:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fasta:
+ type: file
+ description: Reference genome in FASTA format
+ pattern: "*.{fa,fasta,fna}"
- sort_bam:
type: boolean
description: use samtools sort (true) or samtools view (false)
@@ -47,15 +56,33 @@ output:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
+ - sam:
+ type: file
+ description: Output SAM file containing read alignments
+ pattern: "*.{sam}"
- bam:
type: file
description: Output BAM file containing read alignments
pattern: "*.{bam}"
+ - cram:
+ type: file
+ description: Output CRAM file containing read alignments
+ pattern: "*.{cram}"
+ - crai:
+ type: file
+ description: Index file for CRAM file
+ pattern: "*.{crai}"
+ - csi:
+ type: file
+ description: Index file for BAM file
+ pattern: "*.{csi}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@maxulysse"
+ - "@matthdsm"
maintainers:
- "@maxulysse"
+ - "@matthdsm"
diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test b/modules/nf-core/bwamem2/mem/tests/main.nf.test
index 365a0c43..5e67f70b 100644
--- a/modules/nf-core/bwamem2/mem/tests/main.nf.test
+++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test
@@ -10,7 +10,7 @@ nextflow_process {
tag "bwamem2/mem"
tag "bwamem2/index"
- test("sarscov2 - fastq, index, false") {
+ test("sarscov2 - fastq, index, fasta, false") {
setup {
run("BWAMEM2_INDEX") {
@@ -34,7 +34,8 @@ nextflow_process {
[file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)]
])
input[1] = BWAMEM2_INDEX.out.index
- input[2] = false
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = false
"""
}
}
@@ -51,7 +52,7 @@ nextflow_process {
}
- test("sarscov2 - fastq, index, true") {
+ test("sarscov2 - fastq, index, fasta, true") {
setup {
run("BWAMEM2_INDEX") {
@@ -75,7 +76,8 @@ nextflow_process {
[file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)]
])
input[1] = BWAMEM2_INDEX.out.index
- input[2] = true
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = true
"""
}
}
@@ -92,7 +94,7 @@ nextflow_process {
}
- test("sarscov2 - [fastq1, fastq2], index, false") {
+ test("sarscov2 - [fastq1, fastq2], index, fasta, false") {
setup {
run("BWAMEM2_INDEX") {
@@ -119,7 +121,8 @@ nextflow_process {
]
])
input[1] = BWAMEM2_INDEX.out.index
- input[2] = false
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = false
"""
}
}
@@ -136,7 +139,7 @@ nextflow_process {
}
- test("sarscov2 - [fastq1, fastq2], index, true") {
+ test("sarscov2 - [fastq1, fastq2], index, fasta, true") {
setup {
run("BWAMEM2_INDEX") {
@@ -163,7 +166,8 @@ nextflow_process {
]
])
input[1] = BWAMEM2_INDEX.out.index
- input[2] = true
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = true
"""
}
}
@@ -180,7 +184,7 @@ nextflow_process {
}
- test("sarscov2 - [fastq1, fastq2], index, true - stub") {
+ test("sarscov2 - [fastq1, fastq2], index, fasta, true - stub") {
options "-stub"
@@ -209,7 +213,8 @@ nextflow_process {
]
])
input[1] = BWAMEM2_INDEX.out.index
- input[2] = true
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = true
"""
}
}
diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap
index 84be71c6..9fb1e69d 100644
--- a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap
+++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap
@@ -1,5 +1,5 @@
{
- "sarscov2 - [fastq1, fastq2], index, true": {
+ "sarscov2 - [fastq1, fastq2], index, fasta, false": {
"content": [
"test.bam",
[
@@ -8,11 +8,11 @@
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T13:30:22.691288603"
+ "timestamp": "2024-03-19T13:13:18.890289958"
},
- "sarscov2 - [fastq1, fastq2], index, false": {
+ "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": {
"content": [
"test.bam",
[
@@ -21,11 +21,11 @@
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T13:30:11.276168706"
+ "timestamp": "2024-03-19T13:45:51.821633029"
},
- "sarscov2 - [fastq1, fastq2], index, true - stub": {
+ "sarscov2 - [fastq1, fastq2], index, fasta, true": {
"content": [
"test.bam",
[
@@ -34,11 +34,11 @@
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T13:30:32.07431961"
+ "timestamp": "2024-03-19T13:13:36.458291078"
},
- "sarscov2 - fastq, index, false": {
+ "sarscov2 - fastq, index, fasta, false": {
"content": [
"test.bam",
[
@@ -47,11 +47,11 @@
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T13:29:48.586760544"
+ "timestamp": "2024-03-19T13:12:44.084654507"
},
- "sarscov2 - fastq, index, true": {
+ "sarscov2 - fastq, index, fasta, true": {
"content": [
"test.bam",
[
@@ -60,8 +60,8 @@
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-19T13:29:59.846686393"
+ "timestamp": "2024-03-19T13:13:01.763341681"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/bwameme/index/environment.yml b/modules/nf-core/bwameme/index/environment.yml
new file mode 100644
index 00000000..5d76ea18
--- /dev/null
+++ b/modules/nf-core/bwameme/index/environment.yml
@@ -0,0 +1,7 @@
+name: "bwameme_index"
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - "bioconda::bwa-meme=1.0.6"
diff --git a/modules/nf-core/bwameme/index/main.nf b/modules/nf-core/bwameme/index/main.nf
new file mode 100644
index 00000000..870f494c
--- /dev/null
+++ b/modules/nf-core/bwameme/index/main.nf
@@ -0,0 +1,61 @@
+process BWAMEME_INDEX {
+ tag "$fasta"
+ label 'process_single'
+
+ conda "${moduleDir}/environment.yml"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+ 'https://depot.galaxyproject.org/singularity/bwa-meme:1.0.6--hdcf5f25_2':
+ 'biocontainers/bwa-meme:1.0.6--hdcf5f25_2' }"
+
+ input:
+ tuple val(meta), path(fasta)
+
+ output:
+ tuple val(meta), path("bwameme"), emit: index
+ path "versions.yml" , emit: versions
+
+ when:
+ task.ext.when == null || task.ext.when
+
+ script:
+ def args = task.ext.args ?: ''
+ def prefix = task.ext.prefix ?: "${fasta}"
+ def VERSION = '1.0.6' // WARN: Version information provided by tool on CLI is incorrect. Please update this string when bumping container versions.
+ """
+ mkdir bwameme
+
+ bwa-meme index \\
+ $args \\
+ -t $task.cpus \\
+ -p bwameme/$prefix \\
+ $fasta
+
+ build_rmis_dna.sh bwameme/$prefix
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ bwameme: $VERSION
+ END_VERSIONS
+ """
+
+ stub:
+ def prefix = task.ext.prefix ?: "${fasta}"
+ def VERSION = '1.0.6' // WARN: Version information provided by tool on CLI is incorrect. Please update this string when bumping container versions.
+ """
+ mkdir bwameme
+ touch bwameme/${prefix}.0123
+ touch bwameme/${prefix}.ann
+ touch bwameme/${prefix}.pac
+ touch bwameme/${prefix}.amb
+ touch bwameme/${prefix}.pos_packed
+ touch bwameme/${prefix}.suffixarray_uint64
+ touch bwameme/${prefix}.suffixarray_uint64_L0_PARAMETERS
+ touch bwameme/${prefix}.suffixarray_uint64_L1_PARAMETERS
+ touch bwameme/${prefix}.suffixarray_uint64_L2_PARAMETERS
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ bwameme: $VERSION
+ END_VERSIONS
+ """
+}
diff --git a/modules/nf-core/bwameme/index/meta.yml b/modules/nf-core/bwameme/index/meta.yml
new file mode 100644
index 00000000..2db1d3a8
--- /dev/null
+++ b/modules/nf-core/bwameme/index/meta.yml
@@ -0,0 +1,44 @@
+name: "bwameme_index"
+description: Create BWA-MEME index for reference genome
+keywords:
+ - index
+ - fasta
+ - genome
+ - reference
+tools:
+ - "bwameme":
+ description: "Faster BWA-MEM2 using learned-index"
+ homepage: https://github.com/kaist-ina/BWA-MEME
+ documentation: https://github.com/kaist-ina/BWA-MEME#getting-started
+ doi: "10.1093/bioinformatics/btac137"
+ licence: ["MIT"]
+
+input:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. `[ id:'sample1', single_end:false ]`
+ - fasta:
+ type: file
+ description: Input genome fasta file
+
+output:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. `[ id:'sample1', single_end:false ]`
+ - versions:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
+ - index:
+ type: file
+ description: BWA-MEME genome index files
+ pattern: "*.{0123,amb,ann,pac,pos_packed,suffixarray_uint64,suffixarray_uint64_L0_PARAMETERS,suffixarray_uint64_L1_PARAMETERS,suffixarray_uint64_L2_PARAMETERS}"
+
+authors:
+ - "@ramprasadn"
+maintainers:
+ - "@ramprasadn"
diff --git a/modules/nf-core/bwameme/index/tests/main.nf.test b/modules/nf-core/bwameme/index/tests/main.nf.test
new file mode 100644
index 00000000..b61f7660
--- /dev/null
+++ b/modules/nf-core/bwameme/index/tests/main.nf.test
@@ -0,0 +1,59 @@
+nextflow_process {
+
+ name "Test Process BWAMEME_INDEX"
+ script "../main.nf"
+ process "BWAMEME_INDEX"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "bwameme"
+ tag "bwameme/index"
+
+ config "./nextflow.config"
+
+ test("BWAMEME index") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("BWAMEME index - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/bwameme/index/tests/main.nf.test.snap b/modules/nf-core/bwameme/index/tests/main.nf.test.snap
new file mode 100644
index 00000000..e608af8b
--- /dev/null
+++ b/modules/nf-core/bwameme/index/tests/main.nf.test.snap
@@ -0,0 +1,108 @@
+{
+ "BWAMEME index - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "genome.fasta.0123:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.amb:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.ann:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.pac:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.pos_packed:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64_L0_PARAMETERS:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64_L1_PARAMETERS:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64_L2_PARAMETERS:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,c80b8097b8a9c022e4c1e2617771ea3d"
+ ],
+ "index": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "genome.fasta.0123:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.amb:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.ann:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.pac:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.pos_packed:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64_L0_PARAMETERS:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64_L1_PARAMETERS:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "genome.fasta.suffixarray_uint64_L2_PARAMETERS:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c80b8097b8a9c022e4c1e2617771ea3d"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T13:44:38.551252246"
+ },
+ "BWAMEME index": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8",
+ "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e",
+ "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567",
+ "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66",
+ "genome.fasta.pos_packed:md5,3534bc04a547d02d6e4cb50908a40db9",
+ "genome.fasta.suffixarray_uint64:md5,51abb48f687661f88bf5bf5d370521e3",
+ "genome.fasta.suffixarray_uint64_L0_PARAMETERS:md5,ad6397d3d33bbb6a31b1320349e23274",
+ "genome.fasta.suffixarray_uint64_L1_PARAMETERS:md5,6c0d6dc7e733a7f373aa7b2730621aa4",
+ "genome.fasta.suffixarray_uint64_L2_PARAMETERS:md5,b2d4bad4e9f0e8960a0af12b7038ab1e"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,c80b8097b8a9c022e4c1e2617771ea3d"
+ ],
+ "index": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8",
+ "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e",
+ "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567",
+ "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66",
+ "genome.fasta.pos_packed:md5,3534bc04a547d02d6e4cb50908a40db9",
+ "genome.fasta.suffixarray_uint64:md5,51abb48f687661f88bf5bf5d370521e3",
+ "genome.fasta.suffixarray_uint64_L0_PARAMETERS:md5,ad6397d3d33bbb6a31b1320349e23274",
+ "genome.fasta.suffixarray_uint64_L1_PARAMETERS:md5,6c0d6dc7e733a7f373aa7b2730621aa4",
+ "genome.fasta.suffixarray_uint64_L2_PARAMETERS:md5,b2d4bad4e9f0e8960a0af12b7038ab1e"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c80b8097b8a9c022e4c1e2617771ea3d"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T13:44:25.040725565"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bwameme/index/tests/nextflow.config b/modules/nf-core/bwameme/index/tests/nextflow.config
new file mode 100644
index 00000000..5934b7d1
--- /dev/null
+++ b/modules/nf-core/bwameme/index/tests/nextflow.config
@@ -0,0 +1,7 @@
+process {
+
+ withName: BWAMEME_INDEX {
+ ext.args = '-a meme'
+ }
+
+}
diff --git a/modules/nf-core/bwameme/index/tests/tags.yml b/modules/nf-core/bwameme/index/tests/tags.yml
new file mode 100644
index 00000000..ddbcab04
--- /dev/null
+++ b/modules/nf-core/bwameme/index/tests/tags.yml
@@ -0,0 +1,2 @@
+bwameme/index:
+ - "modules/nf-core/bwameme/index/**"
diff --git a/modules/nf-core/bwameme/mem/environment.yml b/modules/nf-core/bwameme/mem/environment.yml
new file mode 100644
index 00000000..388eedd2
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/environment.yml
@@ -0,0 +1,11 @@
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
+name: "bwameme_mem"
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - "bioconda::bwa-meme=1.0.6"
+ - "bioconda::mbuffer=20160228"
+ - "bioconda::samtools=1.20"
diff --git a/modules/nf-core/bwameme/mem/main.nf b/modules/nf-core/bwameme/mem/main.nf
new file mode 100644
index 00000000..db41316e
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/main.nf
@@ -0,0 +1,94 @@
+process BWAMEME_MEM {
+ tag "$meta.id"
+ label 'process_high'
+
+ conda "${moduleDir}/environment.yml"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+ 'https://depot.galaxyproject.org/singularity/mulled-v2-ed29b84fa94419f5a7bf6a841ddbcb964768825b:139b5e403886ad278b9ad139174967441c1c6ff3-0':
+ 'biocontainers/mulled-v2-ed29b84fa94419f5a7bf6a841ddbcb964768825b:139b5e403886ad278b9ad139174967441c1c6ff3-0' }"
+
+ input:
+ tuple val(meta), path(reads)
+ tuple val(meta2), path(index)
+ tuple val(meta3), path(fasta)
+ val sort_bam
+
+ output:
+ tuple val(meta), path("*.sam") , emit: sam , optional:true
+ tuple val(meta), path("*.bam") , emit: bam , optional:true
+ tuple val(meta), path("*.cram") , emit: cram, optional:true
+ tuple val(meta), path("*.crai") , emit: crai, optional:true
+ tuple val(meta), path("*.csi") , emit: csi , optional:true
+ path "versions.yml" , emit: versions
+
+ when:
+ task.ext.when == null || task.ext.when
+
+ script:
+ def args = task.ext.args ?: ''
+ def args2 = task.ext.args2 ?: ''
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ def samtools_command = sort_bam ? 'sort' : 'view'
+ def mbuffer_mem = 3072
+ if (!task.memory) {
+ log.info '[bwameme-mbuffer] Available memory not known - defaulting to 3GB for mbuffer. Specify process memory requirements to change this.'
+ } else {
+ mbuffer_mem = (task.memory.mega*0.5).intValue()
+ }
+ def mbuffer_command = sort_bam ? "| mbuffer -m ${mbuffer_mem}M" : ""
+ def mem_per_thread = sort_bam ? "-m "+ (mbuffer_mem/task.cpus).intValue()+"M" : ""
+ def extension_pattern = /(--output-fmt|-O)+\s+(\S+)/
+ def extension_matcher = (args2 =~ extension_pattern)
+ def extension = extension_matcher.getCount() > 0 ? extension_matcher[0][2].toLowerCase() : "bam"
+ def reference = fasta && extension=="cram" ? "--reference ${fasta}" : ""
+ if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output"
+ def VERSION = '1.0.6' // WARN: Version information provided by tool on CLI is incorrect. Please update this string when bumping container versions.
+ """
+ INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'`
+
+ bwa-meme \\
+ mem \\
+ $args \\
+ -t $task.cpus \\
+ \$INDEX \\
+ $reads \\
+ $mbuffer_command \\
+ | samtools $samtools_command $args2 $mem_per_thread -@ $task.cpus ${reference} -o ${prefix}.${extension} -
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ bwameme: $VERSION
+ samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
+ END_VERSIONS
+ """
+
+ stub:
+
+ def args = task.ext.args ?: ''
+ def args2 = task.ext.args2 ?: ''
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ def samtools_command = sort_bam ? 'sort' : 'view'
+ def extension_pattern = /(--output-fmt|-O)+\s+(\S+)/
+ def extension_matcher = (args2 =~ extension_pattern)
+ def extension = extension_matcher.getCount() > 0 ? extension_matcher[0][2].toLowerCase() : "bam"
+ def reference = fasta && extension=="cram" ? "--reference ${fasta}" : ""
+ if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output"
+
+ def create_index = ""
+ if (extension == "cram") {
+ create_index = "touch ${prefix}.crai"
+ } else if (extension == "bam") {
+ create_index = "touch ${prefix}.csi"
+ }
+ def VERSION = '1.0.6' // WARN: Version information provided by tool on CLI is incorrect. Please update this string when bumping container versions.
+ """
+ touch ${prefix}.${extension}
+ ${create_index}
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ bwameme: $VERSION
+ samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
+ END_VERSIONS
+ """
+}
diff --git a/modules/nf-core/bwameme/mem/meta.yml b/modules/nf-core/bwameme/mem/meta.yml
new file mode 100644
index 00000000..c7eb7b28
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/meta.yml
@@ -0,0 +1,90 @@
+name: "bwameme_mem"
+description: Performs fastq alignment to a fasta reference using BWA-MEME
+keywords:
+ - mem
+ - bwa
+ - bwamem2
+ - bwameme
+ - alignment
+ - map
+ - fastq
+ - bam
+ - sam
+ - cram
+tools:
+ - "bwameme":
+ description: "Faster BWA-MEM2 using learned-index"
+ homepage: https://github.com/kaist-ina/BWA-MEME
+ documentation: https://github.com/kaist-ina/BWA-MEME#getting-started
+ doi: "10.1093/bioinformatics/btac137"
+ licence: ["MIT"]
+
+input:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - reads:
+ type: file
+ description: |
+ List of input FastQ files of size 1 and 2 for single-end and paired-end data,
+ respectively.
+ - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference/index information
+ e.g. [ id:'test' ]
+ - index:
+ type: file
+ description: BWA genome index files
+ pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}"
+ - meta3:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fasta:
+ type: file
+ description: Reference genome in FASTA format
+ pattern: "*.{fa,fasta,fna}"
+ - sort_bam:
+ type: boolean
+ description: use samtools sort (true) or samtools view (false)
+ pattern: "true or false"
+
+output:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - sam:
+ type: file
+ description: Output SAM file containing read alignments
+ pattern: "*.{sam}"
+ - bam:
+ type: file
+ description: Output BAM file containing read alignments
+ pattern: "*.{bam}"
+ - cram:
+ type: file
+ description: Output CRAM file containing read alignments
+ pattern: "*.{cram}"
+ - crai:
+ type: file
+ description: Index file for CRAM file
+ pattern: "*.{crai}"
+ - csi:
+ type: file
+ description: Index file for BAM file
+ pattern: "*.{csi}"
+ - versions:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
+
+authors:
+ - "@ramprasadn"
+maintainers:
+ - "@ramprasadn"
diff --git a/modules/nf-core/bwameme/mem/tests/main.nf.test b/modules/nf-core/bwameme/mem/tests/main.nf.test
new file mode 100644
index 00000000..3b67b39e
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/tests/main.nf.test
@@ -0,0 +1,239 @@
+nextflow_process {
+
+ name "Test Process BWAMEME_MEM"
+ script "../main.nf"
+ process "BWAMEME_MEM"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "bwameme"
+ tag "bwameme/mem"
+ tag "bwameme/index"
+ config "./nextflow.config"
+
+ test("sarscov2 - fastq, index, fasta, false") {
+
+ setup {
+ run("BWAMEME_INDEX") {
+ script "../../index/main.nf"
+ config "./nextflow.config"
+ process {
+ """
+ input[0] = Channel.of([
+ [:], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ ])
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:true ], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)]
+ ])
+ input[1] = BWAMEME_INDEX.out.index
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fastq, index, fasta, true") {
+
+ setup {
+ run("BWAMEME_INDEX") {
+ script "../../index/main.nf"
+ config "./nextflow.config"
+ process {
+ """
+ input[0] = Channel.of([
+ [:], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ ])
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:true ], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)]
+ ])
+ input[1] = BWAMEME_INDEX.out.index
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - [fastq1, fastq2], index, fasta, false") {
+
+ setup {
+ run("BWAMEME_INDEX") {
+ script "../../index/main.nf"
+ config "./nextflow.config"
+ process {
+ """
+ input[0] = Channel.of([
+ [:], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ ])
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
+ ]
+ ])
+ input[1] = BWAMEME_INDEX.out.index
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - [fastq1, fastq2], index, fasta, true") {
+
+ setup {
+ run("BWAMEME_INDEX") {
+ script "../../index/main.nf"
+ config "./nextflow.config"
+ process {
+ """
+ input[0] = Channel.of([
+ [:], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ ])
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
+ ]
+ ])
+ input[1] = BWAMEME_INDEX.out.index
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - [fastq1, fastq2], index, fasta, true - stub") {
+
+ options "-stub"
+
+ setup {
+ run("BWAMEME_INDEX") {
+ script "../../index/main.nf"
+ config "./nextflow.config"
+ process {
+ """
+ input[0] = Channel.of([
+ [:], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]
+ ])
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
+ ]
+ ])
+ input[1] = BWAMEME_INDEX.out.index
+ input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]])
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bwameme/mem/tests/main.nf.test.snap b/modules/nf-core/bwameme/mem/tests/main.nf.test.snap
new file mode 100644
index 00000000..281011ae
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/tests/main.nf.test.snap
@@ -0,0 +1,67 @@
+{
+ "sarscov2 - [fastq1, fastq2], index, fasta, false": {
+ "content": [
+ "test.bam",
+ [
+ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T20:04:31.962017214"
+ },
+ "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": {
+ "content": [
+ "test.bam",
+ [
+ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T19:28:46.895668666"
+ },
+ "sarscov2 - [fastq1, fastq2], index, fasta, true": {
+ "content": [
+ "test.bam",
+ [
+ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T20:44:56.510177191"
+ },
+ "sarscov2 - fastq, index, fasta, false": {
+ "content": [
+ "test.bam",
+ [
+ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T20:00:05.782384898"
+ },
+ "sarscov2 - fastq, index, fasta, true": {
+ "content": [
+ "test.bam",
+ [
+ "versions.yml:md5,700d57071f430eb29b3c67d0a199eb95"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-05-15T20:44:05.2657749"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bwameme/mem/tests/nextflow.config b/modules/nf-core/bwameme/mem/tests/nextflow.config
new file mode 100644
index 00000000..e7dd707e
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/tests/nextflow.config
@@ -0,0 +1,9 @@
+process {
+
+ withName: BWAMEME_INDEX {
+ ext.args = '-a meme'
+ }
+ withName: BWAMEME_MEM {
+ ext.args = '-7'
+ }
+}
diff --git a/modules/nf-core/bwameme/mem/tests/tags.yml b/modules/nf-core/bwameme/mem/tests/tags.yml
new file mode 100644
index 00000000..9e3a26cf
--- /dev/null
+++ b/modules/nf-core/bwameme/mem/tests/tags.yml
@@ -0,0 +1,2 @@
+bwameme/mem:
+ - "modules/nf-core/bwameme/mem/**"
diff --git a/modules/nf-core/cadd/environment.yml b/modules/nf-core/cadd/environment.yml
index 6a21f71e..26f170e9 100644
--- a/modules/nf-core/cadd/environment.yml
+++ b/modules/nf-core/cadd/environment.yml
@@ -4,6 +4,6 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::cadd-scripts=1.6
- - anaconda::conda=4.14.0
+ - bioconda::cadd-scripts=1.6.post1
+ - conda-forge::conda=4.14.0
- conda-forge::mamba=1.4.0
diff --git a/modules/nf-core/cadd/main.nf b/modules/nf-core/cadd/main.nf
index d4fab1f4..0af87f6e 100644
--- a/modules/nf-core/cadd/main.nf
+++ b/modules/nf-core/cadd/main.nf
@@ -3,14 +3,12 @@ process CADD {
label 'process_medium'
conda "${moduleDir}/environment.yml"
- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/mulled-v2-8d145e7b16a8ca4bf920e6ca464763df6f0a56a2:d4e457a2edecb2b10e915c01d8f46e29e236b648-0':
- 'biocontainers/mulled-v2-8d145e7b16a8ca4bf920e6ca464763df6f0a56a2:d4e457a2edecb2b10e915c01d8f46e29e236b648-0' }"
+ container 'docker.io/biocontainers/cadd-scripts-with-envs:1.6.post1_cv1'
containerOptions {
(workflow.containerEngine == 'singularity') ?
- "--writable -B ${annotation_dir}:/usr/local/share/cadd-scripts-1.6-1/data/annotations" :
- "--privileged -v ${annotation_dir}:/usr/local/share/cadd-scripts-1.6-1/data/annotations"
+ "-B ${annotation_dir}:/opt/CADD-scripts-1.6.post1/data/annotations" :
+ "-v ${annotation_dir}:/opt/CADD-scripts-1.6.post1/data/annotations"
}
input:
@@ -27,7 +25,7 @@ process CADD {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
- def VERSION = "1.6" // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
+ def VERSION = "1.6.post1" // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
"""
cadd.sh \\
-o ${prefix}.tsv.gz \\
@@ -43,7 +41,7 @@ process CADD {
stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
- def VERSION = "1.6" // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
+ def VERSION = "1.6.post1" // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
"""
touch ${prefix}.tsv.gz
diff --git a/modules/nf-core/cadd/meta.yml b/modules/nf-core/cadd/meta.yml
index df84d237..230ed9c0 100644
--- a/modules/nf-core/cadd/meta.yml
+++ b/modules/nf-core/cadd/meta.yml
@@ -11,7 +11,8 @@ tools:
documentation: "https://github.com/kircherlab/CADD-scripts/blob/master/README.md"
tool_dev_url: "https://github.com/kircherlab/CADD-scripts/"
doi: "10.1093/nar/gky1016"
- licence: "['Restricted. Free for non-commercial users.']"
+ licence:
+ - Restricted. Free for non-commercial users.
input:
- meta:
type: map
diff --git a/modules/nf-core/deepvariant/README.md b/modules/nf-core/deepvariant/README.md
new file mode 100644
index 00000000..ca112a7d
--- /dev/null
+++ b/modules/nf-core/deepvariant/README.md
@@ -0,0 +1,9 @@
+# Conda is not supported at the moment
+
+The [bioconda](https://bioconda.github.io/recipes/deepvariant/README.html) recipe is not fully working as expected
+
+Hence, we are using the docker container provided by the authors of the tool:
+
+- [google/deepvariant](https://hub.docker.com/r/google/deepvariant)
+
+This image is mirrored on the [nf-core quay.io](https://quay.io/repository/nf-core/deepvariant) for convenience.
diff --git a/modules/nf-core/deepvariant/environment.yml b/modules/nf-core/deepvariant/environment.yml
deleted file mode 100644
index 648a76de..00000000
--- a/modules/nf-core/deepvariant/environment.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-name: deepvariant
-channels:
- - conda-forge
- - bioconda
- - defaults
diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf
index 2d5c480c..507b6c11 100644
--- a/modules/nf-core/deepvariant/main.nf
+++ b/modules/nf-core/deepvariant/main.nf
@@ -2,6 +2,7 @@ process DEEPVARIANT {
tag "$meta.id"
label 'process_high'
+ //Conda is not supported at the moment
container "nf-core/deepvariant:1.5.0"
input:
diff --git a/modules/nf-core/deepvariant/tests/main.nf.test b/modules/nf-core/deepvariant/tests/main.nf.test
new file mode 100644
index 00000000..91612c1e
--- /dev/null
+++ b/modules/nf-core/deepvariant/tests/main.nf.test
@@ -0,0 +1,117 @@
+nextflow_process {
+
+ name "Test Process DEEPVARIANT"
+ script "../main.nf"
+ process "DEEPVARIANT"
+
+ tag "deepvariant"
+ tag "modules"
+ tag "modules_nfcore"
+
+ test("homo_sapiens - [bam, bai] - fasta - fai") {
+ when {
+ config "./nextflow.config"
+
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
+ []
+ ]
+ input[1] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [
+ [],[]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai") {
+ config "./nextflow-intervals.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true),
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.bed', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [
+ [],[]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai") {
+ when {
+ config "./nextflow.config"
+
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true),
+ []
+ ]
+ input[1] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz', checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.fai', checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/modules/nf-core/deepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/tests/main.nf.test.snap
new file mode 100644
index 00000000..6ad76ae4
--- /dev/null
+++ b/modules/nf-core/deepvariant/tests/main.nf.test.snap
@@ -0,0 +1,269 @@
+{
+ "homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,7cba1516f7cf0888765d5ee8caf275f4"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,02a78562bc83520a51010a01fb06f217"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,8d6ac08997bfd848a0a4d9d295e76952"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,37e2d8f4cca0a21113cede608f54885a"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,4678f778b58276933b165fe3e84afc6a"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,8d6ac08997bfd848a0a4d9d295e76952"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,37e2d8f4cca0a21113cede608f54885a"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,7cba1516f7cf0888765d5ee8caf275f4"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,02a78562bc83520a51010a01fb06f217"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,4678f778b58276933b165fe3e84afc6a"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T13:54:42.757335334"
+ },
+ "homo_sapiens - [bam, bai] - fasta - fai": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,7cba1516f7cf0888765d5ee8caf275f4"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,02a78562bc83520a51010a01fb06f217"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,8d6ac08997bfd848a0a4d9d295e76952"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,37e2d8f4cca0a21113cede608f54885a"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,4678f778b58276933b165fe3e84afc6a"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,8d6ac08997bfd848a0a4d9d295e76952"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,37e2d8f4cca0a21113cede608f54885a"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,7cba1516f7cf0888765d5ee8caf275f4"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,02a78562bc83520a51010a01fb06f217"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,4678f778b58276933b165fe3e84afc6a"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T13:54:18.409489045"
+ },
+ "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,7cba1516f7cf0888765d5ee8caf275f4"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,02a78562bc83520a51010a01fb06f217"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,8d6ac08997bfd848a0a4d9d295e76952"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,37e2d8f4cca0a21113cede608f54885a"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,4678f778b58276933b165fe3e84afc6a"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,8d6ac08997bfd848a0a4d9d295e76952"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,37e2d8f4cca0a21113cede608f54885a"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,7cba1516f7cf0888765d5ee8caf275f4"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,02a78562bc83520a51010a01fb06f217"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,4678f778b58276933b165fe3e84afc6a"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T13:54:30.523871801"
+ }
+}
diff --git a/modules/nf-core/deepvariant/tests/nextflow-intervals.config b/modules/nf-core/deepvariant/tests/nextflow-intervals.config
new file mode 100644
index 00000000..6d135f9f
--- /dev/null
+++ b/modules/nf-core/deepvariant/tests/nextflow-intervals.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: DEEPVARIANT {
+ ext.args = '--model_type=WGS '
+ ext.prefix = { "${meta.id}_out" }
+ }
+
+}
diff --git a/modules/nf-core/deepvariant/tests/nextflow.config b/modules/nf-core/deepvariant/tests/nextflow.config
new file mode 100644
index 00000000..d335d30b
--- /dev/null
+++ b/modules/nf-core/deepvariant/tests/nextflow.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: DEEPVARIANT {
+ ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS '
+ ext.prefix = { "${meta.id}_out" }
+ }
+
+}
diff --git a/modules/nf-core/deepvariant/tests/tags.yml b/modules/nf-core/deepvariant/tests/tags.yml
new file mode 100644
index 00000000..8e838c7b
--- /dev/null
+++ b/modules/nf-core/deepvariant/tests/tags.yml
@@ -0,0 +1,2 @@
+deepvariant:
+ - modules/nf-core/deepvariant/**
diff --git a/modules/nf-core/expansionhunter/environment.yml b/modules/nf-core/expansionhunter/environment.yml
index 76edd1ef..90a3bfff 100644
--- a/modules/nf-core/expansionhunter/environment.yml
+++ b/modules/nf-core/expansionhunter/environment.yml
@@ -1,7 +1,10 @@
name: expansionhunter
+
channels:
- conda-forge
- bioconda
- defaults
+
dependencies:
- bioconda::expansionhunter=5.0.0
+ - bioconda::htslib=1.18
diff --git a/modules/nf-core/expansionhunter/main.nf b/modules/nf-core/expansionhunter/main.nf
index bea5916a..dbcb175f 100644
--- a/modules/nf-core/expansionhunter/main.nf
+++ b/modules/nf-core/expansionhunter/main.nf
@@ -40,7 +40,7 @@ process EXPANSIONHUNTER {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
- expansionhunter: \$( echo \$(ExpansionHunter --version 2>&1) | sed 's/^.*ExpansionHunter v//')
+ expansionhunter: \$( echo \$(ExpansionHunter --version 2>&1) | head -1 | sed 's/^.*ExpansionHunter v//')
bgzip: \$(echo \$(bgzip -h 2>&1) | sed 's/^.*Version: //;s/Usage:.*//')
END_VERSIONS
"""
@@ -48,13 +48,13 @@ process EXPANSIONHUNTER {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- touch ${prefix}.vcf.gz
- touch ${prefix}.json.gz
+ echo "" | gzip > ${prefix}.vcf.gz
+ echo "" | gzip > ${prefix}.json.gz
touch ${prefix}_realigned.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
- expansionhunter: \$( echo \$(ExpansionHunter --version 2>&1) | sed 's/^.*ExpansionHunter v//')
+ expansionhunter: \$( echo \$(ExpansionHunter --version 2>&1) | head -1 | sed 's/^.*ExpansionHunter v//')
bgzip: \$(echo \$(bgzip -h 2>&1) | sed 's/^.*Version: //;s/Usage:.*//')
END_VERSIONS
"""
diff --git a/modules/nf-core/expansionhunter/tests/main.nf.test b/modules/nf-core/expansionhunter/tests/main.nf.test
index 6204460a..ef15e133 100644
--- a/modules/nf-core/expansionhunter/tests/main.nf.test
+++ b/modules/nf-core/expansionhunter/tests/main.nf.test
@@ -7,7 +7,7 @@ nextflow_process {
tag "modules_nfcore"
tag "expansionhunter"
- test("expansionhunter") {
+ test("homo_sapiens - [bam,bai], fasta, fai, cat") {
when {
process {
@@ -25,10 +25,35 @@ nextflow_process {
then {
assertAll(
- {assert process.success},
- {assert path(process.out.vcf.get(0).get(1)).linesGzip.size() == 8},
- {assert path(process.out.json.get(0).get(1)).linesGzip.size() == 27},
- {assert snapshot(process.out.bam).match()}
+ {assert process.success},
+ {assert snapshot(process.out).match("expansionhunter")}
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [bam,bai], fasta, fai, cat - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
+ ]
+ input[1] = [[id:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)]
+ input[2] = [[id:'fasta_fai'],file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)]
+ input[3] = [[id:'catalogue'],file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true)]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ {assert process.success},
+ {assert snapshot(process.out).match("stub")}
)
}
diff --git a/modules/nf-core/expansionhunter/tests/main.nf.test.snap b/modules/nf-core/expansionhunter/tests/main.nf.test.snap
index a98fb599..a4e09f4c 100644
--- a/modules/nf-core/expansionhunter/tests/main.nf.test.snap
+++ b/modules/nf-core/expansionhunter/tests/main.nf.test.snap
@@ -1,15 +1,132 @@
{
"expansionhunter": {
"content": [
- [
- [
- {
- "id": "test"
- },
- "test_realigned.bam:md5,b37a72c0b97b45e63636a9758f3144d7"
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,cfd4a1d35c0e469b99eb6aaa6d22de76"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.json.gz:md5,60d7dc4662c837bba2715d54b64a9bfe"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test_realigned.bam:md5,b37a72c0b97b45e63636a9758f3144d7"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,056b525f67ba23c361f0c65f47256dca"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test"
+ },
+ "test_realigned.bam:md5,b37a72c0b97b45e63636a9758f3144d7"
+ ]
+ ],
+ "json": [
+ [
+ {
+ "id": "test"
+ },
+ "test.json.gz:md5,60d7dc4662c837bba2715d54b64a9bfe"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,cfd4a1d35c0e469b99eb6aaa6d22de76"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,056b525f67ba23c361f0c65f47256dca"
]
- ]
+ }
],
- "timestamp": "2024-01-26T17:35:10.45442497"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T12:20:15.18545069"
+ },
+ "stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.json.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test_realigned.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,056b525f67ba23c361f0c65f47256dca"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test"
+ },
+ "test_realigned.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "json": [
+ [
+ {
+ "id": "test"
+ },
+ "test.json.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,056b525f67ba23c361f0c65f47256dca"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.03.0"
+ },
+ "timestamp": "2024-05-03T12:20:28.430115"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf
index 2a3b679e..4fc19b74 100644
--- a/modules/nf-core/fastp/main.nf
+++ b/modules/nf-core/fastp/main.nf
@@ -29,7 +29,7 @@ process FASTP {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def adapter_list = adapter_fasta ? "--adapter_fasta ${adapter_fasta}" : ""
- def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : ''
+ def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : ''
// Added soft-links to original fastqs for consistent naming in MultiQC
// Use single ended for interleaved. Add --interleaved_in in config.
if ( task.ext.args?.contains('--interleaved_in') ) {
diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test
index 9b3f9a38..6f1f4897 100644
--- a/modules/nf-core/fastp/tests/main.nf.test
+++ b/modules/nf-core/fastp/tests/main.nf.test
@@ -251,7 +251,8 @@ nextflow_process {
}
test("fastp test_fastp_interleaved") {
- config './nextflow.config'
+
+ config './nextflow.interleaved.config'
when {
params {
outdir = "$outputDir"
@@ -277,7 +278,7 @@ nextflow_process {
def html_text = [ "Q20 bases:25.719000 K (93.033098%)",
"paired end (151 cycles + 151 cycles)"]
def log_text = [ "Q20 bases: 12922(92.9841%)",
- "reads passed filter: 198"]
+ "reads passed filter: 162"]
def read_lines = [ "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1",
"TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
"AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE
- { assert path(process.out.reads_fail.get(0).get(1).get(1)).linesGzip.contains(failed_read2_line) }
+ { assert path(process.out.reads_fail.get(0).get(1).get(2)).linesGzip.contains(failed_read2_line) }
}
},
{ html_text.each { html_part ->
diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap
index b4c0e1dd..3e876288 100644
--- a/modules/nf-core/fastp/tests/main.nf.test.snap
+++ b/modules/nf-core/fastp/tests/main.nf.test.snap
@@ -7,7 +7,7 @@
"id": "test",
"single_end": true
},
- "test.fastp.json:md5,168f516f7bd4b7b6c32da7cba87299a4"
+ "test.fastp.json:md5,b24e0624df5cc0b11cd5ba21b726fb22"
]
]
],
@@ -15,7 +15,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
- "timestamp": "2024-01-17T18:08:06.123035"
+ "timestamp": "2024-03-18T16:19:15.063001"
},
"test_fastp_paired_end_merged-for_stub_match": {
"content": [
@@ -65,7 +65,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
- "timestamp": "2024-01-17T18:06:00.223817"
+ "timestamp": "2024-03-18T16:18:43.526412"
},
"versions_paired_end": {
"content": [
@@ -112,7 +112,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
- "timestamp": "2024-02-01T12:03:37.827323085"
+ "timestamp": "2024-03-18T16:19:15.111894"
},
"test_fastp_paired_end_merged_match": {
"content": [
@@ -283,7 +283,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
- "timestamp": "2024-02-01T11:57:30.791982648"
+ "timestamp": "2024-03-18T16:18:43.580336"
},
"versions_paired_end_merged_adapterlist": {
"content": [
diff --git a/modules/nf-core/fastp/tests/nextflow.interleaved.config b/modules/nf-core/fastp/tests/nextflow.interleaved.config
new file mode 100644
index 00000000..4be8dbd2
--- /dev/null
+++ b/modules/nf-core/fastp/tests/nextflow.interleaved.config
@@ -0,0 +1,5 @@
+process {
+ withName: FASTP {
+ ext.args = "--interleaved_in -e 30"
+ }
+}
diff --git a/modules/nf-core/fastp/tests/nextflow.config b/modules/nf-core/fastp/tests/nextflow.save_failed.config
similarity index 50%
rename from modules/nf-core/fastp/tests/nextflow.config
rename to modules/nf-core/fastp/tests/nextflow.save_failed.config
index 0f7849ad..53b61b0c 100644
--- a/modules/nf-core/fastp/tests/nextflow.config
+++ b/modules/nf-core/fastp/tests/nextflow.save_failed.config
@@ -1,6 +1,5 @@
process {
-
withName: FASTP {
- ext.args = "--interleaved_in"
+ ext.args = "-e 30"
}
}
diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf
index 9e19a74c..d79f1c86 100644
--- a/modules/nf-core/fastqc/main.nf
+++ b/modules/nf-core/fastqc/main.nf
@@ -25,6 +25,11 @@ process FASTQC {
def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] }
def rename_to = old_new_pairs*.join(' ').join(' ')
def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ')
+
+ def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB')
+ // FastQC memory value allowed range (100 - 10000)
+ def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb)
+
"""
printf "%s %s\\n" $rename_to | while read old_name new_name; do
[ -f "\${new_name}" ] || ln -s \$old_name \$new_name
@@ -33,6 +38,7 @@ process FASTQC {
fastqc \\
$args \\
--threads $task.cpus \\
+ --memory $fastqc_memory \\
$renamed_files
cat <<-END_VERSIONS > versions.yml
diff --git a/modules/nf-core/gatk4/bedtointervallist/tests/main.nf.test b/modules/nf-core/gatk4/bedtointervallist/tests/main.nf.test
new file mode 100644
index 00000000..2289f73f
--- /dev/null
+++ b/modules/nf-core/gatk4/bedtointervallist/tests/main.nf.test
@@ -0,0 +1,38 @@
+nextflow_process {
+
+ name "Test Process GATK4_BEDTOINTERVALLIST"
+ script "../main.nf"
+ process "GATK4_BEDTOINTERVALLIST"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "gatk4"
+ tag "gatk4/bedtointervallist"
+
+ test("test_gatk4_bedtointervallist") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ [file(params.modules_testdata_base_path +
+ 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ]
+ ]
+ input[1] = [ [ id:'dict' ], // meta map
+ [file(params.modules_testdata_base_path +
+ 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/bedtointervallist/tests/main.nf.test.snap b/modules/nf-core/gatk4/bedtointervallist/tests/main.nf.test.snap
new file mode 100644
index 00000000..48c322fd
--- /dev/null
+++ b/modules/nf-core/gatk4/bedtointervallist/tests/main.nf.test.snap
@@ -0,0 +1,35 @@
+{
+ "test_gatk4_bedtointervallist": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.interval_list:md5,e51101c9357fb2d59fd30e370eefa39c"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,29a18c36f27584eb5a5f2f5457088b3b"
+ ],
+ "interval_list": [
+ [
+ {
+ "id": "test"
+ },
+ "test.interval_list:md5,e51101c9357fb2d59fd30e370eefa39c"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,29a18c36f27584eb5a5f2f5457088b3b"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-19T14:20:12.168775"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/bedtointervallist/tests/tags.yml b/modules/nf-core/gatk4/bedtointervallist/tests/tags.yml
new file mode 100644
index 00000000..b4d54f12
--- /dev/null
+++ b/modules/nf-core/gatk4/bedtointervallist/tests/tags.yml
@@ -0,0 +1,2 @@
+gatk4/bedtointervallist:
+ - "modules/nf-core/gatk4/bedtointervallist/**"
diff --git a/modules/nf-core/gatk4/createsequencedictionary/tests/main.nf.test b/modules/nf-core/gatk4/createsequencedictionary/tests/main.nf.test
new file mode 100644
index 00000000..a8a9c6d2
--- /dev/null
+++ b/modules/nf-core/gatk4/createsequencedictionary/tests/main.nf.test
@@ -0,0 +1,56 @@
+nextflow_process {
+
+ name "Test Process GATK4_CREATESEQUENCEDICTIONARY"
+ script "../main.nf"
+ process "GATK4_CREATESEQUENCEDICTIONARY"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "gatk4"
+ tag "gatk4/createsequencedictionary"
+
+ test("sarscov2 - fasta") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fasta - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/gatk4/createsequencedictionary/tests/main.nf.test.snap b/modules/nf-core/gatk4/createsequencedictionary/tests/main.nf.test.snap
new file mode 100644
index 00000000..16735f95
--- /dev/null
+++ b/modules/nf-core/gatk4/createsequencedictionary/tests/main.nf.test.snap
@@ -0,0 +1,68 @@
+{
+ "sarscov2 - fasta - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "genome.dict:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,e60dd34a71fc2029d81dc67ccb5d6be6"
+ ],
+ "dict": [
+ [
+ {
+ "id": "test"
+ },
+ "genome.dict:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,e60dd34a71fc2029d81dc67ccb5d6be6"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-16T10:16:16.34453"
+ },
+ "sarscov2 - fasta": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "genome.dict:md5,7362679f176e0f52add03c08f457f646"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,e60dd34a71fc2029d81dc67ccb5d6be6"
+ ],
+ "dict": [
+ [
+ {
+ "id": "test"
+ },
+ "genome.dict:md5,7362679f176e0f52add03c08f457f646"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,e60dd34a71fc2029d81dc67ccb5d6be6"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-16T13:58:25.822068"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/createsequencedictionary/tests/tags.yml b/modules/nf-core/gatk4/createsequencedictionary/tests/tags.yml
new file mode 100644
index 00000000..035c5e4c
--- /dev/null
+++ b/modules/nf-core/gatk4/createsequencedictionary/tests/tags.yml
@@ -0,0 +1,2 @@
+gatk4/createsequencedictionary:
+ - "modules/nf-core/gatk4/createsequencedictionary/**"
diff --git a/modules/nf-core/gatk4/determinegermlinecontigploidy/README.md b/modules/nf-core/gatk4/determinegermlinecontigploidy/README.md
new file mode 100644
index 00000000..c6a45456
--- /dev/null
+++ b/modules/nf-core/gatk4/determinegermlinecontigploidy/README.md
@@ -0,0 +1,9 @@
+# Conda is not supported at the moment
+
+The [bioconda](https://bioconda.github.io/recipes/gatk4/README.html) recipe is not fully working as expected, cf [github issue](https://github.com/broadinstitute/gatk/issues/7811)
+
+Hence, we are using the docker container provided by the authors of the tool:
+
+- [broadinstitute/gatk](https://hub.docker.com/r/broadinstitute/gatk)
+
+This image is mirrored on the [nf-core quay.io](https://quay.io/repository/nf-core/gatk) for convenience.
diff --git a/modules/nf-core/gatk4/filtermutectcalls/main.nf b/modules/nf-core/gatk4/filtermutectcalls/main.nf
index 38dd44c7..0532ec02 100644
--- a/modules/nf-core/gatk4/filtermutectcalls/main.nf
+++ b/modules/nf-core/gatk4/filtermutectcalls/main.nf
@@ -59,7 +59,7 @@ process GATK4_FILTERMUTECTCALLS {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- touch ${prefix}.vcf.gz
+ echo "" | gzip > ${prefix}.vcf.gz
touch ${prefix}.vcf.gz.tbi
touch ${prefix}.vcf.gz.filteringStats.tsv
diff --git a/modules/nf-core/gatk4/filtermutectcalls/tests/main.nf.test b/modules/nf-core/gatk4/filtermutectcalls/tests/main.nf.test
new file mode 100644
index 00000000..83c3703f
--- /dev/null
+++ b/modules/nf-core/gatk4/filtermutectcalls/tests/main.nf.test
@@ -0,0 +1,176 @@
+nextflow_process {
+
+ name "Test Process GATK4_FILTERMUTECTCALLS"
+ script "../main.nf"
+ process "GATK4_FILTERMUTECTCALLS"
+ config "./nextflow.config"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "gatk4"
+ tag "gatk4/filtermutectcalls"
+
+ test("human - vcf - base") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats', checkIfExists: true),
+ [],
+ [],
+ [],
+ []
+ ]
+
+ input[1] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.versions).match("versions_base") },
+ { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.2") },
+ { assert path(process.out.tbi.get(0).get(1)).linesGzip.toString().contains("TBI")},
+ { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0]).match() }
+ )
+ }
+
+ }
+
+ test("human - vcf - with-files") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_test2_paired_mutect2_calls.artifact-prior.tar.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_test2_paired.segmentation.table', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_test2_paired.contamination.table', checkIfExists: true),
+ []
+ ]
+
+ input[1] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.versions).match("versions_with-files") },
+ { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.2") },
+ { assert path(process.out.tbi.get(0).get(1)).linesGzip.toString().contains("TBI")},
+ { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0..5]).match() }
+ )
+ }
+
+ }
+
+ test("human - vcf - use-val") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_test2_paired_mutect2_calls.artifact-prior.tar.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_test2_paired.segmentation.table', checkIfExists: true),
+ [],
+ '20.0'
+ ]
+
+ input[1] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.versions).match("versions_use-val") },
+ { assert path(process.out.vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.2") },
+ { assert path(process.out.tbi.get(0).get(1)).linesGzip.toString().contains("TBI")},
+ { assert snapshot(file(process.out.stats.get(0).get(1)).readLines()[0]).match() }
+ )
+ }
+
+ }
+
+ test("human - vcf - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats', checkIfExists: true),
+ [],
+ [],
+ [],
+ []
+ ]
+
+ input[1] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.dict', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/gatk4/filtermutectcalls/tests/main.nf.test.snap b/modules/nf-core/gatk4/filtermutectcalls/tests/main.nf.test.snap
new file mode 100644
index 00000000..1c39e3b5
--- /dev/null
+++ b/modules/nf-core/gatk4/filtermutectcalls/tests/main.nf.test.snap
@@ -0,0 +1,140 @@
+{
+ "human - vcf - use-val": {
+ "content": [
+ "#Ln prior of deletion of length 10=-20.72326583694641"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:46:03.887912"
+ },
+ "versions_with-files": {
+ "content": [
+ [
+ "versions.yml:md5,1e86368bd682668a6777ccf2cfd90689"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:45:43.679571"
+ },
+ "human - vcf - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.filtered.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.filtered.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.filtered.vcf.gz.filteringStats.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,1e86368bd682668a6777ccf2cfd90689"
+ ],
+ "stats": [
+ [
+ {
+ "id": "test"
+ },
+ "test.filtered.vcf.gz.filteringStats.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tbi": [
+ [
+ {
+ "id": "test"
+ },
+ "test.filtered.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.filtered.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,1e86368bd682668a6777ccf2cfd90689"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:46:32.666273"
+ },
+ "versions_use-val": {
+ "content": [
+ [
+ "versions.yml:md5,1e86368bd682668a6777ccf2cfd90689"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:46:03.876073"
+ },
+ "versions_base": {
+ "content": [
+ [
+ "versions.yml:md5,1e86368bd682668a6777ccf2cfd90689"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:47:39.930795"
+ },
+ "human - vcf - with-files": {
+ "content": [
+ [
+ "#Ln prior of deletion of length 10=-20.72326583694641",
+ "#Ln prior of deletion of length 9=-20.72326583694641",
+ "#Ln prior of deletion of length 8=-20.72326583694641",
+ "#Ln prior of deletion of length 7=-20.72326583694641",
+ "#Ln prior of deletion of length 6=-20.72326583694641",
+ "#Ln prior of deletion of length 5=-20.72326583694641"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:45:43.699286"
+ },
+ "human - vcf - base": {
+ "content": [
+ "#Ln prior of deletion of length 10=-20.72326583694641"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-05-15T12:47:39.949405"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/filtermutectcalls/tests/nextflow.config b/modules/nf-core/gatk4/filtermutectcalls/tests/nextflow.config
new file mode 100644
index 00000000..12fa58fb
--- /dev/null
+++ b/modules/nf-core/gatk4/filtermutectcalls/tests/nextflow.config
@@ -0,0 +1,5 @@
+process {
+ withName: GATK4_FILTERMUTECTCALLS {
+ ext.prefix = { "${meta.id}.filtered" }
+ }
+}
diff --git a/modules/nf-core/gatk4/filtermutectcalls/tests/tags.yml b/modules/nf-core/gatk4/filtermutectcalls/tests/tags.yml
new file mode 100644
index 00000000..44731031
--- /dev/null
+++ b/modules/nf-core/gatk4/filtermutectcalls/tests/tags.yml
@@ -0,0 +1,2 @@
+gatk4/filtermutectcalls:
+ - "modules/nf-core/gatk4/filtermutectcalls/**"
diff --git a/modules/nf-core/gatk4/germlinecnvcaller/README.md b/modules/nf-core/gatk4/germlinecnvcaller/README.md
new file mode 100644
index 00000000..c6a45456
--- /dev/null
+++ b/modules/nf-core/gatk4/germlinecnvcaller/README.md
@@ -0,0 +1,9 @@
+# Conda is not supported at the moment
+
+The [bioconda](https://bioconda.github.io/recipes/gatk4/README.html) recipe is not fully working as expected, cf [github issue](https://github.com/broadinstitute/gatk/issues/7811)
+
+Hence, we are using the docker container provided by the authors of the tool:
+
+- [broadinstitute/gatk](https://hub.docker.com/r/broadinstitute/gatk)
+
+This image is mirrored on the [nf-core quay.io](https://quay.io/repository/nf-core/gatk) for convenience.
diff --git a/modules/nf-core/gatk4/germlinecnvcaller/gatk4-germlinecnvcaller.diff b/modules/nf-core/gatk4/germlinecnvcaller/gatk4-germlinecnvcaller.diff
deleted file mode 100644
index c501e50e..00000000
--- a/modules/nf-core/gatk4/germlinecnvcaller/gatk4-germlinecnvcaller.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-Changes in module 'nf-core/gatk4/germlinecnvcaller'
---- modules/nf-core/gatk4/germlinecnvcaller/main.nf
-+++ modules/nf-core/gatk4/germlinecnvcaller/main.nf
-@@ -36,7 +36,7 @@
- avail_mem = (task.memory.mega*0.8).intValue()
- }
- """
-- gatk --java-options "-Xmx${avail_mem}g" GermlineCNVCaller \\
-+ gatk --java-options "-Xmx${avail_mem}M" GermlineCNVCaller \\
- $input_list \\
- $ploidy_command \\
- $output_command \\
-
-************************************************************
diff --git a/modules/nf-core/gatk4/germlinecnvcaller/main.nf b/modules/nf-core/gatk4/germlinecnvcaller/main.nf
index 535b14c5..cd1916ec 100644
--- a/modules/nf-core/gatk4/germlinecnvcaller/main.nf
+++ b/modules/nf-core/gatk4/germlinecnvcaller/main.nf
@@ -39,7 +39,7 @@ process GATK4_GERMLINECNVCALLER {
"""
export THEANO_FLAGS="base_compiledir=\$PWD"
- gatk --java-options "-Xmx${avail_mem}g -XX:-UsePerfData" \\
+ gatk --java-options "-Xmx${avail_mem}M -XX:-UsePerfData" \\
GermlineCNVCaller \\
$input_list \\
$ploidy_command \\
diff --git a/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test
new file mode 100644
index 00000000..2891bf9e
--- /dev/null
+++ b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test
@@ -0,0 +1,72 @@
+nextflow_process {
+
+ name "Test Process GATK4_INTERVALLISTTOOLS"
+ script "../main.nf"
+ process "GATK4_INTERVALLISTTOOLS"
+ config "./nextflow.config"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "gatk4"
+ tag "gatk4/bedtointervallist"
+ tag "gatk4/intervallisttools"
+
+ setup {
+ run("GATK4_BEDTOINTERVALLIST") {
+ script "../../bedtointervallist/main.nf"
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)]
+ ]
+ input[1] = [
+ [ id:'dict' ], // meta map
+ [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)]
+ ]
+ """
+ }
+ }
+ }
+
+ test("test_gatk4_intervallisttools") {
+
+ when {
+ process {
+ """
+ input[0] = GATK4_BEDTOINTERVALLIST.out.interval_list
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() },
+ )
+ }
+
+ }
+
+ test("test_gatk4_intervallisttools -stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = GATK4_BEDTOINTERVALLIST.out.interval_list
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() },
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test.snap b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test.snap
new file mode 100644
index 00000000..7718ed00
--- /dev/null
+++ b/modules/nf-core/gatk4/intervallisttools/tests/main.nf.test.snap
@@ -0,0 +1,88 @@
+{
+ "test_gatk4_intervallisttools": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "1scattered.interval_list:md5,64f6665f9fbd257e4a300ec602f4e995",
+ "2scattered.interval_list:md5,f515c3da0c6accfd8e7dc33df50855c5",
+ "3scattered.interval_list:md5,7a918e8c9211b54334587793e8cbae53",
+ "4scattered.interval_list:md5,1b93105227a7dc81f07101a1efd31498"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03"
+ ],
+ "interval_list": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "1scattered.interval_list:md5,64f6665f9fbd257e4a300ec602f4e995",
+ "2scattered.interval_list:md5,f515c3da0c6accfd8e7dc33df50855c5",
+ "3scattered.interval_list:md5,7a918e8c9211b54334587793e8cbae53",
+ "4scattered.interval_list:md5,1b93105227a7dc81f07101a1efd31498"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-05-22T21:26:22.252885"
+ },
+ "test_gatk4_intervallisttools -stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "1scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "2scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "3scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "4scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03"
+ ],
+ "interval_list": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "1scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "2scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "3scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "4scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,ff682cc9ad70d65a80280df57b316b03"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-05-22T22:15:11.772344"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/intervallisttools/tests/nextflow.config b/modules/nf-core/gatk4/intervallisttools/tests/nextflow.config
new file mode 100644
index 00000000..b24b20db
--- /dev/null
+++ b/modules/nf-core/gatk4/intervallisttools/tests/nextflow.config
@@ -0,0 +1,5 @@
+process {
+ withName: GATK4_INTERVALLISTTOOLS {
+ ext.args = '--SCATTER_COUNT 6 --SUBDIVISION_MODE BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW --UNIQUE true --SORT true'
+ }
+}
diff --git a/modules/nf-core/gatk4/intervallisttools/tests/tags.yml b/modules/nf-core/gatk4/intervallisttools/tests/tags.yml
new file mode 100644
index 00000000..bf85ff5f
--- /dev/null
+++ b/modules/nf-core/gatk4/intervallisttools/tests/tags.yml
@@ -0,0 +1,2 @@
+gatk4/intervallisttools:
+ - "modules/nf-core/gatk4/intervallisttools/**"
diff --git a/modules/nf-core/gatk4/mutect2/tests/f1r2.config b/modules/nf-core/gatk4/mutect2/tests/f1r2.config
new file mode 100644
index 00000000..2d3c8a17
--- /dev/null
+++ b/modules/nf-core/gatk4/mutect2/tests/f1r2.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = { "--normal-sample $meta.normal_id --f1r2-tar-gz ${meta.id}.f1r2.tar.gz" }
+}
diff --git a/modules/nf-core/gatk4/mutect2/tests/main.nf.test b/modules/nf-core/gatk4/mutect2/tests/main.nf.test
new file mode 100644
index 00000000..d247ee35
--- /dev/null
+++ b/modules/nf-core/gatk4/mutect2/tests/main.nf.test
@@ -0,0 +1,360 @@
+nextflow_process {
+
+ name "Test Process GATK4_MUTECT2"
+ script "../main.nf"
+ process "GATK4_MUTECT2"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "gatk4"
+ tag "gatk4/mutect2"
+
+ test("tumor_normal_pair") {
+ config "./pair.config"
+ when {
+ process {
+ """
+ input[0] = [
+ [
+ id:'test',
+ normal_id:'normal',
+ tumor_id:'tumour'
+ ],
+ [
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)
+ ],
+ [
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)
+ ],
+ []
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
+ ]
+ input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
+ input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
+ input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
+ input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats,
+ process.out.f1r2,
+ process.out.versions,
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("tumor_normal_pair_f1r2") {
+ config "./f1r2.config"
+ when {
+ process {
+ """
+ input[0] = [
+ [
+ id:'test',
+ normal_id:'normal',
+ tumor_id:'tumour'
+ ],
+ [
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)
+ ],
+ [
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)
+ ],
+ []
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
+ ]
+ input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
+ input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
+ input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
+ input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats,
+ process.out.f1r2.collect { file(it[1]).getName() },
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+ test("tumor_single"){
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'],
+ [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)],
+ [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)],
+ []
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
+ ]
+ input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
+ input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
+ input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
+ input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats,
+ process.out.f1r2,
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+ test("cram_input"){
+ when {
+ process{
+ """
+ input[0] = [
+ [ id:'test'],
+ [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true)],
+ [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)],
+ []
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
+ ]
+ input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
+ input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
+ input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
+ input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats,
+ process.out.f1r2,
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("generate_pon") {
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'],
+ [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true)],
+ [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)],
+ []
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
+ ]
+ input[4] = []
+ input[5] = []
+ input[6] = []
+ input[7] = []
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats,
+ process.out.f1r2,
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("mitochondria"){
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test'],
+ [ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam'], checkIfExists: true)],
+ [ file(params.test_data['homo_sapiens']['illumina']['mitochon_standin_recalibrated_sorted_bam_bai'], checkIfExists: true)],
+ [ file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)]
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
+ ]
+ input[4] = []
+ input[5] = []
+ input[6] = []
+ input[7] = []
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats,
+ process.out.f1r2,
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("tumor_normal_pair_f1r2_stubs"){
+ options "-stub-run"
+ when {
+ process {
+ """
+ input[0] = [
+ [
+ id:'test',
+ normal_id:'normal',
+ tumor_id:'tumour'
+ ],
+ [
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)
+ ],
+ [
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)
+ ],
+ []
+ ]
+ input[1] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ],
+ file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
+ ]
+ input[4] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)
+ input[5] = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)
+ input[6] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)
+ input[7] = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ {
+ assert snapshot(
+ process.out.vcf.collect { file(it[1]).getName() },
+ process.out.tbi.collect { file(it[1]).getName() },
+ process.out.stats.collect { file(it[1]).getName() },
+ process.out.f1r2.collect { file(it[1]).getName() },
+ process.out.versions.collect { file(it[1]).getName() }
+ ).match()
+ }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/gatk4/mutect2/tests/main.nf.test.snap b/modules/nf-core/gatk4/mutect2/tests/main.nf.test.snap
new file mode 100644
index 00000000..f047af19
--- /dev/null
+++ b/modules/nf-core/gatk4/mutect2/tests/main.nf.test.snap
@@ -0,0 +1,204 @@
+{
+ "tumor_normal_pair_f1r2_stubs": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ "test.vcf.gz.stats"
+ ],
+ [
+ "test.f1r2.tar.gz"
+ ],
+ [
+ "h"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-21T10:14:45.599103891"
+ },
+ "generate_pon": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz.stats:md5,b569ce66bbffe9588b3d221e821023ee"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,d94731c50c20569fe9896235a843f382"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-20T15:57:18.264453766"
+ },
+ "mitochondria": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz.stats:md5,4f77301a125913170b8e9e7828b4ca3f"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,d94731c50c20569fe9896235a843f382"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-20T16:05:47.668766905"
+ },
+ "cram_input": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz.stats:md5,55ed641e16089afb33cdbc478e202d3d"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,d94731c50c20569fe9896235a843f382"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-20T15:52:27.894730554"
+ },
+ "tumor_single": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf.gz.stats:md5,55ed641e16089afb33cdbc478e202d3d"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,d94731c50c20569fe9896235a843f382"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-20T15:43:28.935723443"
+ },
+ "tumor_normal_pair": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ [
+ {
+ "id": "test",
+ "normal_id": "normal",
+ "tumor_id": "tumour"
+ },
+ "test.vcf.gz.stats:md5,17d2091015d04cbd4a26b7a67dc659e6"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,d94731c50c20569fe9896235a843f382"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-20T15:31:31.913366311"
+ },
+ "tumor_normal_pair_f1r2": {
+ "content": [
+ [
+ "test.vcf.gz"
+ ],
+ [
+ "test.vcf.gz.tbi"
+ ],
+ [
+ [
+ {
+ "id": "test",
+ "normal_id": "normal",
+ "tumor_id": "tumour"
+ },
+ "test.vcf.gz.stats:md5,17d2091015d04cbd4a26b7a67dc659e6"
+ ]
+ ],
+ [
+ "test.f1r2.tar.gz"
+ ],
+ [
+ "versions.yml:md5,d94731c50c20569fe9896235a843f382"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-03-21T09:45:52.321385704"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/mutect2/tests/mito.config b/modules/nf-core/gatk4/mutect2/tests/mito.config
new file mode 100644
index 00000000..de61d3e2
--- /dev/null
+++ b/modules/nf-core/gatk4/mutect2/tests/mito.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = { "--mitochondria-mode" }
+}
diff --git a/modules/nf-core/gatk4/mutect2/tests/pair.config b/modules/nf-core/gatk4/mutect2/tests/pair.config
new file mode 100644
index 00000000..2a812b82
--- /dev/null
+++ b/modules/nf-core/gatk4/mutect2/tests/pair.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = { "--normal-sample $meta.normal_id" }
+}
diff --git a/modules/nf-core/gatk4/mutect2/tests/tags.yml b/modules/nf-core/gatk4/mutect2/tests/tags.yml
new file mode 100644
index 00000000..46187927
--- /dev/null
+++ b/modules/nf-core/gatk4/mutect2/tests/tags.yml
@@ -0,0 +1,2 @@
+gatk4/mutect2:
+ - "modules/nf-core/gatk4/mutect2/**"
diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/README.md b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/README.md
new file mode 100644
index 00000000..c6a45456
--- /dev/null
+++ b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/README.md
@@ -0,0 +1,9 @@
+# Conda is not supported at the moment
+
+The [bioconda](https://bioconda.github.io/recipes/gatk4/README.html) recipe is not fully working as expected, cf [github issue](https://github.com/broadinstitute/gatk/issues/7811)
+
+Hence, we are using the docker container provided by the authors of the tool:
+
+- [broadinstitute/gatk](https://hub.docker.com/r/broadinstitute/gatk)
+
+This image is mirrored on the [nf-core quay.io](https://quay.io/repository/nf-core/gatk) for convenience.
diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/gatk4-postprocessgermlinecnvcalls.diff b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/gatk4-postprocessgermlinecnvcalls.diff
deleted file mode 100644
index b922c53d..00000000
--- a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/gatk4-postprocessgermlinecnvcalls.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-Changes in module 'nf-core/gatk4/postprocessgermlinecnvcalls'
---- modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf
-+++ modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf
-@@ -35,7 +35,7 @@
- avail_mem = (task.memory.mega*0.8).intValue()
- }
- """
-- gatk --java-options "-Xmx${avail_mem}g" PostprocessGermlineCNVCalls \\
-+ gatk --java-options "-Xmx${avail_mem}M" PostprocessGermlineCNVCalls \\
- $calls_command \\
- $model_command \\
- $ploidy_command \\
-
-************************************************************
diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf
index 31db78bc..73d4a715 100644
--- a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf
+++ b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf
@@ -37,7 +37,7 @@ process GATK4_POSTPROCESSGERMLINECNVCALLS {
"""
export THEANO_FLAGS="base_compiledir=\$PWD"
- gatk --java-options "-Xmx${avail_mem}g -XX:-UsePerfData" \\
+ gatk --java-options "-Xmx${avail_mem}M -XX:-UsePerfData" \\
PostprocessGermlineCNVCalls \\
$calls_command \\
$model_command \\
diff --git a/modules/nf-core/gatk4/variantfiltration/tests/main.nf.test b/modules/nf-core/gatk4/variantfiltration/tests/main.nf.test
new file mode 100644
index 00000000..36b7438d
--- /dev/null
+++ b/modules/nf-core/gatk4/variantfiltration/tests/main.nf.test
@@ -0,0 +1,87 @@
+nextflow_process {
+
+ name "Test Process GATK4_VARIANTFILTRATION"
+ script "../main.nf"
+ process "GATK4_VARIANTFILTRATION"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "gatk4"
+ tag "gatk4/variantfiltration"
+
+ test("test_gatk4_variantfiltration_vcf_input") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.versions,
+ file(process.out.vcf.get(0).get(1)).name,
+ file(process.out.tbi.get(0).get(1)).name).match() },
+ )
+ }
+
+ }
+
+ test("test_gatk4_variantfiltration_gz_input") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = [
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ input[3] = [
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.versions,
+ file(process.out.vcf.get(0).get(1)).name,
+ file(process.out.tbi.get(0).get(1)).name).match() },
+ )
+ }
+
+ }
+
+}
+
diff --git a/modules/nf-core/gatk4/variantfiltration/tests/main.nf.test.snap b/modules/nf-core/gatk4/variantfiltration/tests/main.nf.test.snap
new file mode 100644
index 00000000..36c03f7c
--- /dev/null
+++ b/modules/nf-core/gatk4/variantfiltration/tests/main.nf.test.snap
@@ -0,0 +1,30 @@
+{
+ "test_gatk4_variantfiltration_gz_input": {
+ "content": [
+ [
+ "versions.yml:md5,96943659275ba62de1f0d283a2f6e97b"
+ ],
+ "test.vcf.gz",
+ "test.vcf.gz.tbi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-05-22T22:43:27.609784"
+ },
+ "test_gatk4_variantfiltration_vcf_input": {
+ "content": [
+ [
+ "versions.yml:md5,96943659275ba62de1f0d283a2f6e97b"
+ ],
+ "test.vcf.gz",
+ "test.vcf.gz.tbi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.2"
+ },
+ "timestamp": "2024-05-22T22:42:55.316294"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/gatk4/variantfiltration/tests/tags.yml b/modules/nf-core/gatk4/variantfiltration/tests/tags.yml
new file mode 100644
index 00000000..4818037d
--- /dev/null
+++ b/modules/nf-core/gatk4/variantfiltration/tests/tags.yml
@@ -0,0 +1,2 @@
+gatk4/variantfiltration:
+ - "modules/nf-core/gatk4/variantfiltration/**"
diff --git a/modules/nf-core/manta/germline/main.nf b/modules/nf-core/manta/germline/main.nf
index 5d5666c6..c1b339a9 100644
--- a/modules/nf-core/manta/germline/main.nf
+++ b/modules/nf-core/manta/germline/main.nf
@@ -66,11 +66,11 @@ process MANTA_GERMLINE {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- touch ${prefix}.candidate_small_indels.vcf.gz
+ echo "" | gzip > ${prefix}.candidate_small_indels.vcf.gz
touch ${prefix}.candidate_small_indels.vcf.gz.tbi
- touch ${prefix}.candidate_sv.vcf.gz
+ echo "" | gzip > ${prefix}.candidate_sv.vcf.gz
touch ${prefix}.candidate_sv.vcf.gz.tbi
- touch ${prefix}.diploid_sv.vcf.gz
+ echo "" | gzip > ${prefix}.diploid_sv.vcf.gz
touch ${prefix}.diploid_sv.vcf.gz.tbi
cat <<-END_VERSIONS > versions.yml
diff --git a/modules/nf-core/manta/germline/tests/main.nf.test b/modules/nf-core/manta/germline/tests/main.nf.test
new file mode 100644
index 00000000..1d49ad23
--- /dev/null
+++ b/modules/nf-core/manta/germline/tests/main.nf.test
@@ -0,0 +1,162 @@
+nextflow_process {
+
+ name "Test Process MANTA_GERMLINE"
+ script "../main.nf"
+ process "MANTA_GERMLINE"
+ config "./nextflow.config"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "manta"
+ tag "manta/germline"
+
+ test("human - cram") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test'], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true),
+ [],[]
+ ]
+ // fasta
+ input[1] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ // fai
+ input[2] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ // config
+ input[3] = Channel.of("[manta]", "enableRemoteReadRetrievalForInsertionsInGermlineCallingModes = 0")
+ .collectFile(name:"manta_options.ini", newLine:true)
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.candidate_small_indels_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.candidate_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.diploid_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert snapshot(process.out.version).match("version") }
+ )
+ }
+
+ }
+
+ test("human - cram - bed") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'bed_test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz.tbi', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ // fai
+ input[2] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ // config
+ input[3] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.candidate_small_indels_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.candidate_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.diploid_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert snapshot(process.out.version).match("bed_version") }
+ )
+ }
+
+ }
+
+ test("human - cram - bed - jointcalling") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'bed_test', single_end:false ], // meta map
+ [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram', checkIfExists: true)
+ ],
+ [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram.crai', checkIfExists: true)
+ ],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed.gz.tbi', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ // fai
+ input[2] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ // config
+ input[3] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.candidate_small_indels_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.candidate_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.diploid_sv_vcf.get(0).get(1)).linesGzip.contains("##fileformat=VCFv4.1") },
+ { assert snapshot(process.out.version).match("joint_version") }
+ )
+ }
+
+ }
+ test("human - cram - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test'], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true),
+ [],[]
+ ]
+ // fasta
+ input[1] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ // fai
+ input[2] = [ [id:'genome'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
+ ]
+ // config
+ input[3] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/manta/germline/tests/main.nf.test.snap b/modules/nf-core/manta/germline/tests/main.nf.test.snap
new file mode 100644
index 00000000..79d5541e
--- /dev/null
+++ b/modules/nf-core/manta/germline/tests/main.nf.test.snap
@@ -0,0 +1,139 @@
+{
+ "human - cram - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_small_indels.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_small_indels.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_sv.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_sv.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "4": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diploid_sv.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "5": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diploid_sv.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "6": [
+ "versions.yml:md5,18070b443a26855ef64dafa179dfba01"
+ ],
+ "candidate_small_indels_vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_small_indels.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "candidate_small_indels_vcf_tbi": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_small_indels.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "candidate_sv_vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_sv.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "candidate_sv_vcf_tbi": [
+ [
+ {
+ "id": "test"
+ },
+ "test.candidate_sv.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diploid_sv_vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diploid_sv.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "diploid_sv_vcf_tbi": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diploid_sv.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,18070b443a26855ef64dafa179dfba01"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-21T17:54:09.788372"
+ },
+ "joint_version": {
+ "content": null,
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-21T15:03:07.745972"
+ },
+ "bed_version": {
+ "content": null,
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-21T13:49:38.745653"
+ },
+ "version": {
+ "content": null,
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-21T13:49:14.885769"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/manta/germline/tests/nextflow.config b/modules/nf-core/manta/germline/tests/nextflow.config
new file mode 100644
index 00000000..22acb242
--- /dev/null
+++ b/modules/nf-core/manta/germline/tests/nextflow.config
@@ -0,0 +1,5 @@
+process {
+ withName: MANTA_GERMLINE {
+ ext.args = '--exome '
+ }
+}
diff --git a/modules/nf-core/manta/germline/tests/tags.yml b/modules/nf-core/manta/germline/tests/tags.yml
new file mode 100644
index 00000000..99d1a73c
--- /dev/null
+++ b/modules/nf-core/manta/germline/tests/tags.yml
@@ -0,0 +1,2 @@
+manta/germline:
+ - "modules/nf-core/manta/germline/**"
diff --git a/modules/nf-core/ngsbits/samplegender/meta.yml b/modules/nf-core/ngsbits/samplegender/meta.yml
index 997bc06e..961462b3 100644
--- a/modules/nf-core/ngsbits/samplegender/meta.yml
+++ b/modules/nf-core/ngsbits/samplegender/meta.yml
@@ -12,7 +12,7 @@ tools:
homepage: "https://github.com/imgag/ngs-bits"
documentation: "https://github.com/imgag/ngs-bits"
tool_dev_url: "https://github.com/imgag/ngs-bits"
- licence: "['MIT license']"
+ licence: ["MIT"]
input:
- meta:
type: map
diff --git a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test
new file mode 100644
index 00000000..2cf4757b
--- /dev/null
+++ b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test
@@ -0,0 +1,47 @@
+nextflow_process {
+
+ name "Test Process NGSBITS_SAMPLEGENDER"
+ script "../main.nf"
+ process "NGSBITS_SAMPLEGENDER"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "ngsbits"
+ tag "ngsbits/samplegender"
+
+ // Only a stub test here because the modules needs the full chrX and chrY
+ test("homo_sapiens - bam, bai, [], [], sry - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
+ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'reference'], // meta map
+ []
+ ]
+ input[2] = [
+ [ id:'reference'], // meta map
+ []
+ ]
+ input[3] = "sry"
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap
new file mode 100644
index 00000000..48fd8af9
--- /dev/null
+++ b/modules/nf-core/ngsbits/samplegender/tests/main.nf.test.snap
@@ -0,0 +1,35 @@
+{
+ "homo_sapiens - bam, bai, [], [], sry - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,72f3e70be3e6a734bf39d1a6bf6d604b"
+ ],
+ "tsv": [
+ [
+ {
+ "id": "test"
+ },
+ "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,72f3e70be3e6a734bf39d1a6bf6d604b"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.02.0"
+ },
+ "timestamp": "2024-03-18T15:36:37.639882564"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/ngsbits/samplegender/tests/tags.yml b/modules/nf-core/ngsbits/samplegender/tests/tags.yml
new file mode 100644
index 00000000..8b7a0da9
--- /dev/null
+++ b/modules/nf-core/ngsbits/samplegender/tests/tags.yml
@@ -0,0 +1,2 @@
+ngsbits/samplegender:
+ - "modules/nf-core/ngsbits/samplegender/**"
diff --git a/modules/nf-core/picard/addorreplacereadgroups/main.nf b/modules/nf-core/picard/addorreplacereadgroups/main.nf
index dc1a387d..4300ba7f 100644
--- a/modules/nf-core/picard/addorreplacereadgroups/main.nf
+++ b/modules/nf-core/picard/addorreplacereadgroups/main.nf
@@ -8,12 +8,15 @@ process PICARD_ADDORREPLACEREADGROUPS {
'biocontainers/picard:3.1.1--hdfd78af_0' }"
input:
- tuple val(meta), path(bam)
+ tuple val(meta), path(reads)
+ tuple val(meta2), path(fasta)
+ tuple val(meta3), path(fasta_index)
output:
- tuple val(meta), path("*.bam"), emit: bam
- tuple val(meta), path("*.bai"), emit: bai, optional: true
- path "versions.yml" , emit: versions
+ tuple val(meta), path("*.bam") , emit: bam, optional: true
+ tuple val(meta), path("*.bai") , emit: bai, optional: true
+ tuple val(meta), path("*.cram"), emit: cram, optional: true
+ path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@@ -21,6 +24,8 @@ process PICARD_ADDORREPLACEREADGROUPS {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
+ def suffix = task.ext.suffix ?: "${reads.getExtension()}"
+ def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : ""
def avail_mem = 3072
if (!task.memory) {
log.info '[Picard AddOrReplaceReadGroups] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@@ -28,15 +33,16 @@ process PICARD_ADDORREPLACEREADGROUPS {
avail_mem = (task.memory.mega*0.8).intValue()
}
- if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
+ if ("$reads" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
"""
picard \\
-Xmx${avail_mem}M \\
AddOrReplaceReadGroups \\
$args \\
- --INPUT ${bam} \\
- --OUTPUT ${prefix}.bam
+ $reference \\
+ --INPUT ${reads} \\
+ --OUTPUT ${prefix}.${suffix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
@@ -46,10 +52,10 @@ process PICARD_ADDORREPLACEREADGROUPS {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
-
- if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
+ def suffix = task.ext.suffix ?: "${reads.getExtension()}"
+ if ("$reads" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
"""
- touch ${prefix}.bam
+ touch ${prefix}.${suffix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/picard/addorreplacereadgroups/meta.yml b/modules/nf-core/picard/addorreplacereadgroups/meta.yml
index ab573ac8..efd5b86d 100644
--- a/modules/nf-core/picard/addorreplacereadgroups/meta.yml
+++ b/modules/nf-core/picard/addorreplacereadgroups/meta.yml
@@ -20,10 +20,28 @@ input:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- - bam:
+ - meta2:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - meta3:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - reads:
type: file
- description: Input BAM file
- pattern: "*.{bam}"
+ description: Sequence reads file, can be SAM/BAM/CRAM format
+ pattern: "*.{bam,cram,sam}"
+ - fasta:
+ type: file
+ description: Reference genome file
+ pattern: "*.{fasta,fa,fasta.gz,fa.gz}"
+ - fasta_index:
+ type: file
+ description: Reference genome index file
+ pattern: "*.{fai,fasta.fai,fa.fai,fasta.gz.fai,fa.gz.fai}"
output:
- meta:
type: map
@@ -40,8 +58,12 @@ output:
pattern: "*.{bam}"
- bai:
type: file
- description: BAM index file
+ description: An optional BAM index file
pattern: "*.{bai}"
+ - cram:
+ type: file
+ description: Output CRAM file
+ pattern: "*.{cram}"
authors:
- "@sateeshperi"
- "@mjcipriano"
diff --git a/modules/nf-core/picard/addorreplacereadgroups/tests/bam.config b/modules/nf-core/picard/addorreplacereadgroups/tests/bam.config
new file mode 100644
index 00000000..3f37c2fd
--- /dev/null
+++ b/modules/nf-core/picard/addorreplacereadgroups/tests/bam.config
@@ -0,0 +1,13 @@
+process {
+ withName: 'PICARD_ADDORREPLACEREADGROUPS'{
+ ext.prefix = { "${meta.id}.replaced"}
+ ext.args = {[
+ "--CREATE_INDEX",
+ "-LB ${meta.id}",
+ "-PL ILLUMINA",
+ "-PU bc1",
+ "-SM ${meta.id}"
+ ].join(' ').trim()}
+ }
+
+}
diff --git a/modules/nf-core/picard/addorreplacereadgroups/tests/cram.config b/modules/nf-core/picard/addorreplacereadgroups/tests/cram.config
new file mode 100644
index 00000000..966c14d7
--- /dev/null
+++ b/modules/nf-core/picard/addorreplacereadgroups/tests/cram.config
@@ -0,0 +1,13 @@
+process {
+ withName: 'PICARD_ADDORREPLACEREADGROUPS'{
+ ext.prefix = { "${meta.id}.replaced"}
+ ext.args = {[
+ "-LB ${meta.id}",
+ "-PL ILLUMINA",
+ "-PU bc1",
+ "-SM ${meta.id}"
+ ].join(' ').trim()}
+ ext.suffix = { "cram" }
+ }
+
+}
diff --git a/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test b/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test
new file mode 100644
index 00000000..9c029354
--- /dev/null
+++ b/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test
@@ -0,0 +1,93 @@
+
+nextflow_process {
+
+ name "Test Process PICARD_ADDORREPLACEREADGROUPS"
+ script "../main.nf"
+ process "PICARD_ADDORREPLACEREADGROUPS"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "picard"
+ tag "picard/addorreplacereadgroups"
+
+ test("sarscov2 - bam") {
+ config "./bam.config"
+
+ when {
+ process {
+ """
+ input[0] = [ [:], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) ]
+ input[1] = [ [:], [] ]
+ input[2] = [ [:], [] ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.bam[0][1]).name,
+ file(process.out.bai[0][1]).name,
+ process.out.versions
+ ).match()
+ },
+ )
+ }
+
+ }
+
+ test("homo_sapiens - cram") {
+ config "./cram.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), ]
+ ]
+ input[1] = [ [:], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ]
+ input[2] = [ [:], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.cram[0][1]).name,
+ process.out.versions
+ ).match()
+ },
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam - stub") {
+ config "./bam.config"
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [:], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) ]
+ input[1] = [ [:], [] ]
+ input[2] = [ [:], [] ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap b/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap
new file mode 100644
index 00000000..63a55843
--- /dev/null
+++ b/modules/nf-core/picard/addorreplacereadgroups/tests/main.nf.test.snap
@@ -0,0 +1,74 @@
+{
+ "homo_sapiens - cram": {
+ "content": [
+ "test.replaced.cram",
+ [
+ "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-21T12:05:47.668865"
+ },
+ "sarscov2 - bam - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+
+ },
+ "null.replaced.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891"
+ ],
+ "bai": [
+
+ ],
+ "bam": [
+ [
+ {
+
+ },
+ "null.replaced.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "cram": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-21T10:51:24.530553"
+ },
+ "sarscov2 - bam": {
+ "content": [
+ "null.replaced.bam",
+ "null.replaced.bai",
+ [
+ "versions.yml:md5,0a6f049f94501dcf23aabfbc0e272891"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-21T12:05:29.696728"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/picard/addorreplacereadgroups/tests/tags.yml b/modules/nf-core/picard/addorreplacereadgroups/tests/tags.yml
new file mode 100644
index 00000000..733010d6
--- /dev/null
+++ b/modules/nf-core/picard/addorreplacereadgroups/tests/tags.yml
@@ -0,0 +1,2 @@
+picard/addorreplacereadgroups:
+ - "modules/nf-core/picard/addorreplacereadgroups/**"
diff --git a/modules/nf-core/picard/markduplicates/main.nf b/modules/nf-core/picard/markduplicates/main.nf
index 80930cc4..ad0b2963 100644
--- a/modules/nf-core/picard/markduplicates/main.nf
+++ b/modules/nf-core/picard/markduplicates/main.nf
@@ -8,13 +8,14 @@ process PICARD_MARKDUPLICATES {
'biocontainers/picard:3.1.1--hdfd78af_0' }"
input:
- tuple val(meta), path(bam)
+ tuple val(meta), path(reads)
tuple val(meta2), path(fasta)
tuple val(meta3), path(fai)
output:
- tuple val(meta), path("*.bam") , emit: bam
- tuple val(meta), path("*.bai") , optional:true, emit: bai
+ tuple val(meta), path("*.bam") , emit: bam, optional: true
+ tuple val(meta), path("*.bai") , emit: bai, optional: true
+ tuple val(meta), path("*.cram"), emit: cram, optional: true
tuple val(meta), path("*.metrics.txt"), emit: metrics
path "versions.yml" , emit: versions
@@ -24,6 +25,8 @@ process PICARD_MARKDUPLICATES {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
+ def suffix = task.ext.suffix ?: "${reads.getExtension()}"
+ def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : ""
def avail_mem = 3072
if (!task.memory) {
log.info '[Picard MarkDuplicates] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@@ -31,16 +34,16 @@ process PICARD_MARKDUPLICATES {
avail_mem = (task.memory.mega*0.8).intValue()
}
- if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
+ if ("$reads" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
"""
picard \\
-Xmx${avail_mem}M \\
MarkDuplicates \\
$args \\
- --INPUT $bam \\
- --OUTPUT ${prefix}.bam \\
- --REFERENCE_SEQUENCE $fasta \\
+ --INPUT $reads \\
+ --OUTPUT ${prefix}.${suffix} \\
+ $reference \\
--METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt
cat <<-END_VERSIONS > versions.yml
@@ -51,10 +54,10 @@ process PICARD_MARKDUPLICATES {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
- if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
+ def suffix = task.ext.suffix ?: "${reads.getExtension()}"
+ if ("$reads" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
"""
- touch ${prefix}.bam
- touch ${prefix}.bam.bai
+ touch ${prefix}.${suffix}
touch ${prefix}.MarkDuplicates.metrics.txt
cat <<-END_VERSIONS > versions.yml
diff --git a/modules/nf-core/picard/markduplicates/meta.yml b/modules/nf-core/picard/markduplicates/meta.yml
index 1ab90c07..1f0ffe16 100644
--- a/modules/nf-core/picard/markduplicates/meta.yml
+++ b/modules/nf-core/picard/markduplicates/meta.yml
@@ -21,9 +21,9 @@ input:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- - bam:
+ - reads:
type: file
- description: BAM file
+ description: Sequence reads file, can be SAM/BAM/CRAM format
pattern: "*.{bam,cram,sam}"
- meta2:
type: map
@@ -32,7 +32,7 @@ input:
e.g. [ id:'genome' ]
- fasta:
type: file
- description: Reference genome fasta file
+ description: Reference genome fasta file, required for CRAM input
pattern: "*.{fasta,fa}"
- meta3:
type: map
@@ -57,6 +57,10 @@ output:
type: file
description: An optional BAM index file. If desired, --CREATE_INDEX must be passed as a flag
pattern: "*.{bai}"
+ - cram:
+ type: file
+ description: Output CRAM file
+ pattern: "*.{cram}"
- metrics:
type: file
description: Duplicate metrics file generated by picard
diff --git a/modules/nf-core/picard/markduplicates/tests/main.nf.test b/modules/nf-core/picard/markduplicates/tests/main.nf.test
index c5a29b4b..e3e97f6c 100644
--- a/modules/nf-core/picard/markduplicates/tests/main.nf.test
+++ b/modules/nf-core/picard/markduplicates/tests/main.nf.test
@@ -18,14 +18,8 @@ nextflow_process {
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
])
- input[1] = Channel.of([
- [ id:'genome' ],
- file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
- ])
- input[2] = Channel.of([
- [ id:'genome' ],
- file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
- ])
+ input[1] = [ [:], [] ]
+ input[2] = [ [:], [] ]
"""
}
}
@@ -49,14 +43,8 @@ nextflow_process {
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true)
])
- input[1] = Channel.of([
- [ id:'genome' ],
- file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
- ])
- input[2] = Channel.of([
- [ id:'genome' ],
- file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
- ])
+ input[1] = [ [:], [] ]
+ input[2] = [ [:], [] ]
"""
}
}
@@ -95,7 +83,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert snapshot(file(process.out.bam[0][1]).name).match("cram_name") },
+ { assert snapshot(file(process.out.cram[0][1]).name).match("cram_name") },
{ assert snapshot(path(process.out.metrics.get(0).get(1)).readLines()[0..2]).match("cram_metrics") },
{ assert snapshot(process.out.versions).match("cram_versions") }
)
diff --git a/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap b/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap
index 31c9130d..eb17111e 100644
--- a/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap
+++ b/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap
@@ -5,39 +5,59 @@
"versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17"
]
],
- "timestamp": "2024-01-19T10:26:45.092349"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T15:31:50.928021"
},
"unsorted_bam_name": {
"content": [
"test.marked.bam"
],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
"timestamp": "2024-01-19T10:26:28.100755"
},
"cram_metrics": {
"content": [
[
"## htsjdk.samtools.metrics.StringHeader",
- "# MarkDuplicates --INPUT test.paired_end.sorted.cram --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false",
+ "# MarkDuplicates --INPUT test.paired_end.sorted.cram --OUTPUT test.marked.cram --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false",
"## htsjdk.samtools.metrics.StringHeader"
]
],
- "timestamp": "2024-01-19T10:27:03.253071"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T15:25:47.518152"
},
"sorted_bam_metrics": {
"content": [
[
"## htsjdk.samtools.metrics.StringHeader",
- "# MarkDuplicates --INPUT test.paired_end.sorted.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false",
+ "# MarkDuplicates --INPUT test.paired_end.sorted.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false",
"## htsjdk.samtools.metrics.StringHeader"
]
],
- "timestamp": "2024-01-19T10:26:45.086503"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-21T11:39:10.318331"
},
"cram_name": {
"content": [
- "test.marked.bam"
+ "test.marked.cram"
],
- "timestamp": "2024-01-19T10:27:03.241617"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T15:25:47.459663"
},
"cram_versions": {
"content": [
@@ -45,6 +65,10 @@
"versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17"
]
],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
"timestamp": "2024-01-19T10:27:03.26989"
},
"unsorted_bam_versions": {
@@ -53,22 +77,34 @@
"versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17"
]
],
- "timestamp": "2024-01-19T10:26:28.159071"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-20T15:31:24.040403"
},
"unsorted_bam_metrics": {
"content": [
[
"## htsjdk.samtools.metrics.StringHeader",
- "# MarkDuplicates --INPUT test.paired_end.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false",
+ "# MarkDuplicates --INPUT test.paired_end.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false",
"## htsjdk.samtools.metrics.StringHeader"
]
],
- "timestamp": "2024-01-19T10:26:28.143979"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-21T10:51:12.831787"
},
"sorted_bam_name": {
"content": [
"test.marked.bam"
],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
"timestamp": "2024-01-19T10:26:45.080116"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml
index 3e95dd71..9c24eb0a 100644
--- a/modules/nf-core/samtools/faidx/environment.yml
+++ b/modules/nf-core/samtools/faidx/environment.yml
@@ -1,8 +1,10 @@
name: samtools_faidx
+
channels:
- conda-forge
- bioconda
- defaults
+
dependencies:
- - bioconda::samtools=1.19.2
- bioconda::htslib=1.19.1
+ - bioconda::samtools=1.19.2
diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml
index e189af28..f3c25de2 100644
--- a/modules/nf-core/samtools/faidx/meta.yml
+++ b/modules/nf-core/samtools/faidx/meta.yml
@@ -39,6 +39,10 @@ output:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
+ - fa:
+ type: file
+ description: FASTA file
+ pattern: "*.{fa}"
- fai:
type: file
description: FASTA index file
diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test b/modules/nf-core/samtools/faidx/tests/main.nf.test
new file mode 100644
index 00000000..17244ef2
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/tests/main.nf.test
@@ -0,0 +1,122 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_FAIDX"
+ script "../main.nf"
+ process "SAMTOOLS_FAIDX"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/faidx"
+
+ test("test_samtools_faidx") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]
+
+ input[1] = [[],[]]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("test_samtools_faidx_bgzip") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true)]
+
+ input[1] = [[],[]]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("test_samtools_faidx_fasta") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]
+
+ input[1] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("test_samtools_faidx_stub_fasta") {
+
+ config "./nextflow2.config"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]
+
+ input[1] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("test_samtools_faidx_stub_fai") {
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]
+
+ input[1] = [[],[]]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/faidx/tests/main.nf.test.snap b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap
new file mode 100644
index 00000000..3e651ef6
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/tests/main.nf.test.snap
@@ -0,0 +1,249 @@
+{
+ "test_samtools_faidx": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ],
+ "fa": [
+
+ ],
+ "fai": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-18T16:22:39.412601"
+ },
+ "test_samtools_faidx_bgzip": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ],
+ "fa": [
+
+ ],
+ "fai": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.gz.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "gzi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.gz.gzi:md5,7dea362b3fac8e00956a4952a3d4f474"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-18T16:23:22.427966"
+ },
+ "test_samtools_faidx_fasta": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ],
+ "fa": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36"
+ ]
+ ],
+ "fai": [
+
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-18T16:24:04.107537"
+ },
+ "test_samtools_faidx_stub_fasta": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ],
+ "fa": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "fai": [
+
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-18T16:24:45.868463"
+ },
+ "test_samtools_faidx_stub_fai": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ],
+ "fa": [
+
+ ],
+ "fai": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,4870fc0a88c616aa937f8325a2db0c3c"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-18T16:25:27.550554"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/faidx/tests/nextflow.config b/modules/nf-core/samtools/faidx/tests/nextflow.config
new file mode 100644
index 00000000..f76a3ba0
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/tests/nextflow.config
@@ -0,0 +1,7 @@
+process {
+
+ withName: SAMTOOLS_FAIDX {
+ ext.args = 'MT192765.1 -o extract.fa'
+ }
+
+}
diff --git a/modules/nf-core/samtools/faidx/tests/nextflow2.config b/modules/nf-core/samtools/faidx/tests/nextflow2.config
new file mode 100644
index 00000000..33ebbd5d
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/tests/nextflow2.config
@@ -0,0 +1,6 @@
+process {
+
+ withName: SAMTOOLS_FAIDX {
+ ext.args = '-o extract.fa'
+ }
+}
diff --git a/modules/nf-core/samtools/faidx/tests/tags.yml b/modules/nf-core/samtools/faidx/tests/tags.yml
new file mode 100644
index 00000000..e4a83948
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/tests/tags.yml
@@ -0,0 +1,2 @@
+samtools/faidx:
+ - modules/nf-core/samtools/faidx/**
diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf
index cdd8305d..fc374f98 100644
--- a/modules/nf-core/samtools/sort/main.nf
+++ b/modules/nf-core/samtools/sort/main.nf
@@ -8,11 +8,14 @@ process SAMTOOLS_SORT {
'biocontainers/samtools:1.19.2--h50ea8bc_0' }"
input:
- tuple val(meta), path(bam)
+ tuple val(meta) , path(bam)
+ tuple val(meta2), path(fasta)
output:
- tuple val(meta), path("*.bam"), emit: bam
- tuple val(meta), path("*.csi"), emit: csi, optional: true
+ tuple val(meta), path("*.bam"), emit: bam, optional: true
+ tuple val(meta), path("*.cram"), emit: cram, optional: true
+ tuple val(meta), path("*.crai"), emit: crai, optional: true
+ tuple val(meta), path("*.csi"), emit: csi, optional: true
path "versions.yml" , emit: versions
when:
@@ -21,14 +24,24 @@ process SAMTOOLS_SORT {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
+ def extension = args.contains("--output-fmt sam") ? "sam" :
+ args.contains("--output-fmt cram") ? "cram" :
+ "bam"
+ def reference = fasta ? "--reference ${fasta}" : ""
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
+
"""
+ samtools cat \\
+ --threads $task.cpus \\
+ ${bam} \\
+ | \\
samtools sort \\
$args \\
- -@ $task.cpus \\
- -o ${prefix}.bam \\
- -T $prefix \\
- $bam
+ -T ${prefix} \\
+ --threads $task.cpus \\
+ ${reference} \\
+ -o ${prefix}.${extension} \\
+ -
cat <<-END_VERSIONS > versions.yml
"${task.process}":
@@ -40,6 +53,7 @@ process SAMTOOLS_SORT {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam
+ touch ${prefix}.bam.csi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml
index 2200de72..341a7d0e 100644
--- a/modules/nf-core/samtools/sort/meta.yml
+++ b/modules/nf-core/samtools/sort/meta.yml
@@ -23,8 +23,18 @@ input:
e.g. [ id:'test', single_end:false ]
- bam:
type: file
- description: BAM/CRAM/SAM file
+ description: BAM/CRAM/SAM file(s)
pattern: "*.{bam,cram,sam}"
+ - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fasta:
+ type: file
+ description: Reference genome FASTA file
+ pattern: "*.{fa,fasta,fna}"
+ optional: true
output:
- meta:
type: map
@@ -33,19 +43,29 @@ output:
e.g. [ id:'test', single_end:false ]
- bam:
type: file
- description: Sorted BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
- - versions:
+ description: Sorted BAM file
+ pattern: "*.{bam}"
+ - cram:
type: file
- description: File containing software versions
- pattern: "versions.yml"
+ description: Sorted CRAM file
+ pattern: "*.{cram}"
+ - crai:
+ type: file
+ description: CRAM index file (optional)
+ pattern: "*.crai"
- csi:
type: file
description: BAM index file (optional)
pattern: "*.csi"
+ - versions:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@drpatelh"
- "@ewels"
+ - "@matthdsm"
maintainers:
- "@drpatelh"
- "@ewels"
+ - "@matthdsm"
diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test b/modules/nf-core/samtools/sort/tests/main.nf.test
index 31e24b88..8360e2b1 100644
--- a/modules/nf-core/samtools/sort/tests/main.nf.test
+++ b/modules/nf-core/samtools/sort/tests/main.nf.test
@@ -13,15 +13,43 @@ nextflow_process {
config "./nextflow.config"
when {
- params {
- outdir = "$outputDir"
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
+ ])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ])
+ """
}
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("cram") {
+
+ config "./nextflow.config"
+
+ when {
process {
"""
input[0] = Channel.of([
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ])
"""
}
}
@@ -37,7 +65,7 @@ nextflow_process {
test("bam_stub") {
config "./nextflow.config"
- options "-stub-run"
+ options "-stub"
when {
params {
@@ -49,6 +77,10 @@ nextflow_process {
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ])
"""
}
}
diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test.snap b/modules/nf-core/samtools/sort/tests/main.nf.test.snap
index a7cf0210..38477656 100644
--- a/modules/nf-core/samtools/sort/tests/main.nf.test.snap
+++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap
@@ -1,4 +1,69 @@
{
+ "cram": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23"
+ ]
+ ],
+ "crai": [
+
+ ],
+ "cram": [
+
+ ],
+ "csi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-03-04T15:08:00.830294"
+ },
"bam_stub_bam": {
"content": [
"test.sorted.bam"
@@ -30,13 +95,25 @@
"id": "test",
"single_end": false
},
- "test.sorted.bam:md5,c6ea1346ec4aae007eb40b708935088c"
+ "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23"
]
],
"1": [
],
"2": [
+
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831"
+ ]
+ ],
+ "4": [
"versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca"
],
"bam": [
@@ -45,11 +122,23 @@
"id": "test",
"single_end": false
},
- "test.sorted.bam:md5,c6ea1346ec4aae007eb40b708935088c"
+ "test.sorted.bam:md5,bc0b7c25da26384a006ed84cc9e4da23"
]
],
- "csi": [
+ "crai": [
+
+ ],
+ "cram": [
+ ],
+ "csi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,8d4e836c2fed6c0bf874d5e8cdba5831"
+ ]
],
"versions": [
"versions.yml:md5,e6d43fefc9a8bff91c2ce6e3a1716eca"
@@ -58,8 +147,8 @@
],
"meta": {
"nf-test": "0.8.4",
- "nextflow": "24.01.0"
+ "nextflow": "23.10.1"
},
- "timestamp": "2024-02-13T16:14:52.736359271"
+ "timestamp": "2024-03-04T15:07:48.773803"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/sort/tests/nextflow.config b/modules/nf-core/samtools/sort/tests/nextflow.config
index d0f35086..f642771f 100644
--- a/modules/nf-core/samtools/sort/tests/nextflow.config
+++ b/modules/nf-core/samtools/sort/tests/nextflow.config
@@ -1,7 +1,8 @@
process {
withName: SAMTOOLS_SORT {
- ext.prefix = { "${meta.id}.sorted" }
+ ext.prefix = { "${meta.id}.sorted" }
+ ext.args = "--write-index"
}
}
diff --git a/modules/nf-core/sentieon/bwaindex/environment.yml b/modules/nf-core/sentieon/bwaindex/environment.yml
index ce0a85e4..c806ed0e 100644
--- a/modules/nf-core/sentieon/bwaindex/environment.yml
+++ b/modules/nf-core/sentieon/bwaindex/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/bwaindex/main.nf b/modules/nf-core/sentieon/bwaindex/main.nf
index e36dcc34..f5e8b582 100644
--- a/modules/nf-core/sentieon/bwaindex/main.nf
+++ b/modules/nf-core/sentieon/bwaindex/main.nf
@@ -5,8 +5,8 @@ process SENTIEON_BWAINDEX {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(fasta)
diff --git a/modules/nf-core/sentieon/bwamem/environment.yml b/modules/nf-core/sentieon/bwamem/environment.yml
index c090bfa5..f03db6f8 100644
--- a/modules/nf-core/sentieon/bwamem/environment.yml
+++ b/modules/nf-core/sentieon/bwamem/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf
index 230297d0..62693851 100644
--- a/modules/nf-core/sentieon/bwamem/main.nf
+++ b/modules/nf-core/sentieon/bwamem/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_BWAMEM {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(reads)
diff --git a/modules/nf-core/sentieon/datametrics/environment.yml b/modules/nf-core/sentieon/datametrics/environment.yml
index df094207..b5ea91f6 100644
--- a/modules/nf-core/sentieon/datametrics/environment.yml
+++ b/modules/nf-core/sentieon/datametrics/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/datametrics/main.nf b/modules/nf-core/sentieon/datametrics/main.nf
index d1678187..bc55d275 100644
--- a/modules/nf-core/sentieon/datametrics/main.nf
+++ b/modules/nf-core/sentieon/datametrics/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_DATAMETRICS {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(bam), path(bai)
diff --git a/modules/nf-core/sentieon/dedup/environment.yml b/modules/nf-core/sentieon/dedup/environment.yml
index 622cf739..e29cfff3 100644
--- a/modules/nf-core/sentieon/dedup/environment.yml
+++ b/modules/nf-core/sentieon/dedup/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf
index fbcd595f..5f19ab56 100644
--- a/modules/nf-core/sentieon/dedup/main.nf
+++ b/modules/nf-core/sentieon/dedup/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_DEDUP {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(bam), path(bai)
diff --git a/modules/nf-core/sentieon/dnamodelapply/environment.yml b/modules/nf-core/sentieon/dnamodelapply/environment.yml
index 6d27d44a..a2f88193 100644
--- a/modules/nf-core/sentieon/dnamodelapply/environment.yml
+++ b/modules/nf-core/sentieon/dnamodelapply/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/dnamodelapply/main.nf b/modules/nf-core/sentieon/dnamodelapply/main.nf
index b728a5ec..9a0c70dc 100644
--- a/modules/nf-core/sentieon/dnamodelapply/main.nf
+++ b/modules/nf-core/sentieon/dnamodelapply/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_DNAMODELAPPLY {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(vcf), path(idx)
diff --git a/modules/nf-core/sentieon/dnascope/environment.yml b/modules/nf-core/sentieon/dnascope/environment.yml
index 45c2116c..e6da2dde 100644
--- a/modules/nf-core/sentieon/dnascope/environment.yml
+++ b/modules/nf-core/sentieon/dnascope/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/dnascope/main.nf b/modules/nf-core/sentieon/dnascope/main.nf
index 6adea35e..0671307b 100644
--- a/modules/nf-core/sentieon/dnascope/main.nf
+++ b/modules/nf-core/sentieon/dnascope/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_DNASCOPE {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(bam), path(bai), path(intervals)
diff --git a/modules/nf-core/sentieon/readwriter/environment.yml b/modules/nf-core/sentieon/readwriter/environment.yml
index 67dd1505..423de42d 100644
--- a/modules/nf-core/sentieon/readwriter/environment.yml
+++ b/modules/nf-core/sentieon/readwriter/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/readwriter/main.nf b/modules/nf-core/sentieon/readwriter/main.nf
index 0bace538..c12ca2f9 100644
--- a/modules/nf-core/sentieon/readwriter/main.nf
+++ b/modules/nf-core/sentieon/readwriter/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_READWRITER {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(input), path(index)
diff --git a/modules/nf-core/sentieon/wgsmetrics/environment.yml b/modules/nf-core/sentieon/wgsmetrics/environment.yml
index 24878e29..a33a3fcc 100644
--- a/modules/nf-core/sentieon/wgsmetrics/environment.yml
+++ b/modules/nf-core/sentieon/wgsmetrics/environment.yml
@@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- - bioconda::sentieon=202308.01
+ - bioconda::sentieon=202308.02
diff --git a/modules/nf-core/sentieon/wgsmetrics/main.nf b/modules/nf-core/sentieon/wgsmetrics/main.nf
index a028e4a1..811c0077 100644
--- a/modules/nf-core/sentieon/wgsmetrics/main.nf
+++ b/modules/nf-core/sentieon/wgsmetrics/main.nf
@@ -7,8 +7,8 @@ process SENTIEON_WGSMETRICS {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/sentieon:202308.01--h43eeafb_0' :
- 'biocontainers/sentieon:202308.01--h43eeafb_0' }"
+ 'https://depot.galaxyproject.org/singularity/sentieon:202308.02--h43eeafb_0' :
+ 'biocontainers/sentieon:202308.02--h43eeafb_0' }"
input:
tuple val(meta), path(bam), path(bai)
diff --git a/modules/nf-core/tiddit/sv/main.nf b/modules/nf-core/tiddit/sv/main.nf
index 0f4bc7cb..f350e314 100644
--- a/modules/nf-core/tiddit/sv/main.nf
+++ b/modules/nf-core/tiddit/sv/main.nf
@@ -31,6 +31,7 @@ process TIDDIT_SV {
tiddit \\
--sv \\
$args \\
+ --threads $task.cpus \\
--bam $input \\
--ref $fasta \\
-o $prefix
diff --git a/modules/nf-core/tiddit/sv/meta.yml b/modules/nf-core/tiddit/sv/meta.yml
index b13ae5cd..bfcbc4e3 100644
--- a/modules/nf-core/tiddit/sv/meta.yml
+++ b/modules/nf-core/tiddit/sv/meta.yml
@@ -21,14 +21,24 @@ input:
type: file
description: BAM/CRAM file
pattern: "*.{bam,cram}"
- - index:
+ - input_index:
type: file
description: BAM/CRAM index file
pattern: "*.{bai,crai}"
+ - meta2:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. `[ id:'test_fasta']`
- fasta:
type: file
description: Input FASTA file
pattern: "*.{fasta,fa}"
+ - meta3:
+ type: map
+ description: |
+ Groovy Map containing sample information from bwa index
+ e.g. `[ id:'test_bwa-index' ]`
- bwa_index:
type: file
description: BWA genome index files
diff --git a/modules/nf-core/tiddit/sv/tests/main.nf.test b/modules/nf-core/tiddit/sv/tests/main.nf.test
new file mode 100644
index 00000000..6e32b9e1
--- /dev/null
+++ b/modules/nf-core/tiddit/sv/tests/main.nf.test
@@ -0,0 +1,193 @@
+nextflow_process {
+
+ name "Test Process TIDDIT_SV"
+ script "../main.nf"
+ process "TIDDIT_SV"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "tiddit"
+ tag "tiddit/sv"
+ tag "bwa/index"
+
+ test("sarscov2 - bam - bwa") {
+
+ setup {
+
+ run("BWA_INDEX") {
+ script "../../../../nf-core/bwa/index/main.nf"
+ process {
+ """
+ input[0] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ // bwa_index
+ input[2] = BWA_INDEX.out.index
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.vcf.get(0).get(1)).readLines().contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.ploidy.get(0).get(1)).readLines().contains("Chromosome Ploidy Ploidy_rounded Mean_coverage") },
+ { assert snapshot(process.out.versions).match("bam_bwa_version") }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam - no_bwa") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ // bwa_index
+ input[2] = [ [], [] ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.vcf.get(0).get(1)).readLines().contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.ploidy.get(0).get(1)).readLines().contains("Chromosome Ploidy Ploidy_rounded Mean_coverage") },
+ { assert snapshot(process.out.versions).match("bam_version") }
+ )
+ }
+
+ }
+
+ test("human - cram - bwa") {
+
+ setup {
+
+ run("BWA_INDEX") {
+ script "../../../../nf-core/bwa/index/main.nf"
+ process {
+ """
+ input[0] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ """
+ }
+ }
+ }
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ // bwa_index
+ input[2] = BWA_INDEX.out.index
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.vcf.get(0).get(1)).readLines().contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.ploidy.get(0).get(1)).readLines().contains("Chromosome Ploidy Ploidy_rounded Mean_coverage") },
+ { assert snapshot(process.out.versions).match("cram_bwa_version") })
+ }
+
+ }
+
+ test("human - cram - no_bwa") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ]
+ // bwa_index
+ input[2] = [ [], [] ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert path(process.out.vcf.get(0).get(1)).readLines().contains("##fileformat=VCFv4.1") },
+ { assert path(process.out.ploidy.get(0).get(1)).readLines().contains("Chromosome Ploidy Ploidy_rounded Mean_coverage") },
+ { assert snapshot(process.out.versions).match("cram_version") })
+ }
+
+ }
+
+ test("sarscov2 - bam - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
+ ]
+ // fasta
+ input[1] = [ [id: 'test'],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ // bwa_index
+ input[2] = [ [], [] ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/tiddit/sv/tests/main.nf.test.snap b/modules/nf-core/tiddit/sv/tests/main.nf.test.snap
new file mode 100644
index 00000000..541c48bb
--- /dev/null
+++ b/modules/nf-core/tiddit/sv/tests/main.nf.test.snap
@@ -0,0 +1,99 @@
+{
+ "cram_bwa_version": {
+ "content": [
+ [
+ "versions.yml:md5,0ffcce416e40bcc98da2243f1d7e348a"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T10:33:01.300519"
+ },
+ "cram_version": {
+ "content": [
+ [
+ "versions.yml:md5,0ffcce416e40bcc98da2243f1d7e348a"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T10:27:12.52902"
+ },
+ "sarscov2 - bam - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ploidies.tab:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ "versions.yml:md5,0ffcce416e40bcc98da2243f1d7e348a"
+ ],
+ "ploidy": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ploidies.tab:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,0ffcce416e40bcc98da2243f1d7e348a"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T10:21:51.950503"
+ },
+ "bam_bwa_version": {
+ "content": [
+ [
+ "versions.yml:md5,0ffcce416e40bcc98da2243f1d7e348a"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T10:31:40.918479"
+ },
+ "bam_version": {
+ "content": [
+ [
+ "versions.yml:md5,0ffcce416e40bcc98da2243f1d7e348a"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T10:21:38.449053"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/tiddit/sv/tests/nextflow.config b/modules/nf-core/tiddit/sv/tests/nextflow.config
new file mode 100644
index 00000000..9bbd0bee
--- /dev/null
+++ b/modules/nf-core/tiddit/sv/tests/nextflow.config
@@ -0,0 +1,5 @@
+process {
+ withName: 'TIDDIT_SV' {
+ ext.args = '--skip_assembly'
+ }
+}
diff --git a/modules/nf-core/tiddit/sv/tests/tags.yml b/modules/nf-core/tiddit/sv/tests/tags.yml
new file mode 100644
index 00000000..aac5351e
--- /dev/null
+++ b/modules/nf-core/tiddit/sv/tests/tags.yml
@@ -0,0 +1,2 @@
+tiddit/sv:
+ - "modules/nf-core/tiddit/sv/**"
diff --git a/nextflow.config b/nextflow.config
index 2df0fde4..928d3a8c 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -22,7 +22,9 @@ params {
// Main options
analysis_type = 'wgs'
+ bwa_as_fallback = false
bait_padding = 100
+ run_mt_for_wes = false
run_rtgvcfeval = false
save_mapped_as_cram = false
skip_eklipse = false
@@ -32,6 +34,7 @@ params {
skip_germlinecnvcaller = false
skip_haplocheck = false
skip_peddy = false
+ skip_me_calling = false
skip_me_annotation = false
skip_mt_annotation = false
skip_qualimap = false
@@ -77,15 +80,16 @@ params {
multiqc_methods_description = null
// Boilerplate options
- outdir = 'results'
- publish_dir_mode = 'copy'
- email = null
- email_on_fail = null
- plaintext_email = false
- monochrome_logs = false
- hook_url = null
- help = false
- version = false
+ outdir = null
+ publish_dir_mode = 'copy'
+ email = null
+ email_on_fail = null
+ plaintext_email = false
+ monochrome_logs = false
+ hook_url = null
+ help = false
+ version = false
+ pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'
// Config options
config_profile_name = null
@@ -128,95 +132,102 @@ try {
}
profiles {
debug {
- dumpHashes = true
- process.beforeScript = 'echo $HOSTNAME'
- cleanup = false
+ dumpHashes = true
+ process.beforeScript = 'echo $HOSTNAME'
+ cleanup = false
nextflow.enable.configProcessNamesValidation = true
}
conda {
- conda.enabled = true
- docker.enabled = false
- singularity.enabled = false
- podman.enabled = false
- shifter.enabled = false
- charliecloud.enabled = false
- channels = ['conda-forge', 'bioconda', 'defaults']
- apptainer.enabled = false
+ conda.enabled = true
+ docker.enabled = false
+ singularity.enabled = false
+ podman.enabled = false
+ shifter.enabled = false
+ charliecloud.enabled = false
+ conda.channels = ['conda-forge', 'bioconda', 'defaults']
+ apptainer.enabled = false
}
mamba {
- conda.enabled = true
- conda.useMamba = true
- docker.enabled = false
- singularity.enabled = false
- podman.enabled = false
- shifter.enabled = false
- charliecloud.enabled = false
- apptainer.enabled = false
+ conda.enabled = true
+ conda.useMamba = true
+ docker.enabled = false
+ singularity.enabled = false
+ podman.enabled = false
+ shifter.enabled = false
+ charliecloud.enabled = false
+ apptainer.enabled = false
}
docker {
- docker.enabled = true
- conda.enabled = false
- singularity.enabled = false
- podman.enabled = false
- shifter.enabled = false
- charliecloud.enabled = false
- apptainer.enabled = false
- docker.runOptions = '-u $(id -u):$(id -g)'
+ docker.enabled = true
+ conda.enabled = false
+ singularity.enabled = false
+ podman.enabled = false
+ shifter.enabled = false
+ charliecloud.enabled = false
+ apptainer.enabled = false
+ docker.runOptions = '-u $(id -u):$(id -g)'
}
arm {
- docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64'
+ docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64'
}
singularity {
- singularity.enabled = true
- singularity.autoMounts = true
- conda.enabled = false
- docker.enabled = false
- podman.enabled = false
- shifter.enabled = false
- charliecloud.enabled = false
- apptainer.enabled = false
+ singularity.enabled = true
+ singularity.autoMounts = true
+ conda.enabled = false
+ docker.enabled = false
+ podman.enabled = false
+ shifter.enabled = false
+ charliecloud.enabled = false
+ apptainer.enabled = false
}
podman {
- podman.enabled = true
- conda.enabled = false
- docker.enabled = false
- singularity.enabled = false
- shifter.enabled = false
- charliecloud.enabled = false
- apptainer.enabled = false
+ podman.enabled = true
+ conda.enabled = false
+ docker.enabled = false
+ singularity.enabled = false
+ shifter.enabled = false
+ charliecloud.enabled = false
+ apptainer.enabled = false
}
shifter {
- shifter.enabled = true
- conda.enabled = false
- docker.enabled = false
- singularity.enabled = false
- podman.enabled = false
- charliecloud.enabled = false
- apptainer.enabled = false
+ shifter.enabled = true
+ conda.enabled = false
+ docker.enabled = false
+ singularity.enabled = false
+ podman.enabled = false
+ charliecloud.enabled = false
+ apptainer.enabled = false
}
charliecloud {
- charliecloud.enabled = true
- conda.enabled = false
- docker.enabled = false
- singularity.enabled = false
- podman.enabled = false
- shifter.enabled = false
- apptainer.enabled = false
+ charliecloud.enabled = true
+ conda.enabled = false
+ docker.enabled = false
+ singularity.enabled = false
+ podman.enabled = false
+ shifter.enabled = false
+ apptainer.enabled = false
}
apptainer {
- apptainer.enabled = true
- apptainer.autoMounts = true
- conda.enabled = false
- docker.enabled = false
- singularity.enabled = false
- podman.enabled = false
- shifter.enabled = false
- charliecloud.enabled = false
+ apptainer.enabled = true
+ apptainer.autoMounts = true
+ conda.enabled = false
+ docker.enabled = false
+ singularity.enabled = false
+ podman.enabled = false
+ shifter.enabled = false
+ charliecloud.enabled = false
+ }
+ wave {
+ apptainer.ociAutoPull = true
+ singularity.ociAutoPull = true
+ wave.enabled = true
+ wave.freeze = true
+ wave.strategy = 'conda,container'
}
gitpod {
- executor.name = 'local'
- executor.cpus = 4
- executor.memory = 8.GB
+ executor.name = 'local'
+ executor.cpus = 4
+ executor.memory = 8.GB
}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
@@ -293,7 +304,7 @@ manifest {
description = """call and score variants from WGS/WES of rare disease patients"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
- version = '2.0.1'
+ version = '2.1.0'
doi = ''
}
@@ -316,7 +327,7 @@ includeConfig 'conf/modules/qc_bam.config'
includeConfig 'conf/modules/rank_variants.config'
includeConfig 'conf/modules/scatter_genome.config'
includeConfig 'conf/modules/align_MT.config'
-includeConfig 'conf/modules/align_bwa_bwamem2.config'
+includeConfig 'conf/modules/align_bwa_bwamem2_bwameme.config'
includeConfig 'conf/modules/align_sentieon.config'
includeConfig 'conf/modules/annotate_cadd.config'
includeConfig 'conf/modules/call_snv_MT.config'
diff --git a/nextflow_schema.json b/nextflow_schema.json
index 6e2fbc81..80cdfd11 100644
--- a/nextflow_schema.json
+++ b/nextflow_schema.json
@@ -27,8 +27,7 @@
"type": "string",
"format": "directory-path",
"description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.",
- "fa_icon": "fas fa-folder-open",
- "default": "results"
+ "fa_icon": "fas fa-folder-open"
},
"email": {
"type": "string",
@@ -75,6 +74,14 @@
"help_text": "If none provided, will be generated automatically from the FASTA reference.",
"fa_icon": "fas fa-folder-open"
},
+ "bwameme": {
+ "type": "string",
+ "exists": true,
+ "format": "directory-path",
+ "description": "Directory for pre-built bwameme's learned index.",
+ "help_text": "If none provided, will be generated automatically from the FASTA reference.",
+ "fa_icon": "fas fa-folder-open"
+ },
"cadd_resources": {
"type": "string",
"exists": true,
@@ -466,6 +473,12 @@
"fa_icon": "fas fa-align-center",
"enum": ["wgs", "wes", "mito"]
},
+ "bwa_as_fallback": {
+ "type": "boolean",
+ "description": "Specifies whether or not to use bwa as a fallback aligner in case bwamem2 throws an error.",
+ "help_text": "errorStrategy needs to be set to ignore for the bwamem2 process for the fallback to work. Turned off by default.",
+ "fa_icon": "fas fa-toggle-on"
+ },
"platform": {
"type": "string",
"default": "illumina",
@@ -480,6 +493,11 @@
"fa_icon": "fas fa-align-center",
"enum": ["xy", "hetx", "sry"]
},
+ "run_mt_for_wes": {
+ "type": "boolean",
+ "description": "Specifies whether to run mitochondrial analysis for wes samples",
+ "fa_icon": "fas fa-toggle-on"
+ },
"run_rtgvcfeval": {
"type": "boolean",
"description": "Specifies whether to run rtgtools' vcfeval",
@@ -530,9 +548,14 @@
"description": "Specifies whether or not to skip Qualimap.",
"fa_icon": "fas fa-toggle-on"
},
+ "skip_me_calling": {
+ "type": "boolean",
+ "description": "Specifies whether or not to skip calling mobile elements, and the subsequent annotation step.",
+ "fa_icon": "fas fa-toggle-on"
+ },
"skip_me_annotation": {
"type": "boolean",
- "description": "Specifies whether or not to skip annotation of mobile_elements.",
+ "description": "Specifies whether or not to skip annotation of mobile elements.",
"fa_icon": "fas fa-toggle-on"
},
"skip_mt_annotation": {
@@ -580,7 +603,7 @@
"default": "bwamem2",
"description": "Specifies the alignment algorithm to use - available options are 'bwamem2' and 'sentieon'.",
"fa_icon": "fas fa-align-center",
- "enum": ["bwa", "bwamem2", "sentieon"]
+ "enum": ["bwa", "bwamem2", "bwameme", "sentieon"]
},
"min_trimmed_length": {
"type": "integer",
@@ -876,6 +899,13 @@
"description": "Validation of parameters in lenient more.",
"hidden": true,
"help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)."
+ },
+ "pipelines_testdata_base_path": {
+ "type": "string",
+ "fa_icon": "far fa-check-circle",
+ "description": "Base URL or local path to location of pipeline test dataset files",
+ "default": "https://raw.githubusercontent.com/nf-core/test-datasets/",
+ "hidden": true
}
}
}
diff --git a/pyproject.toml b/pyproject.toml
deleted file mode 100644
index 56110621..00000000
--- a/pyproject.toml
+++ /dev/null
@@ -1,15 +0,0 @@
-# Config file for Python. Mostly used to configure linting of bin/*.py with Ruff.
-# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation.
-[tool.ruff]
-line-length = 120
-target-version = "py38"
-cache-dir = "~/.cache/ruff"
-
-[tool.ruff.lint]
-select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"]
-
-[tool.ruff.lint.isort]
-known-first-party = ["nf_core"]
-
-[tool.ruff.lint.per-file-ignores]
-"__init__.py" = ["E402", "F401"]
diff --git a/subworkflows/local/align.nf b/subworkflows/local/align.nf
index 51bbf3fb..8822d1cb 100644
--- a/subworkflows/local/align.nf
+++ b/subworkflows/local/align.nf
@@ -3,7 +3,7 @@
//
include { FASTP } from '../../modules/nf-core/fastp/main'
-include { ALIGN_BWA_BWAMEM2 } from './alignment/align_bwa_bwamem2'
+include { ALIGN_BWA_BWAMEM2_BWAMEME } from './alignment/align_bwa_bwamem2_bwameme'
include { ALIGN_SENTIEON } from './alignment/align_sentieon'
include { SAMTOOLS_VIEW } from '../../modules/nf-core/samtools/view/main'
include { ALIGN_MT } from './alignment/align_MT'
@@ -17,21 +17,29 @@ workflow ALIGN {
ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ]
ch_genome_bwaindex // channel: [mandatory] [ val(meta), path(index) ]
ch_genome_bwamem2index // channel: [mandatory] [ val(meta), path(index) ]
+ ch_genome_bwamemeindex // channel: [mandatory] [ val(meta), path(index) ]
ch_genome_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
ch_mtshift_bwaindex // channel: [mandatory] [ val(meta), path(index) ]
ch_mtshift_bwamem2index // channel: [mandatory] [ val(meta), path(index) ]
+ ch_mtshift_bwamemeindex // channel: [mandatory] [ val(meta), path(index) ]
ch_mtshift_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_mtshift_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
ch_mtshift_fai // channel: [mandatory] [ val(meta), path(fai) ]
val_platform // string: [mandatory] illumina or a different technology
main:
- ch_versions = Channel.empty()
- ch_fastp_json = Channel.empty()
- ch_bwamem2_bam = Channel.empty()
- ch_sentieon_bam = Channel.empty()
- ch_bwamem2_bai = Channel.empty()
- ch_sentieon_bai = Channel.empty()
+ ch_bwamem2_bam = Channel.empty()
+ ch_bwamem2_bai = Channel.empty()
+ ch_fastp_json = Channel.empty()
+ ch_mt_bam_bai = Channel.empty()
+ ch_mt_marked_bam = Channel.empty()
+ ch_mt_marked_bai = Channel.empty()
+ ch_mtshift_bam_bai = Channel.empty()
+ ch_mtshift_marked_bam = Channel.empty()
+ ch_mtshift_marked_bai = Channel.empty()
+ ch_sentieon_bam = Channel.empty()
+ ch_sentieon_bai = Channel.empty()
+ ch_versions = Channel.empty()
if (!params.skip_fastp) {
FASTP (ch_reads, [], false, false)
@@ -40,18 +48,19 @@ workflow ALIGN {
ch_fastp_json = FASTP.out.json
}
- if (params.aligner.equals("bwamem2") || params.aligner.equals("bwa")) {
- ALIGN_BWA_BWAMEM2 ( // Triggered when params.aligner is set as bwamem2 or bwa
+ if (params.aligner.matches("bwamem2|bwa|bwameme")) {
+ ALIGN_BWA_BWAMEM2_BWAMEME ( // Triggered when params.aligner is set as bwamem2 or bwa or bwameme
ch_reads,
ch_genome_bwaindex,
ch_genome_bwamem2index,
+ ch_genome_bwamemeindex,
ch_genome_fasta,
ch_genome_fai,
val_platform
)
- ch_bwamem2_bam = ALIGN_BWA_BWAMEM2.out.marked_bam
- ch_bwamem2_bai = ALIGN_BWA_BWAMEM2.out.marked_bai
- ch_versions = ch_versions.mix(ALIGN_BWA_BWAMEM2.out.versions)
+ ch_bwamem2_bam = ALIGN_BWA_BWAMEM2_BWAMEME.out.marked_bam
+ ch_bwamem2_bai = ALIGN_BWA_BWAMEM2_BWAMEME.out.marked_bai
+ ch_versions = ch_versions.mix(ALIGN_BWA_BWAMEM2_BWAMEME.out.versions)
} else if (params.aligner.equals("sentieon")) {
ALIGN_SENTIEON ( // Triggered when params.aligner is set as sentieon
ch_reads,
@@ -62,7 +71,7 @@ workflow ALIGN {
)
ch_sentieon_bam = ALIGN_SENTIEON.out.marked_bam
ch_sentieon_bai = ALIGN_SENTIEON.out.marked_bai
- ch_versions = ch_versions.mix(ALIGN_SENTIEON.out.versions)
+ ch_versions = ch_versions.mix(ALIGN_SENTIEON.out.versions)
}
ch_genome_marked_bam = Channel.empty().mix(ch_bwamem2_bam, ch_sentieon_bam)
@@ -70,48 +79,52 @@ workflow ALIGN {
ch_genome_bam_bai = ch_genome_marked_bam.join(ch_genome_marked_bai, failOnMismatch:true, failOnDuplicate:true)
// PREPARING READS FOR MT ALIGNMENT
- CONVERT_MT_BAM_TO_FASTQ (
- ch_genome_bam_bai,
- ch_genome_fasta,
- ch_genome_fai,
- ch_genome_dictionary
- )
- ALIGN_MT (
- CONVERT_MT_BAM_TO_FASTQ.out.fastq,
- CONVERT_MT_BAM_TO_FASTQ.out.bam,
- ch_genome_bwaindex,
- ch_genome_bwamem2index,
- ch_genome_fasta,
- ch_genome_dictionary,
- ch_genome_fai
- )
+ if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
+ CONVERT_MT_BAM_TO_FASTQ (
+ ch_genome_bam_bai,
+ ch_genome_fasta,
+ ch_genome_fai,
+ ch_genome_dictionary
+ )
- ALIGN_MT_SHIFT (
- CONVERT_MT_BAM_TO_FASTQ.out.fastq,
- CONVERT_MT_BAM_TO_FASTQ.out.bam,
- ch_mtshift_bwaindex,
- ch_mtshift_bwamem2index,
- ch_mtshift_fasta,
- ch_mtshift_dictionary,
- ch_mtshift_fai
- )
+ ALIGN_MT (
+ CONVERT_MT_BAM_TO_FASTQ.out.fastq,
+ CONVERT_MT_BAM_TO_FASTQ.out.bam,
+ ch_genome_bwaindex,
+ ch_genome_bwamem2index,
+ ch_genome_bwamemeindex,
+ ch_genome_fasta,
+ ch_genome_dictionary,
+ ch_genome_fai
+ )
- ch_mt_marked_bam = ALIGN_MT.out.marked_bam
- ch_mt_marked_bai = ALIGN_MT.out.marked_bai
- ch_mt_bam_bai = ch_mt_marked_bam.join(ch_mt_marked_bai, failOnMismatch:true, failOnDuplicate:true)
+ ALIGN_MT_SHIFT (
+ CONVERT_MT_BAM_TO_FASTQ.out.fastq,
+ CONVERT_MT_BAM_TO_FASTQ.out.bam,
+ ch_mtshift_bwaindex,
+ ch_mtshift_bwamem2index,
+ ch_mtshift_bwamemeindex,
+ ch_mtshift_fasta,
+ ch_mtshift_dictionary,
+ ch_mtshift_fai
+ )
- ch_mtshift_marked_bam = ALIGN_MT_SHIFT.out.marked_bam
- ch_mtshift_marked_bai = ALIGN_MT_SHIFT.out.marked_bai
- ch_mtshift_bam_bai = ch_mtshift_marked_bam.join(ch_mtshift_marked_bai, failOnMismatch:true, failOnDuplicate:true)
+ ch_mt_marked_bam = ALIGN_MT.out.marked_bam
+ ch_mt_marked_bai = ALIGN_MT.out.marked_bai
+ ch_mt_bam_bai = ch_mt_marked_bam.join(ch_mt_marked_bai, failOnMismatch:true, failOnDuplicate:true)
+ ch_mtshift_marked_bam = ALIGN_MT_SHIFT.out.marked_bam
+ ch_mtshift_marked_bai = ALIGN_MT_SHIFT.out.marked_bai
+ ch_mtshift_bam_bai = ch_mtshift_marked_bam.join(ch_mtshift_marked_bai, failOnMismatch:true, failOnDuplicate:true)
+ ch_versions = ch_versions.mix(ALIGN_MT.out.versions,
+ ALIGN_MT_SHIFT.out.versions,
+ CONVERT_MT_BAM_TO_FASTQ.out.versions)
+ }
if (params.save_mapped_as_cram) {
SAMTOOLS_VIEW( ch_genome_bam_bai, ch_genome_fasta, [] )
ch_versions = ch_versions.mix(SAMTOOLS_VIEW.out.versions)
}
- ch_versions = ch_versions.mix(ALIGN_MT.out.versions,
- ALIGN_MT_SHIFT.out.versions,
- CONVERT_MT_BAM_TO_FASTQ.out.versions)
emit:
fastp_json = ch_fastp_json // channel: [ val(meta), path(json) ]
diff --git a/subworkflows/local/alignment/align_MT.nf b/subworkflows/local/alignment/align_MT.nf
index 8f7930c7..d2a9581d 100644
--- a/subworkflows/local/alignment/align_MT.nf
+++ b/subworkflows/local/alignment/align_MT.nf
@@ -5,6 +5,7 @@
include { BWA_MEM as BWA_MEM_MT } from '../../../modules/nf-core/bwa/mem/main'
include { SENTIEON_BWAMEM as SENTIEON_BWAMEM_MT } from '../../../modules/nf-core/sentieon/bwamem/main'
include { BWAMEM2_MEM as BWAMEM2_MEM_MT } from '../../../modules/nf-core/bwamem2/mem/main'
+include { BWAMEME_MEM as BWAMEME_MEM_MT } from '../../../modules/nf-core/bwameme/mem/main'
include { GATK4_MERGEBAMALIGNMENT as GATK4_MERGEBAMALIGNMENT_MT } from '../../../modules/nf-core/gatk4/mergebamalignment/main'
include { PICARD_ADDORREPLACEREADGROUPS as PICARD_ADDORREPLACEREADGROUPS_MT } from '../../../modules/nf-core/picard/addorreplacereadgroups/main'
include { PICARD_MARKDUPLICATES as PICARD_MARKDUPLICATES_MT } from '../../../modules/nf-core/picard/markduplicates/main'
@@ -17,41 +18,42 @@ workflow ALIGN_MT {
ch_ubam // channel: [mandatory] [ val(meta), path(bam) ]
ch_bwaindex // channel: [mandatory for sentieon] [ val(meta), path(index) ]
ch_bwamem2index // channel: [mandatory for bwamem2] [ val(meta), path(index) ]
+ ch_bwamemeindex // channel: [mandatory for bwameme] [ val(meta), path(index) ]
ch_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_dict // channel: [mandatory] [ val(meta), path(dict) ]
ch_fai // channel: [mandatory] [ val(meta), path(fai) ]
main:
ch_versions = Channel.empty()
- ch_bwa_bam = Channel.empty()
- ch_bwamem2_bam = Channel.empty()
- ch_sentieon_bam = Channel.empty()
if (params.aligner.equals("bwamem2")) {
- BWAMEM2_MEM_MT (ch_fastq, ch_bwamem2index, true)
- ch_bwamem2_bam = BWAMEM2_MEM_MT.out.bam
+ BWAMEM2_MEM_MT (ch_fastq, ch_bwamem2index, ch_fasta, true)
+ ch_align = BWAMEM2_MEM_MT.out.bam
ch_versions = ch_versions.mix(BWAMEM2_MEM_MT.out.versions.first())
} else if (params.aligner.equals("sentieon")) {
SENTIEON_BWAMEM_MT ( ch_fastq, ch_bwaindex, ch_fasta, ch_fai )
- ch_sentieon_bam = SENTIEON_BWAMEM_MT.out.bam_and_bai.map{ meta, bam, bai -> [meta, bam] }
- ch_versions = ch_versions.mix(SENTIEON_BWAMEM_MT.out.versions.first())
+ ch_align = SENTIEON_BWAMEM_MT.out.bam_and_bai.map{ meta, bam, bai -> [meta, bam] }
+ ch_versions = ch_versions.mix(SENTIEON_BWAMEM_MT.out.versions.first())
} else if (params.aligner.equals("bwa")) {
- BWA_MEM_MT ( ch_fastq, ch_bwaindex, true )
- ch_bwa_bam = BWA_MEM_MT.out.bam
- ch_versions = ch_versions.mix(BWA_MEM_MT.out.versions.first())
+ BWA_MEM_MT ( ch_fastq, ch_bwaindex, ch_fasta, true )
+ ch_align = BWA_MEM_MT.out.bam
+ ch_versions = ch_versions.mix(BWA_MEM_MT.out.versions.first())
+ } else if (params.aligner.equals("bwameme")) {
+ BWAMEME_MEM_MT (ch_fastq, ch_bwamemeindex, ch_fasta, true)
+ ch_align = BWAMEME_MEM_MT.out.bam
+ ch_versions = ch_versions.mix(BWAMEME_MEM_MT.out.versions.first())
}
- Channel.empty()
- .mix(ch_bwamem2_bam, ch_sentieon_bam, ch_bwa_bam)
+ ch_align
.join(ch_ubam, failOnMismatch:true, failOnDuplicate:true)
.set {ch_bam_ubam}
GATK4_MERGEBAMALIGNMENT_MT (ch_bam_ubam, ch_fasta, ch_dict)
- PICARD_ADDORREPLACEREADGROUPS_MT (GATK4_MERGEBAMALIGNMENT_MT.out.bam)
+ PICARD_ADDORREPLACEREADGROUPS_MT (GATK4_MERGEBAMALIGNMENT_MT.out.bam, [[:],[]], [[:],[]])
PICARD_MARKDUPLICATES_MT (PICARD_ADDORREPLACEREADGROUPS_MT.out.bam, ch_fasta, ch_fai)
- SAMTOOLS_SORT_MT (PICARD_MARKDUPLICATES_MT.out.bam)
+ SAMTOOLS_SORT_MT (PICARD_MARKDUPLICATES_MT.out.bam, [[:],[]])
SAMTOOLS_INDEX_MT(SAMTOOLS_SORT_MT.out.bam)
diff --git a/subworkflows/local/alignment/align_bwa_bwamem2.nf b/subworkflows/local/alignment/align_bwa_bwamem2_bwameme.nf
similarity index 67%
rename from subworkflows/local/alignment/align_bwa_bwamem2.nf
rename to subworkflows/local/alignment/align_bwa_bwamem2_bwameme.nf
index 10537898..7d635d51 100644
--- a/subworkflows/local/alignment/align_bwa_bwamem2.nf
+++ b/subworkflows/local/alignment/align_bwa_bwamem2_bwameme.nf
@@ -2,8 +2,10 @@
// Map to reference, fetch stats for each demultiplexed read pair, merge, mark duplicates, and index.
//
-include { BWA_MEM } from '../../../modules/nf-core/bwa/mem/main'
+include { BWA_MEM as BWA } from '../../../modules/nf-core/bwa/mem/main'
+include { BWA_MEM as BWAMEM_FALLBACK } from '../../../modules/nf-core/bwa/mem/main'
include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main'
+include { BWAMEME_MEM } from '../../../modules/nf-core/bwameme/mem/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_ALIGN } from '../../../modules/nf-core/samtools/index/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_MARKDUP } from '../../../modules/nf-core/samtools/index/main'
include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main'
@@ -11,11 +13,12 @@ include { SAMTOOLS_MERGE } from '../../../modules/nf-c
include { PICARD_MARKDUPLICATES as MARKDUPLICATES } from '../../../modules/nf-core/picard/markduplicates/main'
-workflow ALIGN_BWA_BWAMEM2 {
+workflow ALIGN_BWA_BWAMEM2_BWAMEME {
take:
ch_reads_input // channel: [mandatory] [ val(meta), path(reads_input) ]
ch_bwa_index // channel: [mandatory] [ val(meta), path(bwamem2_index) ]
ch_bwamem2_index // channel: [mandatory] [ val(meta), path(bwamem2_index) ]
+ ch_bwameme_index // channel: [mandatory] [ val(meta), path(bwamem2_index) ]
ch_genome_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ]
val_platform // string: [mandatory] default: illumina
@@ -25,13 +28,33 @@ workflow ALIGN_BWA_BWAMEM2 {
// Map, sort, and index
if (params.aligner.equals("bwa")) {
- BWA_MEM ( ch_reads_input, ch_bwa_index, true )
- ch_align = BWA_MEM.out.bam
- ch_versions = ch_versions.mix(BWA_MEM.out.versions.first())
+ BWA ( ch_reads_input, ch_bwa_index, ch_genome_fasta, true )
+ ch_align = BWA.out.bam
+ ch_versions = ch_versions.mix(BWA.out.versions.first())
+ } else if (params.aligner.equals("bwameme")) {
+ BWAMEME_MEM ( ch_reads_input, ch_bwameme_index, ch_genome_fasta, true )
+ ch_align = BWAMEME_MEM.out.bam
+ ch_versions = ch_versions.mix(BWAMEME_MEM.out.versions.first())
} else {
- BWAMEM2_MEM ( ch_reads_input, ch_bwamem2_index, true )
- ch_align = BWAMEM2_MEM.out.bam
+ BWAMEM2_MEM ( ch_reads_input, ch_bwamem2_index, ch_genome_fasta, true )
+ ch_align = BWAMEM2_MEM.out.bam
ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first())
+
+ if (params.bwa_as_fallback) {
+ ch_reads_input
+ .join(BWAMEM2_MEM.out.bam, remainder: true)
+ .branch { it ->
+ ERROR: it[2].equals(null)
+ return [it[0], it[1]] // return reads
+ SUCCESS: !it[2].equals(null)
+ return [it[0], it[2]] // return bam
+ }
+ .set { ch_fallback }
+
+ BWAMEM_FALLBACK ( ch_fallback.ERROR, ch_bwa_index, ch_genome_fasta, true )
+ ch_align = ch_fallback.SUCCESS.mix(BWAMEM_FALLBACK.out.bam)
+ ch_versions = ch_versions.mix(BWAMEM_FALLBACK.out.versions.first())
+ }
}
SAMTOOLS_INDEX_ALIGN ( ch_align )
@@ -44,7 +67,7 @@ workflow ALIGN_BWA_BWAMEM2 {
ch_align
.map{ meta, bam ->
new_id = meta.sample
- new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"]
+ new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"] - meta.subMap('lane')
[groupKey(new_meta, new_meta.num_lanes), bam]
}
.groupTuple()
diff --git a/subworkflows/local/alignment/align_sentieon.nf b/subworkflows/local/alignment/align_sentieon.nf
index 366f6cd9..792d9c34 100644
--- a/subworkflows/local/alignment/align_sentieon.nf
+++ b/subworkflows/local/alignment/align_sentieon.nf
@@ -23,7 +23,7 @@ workflow ALIGN_SENTIEON {
.bam_and_bai
.map{ meta, bam, bai ->
new_id = meta.sample
- new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"]
+ new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"] - meta.subMap('lane')
[groupKey(new_meta, new_meta.num_lanes), bam, bai]
}
.groupTuple()
diff --git a/subworkflows/local/annotate_mobile_elements.nf b/subworkflows/local/annotate_mobile_elements.nf
index 0d22cd80..cfd66de9 100644
--- a/subworkflows/local/annotate_mobile_elements.nf
+++ b/subworkflows/local/annotate_mobile_elements.nf
@@ -7,8 +7,6 @@ include { ENSEMBLVEP_VEP as ENSEMBLVEP_ME } from '../../modules/nf-core/en
include { PICARD_SORTVCF } from '../../modules/nf-core/picard/sortvcf/main'
include { SVDB_QUERY as SVDB_QUERY_DB } from '../../modules/nf-core/svdb/query/main'
-include { ANNOTATE_CSQ_PLI as ANNOTATE_CSQ_PLI_ME } from '../../subworkflows/local/annotate_consequence_pli.nf'
-include { GENERATE_CLINICAL_SET as GENERATE_CLINICAL_SET_ME } from '../../subworkflows/local/generate_clinical_set.nf'
workflow ANNOTATE_MOBILE_ELEMENTS {
@@ -18,8 +16,6 @@ workflow ANNOTATE_MOBILE_ELEMENTS {
ch_genome_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_genome_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
ch_vep_cache // channel: [mandatory] [ path(cache) ]
- ch_variant_consequences // channel: [mandatory] [ path(consequences) ]
- ch_hgnc_ids // channel: [mandatory] [ val(hgnc_ids) ]
val_vep_genome // string: [mandatory] GRCh37 or GRCh38
val_vep_cache_version // string: [mandatory] default: 107
ch_vep_extra_files // channel: [mandatory] [ path(files) ]
@@ -76,25 +72,12 @@ workflow ANNOTATE_MOBILE_ELEMENTS {
BCFTOOLS_VIEW_FILTER( ch_bcftools_filter_input, [], [], [] )
- GENERATE_CLINICAL_SET_ME(
- BCFTOOLS_VIEW_FILTER.out.vcf,
- ch_hgnc_ids
- )
-
- ANNOTATE_CSQ_PLI_ME(
- GENERATE_CLINICAL_SET_ME.out.vcf,
- ch_variant_consequences
- )
-
ch_versions = ch_versions.mix( SVDB_QUERY_DB.out.versions )
ch_versions = ch_versions.mix( PICARD_SORTVCF.out.versions )
ch_versions = ch_versions.mix( ENSEMBLVEP_ME.out.versions )
ch_versions = ch_versions.mix( BCFTOOLS_VIEW_FILTER.out.versions )
- ch_versions = ch_versions.mix( GENERATE_CLINICAL_SET_ME.out.versions )
- ch_versions = ch_versions.mix( ANNOTATE_CSQ_PLI_ME.out.versions )
emit:
- vcf = ANNOTATE_CSQ_PLI_ME.out.vcf_ann // channel: [ val(meta), path(vcf) ]
- tbi = ANNOTATE_CSQ_PLI_ME.out.tbi_ann // channel: [ val(meta), path(tbi) ]
+ vcf = BCFTOOLS_VIEW_FILTER.out.vcf // channel: [ val(meta), path(vcf) ]
versions = ch_versions // channel: [ path(versions.yml) ]
}
diff --git a/subworkflows/local/annotate_mt_snvs.nf b/subworkflows/local/annotate_mt_snvs.nf
index 917893b4..02554461 100644
--- a/subworkflows/local/annotate_mt_snvs.nf
+++ b/subworkflows/local/annotate_mt_snvs.nf
@@ -3,12 +3,13 @@
//
include { REPLACE_SPACES_IN_VCFINFO } from '../../modules/local/replace_spaces_in_vcfinfo'
-include { TABIX_TABIX as TABIX_TABIX_MT } from '../../modules/nf-core/tabix/tabix/main'
+include { TABIX_TABIX as TABIX_TABIX_VEP_MT } from '../../modules/nf-core/tabix/tabix/main'
+include { TABIX_BGZIPTABIX as ZIP_TABIX_HMTNOTE_MT } from '../../modules/nf-core/tabix/bgziptabix/main'
include { ENSEMBLVEP_VEP as ENSEMBLVEP_MT } from '../../modules/nf-core/ensemblvep/vep/main'
include { HAPLOGREP2_CLASSIFY as HAPLOGREP2_CLASSIFY_MT } from '../../modules/nf-core/haplogrep2/classify/main'
include { VCFANNO as VCFANNO_MT } from '../../modules/nf-core/vcfanno/main'
include { ANNOTATE_CADD } from './annotation/annotate_cadd'
-include { TABIX_BGZIPTABIX as ZIP_TABIX_HMTNOTE } from '../../modules/nf-core/tabix/bgziptabix/main'
+include { TABIX_BGZIPTABIX as ZIP_TABIX_VCFANNO_MT } from '../../modules/nf-core/tabix/bgziptabix/main'
include { HMTNOTE_ANNOTATE } from '../../modules/nf-core/hmtnote/annotate/main'
workflow ANNOTATE_MT_SNVS {
@@ -27,29 +28,53 @@ workflow ANNOTATE_MT_SNVS {
ch_vep_extra_files // channel: [mandatory] [ path(files) ]
main:
- ch_cadd_vcf = Channel.empty()
ch_versions = Channel.empty()
+ // add prefix to meta
+ ch_mt_vcf
+ .map { it ->
+ return [it[0]+ [prefix: it[1].simpleName + "_hmtnote"], it[1]]
+ }
+ .set { ch_hmtnote_in }
+
+ // HMTNOTE ANNOTATE
+ HMTNOTE_ANNOTATE(ch_hmtnote_in)
+ REPLACE_SPACES_IN_VCFINFO(HMTNOTE_ANNOTATE.out.vcf)
+ ZIP_TABIX_HMTNOTE_MT(REPLACE_SPACES_IN_VCFINFO.out.vcf)
+
+ // Vcfanno
+ ZIP_TABIX_HMTNOTE_MT.out.gz_tbi
+ .map { meta, vcf, tbi -> return [meta + [prefix: meta.prefix + "_vcfanno"], vcf, tbi, []]}
+ .set { ch_in_vcfanno }
+
+ VCFANNO_MT(ch_in_vcfanno, ch_vcfanno_toml, [], ch_vcfanno_resources)
+ ZIP_TABIX_VCFANNO_MT(VCFANNO_MT.out.vcf)
+
+ ch_vcfanno_vcf = ZIP_TABIX_VCFANNO_MT.out.gz_tbi.map{meta, vcf, tbi -> return [meta, vcf]}
+ ch_vcfanno_tbi = ZIP_TABIX_VCFANNO_MT.out.gz_tbi.map{meta, vcf, tbi -> return [meta, tbi]}
+
// Annotating with CADD
if (params.cadd_resources != null) {
ANNOTATE_CADD (
- ch_mt_vcf,
- ch_mt_tbi,
+ ch_vcfanno_vcf,
+ ch_vcfanno_tbi,
ch_cadd_header,
ch_cadd_resources
)
ch_cadd_vcf = ANNOTATE_CADD.out.vcf
ch_versions = ch_versions.mix(ANNOTATE_CADD.out.versions)
+ } else {
+ ch_cadd_vcf = Channel.empty()
}
// Pick input for vep
- ch_mt_vcf
+ ch_vcfanno_vcf
.join(ch_cadd_vcf, remainder: true) // If CADD is not run then the third element in this channel will be `null`
.branch { it -> // If CADD is run, then "it" will be [[meta],selvar.vcf,cadd.vcf], else [[meta],selvar.vcf,null]
merged: it[2].equals(null)
- return [it[0]+ [prefix: it[1].simpleName + "_vep"], it[1]]
+ return [it[0]+ [prefix: it[0].prefix + "_vep"], it[1]]
cadd: !(it[2].equals(null))
- return [it[0] + [prefix: it[1].simpleName + "_cadd_vep"], it[2]]
+ return [it[0] + [prefix: it[0].prefix + "_cadd_vep"], it[2]]
}
.set { ch_for_mix }
@@ -58,7 +83,6 @@ workflow ANNOTATE_MT_SNVS {
.map { meta, vcf -> return [meta, vcf, []] }
.set { ch_vep_in }
-
// Annotating with ensembl Vep
ENSEMBLVEP_MT(
ch_vep_in,
@@ -70,41 +94,24 @@ workflow ANNOTATE_MT_SNVS {
ch_vep_extra_files
)
- // Running vcfanno
- TABIX_TABIX_MT(ENSEMBLVEP_MT.out.vcf)
- ENSEMBLVEP_MT.out.vcf
- .join(TABIX_TABIX_MT.out.tbi, failOnMismatch:true, failOnDuplicate:true)
- .map { meta, vcf, tbi -> return [meta + [prefix: meta.prefix + "_vcfanno"], vcf, tbi, []]}
- .set { ch_in_vcfanno }
-
- VCFANNO_MT(ch_in_vcfanno, ch_vcfanno_toml, [], ch_vcfanno_resources).vcf
- .map { meta, vcf -> return [meta + [prefix: meta.prefix + "_hmtnote"], vcf]}
- .set {ch_hmtnote_in}
-
- // HMTNOTE ANNOTATE
- HMTNOTE_ANNOTATE(ch_hmtnote_in)
- REPLACE_SPACES_IN_VCFINFO(HMTNOTE_ANNOTATE.out.vcf)
- ZIP_TABIX_HMTNOTE(REPLACE_SPACES_IN_VCFINFO.out.vcf)
-
- // Prepare output
- ch_vcf_out = ZIP_TABIX_HMTNOTE.out.gz_tbi.map{meta, vcf, tbi -> return [meta, vcf] }
- ch_tbi_out = ZIP_TABIX_HMTNOTE.out.gz_tbi.map{meta, vcf, tbi -> return [meta, tbi] }
+ TABIX_TABIX_VEP_MT(ENSEMBLVEP_MT.out.vcf)
// Running haplogrep2
HAPLOGREP2_CLASSIFY_MT(ch_haplogrep_in, "vcf.gz")
ch_versions = ch_versions.mix(ENSEMBLVEP_MT.out.versions)
- ch_versions = ch_versions.mix(TABIX_TABIX_MT.out.versions)
+ ch_versions = ch_versions.mix(TABIX_TABIX_VEP_MT.out.versions)
ch_versions = ch_versions.mix(VCFANNO_MT.out.versions)
ch_versions = ch_versions.mix(HMTNOTE_ANNOTATE.out.versions)
ch_versions = ch_versions.mix(HAPLOGREP2_CLASSIFY_MT.out.versions)
- ch_versions = ch_versions.mix(ZIP_TABIX_HMTNOTE.out.versions)
+ ch_versions = ch_versions.mix(ZIP_TABIX_VCFANNO_MT.out.versions)
+ ch_versions = ch_versions.mix(ZIP_TABIX_HMTNOTE_MT.out.versions)
ch_versions = ch_versions.mix(REPLACE_SPACES_IN_VCFINFO.out.versions)
emit:
haplog = HAPLOGREP2_CLASSIFY_MT.out.txt // channel: [ val(meta), path(txt) ]
- vcf_ann = ch_vcf_out // channel: [ val(meta), path(vcf) ]
- tbi = ch_tbi_out // channel: [ val(meta), path(tbi) ]
+ vcf_ann = ENSEMBLVEP_MT.out.vcf // channel: [ val(meta), path(vcf) ]
+ tbi = TABIX_TABIX_VEP_MT.out.tbi // channel: [ val(meta), path(tbi) ]
report = ENSEMBLVEP_MT.out.report // channel: [ path(html) ]
versions = ch_versions // channel: [ path(versions.yml) ]
}
diff --git a/subworkflows/local/annotation/annotate_rhocallviz.nf b/subworkflows/local/annotation/annotate_rhocallviz.nf
index c01eda52..87d3b6bd 100644
--- a/subworkflows/local/annotation/annotate_rhocallviz.nf
+++ b/subworkflows/local/annotation/annotate_rhocallviz.nf
@@ -2,7 +2,7 @@
// A subworkflow to plot binned zygosity and RHO-regions.
//
-include { BCFTOOLS_VIEW } from '../../../modules/nf-core/bcftools/view/main'
+include { BCFTOOLS_VIEW as BCFTOOLS_VIEW_RHOCALL } from '../../../modules/nf-core/bcftools/view/main'
include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main'
include { BCFTOOLS_ROH } from '../../../modules/nf-core/bcftools/roh/main'
include { BCFTOOLS_VIEW as BCFTOOLS_VIEW_UNCOMPRESS } from '../../../modules/nf-core/bcftools/view/main'
@@ -25,11 +25,11 @@ workflow ANNOTATE_RHOCALLVIZ {
.map {meta, vcf, tbi, meta2 -> return [meta2,vcf,tbi]}
.set { ch_rhocall_viz }
- BCFTOOLS_VIEW(ch_rhocall_viz, [],[],[])
+ BCFTOOLS_VIEW_RHOCALL(ch_rhocall_viz, [],[],[])
- TABIX_TABIX(BCFTOOLS_VIEW.out.vcf)
+ TABIX_TABIX(BCFTOOLS_VIEW_RHOCALL.out.vcf)
- BCFTOOLS_VIEW.out.vcf
+ BCFTOOLS_VIEW_RHOCALL.out.vcf
.join(TABIX_TABIX.out.tbi)
.set {ch_roh_in }
@@ -43,7 +43,7 @@ workflow ANNOTATE_RHOCALLVIZ {
UCSC_WIGTOBIGWIG(RHOCALL_VIZ.out.wig, ch_genome_chrsizes)
- ch_versions = ch_versions.mix(BCFTOOLS_VIEW.out.versions.first())
+ ch_versions = ch_versions.mix(BCFTOOLS_VIEW_RHOCALL.out.versions.first())
ch_versions = ch_versions.mix(CHROMOGRAPH_AUTOZYG.out.versions.first())
ch_versions = ch_versions.mix(TABIX_TABIX.out.versions.first())
ch_versions = ch_versions.mix(BCFTOOLS_ROH.out.versions.first())
diff --git a/subworkflows/local/call_repeat_expansions.nf b/subworkflows/local/call_repeat_expansions.nf
index 65437480..130b7a5b 100644
--- a/subworkflows/local/call_repeat_expansions.nf
+++ b/subworkflows/local/call_repeat_expansions.nf
@@ -33,7 +33,7 @@ workflow CALL_REPEAT_EXPANSIONS {
)
// Sort and index realigned bam
- SAMTOOLS_SORT(EXPANSIONHUNTER.out.bam)
+ SAMTOOLS_SORT(EXPANSIONHUNTER.out.bam, [[:],[]])
SAMTOOLS_INDEX(SAMTOOLS_SORT.out.bam)
// Fix header and rename sample
diff --git a/subworkflows/local/call_snv.nf b/subworkflows/local/call_snv.nf
index 3e76ab91..48bc500a 100644
--- a/subworkflows/local/call_snv.nf
+++ b/subworkflows/local/call_snv.nf
@@ -38,6 +38,8 @@ workflow CALL_SNV {
ch_deepvar_tbi = Channel.empty()
ch_deepvar_gvcf = Channel.empty()
ch_deepvar_gtbi = Channel.empty()
+ ch_mt_vcf = Channel.empty()
+ ch_mt_tabix = Channel.empty()
ch_sentieon_vcf = Channel.empty()
ch_sentieon_tbi = Channel.empty()
ch_sentieon_gvcf = Channel.empty()
@@ -74,7 +76,7 @@ workflow CALL_SNV {
ch_sentieon_vcf = CALL_SNV_SENTIEON.out.vcf
ch_sentieon_tbi = CALL_SNV_SENTIEON.out.tabix
ch_sentieon_gvcf = CALL_SNV_SENTIEON.out.gvcf
- ch_sentieon_gtbi = CALL_SNV_SENTIEON.out.gtbi
+ ch_sentieon_gtbi = CALL_SNV_SENTIEON.out.gvcf_tbi
ch_versions = ch_versions.mix(CALL_SNV_SENTIEON.out.versions)
}
@@ -93,46 +95,49 @@ workflow CALL_SNV {
ch_genome_tabix = GATK4_SELECTVARIANTS.out.tbi
ch_genome_vcf_tabix = ch_genome_vcf.join(ch_genome_tabix, failOnMismatch:true, failOnDuplicate:true)
- CALL_SNV_MT(
- ch_mt_bam_bai,
- ch_genome_fasta,
- ch_genome_fai,
- ch_genome_dictionary,
- ch_mt_intervals
- )
-
- CALL_SNV_MT_SHIFT(
- ch_mtshift_bam_bai,
- ch_mtshift_fasta,
- ch_mtshift_fai,
- ch_mtshift_dictionary,
- ch_mtshift_intervals
- )
+ if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
+ CALL_SNV_MT(
+ ch_mt_bam_bai,
+ ch_genome_fasta,
+ ch_genome_fai,
+ ch_genome_dictionary,
+ ch_mt_intervals
+ )
- POSTPROCESS_MT_CALLS(
- CALL_SNV_MT.out.vcf,
- CALL_SNV_MT_SHIFT.out.vcf,
- ch_genome_fasta,
- ch_genome_dictionary,
- ch_genome_fai,
- ch_mtshift_backchain,
- ch_case_info,
- ch_foundin_header,
- ch_genome_chrsizes
- )
+ CALL_SNV_MT_SHIFT(
+ ch_mtshift_bam_bai,
+ ch_mtshift_fasta,
+ ch_mtshift_fai,
+ ch_mtshift_dictionary,
+ ch_mtshift_intervals
+ )
- ch_versions = ch_versions.mix(CALL_SNV_MT.out.versions)
- ch_versions = ch_versions.mix(CALL_SNV_MT_SHIFT.out.versions)
- ch_versions = ch_versions.mix(POSTPROCESS_MT_CALLS.out.versions)
- ch_versions = ch_versions.mix(GATK4_SELECTVARIANTS.out.versions)
+ POSTPROCESS_MT_CALLS(
+ CALL_SNV_MT.out.vcf,
+ CALL_SNV_MT_SHIFT.out.vcf,
+ ch_genome_fasta,
+ ch_genome_dictionary,
+ ch_genome_fai,
+ ch_mtshift_backchain,
+ ch_case_info,
+ ch_foundin_header,
+ ch_genome_chrsizes
+ )
+ ch_mt_vcf = POSTPROCESS_MT_CALLS.out.vcf
+ ch_mt_tabix = POSTPROCESS_MT_CALLS.out.tbi
+ ch_versions = ch_versions.mix(CALL_SNV_MT.out.versions)
+ ch_versions = ch_versions.mix(CALL_SNV_MT_SHIFT.out.versions)
+ ch_versions = ch_versions.mix(POSTPROCESS_MT_CALLS.out.versions)
+ ch_versions = ch_versions.mix(GATK4_SELECTVARIANTS.out.versions)
+ }
emit:
- genome_vcf = ch_genome_vcf // channel: [ val(meta), path(vcf) ]
- genome_tabix = ch_genome_tabix // channel: [ val(meta), path(tbi) ]
- genome_vcf_tabix = ch_genome_vcf_tabix // channel: [ val(meta), path(vcf), path(tbi) ]
- genome_gvcf = ch_gvcf // channel: [ val(meta), path(gvcf) ]
- genome_gtabix = ch_gtabix // channel: [ val(meta), path(gtbi) ]
- mt_vcf = POSTPROCESS_MT_CALLS.out.vcf // channel: [ val(meta), path(vcf) ]
- mt_tabix = POSTPROCESS_MT_CALLS.out.tbi // channel: [ val(meta), path(tbi) ]
- versions = ch_versions // channel: [ path(versions.yml) ]
+ genome_vcf = ch_genome_vcf // channel: [ val(meta), path(vcf) ]
+ genome_tabix = ch_genome_tabix // channel: [ val(meta), path(tbi) ]
+ genome_vcf_tabix = ch_genome_vcf_tabix // channel: [ val(meta), path(vcf), path(tbi) ]
+ genome_gvcf = ch_gvcf // channel: [ val(meta), path(gvcf) ]
+ genome_gtabix = ch_gtabix // channel: [ val(meta), path(gtbi) ]
+ mt_vcf = ch_mt_vcf // channel: [ val(meta), path(vcf) ]
+ mt_tabix = ch_mt_tabix // channel: [ val(meta), path(tbi) ]
+ versions = ch_versions // channel: [ path(versions.yml) ]
}
diff --git a/subworkflows/local/call_structural_variants.nf b/subworkflows/local/call_structural_variants.nf
index f590bb60..76f40af5 100644
--- a/subworkflows/local/call_structural_variants.nf
+++ b/subworkflows/local/call_structural_variants.nf
@@ -57,7 +57,10 @@ workflow CALL_STRUCTURAL_VARIANTS {
.collect{it[1]}
.set { cnvnator_vcf }
- CALL_SV_MT (ch_mt_bam_bai, ch_genome_fasta)
+ if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
+ CALL_SV_MT (ch_mt_bam_bai, ch_genome_fasta)
+ ch_versions = ch_versions.mix(CALL_SV_MT.out.versions)
+ }
//merge
if (params.skip_germlinecnvcaller) {
@@ -85,7 +88,6 @@ workflow CALL_STRUCTURAL_VARIANTS {
ch_versions = ch_versions.mix(CALL_SV_CNVNATOR.out.versions)
ch_versions = ch_versions.mix(CALL_SV_MANTA.out.versions)
- ch_versions = ch_versions.mix(CALL_SV_MT.out.versions)
ch_versions = ch_versions.mix(CALL_SV_TIDDIT.out.versions)
ch_versions = ch_versions.mix(TABIX_TABIX.out.versions)
ch_versions = ch_versions.mix(SVDB_MERGE.out.versions)
diff --git a/subworkflows/local/generate_clinical_set.nf b/subworkflows/local/generate_clinical_set.nf
index 87250ff9..3e71e6b0 100644
--- a/subworkflows/local/generate_clinical_set.nf
+++ b/subworkflows/local/generate_clinical_set.nf
@@ -15,19 +15,17 @@ workflow GENERATE_CLINICAL_SET {
ch_versions = Channel.empty()
ch_vcf
- .combine(ch_hgnc_ids)
- .multiMap { meta, vcf, ids ->
- clinical: [ meta + [ set: "clinical", hgnc_ids:ids ], vcf ]
+ .multiMap { meta, vcf ->
+ clinical: [ meta + [ set: "clinical" ], vcf ]
research: [ meta + [ set: "research" ], vcf ]
}
.set { ch_clin_research_vcf }
ENSEMBLVEP_FILTERVEP(
ch_clin_research_vcf.clinical,
- []
+ ch_hgnc_ids
)
.output
- .map {meta, vcf -> [ meta - meta.subMap('hgnc_ids'), vcf ]}
.set { ch_filtervep_out }
TABIX_BGZIP( ch_filtervep_out )
diff --git a/subworkflows/local/gens.nf b/subworkflows/local/gens.nf
index 93f1ac0a..36c0ede5 100644
--- a/subworkflows/local/gens.nf
+++ b/subworkflows/local/gens.nf
@@ -36,8 +36,8 @@ workflow GENS {
COLLECTREADCOUNTS.out.hdf5
.branch { meta, counts ->
- female: meta.sex.equals(2) || meta.sex.equals(0)
- male: meta.sex.equals(1)
+ female: meta.sex.matches('2|other')
+ male: meta.sex.equals('1')
}
.set { ch_denoisereadcounts_in }
diff --git a/subworkflows/local/prepare_references.nf b/subworkflows/local/prepare_references.nf
index 64d33248..2bd4b6dd 100644
--- a/subworkflows/local/prepare_references.nf
+++ b/subworkflows/local/prepare_references.nf
@@ -6,6 +6,8 @@ include { BWA_INDEX as BWA_INDEX_GENOME } from '../../modul
include { BWA_INDEX as BWA_INDEX_MT_SHIFT } from '../../modules/nf-core/bwa/index/main'
include { BWAMEM2_INDEX as BWAMEM2_INDEX_GENOME } from '../../modules/nf-core/bwamem2/index/main'
include { BWAMEM2_INDEX as BWAMEM2_INDEX_MT_SHIFT } from '../../modules/nf-core/bwamem2/index/main'
+include { BWAMEME_INDEX as BWAMEME_INDEX_GENOME } from '../../modules/nf-core/bwameme/index/main'
+include { BWAMEME_INDEX as BWAMEME_INDEX_MT_SHIFT } from '../../modules/nf-core/bwameme/index/main'
include { CAT_CAT as CAT_CAT_BAIT } from '../../modules/nf-core/cat/cat/main'
include { GATK4_BEDTOINTERVALLIST as GATK_BILT } from '../../modules/nf-core/gatk4/bedtointervallist/main'
include { GATK4_CREATESEQUENCEDICTIONARY as GATK_SD } from '../../modules/nf-core/gatk4/createsequencedictionary/main'
@@ -45,24 +47,27 @@ workflow PREPARE_REFERENCES {
ch_sentieonbwa = Channel.empty()
// Genome indices
- BWA_INDEX_GENOME(ch_genome_fasta).index.set{ch_bwa}
- BWAMEM2_INDEX_GENOME(ch_genome_fasta)
- SENTIEON_BWAINDEX_GENOME(ch_genome_fasta).index.set{ch_sentieonbwa}
SAMTOOLS_FAIDX_GENOME(ch_genome_fasta, [[],[]])
GATK_SD(ch_genome_fasta)
ch_fai = Channel.empty().mix(ch_genome_fai, SAMTOOLS_FAIDX_GENOME.out.fai).collect()
GET_CHROM_SIZES( ch_fai )
- ch_genome_fasta.map { meta, fasta -> return [meta, fasta, [], [] ] }
- .set {ch_rtgformat_in}
- RTGTOOLS_FORMAT(ch_rtgformat_in)
- // MT indices
+ // Genome alignment indices
+ BWA_INDEX_GENOME(ch_genome_fasta).index.set{ch_bwa}
+ BWAMEM2_INDEX_GENOME(ch_genome_fasta)
+ BWAMEME_INDEX_GENOME(ch_genome_fasta)
+ SENTIEON_BWAINDEX_GENOME(ch_genome_fasta).index.set{ch_sentieonbwa}
+
+ // MT genome indices
SAMTOOLS_EXTRACT_MT(ch_genome_fasta, ch_fai)
ch_mt_fasta_in = Channel.empty().mix(ch_mt_fasta, SAMTOOLS_EXTRACT_MT.out.fa).collect()
SAMTOOLS_FAIDX_MT_SHIFT(ch_mt_fasta_in, [[],[]])
GATK_SD_MT_SHIFT(ch_mt_fasta_in)
GATK_SHIFTFASTA(ch_mt_fasta_in, SAMTOOLS_FAIDX_MT_SHIFT.out.fai, GATK_SD_MT_SHIFT.out.dict)
+
+ // MT alignment indices
BWAMEM2_INDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
+ BWAMEME_INDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
BWA_INDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
SENTIEON_BWAINDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
ch_bwa_mtshift = Channel.empty().mix(SENTIEON_BWAINDEX_MT_SHIFT.out.index, BWA_INDEX_MT_SHIFT.out.index).collect()
@@ -79,7 +84,6 @@ workflow PREPARE_REFERENCES {
// Vcf, tab and bed indices
TABIX_DBSNP(ch_known_dbsnp)
- ch_versions = ch_versions.mix(TABIX_DBSNP.out.versions)
TABIX_GNOMAD_AF(ch_gnomad_af_tab)
TABIX_PT(ch_target_bed).tbi.set { ch_tbi }
TABIX_PBT(ch_target_bed).gz_tbi.set { ch_bgzip_tbi }
@@ -101,9 +105,15 @@ workflow PREPARE_REFERENCES {
GATK_PREPROCESS_WGS (ch_genome_fasta, ch_fai, GATK_SD.out.dict, [[],[]], [[],[]]).set {ch_preprocwgs}
GATK_PREPROCESS_WES (ch_genome_fasta, ch_fai, GATK_SD.out.dict, GATK_BILT.out.interval_list, [[],[]]).set {ch_preprocwes}
+ // RTG tools
+ ch_genome_fasta.map { meta, fasta -> return [meta, fasta, [], [] ] }
+ .set {ch_rtgformat_in}
+ RTGTOOLS_FORMAT(ch_rtgformat_in)
+
// Gather versions
ch_versions = ch_versions.mix(BWA_INDEX_GENOME.out.versions)
ch_versions = ch_versions.mix(BWAMEM2_INDEX_GENOME.out.versions)
+ ch_versions = ch_versions.mix(BWAMEME_INDEX_GENOME.out.versions)
ch_versions = ch_versions.mix(SENTIEON_BWAINDEX_GENOME.out.versions)
ch_versions = ch_versions.mix(SAMTOOLS_FAIDX_GENOME.out.versions)
ch_versions = ch_versions.mix(GATK_SD.out.versions)
@@ -112,12 +122,14 @@ workflow PREPARE_REFERENCES {
ch_versions = ch_versions.mix(SAMTOOLS_FAIDX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(GATK_SD_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(GATK_SHIFTFASTA.out.versions)
+ ch_versions = ch_versions.mix(BWAMEME_INDEX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(BWAMEM2_INDEX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(BWA_INDEX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(SENTIEON_BWAINDEX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(TABIX_GNOMAD_AF.out.versions)
ch_versions = ch_versions.mix(TABIX_PT.out.versions)
ch_versions = ch_versions.mix(TABIX_PBT.out.versions)
+ ch_versions = ch_versions.mix(TABIX_DBSNP.out.versions)
ch_versions = ch_versions.mix(GATK_BILT.out.versions)
ch_versions = ch_versions.mix(GATK_ILT.out.versions)
ch_versions = ch_versions.mix(CAT_CAT_BAIT.out.versions)
@@ -129,6 +141,7 @@ workflow PREPARE_REFERENCES {
emit:
genome_bwa_index = Channel.empty().mix(ch_bwa, ch_sentieonbwa).collect() // channel: [ val(meta), path(index) ]
genome_bwamem2_index = BWAMEM2_INDEX_GENOME.out.index.collect() // channel: [ val(meta), path(index) ]
+ genome_bwameme_index = BWAMEME_INDEX_GENOME.out.index.collect() // channel: [ val(meta), path(index) ]
genome_chrom_sizes = GET_CHROM_SIZES.out.sizes.collect() // channel: [ path(sizes) ]
genome_fai = ch_fai // channel: [ val(meta), path(fai) ]
genome_dict = GATK_SD.out.dict.collect() // channel: [ path(dict) ]
@@ -143,6 +156,7 @@ workflow PREPARE_REFERENCES {
mtshift_dict = GATK_SHIFTFASTA.out.dict.collect() // channel: [ path(dict) ]
mtshift_bwa_index = ch_bwa_mtshift // channel: [ val(meta), path(index) ]
mtshift_bwamem2_index = BWAMEM2_INDEX_MT_SHIFT.out.index.collect() // channel: [ val(meta), path(index) ]
+ mtshift_bwameme_index = BWAMEME_INDEX_MT_SHIFT.out.index.collect() // channel: [ val(meta), path(index) ]
gnomad_af_idx = TABIX_GNOMAD_AF.out.tbi.collect() // channel: [ val(meta), path(fasta) ]
known_dbsnp_tbi = TABIX_DBSNP.out.tbi.collect() // channel: [ val(meta), path(fasta) ]
diff --git a/subworkflows/local/qc_bam.nf b/subworkflows/local/qc_bam.nf
index b1ce5141..26c4fa75 100644
--- a/subworkflows/local/qc_bam.nf
+++ b/subworkflows/local/qc_bam.nf
@@ -2,18 +2,18 @@
// A quality check subworkflow for processed bams.
//
-include { PICARD_COLLECTMULTIPLEMETRICS } from '../../modules/nf-core/picard/collectmultiplemetrics/main'
-include { PICARD_COLLECTHSMETRICS } from '../../modules/nf-core/picard/collecthsmetrics/main'
-include { CHROMOGRAPH as CHROMOGRAPH_COV } from '../../modules/nf-core/chromograph/main'
-include { QUALIMAP_BAMQC } from '../../modules/nf-core/qualimap/bamqc/main'
-include { TIDDIT_COV } from '../../modules/nf-core/tiddit/cov/main'
-include { MOSDEPTH } from '../../modules/nf-core/mosdepth/main'
-include { UCSC_WIGTOBIGWIG } from '../../modules/nf-core/ucsc/wigtobigwig/main'
-include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS } from '../../modules/nf-core/picard/collectwgsmetrics/main'
-include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_Y } from '../../modules/nf-core/picard/collectwgsmetrics/main'
-include { SENTIEON_WGSMETRICS } from '../../modules/nf-core/sentieon/wgsmetrics/main'
-include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_Y } from '../../modules/nf-core/sentieon/wgsmetrics/main'
-include { NGSBITS_SAMPLEGENDER } from '../../modules/nf-core/ngsbits/samplegender/main'
+include { PICARD_COLLECTMULTIPLEMETRICS } from '../../modules/nf-core/picard/collectmultiplemetrics/main'
+include { PICARD_COLLECTHSMETRICS } from '../../modules/nf-core/picard/collecthsmetrics/main'
+include { CHROMOGRAPH as CHROMOGRAPH_COV } from '../../modules/nf-core/chromograph/main'
+include { QUALIMAP_BAMQC } from '../../modules/nf-core/qualimap/bamqc/main'
+include { TIDDIT_COV } from '../../modules/nf-core/tiddit/cov/main'
+include { MOSDEPTH } from '../../modules/nf-core/mosdepth/main'
+include { UCSC_WIGTOBIGWIG } from '../../modules/nf-core/ucsc/wigtobigwig/main'
+include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_WG } from '../../modules/nf-core/picard/collectwgsmetrics/main'
+include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_Y } from '../../modules/nf-core/picard/collectwgsmetrics/main'
+include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_WG } from '../../modules/nf-core/sentieon/wgsmetrics/main'
+include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_Y } from '../../modules/nf-core/sentieon/wgsmetrics/main'
+include { NGSBITS_SAMPLEGENDER } from '../../modules/nf-core/ngsbits/samplegender/main'
workflow QC_BAM {
@@ -31,6 +31,8 @@ workflow QC_BAM {
ngsbits_samplegender_method // channel [val(method)]
main:
+ ch_cov = Channel.empty()
+ ch_cov_y = Channel.empty()
ch_versions = Channel.empty()
ch_qualimap = Channel.empty()
@@ -58,17 +60,19 @@ workflow QC_BAM {
MOSDEPTH (ch_mosdepth_in, ch_genome_fasta)
// COLLECT WGS METRICS
- PICARD_COLLECTWGSMETRICS ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs )
- PICARD_COLLECTWGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y )
-
- SENTIEON_WGSMETRICS ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs.map{ interval -> [[:], interval]} )
- SENTIEON_WGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y.map{ interval -> [[:], interval]} )
-
+ if (!params.analysis_type.equals("wes")) {
+ PICARD_COLLECTWGSMETRICS_WG ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs )
+ PICARD_COLLECTWGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y )
+ SENTIEON_WGSMETRICS_WG ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs.map{ interval -> [[:], interval]} )
+ SENTIEON_WGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y.map{ interval -> [[:], interval]} )
+ ch_cov = Channel.empty().mix(PICARD_COLLECTWGSMETRICS_WG.out.metrics, SENTIEON_WGSMETRICS_WG.out.wgs_metrics)
+ ch_cov_y = Channel.empty().mix(PICARD_COLLECTWGSMETRICS_Y.out.metrics, SENTIEON_WGSMETRICS_Y.out.wgs_metrics)
+ ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS_WG.out.versions.first(), SENTIEON_WGSMETRICS_WG.out.versions.first())
+ ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS_Y.out.versions.first(), SENTIEON_WGSMETRICS_Y.out.versions.first())
+ }
// Check sex
NGSBITS_SAMPLEGENDER(ch_bam_bai, ch_genome_fasta, ch_genome_fai, ngsbits_samplegender_method)
- ch_cov = Channel.empty().mix(PICARD_COLLECTWGSMETRICS.out.metrics, SENTIEON_WGSMETRICS.out.wgs_metrics)
- ch_cov_y = Channel.empty().mix(PICARD_COLLECTWGSMETRICS_Y.out.metrics, SENTIEON_WGSMETRICS_Y.out.wgs_metrics)
ch_versions = ch_versions.mix(CHROMOGRAPH_COV.out.versions.first())
ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first())
@@ -77,8 +81,6 @@ workflow QC_BAM {
ch_versions = ch_versions.mix(UCSC_WIGTOBIGWIG.out.versions.first())
ch_versions = ch_versions.mix(MOSDEPTH.out.versions.first())
ch_versions = ch_versions.mix(NGSBITS_SAMPLEGENDER.out.versions.first())
- ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first(), SENTIEON_WGSMETRICS.out.versions.first())
- ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS_Y.out.versions.first(), SENTIEON_WGSMETRICS_Y.out.versions.first())
emit:
multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), path(metrics) ]
diff --git a/subworkflows/local/subsample_mt.nf b/subworkflows/local/subsample_mt.nf
index d8da5aae..180748e5 100644
--- a/subworkflows/local/subsample_mt.nf
+++ b/subworkflows/local/subsample_mt.nf
@@ -19,7 +19,7 @@ workflow SUBSAMPLE_MT {
ch_mt_bam_bai.map {meta, bam, bai -> return [meta, bam, -1]}.set {ch_genomecov_in}
- BEDTOOLS_GENOMECOV (ch_genomecov_in, [], "genomecov")
+ BEDTOOLS_GENOMECOV (ch_genomecov_in, [], "genomecov", false)
CALCULATE_SEED_FRACTION (
BEDTOOLS_GENOMECOV.out.genomecov,
diff --git a/subworkflows/local/utils_nfcore_raredisease_pipeline/main.nf b/subworkflows/local/utils_nfcore_raredisease_pipeline/main.nf
index 912c7ace..36c0cbaa 100644
--- a/subworkflows/local/utils_nfcore_raredisease_pipeline/main.nf
+++ b/subworkflows/local/utils_nfcore_raredisease_pipeline/main.nf
@@ -150,6 +150,10 @@ workflow PIPELINE_COMPLETION {
imNotification(summary_params, hook_url)
}
}
+
+ workflow.onError {
+ log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting"
+ }
}
/*
@@ -420,8 +424,16 @@ def methodsDescriptionText(mqc_methods_yaml) {
meta["manifest_map"] = workflow.manifest.toMap()
// Pipeline DOI
- meta["doi_text"] = meta.manifest_map.doi ? "(doi: ${meta.manifest_map.doi})" : ""
- meta["nodoi_text"] = meta.manifest_map.doi ? "": " Make sure to update the text to include the Zenodo DOI of version of the pipeline used. "
+ if (meta.manifest_map.doi) {
+ // Using a loop to handle multiple DOIs
+ // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers
+ // Removing ` ` since the manifest.doi is a string and not a proper list
+ def temp_doi_ref = ""
+ String[] manifest_doi = meta.manifest_map.doi.tokenize(",")
+ for (String doi_ref: manifest_doi) temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), "
+ meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2)
+ } else meta["doi_text"] = ""
+ meta["nodoi_text"] = meta.manifest_map.doi ? "" : "If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used. "
// Tool references
meta["tool_citations"] = toolCitationText().replaceAll(", \\.", ".").replaceAll("\\. \\.", ".").replaceAll(", \\.", ".")
diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf
index a8b55d6f..14558c39 100644
--- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf
+++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf
@@ -65,9 +65,15 @@ def checkProfileProvided(nextflow_cli_args) {
// Citation string for pipeline
//
def workflowCitation() {
+ def temp_doi_ref = ""
+ String[] manifest_doi = workflow.manifest.doi.tokenize(",")
+ // Using a loop to handle multiple DOIs
+ // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers
+ // Removing ` ` since the manifest.doi is a string and not a proper list
+ for (String doi_ref: manifest_doi) temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n"
return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" +
"* The pipeline\n" +
- " ${workflow.manifest.doi}\n\n" +
+ temp_doi_ref + "\n" +
"* The nf-core framework\n" +
" https://doi.org/10.1038/s41587-020-0439-x\n\n" +
"* Software dependencies\n" +
diff --git a/workflows/raredisease.nf b/workflows/raredisease.nf
index 96debe46..ab09b6f2 100644
--- a/workflows/raredisease.nf
+++ b/workflows/raredisease.nf
@@ -71,6 +71,10 @@ if (!params.skip_vep_filter) {
}
}
+if (!params.skip_me_calling) {
+ mandatoryParams += ["mobile_element_references"]
+}
+
if (!params.skip_me_annotation) {
mandatoryParams += ["mobile_element_svdb_annotations", "variant_consequences_snv"]
}
@@ -112,12 +116,15 @@ include { SMNCOPYNUMBERCALLER } from '../modules/nf-core/smncopynumbercaller/mai
include { RENAME_ALIGN_FILES as RENAME_BAM_FOR_SMNCALLER } from '../modules/local/rename_align_files'
include { RENAME_ALIGN_FILES as RENAME_BAI_FOR_SMNCALLER } from '../modules/local/rename_align_files'
+include { CREATE_HGNCIDS_FILE } from '../modules/local/create_hgncids_file'
+include { CREATE_PEDIGREE_FILE } from '../modules/local/create_pedigree_file'
//
// SUBWORKFLOWS
//
include { ALIGN } from '../subworkflows/local/align'
+include { ANNOTATE_CSQ_PLI as ANN_CSQ_PLI_ME } from '../subworkflows/local/annotate_consequence_pli.nf'
include { ANNOTATE_CSQ_PLI as ANN_CSQ_PLI_MT } from '../subworkflows/local/annotate_consequence_pli'
include { ANNOTATE_CSQ_PLI as ANN_CSQ_PLI_SNV } from '../subworkflows/local/annotate_consequence_pli'
include { ANNOTATE_CSQ_PLI as ANN_CSQ_PLI_SV } from '../subworkflows/local/annotate_consequence_pli'
@@ -129,6 +136,7 @@ include { CALL_MOBILE_ELEMENTS } from '../subworkf
include { CALL_REPEAT_EXPANSIONS } from '../subworkflows/local/call_repeat_expansions'
include { CALL_SNV } from '../subworkflows/local/call_snv'
include { CALL_STRUCTURAL_VARIANTS } from '../subworkflows/local/call_structural_variants'
+include { GENERATE_CLINICAL_SET as GENERATE_CLINICAL_SET_ME } from '../subworkflows/local/generate_clinical_set.nf'
include { GENERATE_CLINICAL_SET as GENERATE_CLINICAL_SET_MT } from '../subworkflows/local/generate_clinical_set'
include { GENERATE_CLINICAL_SET as GENERATE_CLINICAL_SET_SNV } from '../subworkflows/local/generate_clinical_set'
include { GENERATE_CLINICAL_SET as GENERATE_CLINICAL_SET_SV } from '../subworkflows/local/generate_clinical_set'
@@ -160,7 +168,6 @@ workflow RAREDISEASE {
ch_multiqc_files = Channel.empty()
ch_samples = ch_samplesheet.map { meta, fastqs -> meta}
- ch_pedfile = ch_samples.toList().map { file(CustomFunctions.makePed(it, params.outdir)) }
ch_case_info = ch_samples.toList().map { CustomFunctions.createCaseChannel(it) }
// Initialize file channels for PREPARE_REFERENCES subworkflow
@@ -209,6 +216,8 @@ workflow RAREDISEASE {
: ch_references.genome_bwa_index
ch_genome_bwamem2index = params.bwamem2 ? Channel.fromPath(params.bwamem2).map {it -> [[id:it[0].simpleName], it]}.collect()
: ch_references.genome_bwamem2_index
+ ch_genome_bwamemeindex = params.bwameme ? Channel.fromPath(params.bwameme).map {it -> [[id:it[0].simpleName], it]}.collect()
+ : ch_references.genome_bwameme_index
ch_genome_chrsizes = ch_references.genome_chrom_sizes
ch_genome_fai = ch_references.genome_fai
ch_genome_dictionary = params.sequence_dictionary ? Channel.fromPath(params.sequence_dictionary).map {it -> [[id:it[0].simpleName], it]}.collect()
@@ -239,6 +248,7 @@ workflow RAREDISEASE {
ch_mtshift_backchain = ch_references.mtshift_backchain
ch_mtshift_bwaindex = ch_references.mtshift_bwa_index
ch_mtshift_bwamem2index = ch_references.mtshift_bwamem2_index
+ ch_mtshift_bwamemeindex = ch_references.mtshift_bwameme_index
ch_mtshift_dictionary = ch_references.mtshift_dict
ch_mtshift_fai = ch_references.mtshift_fai
ch_mtshift_fasta = ch_references.mtshift_fasta
@@ -285,9 +295,9 @@ workflow RAREDISEASE {
: ( params.vep_cache ? Channel.fromPath(params.vep_cache).collect() : Channel.value([]) )
ch_vep_extra_files_unsplit = params.vep_plugin_files ? Channel.fromPath(params.vep_plugin_files).collect()
: Channel.value([])
- ch_vep_filters_std_fmt = params.vep_filters ? Channel.fromPath(params.vep_filters).splitCsv().collect()
+ ch_vep_filters_std_fmt = params.vep_filters ? Channel.fromPath(params.vep_filters).map { it -> [[id:'standard'],it]}.collect()
: Channel.empty()
- ch_vep_filters_scout_fmt = params.vep_filters_scout_fmt ? Channel.fromPath(params.vep_filters_scout_fmt).collect()
+ ch_vep_filters_scout_fmt = params.vep_filters_scout_fmt ? Channel.fromPath(params.vep_filters_scout_fmt).map { it -> [[id:'scout'],it]}.collect()
: Channel.empty()
ch_versions = ch_versions.mix(ch_references.versions)
@@ -298,6 +308,11 @@ workflow RAREDISEASE {
ch_svcaller_priority = Channel.value(["tiddit", "manta", "gcnvcaller", "cnvnator"])
}
+
+ // Generate pedigree file
+ ch_pedfile = CREATE_PEDIGREE_FILE(ch_samples.toList()).ped
+ ch_versions = ch_versions.mix(CREATE_PEDIGREE_FILE.out.versions)
+
// Read and store paths in the vep_plugin_files file
if (params.vep_plugin_files) {
ch_vep_extra_files_unsplit.splitCsv ( header:true )
@@ -315,9 +330,11 @@ workflow RAREDISEASE {
// Read and store hgnc ids in a channel
ch_vep_filters_scout_fmt
- .map { it -> CustomFunctions.parseHgncIds(it.text) }
.mix (ch_vep_filters_std_fmt)
- .toList()
+ .set {ch_vep_filters}
+
+ CREATE_HGNCIDS_FILE(ch_vep_filters)
+ .txt
.set {ch_hgnc_ids}
// Input QC
@@ -345,9 +362,11 @@ workflow RAREDISEASE {
ch_genome_fai,
ch_genome_bwaindex,
ch_genome_bwamem2index,
+ ch_genome_bwamemeindex,
ch_genome_dictionary,
ch_mtshift_bwaindex,
ch_mtshift_bwamem2index,
+ ch_mtshift_bwamemeindex,
ch_mtshift_fasta,
ch_mtshift_dictionary,
ch_mtshift_fai,
@@ -356,7 +375,7 @@ workflow RAREDISEASE {
.set { ch_mapped }
ch_versions = ch_versions.mix(ALIGN.out.versions)
- if (!params.skip_mt_subsample) {
+ if (!params.skip_mt_subsample && (params.analysis_type.equals("wgs") || params.run_mt_for_wes)) {
SUBSAMPLE_MT(
ch_mapped.mt_bam_bai,
params.mt_subsample_rd,
@@ -386,14 +405,16 @@ workflow RAREDISEASE {
//
// EXPANSIONHUNTER AND STRANGER
//
- CALL_REPEAT_EXPANSIONS (
- ch_mapped.genome_bam_bai,
- ch_variant_catalog,
- ch_case_info,
- ch_genome_fasta,
- ch_genome_fai
- )
- ch_versions = ch_versions.mix(CALL_REPEAT_EXPANSIONS.out.versions)
+ if (params.analysis_type.equals("wgs")) {
+ CALL_REPEAT_EXPANSIONS (
+ ch_mapped.genome_bam_bai,
+ ch_variant_catalog,
+ ch_case_info,
+ ch_genome_fasta,
+ ch_genome_fai
+ )
+ ch_versions = ch_versions.mix(CALL_REPEAT_EXPANSIONS.out.versions)
+ }
//
// SNV CALLING
@@ -547,7 +568,7 @@ workflow RAREDISEASE {
//
// ANNOTATE MT SNVs
//
- if (!params.skip_mt_annotation) {
+ if (!params.skip_mt_annotation && (params.run_mt_for_wes || params.analysis_type.equals("wgs"))) {
ANNOTATE_MT_SNVS (
CALL_SNV.out.mt_vcf,
@@ -647,52 +668,87 @@ workflow RAREDISEASE {
ch_versions = ch_versions.mix(GENS.out.versions)
}
- CALL_MOBILE_ELEMENTS(
- ch_mapped.genome_bam_bai,
- ch_genome_fasta,
- ch_genome_fai,
- ch_me_references,
- ch_case_info,
- params.genome
- )
- ch_versions = ch_versions.mix(CALL_MOBILE_ELEMENTS.out.versions)
-
- if (!params.skip_me_annotation) {
- ANNOTATE_MOBILE_ELEMENTS(
- CALL_MOBILE_ELEMENTS.out.vcf,
- ch_me_svdb_resources,
+ if (!params.skip_me_calling) {
+ CALL_MOBILE_ELEMENTS(
+ ch_mapped.genome_bam_bai,
ch_genome_fasta,
- ch_genome_dictionary,
- ch_vep_cache,
- ch_variant_consequences_sv,
- ch_hgnc_ids,
- params.genome,
- params.vep_cache_version,
- ch_vep_extra_files
+ ch_genome_fai,
+ ch_me_references,
+ ch_case_info,
+ params.genome
)
- ch_versions = ch_versions.mix(ANNOTATE_MOBILE_ELEMENTS.out.versions)
+ ch_versions = ch_versions.mix(CALL_MOBILE_ELEMENTS.out.versions)
+
+ if (!params.skip_me_annotation) {
+ ANNOTATE_MOBILE_ELEMENTS(
+ CALL_MOBILE_ELEMENTS.out.vcf,
+ ch_me_svdb_resources,
+ ch_genome_fasta,
+ ch_genome_dictionary,
+ ch_vep_cache,
+ params.genome,
+ params.vep_cache_version,
+ ch_vep_extra_files
+ )
+ ch_versions = ch_versions.mix(ANNOTATE_MOBILE_ELEMENTS.out.versions)
+
+ GENERATE_CLINICAL_SET_ME(
+ ANNOTATE_MOBILE_ELEMENTS.out.vcf,
+ ch_hgnc_ids
+ )
+ ch_versions = ch_versions.mix( GENERATE_CLINICAL_SET_ME.out.versions )
+
+ ANN_CSQ_PLI_ME(
+ GENERATE_CLINICAL_SET_ME.out.vcf,
+ ch_variant_consequences_sv
+ )
+ ch_versions = ch_versions.mix( ANN_CSQ_PLI_ME.out.versions )
+
+ }
}
-
//
// Collate and save software versions
//
softwareVersionsToYAML(ch_versions)
- .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_pipeline_software_mqc_versions.yml', sort: true, newLine: true)
- .set { ch_collated_versions }
+ .collectFile(
+ storeDir: "${params.outdir}/pipeline_info",
+ name: 'nf_core_pipeline_software_mqc_versions.yml',
+ sort: true,
+ newLine: true
+ ).set { ch_collated_versions }
//
// MODULE: MultiQC
//
- ch_multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true)
- ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty()
- ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.fromPath("$projectDir/docs/images/nf-core-raredisease_logo_light.png", checkIfExists: true)
- summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json")
- ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params))
- ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
- ch_methods_description = Channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description))
- ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
- ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions)
- ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false))
+ ch_multiqc_config = Channel.fromPath(
+ "$projectDir/assets/multiqc_config.yml", checkIfExists: true)
+ ch_multiqc_custom_config = params.multiqc_config ?
+ Channel.fromPath(params.multiqc_config, checkIfExists: true) :
+ Channel.empty()
+ ch_multiqc_logo = params.multiqc_logo ?
+ Channel.fromPath(params.multiqc_logo, checkIfExists: true) :
+ Channel.fromPath("$projectDir/docs/images/nf-core-raredisease_logo_light.png", checkIfExists: true)
+
+ summary_params = paramsSummaryMap(
+ workflow, parameters_schema: "nextflow_schema.json")
+ ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params))
+
+ ch_multiqc_custom_methods_description = params.multiqc_methods_description ?
+ file(params.multiqc_methods_description, checkIfExists: true) :
+ file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
+ ch_methods_description = Channel.value(
+ methodsDescriptionText(ch_multiqc_custom_methods_description))
+
+ ch_multiqc_files = ch_multiqc_files.mix(
+ ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
+ ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions)
+ ch_multiqc_files = ch_multiqc_files.mix(
+ ch_methods_description.collectFile(
+ name: 'methods_description_mqc.yaml',
+ sort: true
+ )
+ )
+
if (!params.skip_fastqc) {
ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
}
|