diff --git a/CHANGELOG.md b/CHANGELOG.md
index c2764ae..eabc583 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,26 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [[1.1.4](https://github.com/sanger-tol/variantcalling/releases/tag/1.1.4)] - Shang Tang (patch 4) - [2024-12-05]
+
+### Enhancements & fixes
+
+- Module updates and remove Anaconda references
+
+### Software dependencies
+
+Note, since the pipeline is using Nextflow DSL2, each process will be run with its own [Biocontainer](https://biocontainers.pro/#/registry). This means that on occasion it is entirely possible for the pipeline to be using different versions of the same tool. However, the overall software dependency changes compared to the last release have been listed below for reference. Only `Docker` or `Singularity` containers are supported, `conda` is not supported.
+
+| Dependency | Old version | New version |
+| ----------- | ----------- | ----------- |
+| bcftools | 1.17 | 1.20 |
+| blastn | 2.14.1 | 2.15.0 |
+| deepvariant | 1.5.0 | 1.6.1 |
+| Python | 3.8.3 | 3.9.1 |
+| samtools | 1.17 | 1.21 |
+
+> **NB:** Dependency has been **updated** if both old and new version information is present. **NB:** Dependency has been **added** if just the new version information is present. **NB:** Dependency has been **removed** if version information isn't present.
+
## [[1.1.3](https://github.com/sanger-tol/variantcalling/releases/tag/1.1.3)] - Shang Tang (patch 3) - [2024-05-24]
### Enhancements & fixes
diff --git a/CITATION.cff b/CITATION.cff
index 5b0fb48..bc3790b 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -20,6 +20,10 @@ authors:
family-names: Muffato
affiliation: Wellcome Sanger Institute
orcid: "https://orcid.org/0000-0002-7860-3560"
+ - given-names: Tyler
+ family-names: Chafin
+ affiliation: Wellcome Sanger Institute
+ orcid: "https://orcid.org/0000-0001-8687-5905"
identifiers:
- type: doi
value: 10.5281/zenodo.7890528
diff --git a/conf/test_full.config b/conf/test_full.config
index 3a2d38e..7131c10 100644
--- a/conf/test_full.config
+++ b/conf/test_full.config
@@ -10,8 +10,6 @@
----------------------------------------------------------------------------------------
*/
-cleanup = true
-
params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'
diff --git a/conf/test_full_align.config b/conf/test_full_align.config
index a29005a..f6ac9aa 100644
--- a/conf/test_full_align.config
+++ b/conf/test_full_align.config
@@ -10,8 +10,6 @@
----------------------------------------------------------------------------------------
*/
-cleanup = true
-
params {
config_profile_name = 'Full test profile with alignment'
config_profile_description = 'Full non-aligned test dataset to check pipeline function'
diff --git a/modules.json b/modules.json
index 44bf8bf..16df126 100644
--- a/modules.json
+++ b/modules.json
@@ -7,100 +7,99 @@
"nf-core": {
"bcftools/concat": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "d1e0ec7670fa77905a378627232566ce54c3c26d",
"installed_by": ["modules"]
},
"blast/blastn": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"cat/cat": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
"branch": "master",
- "git_sha": "05c280924b6c768d484c7c443dad5e605c4ff4b4",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
- "deepvariant": {
+ "deepvariant/rundeepvariant": {
"branch": "master",
- "git_sha": "516189e968feb4ebdd9921806988b4c12b4ac2dc",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"gunzip": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"minimap2/align": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"samtools/collate": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208",
"installed_by": ["modules"]
},
"samtools/faidx": {
"branch": "master",
- "git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe",
+ "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208",
"installed_by": ["modules"]
},
"samtools/fasta": {
"branch": "master",
- "git_sha": "6f4299292ef2c5b66e6829527b2647c301b77cc9",
+ "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208",
"installed_by": ["modules"]
},
"samtools/fastq": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208",
"installed_by": ["modules"]
},
"samtools/flagstat": {
"branch": "master",
- "git_sha": "63e817de8c617131447192ab2c4e70b4ed4071f7",
+ "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540",
"installed_by": ["modules"]
},
"samtools/idxstats": {
"branch": "master",
- "git_sha": "63e817de8c617131447192ab2c4e70b4ed4071f7",
+ "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540",
"installed_by": ["modules"]
},
"samtools/merge": {
"branch": "master",
- "git_sha": "e7ce60acc8a33fa17429e966364657a63016e870",
- "installed_by": ["modules"],
- "patch": "modules/nf-core/samtools/merge/samtools-merge.diff"
+ "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208",
+ "installed_by": ["modules"]
},
"samtools/sort": {
"branch": "master",
- "git_sha": "a0f7be95788366c1923171e358da7d049eb440f9",
+ "git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b",
"installed_by": ["modules"]
},
"samtools/stats": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540",
"installed_by": ["modules"]
},
"samtools/view": {
"branch": "master",
- "git_sha": "6c2309aaec566c0d44a6cf14d4b2d0c51afe2e91",
- "installed_by": ["modules"]
+ "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540",
+ "installed_by": ["modules"],
+ "patch": "modules/nf-core/samtools/view/samtools-view.diff"
},
"untar": {
"branch": "master",
- "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"vcftools": {
"branch": "master",
- "git_sha": "485558b40040fc3ace093d9084210125d8ba4c97",
- "installed_by": ["modules"],
- "patch": "modules/nf-core/vcftools/vcftools.diff"
+ "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
+ "installed_by": ["modules"]
}
}
}
diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf
index 0505378..1b8e9f1 100644
--- a/modules/local/samplesheet_check.nf
+++ b/modules/local/samplesheet_check.nf
@@ -2,10 +2,10 @@ process SAMPLESHEET_CHECK {
tag "$samplesheet"
label 'process_single'
- conda "conda-forge::python=3.8.3"
+ conda "conda-forge::python=3.9.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/python:3.8.3' :
- 'biocontainers/python:3.8.3' }"
+ 'https://depot.galaxyproject.org/singularity/python:3.9--1' :
+ 'quay.io/biocontainers/python:3.9--1' }"
input:
path samplesheet
diff --git a/modules/nf-core/bcftools/concat/environment.yml b/modules/nf-core/bcftools/concat/environment.yml
new file mode 100644
index 0000000..5c00b11
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/environment.yml
@@ -0,0 +1,5 @@
+channels:
+ - conda-forge
+ - bioconda
+dependencies:
+ - bioconda::bcftools=1.20
diff --git a/modules/nf-core/bcftools/concat/main.nf b/modules/nf-core/bcftools/concat/main.nf
index 244a42c..a94b28d 100644
--- a/modules/nf-core/bcftools/concat/main.nf
+++ b/modules/nf-core/bcftools/concat/main.nf
@@ -2,17 +2,19 @@ process BCFTOOLS_CONCAT {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::bcftools=1.17"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0':
- 'biocontainers/bcftools:1.17--haef29d1_0' }"
+ 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0':
+ 'biocontainers/bcftools:1.20--h8b25389_0' }"
input:
tuple val(meta), path(vcfs), path(tbi)
output:
- tuple val(meta), path("*.gz"), emit: vcf
- path "versions.yml" , emit: versions
+ tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf
+ tuple val(meta), path("${prefix}.vcf.gz.tbi"), emit: tbi, optional: true
+ tuple val(meta), path("${prefix}.vcf.gz.csi"), emit: csi, optional: true
+ path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@@ -20,7 +22,11 @@ process BCFTOOLS_CONCAT {
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
+ def tbi_names = tbi.findAll { file -> !(file instanceof List) }.collect { file -> file.name }
+ def create_input_index = vcfs.collect { vcf -> tbi_names.contains(vcf.name + ".tbi") ? "" : "tabix ${vcf}" }.join("\n ")
"""
+ ${create_input_index}
+
bcftools concat \\
--output ${prefix}.vcf.gz \\
$args \\
@@ -34,9 +40,16 @@ process BCFTOOLS_CONCAT {
"""
stub:
+ def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
+ def index = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" :
+ args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" :
+ args.contains("--write-index") || args.contains("-W") ? "csi" :
+ ""
+ def create_index = index.matches("csi|tbi") ? "touch ${prefix}.vcf.gz.${index}" : ""
"""
- touch ${prefix}.vcf.gz
+ echo "" | gzip > ${prefix}.vcf.gz
+ ${create_index}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/bcftools/concat/meta.yml b/modules/nf-core/bcftools/concat/meta.yml
index e8c83cd..d2565b2 100644
--- a/modules/nf-core/bcftools/concat/meta.yml
+++ b/modules/nf-core/bcftools/concat/meta.yml
@@ -5,7 +5,6 @@ keywords:
- concat
- bcftools
- VCF
-
tools:
- concat:
description: |
@@ -14,36 +13,71 @@ tools:
documentation: http://www.htslib.org/doc/bcftools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:bcftools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - vcfs:
- type: files
- description: |
- List containing 2 or more vcf files
- e.g. [ 'file1.vcf', 'file2.vcf' ]
- - tbi:
- type: files
- description: |
- List containing 2 or more index files (optional)
- e.g. [ 'file1.tbi', 'file2.tbi' ]
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - vcfs:
+ type: list
+ description: |
+ List containing 2 or more vcf files
+ e.g. [ 'file1.vcf', 'file2.vcf' ]
+ - tbi:
+ type: list
+ description: |
+ List containing 2 or more index files (optional)
+ e.g. [ 'file1.tbi', 'file2.tbi' ]
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- vcf:
- type: file
- description: VCF concatenated output file
- pattern: "*.{vcf.gz}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ pattern: "*.{vcf.gz}"
+ - ${prefix}.vcf.gz:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ pattern: "*.{vcf.gz}"
+ - tbi:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ pattern: "*.tbi"
+ - ${prefix}.vcf.gz.tbi:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ pattern: "*.tbi"
+ - csi:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ pattern: "*.csi"
+ - ${prefix}.vcf.gz.csi:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ pattern: "*.csi"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@abhi18av"
- "@nvnieuwk"
+maintainers:
+ - "@abhi18av"
+ - "@nvnieuwk"
diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test b/modules/nf-core/bcftools/concat/tests/main.nf.test
new file mode 100644
index 0000000..cb4642b
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/main.nf.test
@@ -0,0 +1,316 @@
+nextflow_process {
+
+ name "Test Process BCFTOOLS_CONCAT"
+ script "../main.nf"
+ process "BCFTOOLS_CONCAT"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "bcftools"
+ tag "bcftools/concat"
+
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]]") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index") {
+
+ config "./vcf_gz_index.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.vcf,
+ process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.versions
+ ).match() },
+ { assert process.out.csi[0][1].endsWith(".csi") }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi") {
+
+ config "./vcf_gz_index_csi.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.vcf,
+ process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.versions
+ ).match() },
+ { assert process.out.csi[0][1].endsWith(".csi") }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi") {
+
+ config "./vcf_gz_index_tbi.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.vcf,
+ process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.tbi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.versions
+ ).match() },
+ { assert process.out.tbi[0][1].endsWith(".tbi") }
+ )
+ }
+
+ }
+
+
+ test("homo_sapiens - [[vcf1, vcf2], []]") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true)
+ ],
+ []
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - stub") {
+
+ config "./nextflow.config"
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub") {
+
+ config "./vcf_gz_index.config"
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() },
+ { assert process.out.csi[0][1].endsWith(".csi") }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub") {
+
+ config "./vcf_gz_index_csi.config"
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() },
+ { assert process.out.csi[0][1].endsWith(".csi") }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub") {
+
+ config "./vcf_gz_index_tbi.config"
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test3' ], // meta map
+ [
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz', checkIfExists: true),
+ 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),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test_haplotcaller.cnn.vcf.gz.tbi', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() },
+ { assert process.out.tbi[0][1].endsWith(".tbi") }
+ )
+ }
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/concat/tests/main.nf.test.snap b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap
new file mode 100644
index 0000000..09e87cd
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/main.nf.test.snap
@@ -0,0 +1,395 @@
+{
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ],
+ "csi": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tbi": [
+
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:04:11.178539482"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]]": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ],
+ "csi": [
+
+ ],
+ "tbi": [
+
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:03:08.765639958"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index": {
+ "content": [
+ [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.csi"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:03:21.607274757"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ],
+ "csi": [
+
+ ],
+ "tbi": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:04:27.332133878"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi": {
+ "content": [
+ [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.csi"
+ ]
+ ],
+ [
+
+ ],
+ [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:03:36.575719606"
+ },
+ "homo_sapiens - [[vcf1, vcf2], []]": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ],
+ "csi": [
+
+ ],
+ "tbi": [
+
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:03:54.069826178"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ],
+ "csi": [
+
+ ],
+ "tbi": [
+
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:04:02.45346063"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_tbi": {
+ "content": [
+ [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,5f6796c3ae109a1a5b87353954693f5a"
+ ]
+ ],
+ [
+
+ ],
+ [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.tbi"
+ ]
+ ],
+ [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:03:44.618596639"
+ },
+ "homo_sapiens - [[vcf1, vcf2], [tbi1, tbi2]] - vcf_gz_index_csi - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ],
+ "csi": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tbi": [
+
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test3"
+ },
+ "test3_vcf.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,c6e19f105510a46af1c5da9064e2e659"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-26T11:04:19.745768656"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/concat/tests/nextflow.config b/modules/nf-core/bcftools/concat/tests/nextflow.config
new file mode 100644
index 0000000..f3e1e98
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/nextflow.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = "--no-version"
+}
\ No newline at end of file
diff --git a/modules/nf-core/bcftools/concat/tests/tags.yml b/modules/nf-core/bcftools/concat/tests/tags.yml
new file mode 100644
index 0000000..21710d4
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/tags.yml
@@ -0,0 +1,2 @@
+bcftools/concat:
+ - "modules/nf-core/bcftools/concat/**"
diff --git a/modules/nf-core/bcftools/concat/tests/vcf_gz_index.config b/modules/nf-core/bcftools/concat/tests/vcf_gz_index.config
new file mode 100644
index 0000000..7dd696e
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/vcf_gz_index.config
@@ -0,0 +1,4 @@
+process {
+ ext.prefix = { "${meta.id}_vcf" }
+ ext.args = "--output-type z --write-index --no-version"
+}
diff --git a/modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config
new file mode 100644
index 0000000..aebffb6
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_csi.config
@@ -0,0 +1,4 @@
+process {
+ ext.prefix = { "${meta.id}_vcf" }
+ ext.args = "--output-type z --write-index=csi --no-version"
+}
diff --git a/modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config
new file mode 100644
index 0000000..b192ae7
--- /dev/null
+++ b/modules/nf-core/bcftools/concat/tests/vcf_gz_index_tbi.config
@@ -0,0 +1,4 @@
+process {
+ ext.prefix = { "${meta.id}_vcf" }
+ ext.args = "--output-type z --write-index=tbi --no-version"
+}
diff --git a/modules/nf-core/blast/blastn/environment.yml b/modules/nf-core/blast/blastn/environment.yml
index cb9b15d..777e097 100644
--- a/modules/nf-core/blast/blastn/environment.yml
+++ b/modules/nf-core/blast/blastn/environment.yml
@@ -1,7 +1,5 @@
-name: blast_blastn
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - bioconda::blast=2.14.1
+ - bioconda::blast=2.15.0
diff --git a/modules/nf-core/blast/blastn/main.nf b/modules/nf-core/blast/blastn/main.nf
index e8b96ad..68b43ba 100644
--- a/modules/nf-core/blast/blastn/main.nf
+++ b/modules/nf-core/blast/blastn/main.nf
@@ -4,8 +4,8 @@ process BLAST_BLASTN {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/blast:2.14.1--pl5321h6f7f691_0':
- 'biocontainers/blast:2.14.1--pl5321h6f7f691_0' }"
+ 'https://depot.galaxyproject.org/singularity/blast:2.15.0--pl5321h6f7f691_1':
+ 'biocontainers/blast:2.15.0--pl5321h6f7f691_1' }"
input:
tuple val(meta) , path(fasta)
@@ -29,7 +29,12 @@ process BLAST_BLASTN {
gzip -c -d ${fasta} > ${fasta_name}
fi
- DB=`find -L ./ -name "*.nin" | sed 's/\\.nin\$//'`
+ DB=`find -L ./ -name "*.nal" | sed 's/\\.nal\$//'`
+ if [ -z "\$DB" ]; then
+ DB=`find -L ./ -name "*.nin" | sed 's/\\.nin\$//'`
+ fi
+ echo Using \$DB
+
blastn \\
-num_threads ${task.cpus} \\
-db \$DB \\
diff --git a/modules/nf-core/blast/blastn/meta.yml b/modules/nf-core/blast/blastn/meta.yml
index a0d64dd..0f5e41b 100644
--- a/modules/nf-core/blast/blastn/meta.yml
+++ b/modules/nf-core/blast/blastn/meta.yml
@@ -13,39 +13,42 @@ tools:
documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs
doi: 10.1016/S0022-2836(05)80360-2
licence: ["US-Government-Work"]
+ identifier: ""
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - fasta:
- type: file
- description: Input fasta file containing queries sequences
- pattern: "*.{fa,fasta,fa.gz,fasta.gz}"
- - meta2:
- type: map
- description: |
- Groovy Map containing db information
- e.g. [ id:'test2', single_end:false ]
- - db:
- type: directory
- description: Directory containing the blast database
- pattern: "*"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - fasta:
+ type: file
+ description: Input fasta file containing queries sequences
+ pattern: "*.{fa,fasta,fa.gz,fasta.gz}"
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing db information
+ e.g. [ id:'test2', single_end:false ]
+ - db:
+ type: directory
+ description: Directory containing the blast database
+ pattern: "*"
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- txt:
- type: file
- description: File containing blastn hits
- pattern: "*.txt"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.txt":
+ type: file
+ description: File containing blastn hits
+ pattern: "*.txt"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@joseespinosa"
- "@drpatelh"
diff --git a/modules/nf-core/blast/blastn/tests/main.nf.test b/modules/nf-core/blast/blastn/tests/main.nf.test
index 1058c81..aacc93c 100644
--- a/modules/nf-core/blast/blastn/tests/main.nf.test
+++ b/modules/nf-core/blast/blastn/tests/main.nf.test
@@ -8,13 +8,14 @@ nextflow_process {
tag "modules_nfcore"
tag "blast"
tag "blast/blastn"
+ tag "blast/makeblastdb"
setup {
run("BLAST_MAKEBLASTDB") {
script "../../makeblastdb/main.nf"
process {
"""
- input[0] = [ [id:'test2'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
+ input[0] = [ [id:'test2'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]
"""
}
}
@@ -28,7 +29,7 @@ nextflow_process {
}
process {
"""
- input[0] = [ [id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
+ input[0] = [ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]
input[1] = BLAST_MAKEBLASTDB.out.db
"""
}
@@ -37,8 +38,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert path(process.out.txt.get(0).get(1)).getText().contains("Query= MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate") },
- { assert process.out.versions }
+ { assert path(process.out.txt[0][1]).getText().contains("Query= MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate") },
+ { assert snapshot(process.out.versions).match("versions") }
)
}
@@ -52,7 +53,7 @@ nextflow_process {
}
process {
"""
- input[0] = [ [id:'test'], file(params.test_data['sarscov2']['genome']['genome_fasta_gz'], checkIfExists: true) ]
+ input[0] = [ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) ]
input[1] = BLAST_MAKEBLASTDB.out.db
"""
}
@@ -61,8 +62,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
- { assert path(process.out.txt.get(0).get(1)).getText().contains("Query= MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate") },
- { assert process.out.versions }
+ { assert path(process.out.txt[0][1]).getText().contains("Query= MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate") },
+ { assert snapshot(process.out.versions).match("versions_zipped") }
)
}
diff --git a/modules/nf-core/blast/blastn/tests/main.nf.test.snap b/modules/nf-core/blast/blastn/tests/main.nf.test.snap
new file mode 100644
index 0000000..dd8b775
--- /dev/null
+++ b/modules/nf-core/blast/blastn/tests/main.nf.test.snap
@@ -0,0 +1,18 @@
+{
+ "versions": {
+ "content": [
+ [
+ "versions.yml:md5,faf2471d836ebbf24d96d3e1f8720b17"
+ ]
+ ],
+ "timestamp": "2023-12-11T07:20:03.54997013"
+ },
+ "versions_zipped": {
+ "content": [
+ [
+ "versions.yml:md5,faf2471d836ebbf24d96d3e1f8720b17"
+ ]
+ ],
+ "timestamp": "2023-12-11T07:20:12.925782708"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml
new file mode 100644
index 0000000..9b01c86
--- /dev/null
+++ b/modules/nf-core/cat/cat/environment.yml
@@ -0,0 +1,5 @@
+channels:
+ - conda-forge
+ - bioconda
+dependencies:
+ - conda-forge::pigz=2.3.4
diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf
index 9f06221..2862c64 100644
--- a/modules/nf-core/cat/cat/main.nf
+++ b/modules/nf-core/cat/cat/main.nf
@@ -2,7 +2,7 @@ process CAT_CAT {
tag "$meta.id"
label 'process_low'
- conda "conda-forge::pigz=2.3.4"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pigz:2.3.4' :
'biocontainers/pigz:2.3.4' }"
@@ -22,6 +22,8 @@ process CAT_CAT {
def args2 = task.ext.args2 ?: ''
def file_list = files_in.collect { it.toString() }
+ // choose appropriate concatenation tool depending on input and output format
+
// | input | output | command1 | command2 |
// |-----------|------------|----------|----------|
// | gzipped | gzipped | cat | |
@@ -30,11 +32,15 @@ process CAT_CAT {
// | ungzipped | gzipped | cat | pigz |
// Use input file ending as default
- prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}"
+ prefix = task.ext.prefix ?: "${meta.id}${getFileSuffix(file_list[0])}"
out_zip = prefix.endsWith('.gz')
in_zip = file_list[0].endsWith('.gz')
command1 = (in_zip && !out_zip) ? 'zcat' : 'cat'
command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : ''
+ if(file_list.contains(prefix.trim())) {
+ error "The name of the input file can't be the same as for the output prefix in the " +
+ "module CAT_CAT (currently `$prefix`). Please choose a different one."
+ }
"""
$command1 \\
$args \\
@@ -49,8 +55,12 @@ process CAT_CAT {
"""
stub:
- def file_list = files_in.collect { it.toString() }
- prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}"
+ def file_list = files_in.collect { it.toString() }
+ prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}"
+ if(file_list.contains(prefix.trim())) {
+ error "The name of the input file can't be the same as for the output prefix in the " +
+ "module CAT_CAT (currently `$prefix`). Please choose a different one."
+ }
"""
touch $prefix
@@ -60,3 +70,9 @@ process CAT_CAT {
END_VERSIONS
"""
}
+
+// for .gz files also include the second to last extension if it is present. E.g., .fasta.gz
+def getFileSuffix(filename) {
+ def match = filename =~ /^.*?((\.\w{1,5})?(\.\w{1,5}\.gz$))/
+ return match ? match[0][1] : filename.substring(filename.lastIndexOf('.'))
+}
diff --git a/modules/nf-core/cat/cat/meta.yml b/modules/nf-core/cat/cat/meta.yml
index 8acc0bf..81778a0 100644
--- a/modules/nf-core/cat/cat/meta.yml
+++ b/modules/nf-core/cat/cat/meta.yml
@@ -7,31 +7,37 @@ keywords:
tools:
- cat:
description: Just concatenation
-
documentation: https://man7.org/linux/man-pages/man1/cat.1.html
-
licence: ["GPL-3.0-or-later"]
+ identifier: ""
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - files_in:
- type: file
- description: List of compressed / uncompressed files
- pattern: "*"
-
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - files_in:
+ type: file
+ description: List of compressed / uncompressed files
+ pattern: "*"
output:
- - versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
- file_out:
- type: file
- description: Concatenated file. Will be gzipped if file_out ends with ".gz"
- pattern: "${file_out}"
-
+ - meta:
+ type: file
+ description: Concatenated file. Will be gzipped if file_out ends with ".gz"
+ pattern: "${file_out}"
+ - ${prefix}:
+ type: file
+ description: Concatenated file. Will be gzipped if file_out ends with ".gz"
+ pattern: "${file_out}"
+ - versions:
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@erikrikarddaniel"
- "@FriederikeHanssen"
+maintainers:
+ - "@erikrikarddaniel"
+ - "@FriederikeHanssen"
diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test
new file mode 100644
index 0000000..9cb1617
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/main.nf.test
@@ -0,0 +1,191 @@
+nextflow_process {
+
+ name "Test Process CAT_CAT"
+ script "../main.nf"
+ process "CAT_CAT"
+ tag "modules"
+ tag "modules_nfcore"
+ tag "cat"
+ tag "cat/cat"
+
+ test("test_cat_name_conflict") {
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'genome', single_end:true ],
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert !process.success },
+ { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") },
+ { assert snapshot(process.out.versions).match() }
+ )
+ }
+ }
+
+ test("test_cat_unzipped_unzipped") {
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+
+ test("test_cat_zipped_zipped") {
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+ then {
+ def lines = path(process.out.file_out.get(0).get(1)).linesGzip
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ lines[0..5],
+ lines.size(),
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("test_cat_zipped_unzipped") {
+ config './nextflow_zipped_unzipped.config'
+
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("test_cat_unzipped_zipped") {
+ config './nextflow_unzipped_zipped.config'
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+ then {
+ def lines = path(process.out.file_out.get(0).get(1)).linesGzip
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ lines[0..5],
+ lines.size(),
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("test_cat_one_file_unzipped_zipped") {
+ config './nextflow_unzipped_zipped.config'
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+ then {
+ def lines = path(process.out.file_out.get(0).get(1)).linesGzip
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ lines[0..5],
+ lines.size(),
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap
new file mode 100644
index 0000000..b7623ee
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/main.nf.test.snap
@@ -0,0 +1,147 @@
+{
+ "test_cat_unzipped_unzipped": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ],
+ "file_out": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2023-10-16T14:32:18.500464399"
+ },
+ "test_cat_zipped_unzipped": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ],
+ "file_out": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2023-10-16T14:32:49.642741302"
+ },
+ "test_cat_zipped_zipped": {
+ "content": [
+ [
+ "MT192765.1\tGenbank\ttranscript\t259\t29667\t.\t+\t.\tID=unknown_transcript_1;geneID=orf1ab;gene_name=orf1ab",
+ "MT192765.1\tGenbank\tgene\t259\t21548\t.\t+\t.\tParent=unknown_transcript_1",
+ "MT192765.1\tGenbank\tCDS\t259\t13461\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1",
+ "MT192765.1\tGenbank\tCDS\t13461\t21548\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1",
+ "MT192765.1\tGenbank\tCDS\t21556\t25377\t.\t+\t0\tParent=unknown_transcript_1;gbkey=CDS;gene=S;note=\"structural protein\";product=\"surface glycoprotein\";protein_id=QIK50427.1",
+ "MT192765.1\tGenbank\tgene\t21556\t25377\t.\t+\t.\tParent=unknown_transcript_1"
+ ],
+ 78,
+ [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-22T11:51:46.802978"
+ },
+ "test_cat_name_conflict": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-22T11:51:29.45394"
+ },
+ "test_cat_one_file_unzipped_zipped": {
+ "content": [
+ [
+ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome",
+ "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT",
+ "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG",
+ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG",
+ "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT",
+ "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG"
+ ],
+ 374,
+ [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-22T11:52:02.774016"
+ },
+ "test_cat_unzipped_zipped": {
+ "content": [
+ [
+ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome",
+ "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT",
+ "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG",
+ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG",
+ "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT",
+ "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG"
+ ],
+ 375,
+ [
+ "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-22T11:51:57.581523"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config b/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config
new file mode 100644
index 0000000..ec26b0f
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config
@@ -0,0 +1,6 @@
+
+process {
+ withName: CAT_CAT {
+ ext.prefix = 'cat.txt.gz'
+ }
+}
diff --git a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config b/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config
new file mode 100644
index 0000000..fbc7978
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config
@@ -0,0 +1,8 @@
+
+process {
+
+ withName: CAT_CAT {
+ ext.prefix = 'cat.txt'
+ }
+
+}
diff --git a/modules/nf-core/cat/cat/tests/tags.yml b/modules/nf-core/cat/cat/tests/tags.yml
new file mode 100644
index 0000000..37b578f
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/tags.yml
@@ -0,0 +1,2 @@
+cat/cat:
+ - modules/nf-core/cat/cat/**
diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml
new file mode 100644
index 0000000..9d79af9
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/environment.yml
@@ -0,0 +1,5 @@
+channels:
+ - conda-forge
+ - bioconda
+dependencies:
+ - bioconda::multiqc=1.20
diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf
index c9d014b..105f926 100644
--- a/modules/nf-core/custom/dumpsoftwareversions/main.nf
+++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf
@@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS {
label 'process_single'
// Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container
- conda "bioconda::multiqc=1.15"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/multiqc:1.15--pyhdfd78af_0' :
- 'biocontainers/multiqc:1.15--pyhdfd78af_0' }"
+ 'https://depot.galaxyproject.org/singularity/multiqc:1.20--pyhdfd78af_0' :
+ 'biocontainers/multiqc:1.20--pyhdfd78af_0' }"
input:
path versions
diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml
index c32657d..dc1e412 100644
--- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml
+++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml
@@ -1,36 +1,43 @@
-# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: custom_dumpsoftwareversions
-description: Custom module used to dump software versions within the nf-core pipeline template
+description: Custom module used to dump software versions within the nf-core pipeline
+ template
keywords:
- custom
- dump
- version
tools:
- custom:
- description: Custom module used to dump software versions within the nf-core pipeline template
+ description: Custom module used to dump software versions within the nf-core pipeline
+ template
homepage: https://github.com/nf-core/tools
documentation: https://github.com/nf-core/tools
licence: ["MIT"]
+ identifier: ""
input:
- - versions:
- type: file
- description: YML file containing software versions
- pattern: "*.yml"
-
+ - - versions:
+ type: file
+ description: YML file containing software versions
+ pattern: "*.yml"
output:
- yml:
- type: file
- description: Standard YML file containing software versions
- pattern: "software_versions.yml"
+ - software_versions.yml:
+ type: file
+ description: Standard YML file containing software versions
+ pattern: "software_versions.yml"
- mqc_yml:
- type: file
- description: MultiQC custom content YML file containing software versions
- pattern: "software_versions_mqc.yml"
+ - software_versions_mqc.yml:
+ type: file
+ description: MultiQC custom content YML file containing software versions
+ pattern: "software_versions_mqc.yml"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
-
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@drpatelh"
- "@grst"
+maintainers:
+ - "@drpatelh"
+ - "@grst"
diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
index e55b8d4..b83b32c 100755
--- a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
+++ b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
@@ -3,7 +3,6 @@
"""Provide functions to merge multiple versions.yml files."""
-
import platform
from textwrap import dedent
diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test
new file mode 100644
index 0000000..b1e1630
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test
@@ -0,0 +1,43 @@
+nextflow_process {
+
+ name "Test Process CUSTOM_DUMPSOFTWAREVERSIONS"
+ script "../main.nf"
+ process "CUSTOM_DUMPSOFTWAREVERSIONS"
+ tag "modules"
+ tag "modules_nfcore"
+ tag "custom"
+ tag "dumpsoftwareversions"
+ tag "custom/dumpsoftwareversions"
+
+ test("Should run without failures") {
+ when {
+ process {
+ """
+ def tool1_version = '''
+ TOOL1:
+ tool1: 0.11.9
+ '''.stripIndent()
+
+ def tool2_version = '''
+ TOOL2:
+ tool2: 1.9
+ '''.stripIndent()
+
+ input[0] = Channel.of(tool1_version, tool2_version).collectFile()
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.versions,
+ file(process.out.mqc_yml[0]).readLines()[0..10],
+ file(process.out.yml[0]).readLines()[0..7]
+ ).match()
+ }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap
new file mode 100644
index 0000000..5f59a93
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap
@@ -0,0 +1,33 @@
+{
+ "Should run without failures": {
+ "content": [
+ [
+ "versions.yml:md5,76d454d92244589d32455833f7c1ba6d"
+ ],
+ [
+ "data: \"\\n
\\n \\n \\n Process Name | \\n \\",
+ " \\ Software | \\n Version | \\n
\\n \\n\\",
+ " \\n\\n\\n CUSTOM_DUMPSOFTWAREVERSIONS | \\n python | \\n\\",
+ " \\ 3.11.7 | \\n
\\n\\n\\n | \\n \\",
+ " \\ yaml | \\n 5.4.1 | \\n
\\n\\n\\n\\",
+ " \\n\\n TOOL1 | \\n tool1 | \\n\\",
+ " \\ 0.11.9 | \\n
\\n\\n\\n\\n\\n TOOL2 | \\n\\",
+ " \\ tool2 | \\n 1.9 | \\n
\\n\\n\\n\\",
+ " \\n\\n Workflow | \\n Nextflow | \\n\\"
+ ],
+ [
+ "CUSTOM_DUMPSOFTWAREVERSIONS:",
+ " python: 3.11.7",
+ " yaml: 5.4.1",
+ "TOOL1:",
+ " tool1: 0.11.9",
+ "TOOL2:",
+ " tool2: '1.9'",
+ "Workflow:"
+ ]
+ ],
+ "timestamp": "2024-01-09T23:01:18.710682"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml b/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml
new file mode 100644
index 0000000..405aa24
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml
@@ -0,0 +1,2 @@
+custom/dumpsoftwareversions:
+ - modules/nf-core/custom/dumpsoftwareversions/**
diff --git a/modules/nf-core/deepvariant/environment.yml b/modules/nf-core/deepvariant/environment.yml
deleted file mode 100644
index bcd3a8b..0000000
--- a/modules/nf-core/deepvariant/environment.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-channels:
- - conda-forge
- - bioconda
- - defaults
diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml
deleted file mode 100644
index a50dc57..0000000
--- a/modules/nf-core/deepvariant/meta.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-name: deepvariant
-description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data
-keywords:
- - variant calling
- - machine learning
- - neural network
-tools:
- - deepvariant:
- description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data
- homepage: https://github.com/google/deepvariant
- documentation: https://github.com/google/deepvariant
- tool_dev_url: https://github.com/google/deepvariant
- doi: "10.1038/nbt.4235"
- licence: ["BSD-3-clause"]
-input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input:
- type: file
- description: BAM/CRAM file
- pattern: "*.bam/cram"
- - index:
- type: file
- description: Index of BAM/CRAM file
- pattern: "*.bai/crai"
- - interval:
- type: file
- description: Interval file for targeted regions
- pattern: "*.bed"
- - meta2:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'genome' ]
- - fasta:
- type: file
- description: The reference fasta file
- pattern: "*.fasta"
- - meta3:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'genome' ]
- - fai:
- type: file
- description: Index of reference fasta file
- pattern: "*.fai"
- - meta4:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'genome' ]
- - gzi:
- type: file
- description: GZI index of reference fasta file
- pattern: "*.gzi"
-output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - vcf:
- type: file
- description: Compressed VCF file
- pattern: "*.vcf.gz"
- - gvcf:
- type: file
- description: Compressed GVCF file
- pattern: "*.g.vcf.gz"
- - version:
- type: file
- description: File containing software version
- pattern: "*.{version.txt}"
-authors:
- - "@abhi18av"
- - "@ramprasadn"
-maintainers:
- - "@abhi18av"
- - "@ramprasadn"
diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/rundeepvariant/main.nf
similarity index 71%
rename from modules/nf-core/deepvariant/main.nf
rename to modules/nf-core/deepvariant/rundeepvariant/main.nf
index 2d5c480..7f99c53 100644
--- a/modules/nf-core/deepvariant/main.nf
+++ b/modules/nf-core/deepvariant/rundeepvariant/main.nf
@@ -1,14 +1,18 @@
-process DEEPVARIANT {
+process DEEPVARIANT_RUNDEEPVARIANT {
tag "$meta.id"
label 'process_high'
- container "nf-core/deepvariant:1.5.0"
+ // FIXME Conda is not supported at the moment
+ // BUG https://github.com/nf-core/modules/issues/1754
+ // BUG https://github.com/bioconda/bioconda-recipes/issues/30310
+ container "nf-core/deepvariant:1.6.1"
input:
tuple val(meta), path(input), path(index), path(intervals)
tuple val(meta2), path(fasta)
tuple val(meta3), path(fai)
tuple val(meta4), path(gzi)
+ tuple val(meta5), path(par_bed)
output:
tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf
@@ -28,6 +32,10 @@ process DEEPVARIANT {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def regions = intervals ? "--regions=${intervals}" : ""
+ def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : ""
+ // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755
+ // FIXME Revert this on next version bump
+ def VERSION = '1.6.1'
"""
/opt/deepvariant/bin/run_deepvariant \\
@@ -37,12 +45,13 @@ process DEEPVARIANT {
--output_gvcf=${prefix}.g.vcf.gz \\
${args} \\
${regions} \\
- --intermediate_results_dir=. \\
+ ${par_regions} \\
+ --intermediate_results_dir=tmp \\
--num_shards=${task.cpus}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
- deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' )
+ deepvariant: $VERSION
END_VERSIONS
"""
@@ -52,6 +61,9 @@ process DEEPVARIANT {
error "DEEPVARIANT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
prefix = task.ext.prefix ?: "${meta.id}"
+ // WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755
+ // FIXME Revert this on next version bump
+ def VERSION = '1.6.1'
"""
touch ${prefix}.vcf.gz
touch ${prefix}.vcf.gz.tbi
@@ -60,7 +72,7 @@ process DEEPVARIANT {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
- deepvariant: \$(echo \$(/opt/deepvariant/bin/run_deepvariant --version) | sed 's/^.*version //; s/ .*\$//' )
+ deepvariant: $VERSION
END_VERSIONS
"""
}
diff --git a/modules/nf-core/deepvariant/rundeepvariant/meta.yml b/modules/nf-core/deepvariant/rundeepvariant/meta.yml
new file mode 100644
index 0000000..29b45ff
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/meta.yml
@@ -0,0 +1,122 @@
+name: deepvariant_rundeepvariant
+description: DeepVariant is an analysis pipeline that uses a deep neural network to
+ call genetic variants from next-generation DNA sequencing data
+keywords:
+ - variant calling
+ - machine learning
+ - neural network
+tools:
+ - deepvariant:
+ description: DeepVariant is an analysis pipeline that uses a deep neural network
+ to call genetic variants from next-generation DNA sequencing data
+ homepage: https://github.com/google/deepvariant
+ documentation: https://github.com/google/deepvariant
+ tool_dev_url: https://github.com/google/deepvariant
+ doi: "10.1038/nbt.4235"
+ licence: ["BSD-3-clause"]
+ identifier: biotools:deepvariant
+input:
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input:
+ type: file
+ description: BAM/CRAM file
+ pattern: "*.bam/cram"
+ - index:
+ type: file
+ description: Index of BAM/CRAM file
+ pattern: "*.bai/crai"
+ - intervals:
+ type: file
+ description: file containing intervals
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fasta:
+ type: file
+ description: The reference fasta file
+ pattern: "*.fasta"
+ - - meta3:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fai:
+ type: file
+ description: Index of reference fasta file
+ pattern: "*.fai"
+ - - meta4:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - gzi:
+ type: file
+ description: GZI index of reference fasta file
+ pattern: "*.gzi"
+ - - meta5:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - par_bed:
+ type: file
+ description: BED file containing PAR regions
+ pattern: "*.bed"
+output:
+ - vcf:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.vcf.gz:
+ type: file
+ description: Compressed VCF file
+ pattern: "*.vcf.gz"
+ - vcf_tbi:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.vcf.gz.tbi:
+ type: file
+ description: Tabix index file of compressed VCF
+ pattern: "*.vcf.gz.tbi"
+ - gvcf:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.g.vcf.gz:
+ type: file
+ description: Compressed GVCF file
+ pattern: "*.g.vcf.gz"
+ - gvcf_tbi:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.g.vcf.gz.tbi:
+ type: file
+ description: Tabix index file of compressed GVCF
+ pattern: "*.g.vcf.gz.tbi"
+ - versions:
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
+authors:
+ - "@abhi18av"
+ - "@ramprasadn"
+maintainers:
+ - "@abhi18av"
+ - "@ramprasadn"
diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test
new file mode 100644
index 0000000..0790fb8
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test
@@ -0,0 +1,166 @@
+nextflow_process {
+
+ name "Test Process DEEPVARIANT_RUNDEEPVARIANT"
+ script "../main.nf"
+ process "DEEPVARIANT_RUNDEEPVARIANT"
+
+ tag "deepvariant/rundeepvariant"
+ 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] = [
+ [],[]
+ ]
+ input[4] = [
+ [],[]
+ ]
+ """
+ }
+ }
+
+ 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] = [
+ [],[]
+ ]
+ input[4] = [
+ [],[]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") {
+ config "./nextflow-non-autosomal-calling.config"
+ tag "test"
+ 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] = [
+ [],[]
+ ]
+ input[4] = [
+ [ id:'genome'],
+ file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.blacklist_intervals.bed', checkIfExists: true)
+ ]
+ """
+ }
+ }
+
+ 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)
+ ]
+ input[4] = [
+ [],[]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+}
diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap
new file mode 100644
index 0000000..1ec351e
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/tests/main.nf.test.snap
@@ -0,0 +1,358 @@
+{
+ "homo_sapiens - [bam, bai] - fasta_gz - fasta_gz_fai": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-08-29T11:36:27.325363"
+ },
+ "homo_sapiens - [bam, bai] - fasta - fai": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-08-29T11:34:41.779153"
+ },
+ "homo_sapiens - [cram, crai, genome_bed] - fasta - fai": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,0a629e1745926cfcedf4b169046a921a"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,49503913c28ec70a6f4aa52f6b357b4d"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,8b8ab4a675f01e437aa72e1438a717d0"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0000833138104e87b05eaa906821eb21"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-08-29T11:35:16.993129"
+ },
+ "homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ],
+ "gvcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a"
+ ]
+ ],
+ "gvcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c"
+ ]
+ ],
+ "vcf_tbi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,a251d8d9f5e8b737d8298eead96c0890"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-08-29T11:35:52.23093"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config
new file mode 100644
index 0000000..78d8d59
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-intervals.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: DEEPVARIANT_RUNDEEPVARIANT {
+ ext.args = '--model_type=WGS '
+ ext.prefix = { "${meta.id}_out" }
+ }
+
+}
diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config
new file mode 100644
index 0000000..6d26529
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow-non-autosomal-calling.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: DEEPVARIANT_RUNDEEPVARIANT {
+ ext.args = '--model_type=WGS --haploid_contigs chr22'
+ ext.prefix = { "${meta.id}_out" }
+ }
+
+}
diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config
new file mode 100644
index 0000000..77e355c
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/tests/nextflow.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: DEEPVARIANT_RUNDEEPVARIANT {
+ ext.args = ' --regions=\"chr22:0-40001\" --model_type=WGS '
+ ext.prefix = { "${meta.id}_out" }
+ }
+
+}
diff --git a/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml
new file mode 100644
index 0000000..958b8e4
--- /dev/null
+++ b/modules/nf-core/deepvariant/rundeepvariant/tests/tags.yml
@@ -0,0 +1,2 @@
+deepvariant/rundeepvariant:
+ - modules/nf-core/deepvariant/rundeepvariant/**
diff --git a/modules/nf-core/gunzip/environment.yml b/modules/nf-core/gunzip/environment.yml
index 25910b3..c779485 100644
--- a/modules/nf-core/gunzip/environment.yml
+++ b/modules/nf-core/gunzip/environment.yml
@@ -1,7 +1,7 @@
-name: gunzip
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - conda-forge::sed=4.7
+ - conda-forge::grep=3.11
+ - conda-forge::sed=4.8
+ - conda-forge::tar=1.34
diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf
index 468a6f2..5e67e3b 100644
--- a/modules/nf-core/gunzip/main.nf
+++ b/modules/nf-core/gunzip/main.nf
@@ -4,8 +4,8 @@ process GUNZIP {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
- 'nf-core/ubuntu:20.04' }"
+ 'https://depot.galaxyproject.org/singularity/ubuntu:22.04' :
+ 'nf-core/ubuntu:22.04' }"
input:
tuple val(meta), path(archive)
@@ -18,8 +18,11 @@ process GUNZIP {
task.ext.when == null || task.ext.when
script:
- def args = task.ext.args ?: ''
- gunzip = archive.toString() - '.gz'
+ def args = task.ext.args ?: ''
+ def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1]
+ def name = archive.toString() - '.gz' - ".$extension"
+ def prefix = task.ext.prefix ?: name
+ gunzip = prefix + ".$extension"
"""
# Not calling gunzip itself because it creates files
# with the original group ownership rather than the
@@ -37,7 +40,11 @@ process GUNZIP {
"""
stub:
- gunzip = archive.toString() - '.gz'
+ def args = task.ext.args ?: ''
+ def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1]
+ def name = archive.toString() - '.gz' - ".$extension"
+ def prefix = task.ext.prefix ?: name
+ gunzip = prefix + ".$extension"
"""
touch $gunzip
cat <<-END_VERSIONS > versions.yml
diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml
index 231034f..9066c03 100644
--- a/modules/nf-core/gunzip/meta.yml
+++ b/modules/nf-core/gunzip/meta.yml
@@ -10,25 +10,32 @@ tools:
gzip is a file format and a software application used for file compression and decompression.
documentation: https://www.gnu.org/software/gzip/manual/gzip.html
licence: ["GPL-3.0-or-later"]
+ identifier: ""
input:
- - meta:
- type: map
- description: |
- Optional groovy Map containing meta information
- e.g. [ id:'test', single_end:false ]
- - archive:
- type: file
- description: File to be compressed/uncompressed
- pattern: "*.*"
+ - - meta:
+ type: map
+ description: |
+ Optional groovy Map containing meta information
+ e.g. [ id:'test', single_end:false ]
+ - archive:
+ type: file
+ description: File to be compressed/uncompressed
+ pattern: "*.*"
output:
- gunzip:
- type: file
- description: Compressed/uncompressed file
- pattern: "*.*"
+ - meta:
+ type: file
+ description: Compressed/uncompressed file
+ pattern: "*.*"
+ - $gunzip:
+ type: file
+ description: Compressed/uncompressed file
+ pattern: "*.*"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@joseespinosa"
- "@drpatelh"
@@ -37,3 +44,4 @@ maintainers:
- "@joseespinosa"
- "@drpatelh"
- "@jfy133"
+ - "@gallvp"
diff --git a/modules/nf-core/gunzip/tests/main.nf.test b/modules/nf-core/gunzip/tests/main.nf.test
index d031792..776211a 100644
--- a/modules/nf-core/gunzip/tests/main.nf.test
+++ b/modules/nf-core/gunzip/tests/main.nf.test
@@ -15,10 +15,96 @@ nextflow_process {
}
process {
"""
- input[0] = [
- [],
- file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
- ]
+ input[0] = Channel.of([
+ [],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
+ ]
+ )
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("Should run without failures - prefix") {
+
+ config './nextflow.config'
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = Channel.of([
+ [ id: 'test' ],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
+ ]
+ )
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("Should run without failures - stub") {
+
+ options '-stub'
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = Channel.of([
+ [],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
+ ]
+ )
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("Should run without failures - prefix - stub") {
+
+ options '-stub'
+ config './nextflow.config'
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = Channel.of([
+ [ id: 'test' ],
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
+ ]
+ )
"""
}
}
diff --git a/modules/nf-core/gunzip/tests/main.nf.test.snap b/modules/nf-core/gunzip/tests/main.nf.test.snap
index 720fd9f..069967e 100644
--- a/modules/nf-core/gunzip/tests/main.nf.test.snap
+++ b/modules/nf-core/gunzip/tests/main.nf.test.snap
@@ -1,4 +1,70 @@
{
+ "Should run without failures - prefix - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,54376d32aca20e937a4ec26dac228e84"
+ ],
+ "gunzip": [
+ [
+ {
+ "id": "test"
+ },
+ "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,54376d32aca20e937a4ec26dac228e84"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-25T11:35:10.861293"
+ },
+ "Should run without failures - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ [
+
+ ],
+ "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,54376d32aca20e937a4ec26dac228e84"
+ ],
+ "gunzip": [
+ [
+ [
+
+ ],
+ "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,54376d32aca20e937a4ec26dac228e84"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-25T11:35:05.857145"
+ },
"Should run without failures": {
"content": [
{
@@ -26,6 +92,43 @@
]
}
],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
"timestamp": "2023-10-17T15:35:37.690477896"
+ },
+ "Should run without failures - prefix": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,54376d32aca20e937a4ec26dac228e84"
+ ],
+ "gunzip": [
+ [
+ {
+ "id": "test"
+ },
+ "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,54376d32aca20e937a4ec26dac228e84"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-25T11:33:32.921739"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/gunzip/tests/nextflow.config b/modules/nf-core/gunzip/tests/nextflow.config
new file mode 100644
index 0000000..dec7764
--- /dev/null
+++ b/modules/nf-core/gunzip/tests/nextflow.config
@@ -0,0 +1,5 @@
+process {
+ withName: GUNZIP {
+ ext.prefix = { "${meta.id}.xyz" }
+ }
+}
diff --git a/modules/nf-core/minimap2/align/environment.yml b/modules/nf-core/minimap2/align/environment.yml
index 60b9a8b..dc6476b 100644
--- a/modules/nf-core/minimap2/align/environment.yml
+++ b/modules/nf-core/minimap2/align/environment.yml
@@ -1,8 +1,8 @@
-name: minimap2_align
channels:
- conda-forge
- bioconda
- - defaults
+
dependencies:
- - bioconda::minimap2=2.24
- - bioconda::samtools=1.14
+ - bioconda::htslib=1.20
+ - bioconda::minimap2=2.28
+ - bioconda::samtools=1.20
diff --git a/modules/nf-core/minimap2/align/main.nf b/modules/nf-core/minimap2/align/main.nf
index fa3ae50..d82dc14 100644
--- a/modules/nf-core/minimap2/align/main.nf
+++ b/modules/nf-core/minimap2/align/main.nf
@@ -1,45 +1,75 @@
process MINIMAP2_ALIGN {
tag "$meta.id"
- label 'process_medium'
+ label 'process_high'
// Note: the versions here need to match the versions used in the mulled container below and minimap2/index
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' :
- 'biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }"
+ 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:3161f532a5ea6f1dec9be5667c9efc2afdac6104-0' :
+ 'biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:3161f532a5ea6f1dec9be5667c9efc2afdac6104-0' }"
input:
tuple val(meta), path(reads)
tuple val(meta2), path(reference)
val bam_format
+ val bam_index_extension
val cigar_paf_format
val cigar_bam
output:
- tuple val(meta), path("*.paf"), optional: true, emit: paf
- tuple val(meta), path("*.bam"), optional: true, emit: bam
- path "versions.yml" , emit: versions
+ tuple val(meta), path("*.paf") , optional: true, emit: paf
+ tuple val(meta), path("*.bam") , optional: true, emit: bam
+ tuple val(meta), path("*.bam.${bam_index_extension}"), optional: true, emit: index
+ path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
- def args = task.ext.args ?: ''
+ def args = task.ext.args ?: ''
+ def args2 = task.ext.args2 ?: ''
+ def args3 = task.ext.args3 ?: ''
+ def args4 = task.ext.args4 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
- def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf"
+ def bam_index = bam_index_extension ? "${prefix}.bam##idx##${prefix}.bam.${bam_index_extension} --write-index" : "${prefix}.bam"
+ def bam_output = bam_format ? "-a | samtools sort -@ ${task.cpus-1} -o ${bam_index} ${args2}" : "-o ${prefix}.paf"
def cigar_paf = cigar_paf_format && !bam_format ? "-c" : ''
def set_cigar_bam = cigar_bam && bam_format ? "-L" : ''
+ def bam_input = "${reads.extension}".matches('sam|bam|cram')
+ def samtools_reset_fastq = bam_input ? "samtools reset --threads ${task.cpus-1} $args3 $reads | samtools fastq --threads ${task.cpus-1} $args4 |" : ''
+ def query = bam_input ? "-" : reads
+ def target = reference ?: (bam_input ? error("BAM input requires reference") : reads)
+
"""
+ $samtools_reset_fastq \\
minimap2 \\
$args \\
-t $task.cpus \\
- "${reference ?: reads}" \\
- "$reads" \\
+ $target \\
+ $query \\
$cigar_paf \\
$set_cigar_bam \\
$bam_output
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ minimap2: \$(minimap2 --version 2>&1)
+ samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
+ END_VERSIONS
+ """
+
+ stub:
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ def output_file = bam_format ? "${prefix}.bam" : "${prefix}.paf"
+ def bam_index = bam_index_extension ? "touch ${prefix}.bam.${bam_index_extension}" : ""
+ def bam_input = "${reads.extension}".matches('sam|bam|cram')
+ def target = reference ?: (bam_input ? error("BAM input requires reference") : reads)
+
+ """
+ touch $output_file
+ ${bam_index}
+
cat <<-END_VERSIONS > versions.yml
"${task.process}":
minimap2: \$(minimap2 --version 2>&1)
diff --git a/modules/nf-core/minimap2/align/meta.yml b/modules/nf-core/minimap2/align/meta.yml
index 408522d..a4cfc89 100644
--- a/modules/nf-core/minimap2/align/meta.yml
+++ b/modules/nf-core/minimap2/align/meta.yml
@@ -14,62 +14,86 @@ tools:
homepage: https://github.com/lh3/minimap2
documentation: https://github.com/lh3/minimap2#uguide
licence: ["MIT"]
+ identifier: ""
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - reads:
- type: file
- description: |
- List of input FASTA or FASTQ files of size 1 and 2 for single-end
- and paired-end data, respectively.
- - meta2:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'test_ref']
- - reference:
- type: file
- description: |
- Reference database in FASTA format.
- - bam_format:
- type: boolean
- description: Specify that output should be in BAM format
- - cigar_paf_format:
- type: boolean
- description: Specify that output CIGAR should be in PAF format
- - cigar_bam:
- type: boolean
- description: |
- Write CIGAR with >65535 ops at the CG tag. This is recommended when
- doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations)
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - reads:
+ type: file
+ description: |
+ List of input FASTA or FASTQ files of size 1 and 2 for single-end
+ and paired-end data, respectively.
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'test_ref']
+ - reference:
+ type: file
+ description: |
+ Reference database in FASTA format.
+ - - bam_format:
+ type: boolean
+ description: Specify that output should be in BAM format
+ - - bam_index_extension:
+ type: string
+ description: BAM alignment index extension (e.g. "bai")
+ - - cigar_paf_format:
+ type: boolean
+ description: Specify that output CIGAR should be in PAF format
+ - - cigar_bam:
+ type: boolean
+ description: |
+ Write CIGAR with >65535 ops at the CG tag. This is recommended when
+ doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations)
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- paf:
- type: file
- description: Alignment in PAF format
- pattern: "*.paf"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.paf":
+ type: file
+ description: Alignment in PAF format
+ pattern: "*.paf"
- bam:
- type: file
- description: Alignment in BAM format
- pattern: "*.bam"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.bam":
+ type: file
+ description: Alignment in BAM format
+ pattern: "*.bam"
+ - index:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.bam.${bam_index_extension}":
+ type: file
+ description: BAM alignment index
+ pattern: "*.bam.*"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@heuermh"
- "@sofstam"
- "@sateeshperi"
- "@jfy133"
+ - "@fellen31"
maintainers:
- "@heuermh"
- "@sofstam"
- "@sateeshperi"
- "@jfy133"
+ - "@fellen31"
diff --git a/modules/nf-core/minimap2/align/tests/main.nf.test b/modules/nf-core/minimap2/align/tests/main.nf.test
new file mode 100644
index 0000000..4072c17
--- /dev/null
+++ b/modules/nf-core/minimap2/align/tests/main.nf.test
@@ -0,0 +1,441 @@
+nextflow_process {
+
+ name "Test Process MINIMAP2_ALIGN"
+ script "../main.nf"
+ process "MINIMAP2_ALIGN"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "minimap2"
+ tag "minimap2/align"
+
+ test("sarscov2 - fastq, fasta, true, [], false, false") {
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ bam(process.out.bam[0][1]).getHeader(),
+ bam(process.out.bam[0][1]).getReadsMD5(),
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fastq, fasta, true, 'bai', false, false") {
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = 'bai'
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ bam(process.out.bam[0][1]).getHeader(),
+ bam(process.out.bam[0][1]).getReadsMD5(),
+ file(process.out.index[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - [fastq1, fastq2], fasta, true, false, false") {
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ bam(process.out.bam[0][1]).getHeader(),
+ bam(process.out.bam[0][1]).getReadsMD5(),
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fastq, [], true, false, false") {
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ []
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ bam(process.out.bam[0][1]).getHeader(),
+ bam(process.out.bam[0][1]).getReadsMD5(),
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam, fasta, true, [], false, false") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ bam(process.out.bam[0][1]).getHeader(),
+ bam(process.out.bam[0][1]).getReadsMD5(),
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam, fasta, true, 'bai', false, false") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = 'bai'
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ bam(process.out.bam[0][1]).getHeader(),
+ bam(process.out.bam[0][1]).getReadsMD5(),
+ file(process.out.index[0][1]).name,
+ process.out.versions
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam, [], true, false, false") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'test_ref' ], // meta map
+ []
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.failed }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fastq, fasta, true, [], false, false - stub") {
+
+ options "-stub"
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fastq, fasta, true, 'bai', false, false - stub") {
+
+ options "-stub"
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = 'bai'
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - fastq, fasta, false, [], false, false - stub") {
+
+ options "-stub"
+
+ 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] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = false
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam, fasta, true, [], false, false - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam, fasta, true, 'bai', false, false - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'test_ref' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
+ ]
+ input[2] = true
+ input[3] = 'bai'
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam, [], true, false, false - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam', checkIfExists: true)
+ ]
+ input[1] = [
+ [ id:'test_ref' ], // meta map
+ []
+ ]
+ input[2] = true
+ input[3] = []
+ input[4] = false
+ input[5] = false
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.failed }
+ )
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/modules/nf-core/minimap2/align/tests/main.nf.test.snap b/modules/nf-core/minimap2/align/tests/main.nf.test.snap
new file mode 100644
index 0000000..12264a8
--- /dev/null
+++ b/modules/nf-core/minimap2/align/tests/main.nf.test.snap
@@ -0,0 +1,476 @@
+{
+ "sarscov2 - bam, fasta, true, 'bai', false, false": {
+ "content": [
+ [
+ "@HD\tVN:1.6\tSO:coordinate",
+ "@SQ\tSN:MT192765.1\tLN:29829",
+ "@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -t 2 -a genome.fasta -",
+ "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.20\tCL:samtools sort -@ 1 -o test.bam##idx##test.bam.bai --write-index"
+ ],
+ "5d426b9a5f5b2c54f1d7f1e4c238ae94",
+ "test.bam.bai",
+ [
+ "versions.yml:md5,3548eeba9066efbf8d78ea99f8d813fd"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-25T09:03:00.827260362"
+ },
+ "sarscov2 - bam, fasta, true, 'bai', false, false - stub": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "index": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "paf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-23T11:21:37.92353539"
+ },
+ "sarscov2 - fastq, fasta, true, 'bai', false, false - stub": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "index": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "paf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-03T11:29:44.669021368"
+ },
+ "sarscov2 - fastq, fasta, false, [], false, false - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.paf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ],
+ "bam": [
+
+ ],
+ "index": [
+
+ ],
+ "paf": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.paf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-03T11:15:52.738781039"
+ },
+ "sarscov2 - fastq, fasta, true, [], false, false - stub": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "index": [
+
+ ],
+ "paf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-03T11:15:23.033808223"
+ },
+ "sarscov2 - [fastq1, fastq2], fasta, true, false, false": {
+ "content": [
+ [
+ "@HD\tVN:1.6\tSO:coordinate",
+ "@SQ\tSN:MT192765.1\tLN:29829",
+ "@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -t 2 -a genome.fasta test_1.fastq.gz test_2.fastq.gz",
+ "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.20\tCL:samtools sort -@ 1 -o test.bam"
+ ],
+ "1bc392244f228bf52cf0b5a8f6a654c9",
+ [
+ "versions.yml:md5,3548eeba9066efbf8d78ea99f8d813fd"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-23T11:18:18.964586894"
+ },
+ "sarscov2 - fastq, fasta, true, [], false, false": {
+ "content": [
+ [
+ "@HD\tVN:1.6\tSO:coordinate",
+ "@SQ\tSN:MT192765.1\tLN:29829",
+ "@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -t 2 -a genome.fasta test_1.fastq.gz",
+ "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.20\tCL:samtools sort -@ 1 -o test.bam"
+ ],
+ "f194745c0ccfcb2a9c0aee094a08750",
+ [
+ "versions.yml:md5,3548eeba9066efbf8d78ea99f8d813fd"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-23T11:17:48.667488325"
+ },
+ "sarscov2 - fastq, fasta, true, 'bai', false, false": {
+ "content": [
+ [
+ "@HD\tVN:1.6\tSO:coordinate",
+ "@SQ\tSN:MT192765.1\tLN:29829",
+ "@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -t 2 -a genome.fasta test_1.fastq.gz",
+ "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.20\tCL:samtools sort -@ 1 -o test.bam##idx##test.bam.bai --write-index"
+ ],
+ "f194745c0ccfcb2a9c0aee094a08750",
+ "test.bam.bai",
+ [
+ "versions.yml:md5,3548eeba9066efbf8d78ea99f8d813fd"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-23T11:18:02.517416733"
+ },
+ "sarscov2 - bam, fasta, true, [], false, false": {
+ "content": [
+ [
+ "@HD\tVN:1.6\tSO:coordinate",
+ "@SQ\tSN:MT192765.1\tLN:29829",
+ "@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -t 2 -a genome.fasta -",
+ "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.20\tCL:samtools sort -@ 1 -o test.bam"
+ ],
+ "5d426b9a5f5b2c54f1d7f1e4c238ae94",
+ [
+ "versions.yml:md5,3548eeba9066efbf8d78ea99f8d813fd"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-25T09:02:49.64829488"
+ },
+ "sarscov2 - bam, fasta, true, [], false, false - stub": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "index": [
+
+ ],
+ "paf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,98b8f5f36aa54b82210094f0b0d11938"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-23T11:21:22.162291795"
+ },
+ "sarscov2 - fastq, [], true, false, false": {
+ "content": [
+ [
+ "@HD\tVN:1.6\tSO:coordinate",
+ "@SQ\tSN:ERR5069949.2151832\tLN:150",
+ "@SQ\tSN:ERR5069949.576388\tLN:77",
+ "@SQ\tSN:ERR5069949.501486\tLN:146",
+ "@SQ\tSN:ERR5069949.1331889\tLN:132",
+ "@SQ\tSN:ERR5069949.2161340\tLN:80",
+ "@SQ\tSN:ERR5069949.973930\tLN:79",
+ "@SQ\tSN:ERR5069949.2417063\tLN:150",
+ "@SQ\tSN:ERR5069949.376959\tLN:151",
+ "@SQ\tSN:ERR5069949.1088785\tLN:149",
+ "@SQ\tSN:ERR5069949.1066259\tLN:147",
+ "@SQ\tSN:ERR5069949.2832676\tLN:139",
+ "@SQ\tSN:ERR5069949.2953930\tLN:151",
+ "@SQ\tSN:ERR5069949.324865\tLN:151",
+ "@SQ\tSN:ERR5069949.2185111\tLN:150",
+ "@SQ\tSN:ERR5069949.937422\tLN:151",
+ "@SQ\tSN:ERR5069949.2431709\tLN:150",
+ "@SQ\tSN:ERR5069949.1246538\tLN:148",
+ "@SQ\tSN:ERR5069949.1189252\tLN:98",
+ "@SQ\tSN:ERR5069949.2216307\tLN:147",
+ "@SQ\tSN:ERR5069949.3273002\tLN:148",
+ "@SQ\tSN:ERR5069949.3277445\tLN:151",
+ "@SQ\tSN:ERR5069949.3022231\tLN:147",
+ "@SQ\tSN:ERR5069949.184542\tLN:151",
+ "@SQ\tSN:ERR5069949.540529\tLN:149",
+ "@SQ\tSN:ERR5069949.686090\tLN:150",
+ "@SQ\tSN:ERR5069949.2787556\tLN:106",
+ "@SQ\tSN:ERR5069949.2650879\tLN:150",
+ "@SQ\tSN:ERR5069949.2064910\tLN:149",
+ "@SQ\tSN:ERR5069949.2328704\tLN:150",
+ "@SQ\tSN:ERR5069949.1067032\tLN:150",
+ "@SQ\tSN:ERR5069949.3338256\tLN:151",
+ "@SQ\tSN:ERR5069949.1412839\tLN:147",
+ "@SQ\tSN:ERR5069949.1538968\tLN:150",
+ "@SQ\tSN:ERR5069949.147998\tLN:94",
+ "@SQ\tSN:ERR5069949.366975\tLN:106",
+ "@SQ\tSN:ERR5069949.1372331\tLN:151",
+ "@SQ\tSN:ERR5069949.1709367\tLN:129",
+ "@SQ\tSN:ERR5069949.2388984\tLN:150",
+ "@SQ\tSN:ERR5069949.1132353\tLN:150",
+ "@SQ\tSN:ERR5069949.1151736\tLN:151",
+ "@SQ\tSN:ERR5069949.479807\tLN:150",
+ "@SQ\tSN:ERR5069949.2176303\tLN:151",
+ "@SQ\tSN:ERR5069949.2772897\tLN:151",
+ "@SQ\tSN:ERR5069949.1020777\tLN:122",
+ "@SQ\tSN:ERR5069949.465452\tLN:151",
+ "@SQ\tSN:ERR5069949.1704586\tLN:149",
+ "@SQ\tSN:ERR5069949.1258508\tLN:151",
+ "@SQ\tSN:ERR5069949.986441\tLN:119",
+ "@SQ\tSN:ERR5069949.2674295\tLN:148",
+ "@SQ\tSN:ERR5069949.885966\tLN:79",
+ "@SQ\tSN:ERR5069949.2342766\tLN:151",
+ "@SQ\tSN:ERR5069949.3122970\tLN:127",
+ "@SQ\tSN:ERR5069949.3279513\tLN:72",
+ "@SQ\tSN:ERR5069949.309410\tLN:151",
+ "@SQ\tSN:ERR5069949.532979\tLN:149",
+ "@SQ\tSN:ERR5069949.2888794\tLN:151",
+ "@SQ\tSN:ERR5069949.2205229\tLN:150",
+ "@SQ\tSN:ERR5069949.786562\tLN:151",
+ "@SQ\tSN:ERR5069949.919671\tLN:151",
+ "@SQ\tSN:ERR5069949.1328186\tLN:151",
+ "@SQ\tSN:ERR5069949.870926\tLN:149",
+ "@SQ\tSN:ERR5069949.2257580\tLN:151",
+ "@SQ\tSN:ERR5069949.3249622\tLN:77",
+ "@SQ\tSN:ERR5069949.611123\tLN:125",
+ "@SQ\tSN:ERR5069949.651338\tLN:142",
+ "@SQ\tSN:ERR5069949.169513\tLN:92",
+ "@SQ\tSN:ERR5069949.155944\tLN:150",
+ "@SQ\tSN:ERR5069949.2033605\tLN:150",
+ "@SQ\tSN:ERR5069949.2730382\tLN:142",
+ "@SQ\tSN:ERR5069949.2125592\tLN:150",
+ "@SQ\tSN:ERR5069949.1062611\tLN:151",
+ "@SQ\tSN:ERR5069949.1778133\tLN:151",
+ "@SQ\tSN:ERR5069949.3057020\tLN:95",
+ "@SQ\tSN:ERR5069949.2972968\tLN:141",
+ "@SQ\tSN:ERR5069949.2734474\tLN:149",
+ "@SQ\tSN:ERR5069949.856527\tLN:151",
+ "@SQ\tSN:ERR5069949.2098070\tLN:151",
+ "@SQ\tSN:ERR5069949.1552198\tLN:150",
+ "@SQ\tSN:ERR5069949.2385514\tLN:150",
+ "@SQ\tSN:ERR5069949.2270078\tLN:151",
+ "@SQ\tSN:ERR5069949.114870\tLN:150",
+ "@SQ\tSN:ERR5069949.2668880\tLN:147",
+ "@SQ\tSN:ERR5069949.257821\tLN:139",
+ "@SQ\tSN:ERR5069949.2243023\tLN:150",
+ "@SQ\tSN:ERR5069949.2605155\tLN:146",
+ "@SQ\tSN:ERR5069949.1340552\tLN:151",
+ "@SQ\tSN:ERR5069949.1561137\tLN:150",
+ "@SQ\tSN:ERR5069949.2361683\tLN:149",
+ "@SQ\tSN:ERR5069949.2521353\tLN:150",
+ "@SQ\tSN:ERR5069949.1261808\tLN:149",
+ "@SQ\tSN:ERR5069949.2734873\tLN:98",
+ "@SQ\tSN:ERR5069949.3017828\tLN:107",
+ "@SQ\tSN:ERR5069949.573706\tLN:150",
+ "@SQ\tSN:ERR5069949.1980512\tLN:151",
+ "@SQ\tSN:ERR5069949.1014693\tLN:150",
+ "@SQ\tSN:ERR5069949.3184655\tLN:150",
+ "@SQ\tSN:ERR5069949.29668\tLN:89",
+ "@SQ\tSN:ERR5069949.3258358\tLN:151",
+ "@SQ\tSN:ERR5069949.1476386\tLN:151",
+ "@SQ\tSN:ERR5069949.2415814\tLN:150",
+ "@PG\tID:minimap2\tPN:minimap2\tVN:2.28-r1209\tCL:minimap2 -t 2 -a test_1.fastq.gz test_1.fastq.gz",
+ "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.20\tCL:samtools sort -@ 1 -o test.bam"
+ ],
+ "16c1c651f8ec67383bcdee3c55aed94f",
+ [
+ "versions.yml:md5,3548eeba9066efbf8d78ea99f8d813fd"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-07-23T11:18:34.246998277"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/minimap2/align/tests/tags.yml b/modules/nf-core/minimap2/align/tests/tags.yml
new file mode 100644
index 0000000..39dba37
--- /dev/null
+++ b/modules/nf-core/minimap2/align/tests/tags.yml
@@ -0,0 +1,2 @@
+minimap2/align:
+ - "modules/nf-core/minimap2/align/**"
diff --git a/modules/nf-core/samtools/collate/environment.yml b/modules/nf-core/samtools/collate/environment.yml
index 0fb861b..62054fc 100644
--- a/modules/nf-core/samtools/collate/environment.yml
+++ b/modules/nf-core/samtools/collate/environment.yml
@@ -1,7 +1,8 @@
-name: samtools_collate
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - bioconda::samtools=1.17
+ - bioconda::htslib=1.21
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/collate/main.nf b/modules/nf-core/samtools/collate/main.nf
index 38a4daf..a0d831f 100644
--- a/modules/nf-core/samtools/collate/main.nf
+++ b/modules/nf-core/samtools/collate/main.nf
@@ -4,12 +4,12 @@ process SAMTOOLS_COLLATE {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0':
- 'biocontainers/samtools:1.17--h00cdaf9_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0':
+ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
input:
tuple val(meta), path(input)
- path fasta
+ tuple val(meta2), path(fasta)
output:
tuple val(meta), path("*.bam"), emit: bam, optional: true
diff --git a/modules/nf-core/samtools/collate/meta.yml b/modules/nf-core/samtools/collate/meta.yml
index 3c79927..cc54583 100644
--- a/modules/nf-core/samtools/collate/meta.yml
+++ b/modules/nf-core/samtools/collate/meta.yml
@@ -3,6 +3,8 @@ description: shuffles and groups reads together by their names
keywords:
- collate
- bam
+ - sam
+ - cram
tools:
- "samtools":
description: "Tools for dealing with SAM, BAM and CRAM files"
@@ -10,33 +12,65 @@ tools:
documentation: "https://www.htslib.org/doc/samtools-collate.html"
tool_dev_url: "https://github.com/samtools/samtools"
doi: "10.1093/bioinformatics/btp352"
- licence: "['MIT']"
+ licence: ["MIT"]
+ identifier: biotools:samtools
input:
# Only when we have meta
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input:
- type: file
- description: BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input:
+ type: file
+ description: BAM/CRAM/SAM file
+ pattern: "*.{bam,cram,sam}"
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - fasta:
+ type: file
+ description: FASTA ref file
+ pattern: "*.fasta"
output:
#Only when we have meta
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
+ - bam:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.bam":
+ type: file
+ description: Sorted BAM
+ pattern: "*.{bam}"
+ - cram:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.cram":
+ type: file
+ description: Sorted CRAM
+ pattern: "*.{cram}"
+ - sam:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.sam":
+ type: file
+ description: Sorted SAM
+ pattern: "*.{sam}"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
- - output:
- type: file
- description: Collated BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@priyanka-surana"
maintainers:
diff --git a/modules/nf-core/samtools/collate/tests/main.nf.test b/modules/nf-core/samtools/collate/tests/main.nf.test
new file mode 100644
index 0000000..875f0e9
--- /dev/null
+++ b/modules/nf-core/samtools/collate/tests/main.nf.test
@@ -0,0 +1,67 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_COLLATE"
+ script "../main.nf"
+ process "SAMTOOLS_COLLATE"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/collate"
+
+ test("sarscov2 - bam") {
+
+ 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] = [ [id:'fasta'], [] ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("bam_bam") },
+ { assert snapshot(process.out.cram).match("bam_cram") },
+ { assert snapshot(process.out.sam).match("bam_sam") },
+ { assert snapshot(process.out.versions).match("bam_versions") }
+ )
+ }
+
+ }
+
+ test("homo_sapiens - cram + fasta") {
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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)
+ ])
+ input[1] = Channel.of([
+ [ id:'fasta'],
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("cram_fasta_bam") },
+ { assert snapshot(process.out.cram).match("cram_fasta_cram") },
+ { assert snapshot(process.out.sam).match("cram_fasta_sam") },
+ { assert snapshot(process.out.versions).match("cram_fasta_versions") }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/samtools/collate/tests/main.nf.test.snap b/modules/nf-core/samtools/collate/tests/main.nf.test.snap
new file mode 100644
index 0000000..4d22136
--- /dev/null
+++ b/modules/nf-core/samtools/collate/tests/main.nf.test.snap
@@ -0,0 +1,94 @@
+{
+ "cram_fasta_versions": {
+ "content": [
+ [
+ "versions.yml:md5,354d4c20293fa674e56f96d5f7db6580"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:48:41.845649492"
+ },
+ "bam_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-02T16:56:01.611698"
+ },
+ "cram_fasta_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-02T16:56:48.325375"
+ },
+ "cram_fasta_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-02T16:56:48.328907"
+ },
+ "cram_fasta_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-02T16:56:48.322144"
+ },
+ "bam_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-02T16:56:01.608677"
+ },
+ "bam_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-02T16:56:01.613225"
+ },
+ "bam_versions": {
+ "content": [
+ [
+ "versions.yml:md5,354d4c20293fa674e56f96d5f7db6580"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:48:29.622364238"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/collate/tests/tags.yml b/modules/nf-core/samtools/collate/tests/tags.yml
new file mode 100644
index 0000000..9c09270
--- /dev/null
+++ b/modules/nf-core/samtools/collate/tests/tags.yml
@@ -0,0 +1,2 @@
+samtools/collate:
+ - "modules/nf-core/samtools/collate/**"
diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml
new file mode 100644
index 0000000..62054fc
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/environment.yml
@@ -0,0 +1,8 @@
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
+channels:
+ - conda-forge
+ - bioconda
+dependencies:
+ - bioconda::htslib=1.21
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf
index 59ed308..28c0a81 100644
--- a/modules/nf-core/samtools/faidx/main.nf
+++ b/modules/nf-core/samtools/faidx/main.nf
@@ -2,10 +2,10 @@ process SAMTOOLS_FAIDX {
tag "$fasta"
label 'process_single'
- conda "bioconda::samtools=1.17"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
- 'biocontainers/samtools:1.17--h00cdaf9_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
+ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
input:
tuple val(meta), path(fasta)
diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml
index 957b25e..6721b2c 100644
--- a/modules/nf-core/samtools/faidx/meta.yml
+++ b/modules/nf-core/samtools/faidx/meta.yml
@@ -14,44 +14,67 @@ tools:
documentation: http://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:samtools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'test' ]
- - fasta:
- type: file
- description: FASTA file
- pattern: "*.{fa,fasta}"
- - meta2:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'test' ]
- - fai:
- type: file
- description: FASTA index file
- pattern: "*.{fai}"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'test' ]
+ - fasta:
+ type: file
+ description: FASTA file
+ pattern: "*.{fa,fasta}"
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'test' ]
+ - fai:
+ type: file
+ description: FASTA index file
+ pattern: "*.{fai}"
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
+ - fa:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.{fa,fasta}":
+ type: file
+ description: FASTA file
+ pattern: "*.{fa}"
- fai:
- type: file
- description: FASTA index file
- pattern: "*.{fai}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.fai":
+ type: file
+ description: FASTA index file
+ pattern: "*.{fai}"
- gzi:
- type: file
- description: Optional gzip index file for compressed inputs
- pattern: "*.gzi"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.gzi":
+ type: file
+ description: Optional gzip index file for compressed inputs
+ pattern: "*.gzi"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@drpatelh"
- "@ewels"
- "@phue"
+maintainers:
+ - "@drpatelh"
+ - "@ewels"
+ - "@phue"
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 0000000..17244ef
--- /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 0000000..1bbb3ec
--- /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,6bbe80a2e14bd61202ca63e12d66027f"
+ ],
+ "fa": [
+
+ ],
+ "fai": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:57:47.450887871"
+ },
+ "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,6bbe80a2e14bd61202ca63e12d66027f"
+ ],
+ "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,6bbe80a2e14bd61202ca63e12d66027f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:58:04.804905659"
+ },
+ "test_samtools_faidx_fasta": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ],
+ "fa": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,6a0774a0ad937ba0bfd2ac7457d90f36"
+ ]
+ ],
+ "fai": [
+
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:58:23.831268154"
+ },
+ "test_samtools_faidx_stub_fasta": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ],
+ "fa": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "extract.fa:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "fai": [
+
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:58:35.600243706"
+ },
+ "test_samtools_faidx_stub_fai": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "2": [
+
+ ],
+ "3": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ],
+ "fa": [
+
+ ],
+ "fai": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "genome.fasta.fai:md5,9da2a56e2853dc8c0b86a9e7229c9fe5"
+ ]
+ ],
+ "gzi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,6bbe80a2e14bd61202ca63e12d66027f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:58:54.705460167"
+ }
+}
\ 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 0000000..f76a3ba
--- /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 0000000..33ebbd5
--- /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 0000000..e4a8394
--- /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/fasta/environment.yml b/modules/nf-core/samtools/fasta/environment.yml
index 8a82f9e..62054fc 100644
--- a/modules/nf-core/samtools/fasta/environment.yml
+++ b/modules/nf-core/samtools/fasta/environment.yml
@@ -1,7 +1,8 @@
-name: samtools_fasta
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - bioconda::samtools=1.17
+ - bioconda::htslib=1.21
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/fasta/main.nf b/modules/nf-core/samtools/fasta/main.nf
index dc4ad98..1c42141 100644
--- a/modules/nf-core/samtools/fasta/main.nf
+++ b/modules/nf-core/samtools/fasta/main.nf
@@ -4,8 +4,8 @@ process SAMTOOLS_FASTA {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
- 'biocontainers/samtools:1.17--h00cdaf9_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
+ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
input:
tuple val(meta), path(input)
@@ -24,7 +24,7 @@ process SAMTOOLS_FASTA {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
- def output = ( interleave && ! meta.single_end ) ? "> ${prefix}_interleaved.fasta.gz" :
+ def output = ( interleave && ! meta.single_end ) ? "| gzip > ${prefix}_interleaved.fasta.gz" :
meta.single_end ? "-1 ${prefix}_1.fasta.gz -s ${prefix}_singleton.fasta.gz" :
"-1 ${prefix}_1.fasta.gz -2 ${prefix}_2.fasta.gz -s ${prefix}_singleton.fasta.gz"
"""
diff --git a/modules/nf-core/samtools/fasta/meta.yml b/modules/nf-core/samtools/fasta/meta.yml
index eae26f0..6ea7763 100644
--- a/modules/nf-core/samtools/fasta/meta.yml
+++ b/modules/nf-core/samtools/fasta/meta.yml
@@ -13,47 +13,71 @@ tools:
tool_dev_url: "https://github.com/samtools/samtools"
doi: "10.1093/bioinformatics/btp352"
licence: ["MIT"]
+ identifier: biotools:samtools
input:
# Only when we have meta
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input:
- type: file
- description: BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
- - interleave:
- type: boolean
- description: Set true for interleaved fasta files
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input:
+ type: file
+ description: BAM/CRAM/SAM file
+ pattern: "*.{bam,cram,sam}"
+ - - interleave:
+ type: boolean
+ description: Set true for interleaved fasta files
output:
#Only when we have meta
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
- fasta:
- type: file
- description: Compressed FASTA file(s) with reads with either the READ1 or READ2 flag set in separate files.
- pattern: "*_{1,2}.fasta.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_{1,2}.fasta.gz":
+ type: file
+ description: Compressed FASTA file(s) with reads with either the READ1 or READ2
+ flag set in separate files.
+ pattern: "*_{1,2}.fasta.gz"
- interleaved:
- type: file
- description: Compressed FASTA file with reads with either the READ1 or READ2 flag set in a combined file. Needs collated input file.
- pattern: "*_interleaved.fasta.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_interleaved.fasta.gz":
+ type: file
+ description: Compressed FASTA file with reads with either the READ1 or READ2
+ flag set in a combined file. Needs collated input file.
+ pattern: "*_interleaved.fasta.gz"
- singleton:
- type: file
- description: Compressed FASTA file with singleton reads
- pattern: "*_singleton.fasta.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_singleton.fasta.gz":
+ type: file
+ description: Compressed FASTA file with singleton reads
+ pattern: "*_singleton.fasta.gz"
- other:
- type: file
- description: Compressed FASTA file with reads with either both READ1 and READ2 flags set or unset
- pattern: "*_other.fasta.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_other.fasta.gz":
+ type: file
+ description: Compressed FASTA file with reads with either both READ1 and READ2
+ flags set or unset
+ pattern: "*_other.fasta.gz"
+ - versions:
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@priyanka-surana"
maintainers:
diff --git a/modules/nf-core/samtools/fasta/tests/main.nf.test b/modules/nf-core/samtools/fasta/tests/main.nf.test
new file mode 100644
index 0000000..30d0c25
--- /dev/null
+++ b/modules/nf-core/samtools/fasta/tests/main.nf.test
@@ -0,0 +1,70 @@
+
+nextflow_process {
+
+ name "Test Process SAMTOOLS_FASTA"
+ script "../main.nf"
+ process "SAMTOOLS_FASTA"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/fasta"
+
+ test("test-samtools-fasta") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ 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] = false
+
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ process.out.fasta[0][1].collect { file(it).name }.toSorted(),
+ file(process.out.singleton[0][1]).name,
+ file(process.out.other[0][1]).name,
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+ test("test-samtools-fasta-interleave") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ 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] = true
+
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ path(process.out.interleaved[0][1]).linesGzip[0],
+ file(process.out.other[0][1]).name,
+ process.out.versions
+ ).match()
+ }
+ )
+ }
+ }
+
+}
diff --git a/modules/nf-core/samtools/fasta/tests/main.nf.test.snap b/modules/nf-core/samtools/fasta/tests/main.nf.test.snap
new file mode 100644
index 0000000..6c26c7e
--- /dev/null
+++ b/modules/nf-core/samtools/fasta/tests/main.nf.test.snap
@@ -0,0 +1,34 @@
+{
+ "test-samtools-fasta": {
+ "content": [
+ [
+ "test_1.fasta.gz",
+ "test_2.fasta.gz"
+ ],
+ "test_singleton.fasta.gz",
+ "test_other.fasta.gz",
+ [
+ "versions.yml:md5,da649728a4a937a64cb8865ebc9ace81"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:59:47.290462747"
+ },
+ "test-samtools-fasta-interleave": {
+ "content": [
+ ">ERR5069949.2151832/1",
+ "test_other.fasta.gz",
+ [
+ "versions.yml:md5,da649728a4a937a64cb8865ebc9ace81"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T07:59:59.597655297"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/fastq/environment.yml b/modules/nf-core/samtools/fastq/environment.yml
index 1b7124d..62054fc 100644
--- a/modules/nf-core/samtools/fastq/environment.yml
+++ b/modules/nf-core/samtools/fastq/environment.yml
@@ -1,7 +1,8 @@
-name: samtools_fastq
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - bioconda::samtools=1.17
+ - bioconda::htslib=1.21
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/fastq/main.nf b/modules/nf-core/samtools/fastq/main.nf
index ed8d755..136744d 100644
--- a/modules/nf-core/samtools/fastq/main.nf
+++ b/modules/nf-core/samtools/fastq/main.nf
@@ -4,8 +4,8 @@ process SAMTOOLS_FASTQ {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
- 'biocontainers/samtools:1.17--h00cdaf9_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
+ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
input:
tuple val(meta), path(input)
@@ -13,7 +13,7 @@ process SAMTOOLS_FASTQ {
output:
tuple val(meta), path("*_{1,2}.fastq.gz") , optional:true, emit: fastq
- tuple val(meta), path("*_interleaved.fastq.gz"), optional:true, emit: interleaved
+ tuple val(meta), path("*_interleaved.fastq") , optional:true, emit: interleaved
tuple val(meta), path("*_singleton.fastq.gz") , optional:true, emit: singleton
tuple val(meta), path("*_other.fastq.gz") , optional:true, emit: other
path "versions.yml" , emit: versions
@@ -24,7 +24,7 @@ process SAMTOOLS_FASTQ {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
- def output = ( interleave && ! meta.single_end ) ? "> ${prefix}_interleaved.fastq.gz" :
+ def output = ( interleave && ! meta.single_end ) ? "> ${prefix}_interleaved.fastq" :
meta.single_end ? "-1 ${prefix}_1.fastq.gz -s ${prefix}_singleton.fastq.gz" :
"-1 ${prefix}_1.fastq.gz -2 ${prefix}_2.fastq.gz -s ${prefix}_singleton.fastq.gz"
"""
diff --git a/modules/nf-core/samtools/fastq/meta.yml b/modules/nf-core/samtools/fastq/meta.yml
index c4002a4..c15a0b6 100644
--- a/modules/nf-core/samtools/fastq/meta.yml
+++ b/modules/nf-core/samtools/fastq/meta.yml
@@ -15,45 +15,69 @@ tools:
documentation: http://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:samtools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input:
- type: file
- description: BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
- - interleave:
- type: boolean
- description: Set true for interleaved fastq file
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input:
+ type: file
+ description: BAM/CRAM/SAM file
+ pattern: "*.{bam,cram,sam}"
+ - - interleave:
+ type: boolean
+ description: Set true for interleaved fastq file
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
- fastq:
- type: file
- description: Compressed FASTQ file(s) with reads with either the READ1 or READ2 flag set in separate files.
- pattern: "*_{1,2}.fastq.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_{1,2}.fastq.gz":
+ type: file
+ description: Compressed FASTQ file(s) with reads with either the READ1 or READ2
+ flag set in separate files.
+ pattern: "*_{1,2}.fastq.gz"
- interleaved:
- type: file
- description: Compressed FASTQ file with reads with either the READ1 or READ2 flag set in a combined file. Needs collated input file.
- pattern: "*_interleaved.fastq.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_interleaved.fastq":
+ type: file
+ description: Compressed FASTQ file with reads with either the READ1 or READ2
+ flag set in a combined file. Needs collated input file.
+ pattern: "*_interleaved.fastq.gz"
- singleton:
- type: file
- description: Compressed FASTQ file with singleton reads
- pattern: "*_singleton.fastq.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_singleton.fastq.gz":
+ type: file
+ description: Compressed FASTQ file with singleton reads
+ pattern: "*_singleton.fastq.gz"
- other:
- type: file
- description: Compressed FASTQ file with reads with either both READ1 and READ2 flags set or unset
- pattern: "*_other.fastq.gz"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*_other.fastq.gz":
+ type: file
+ description: Compressed FASTQ file with reads with either both READ1 and READ2
+ flags set or unset
+ pattern: "*_other.fastq.gz"
+ - versions:
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@priyanka-surana"
- "@suzannejin"
diff --git a/modules/nf-core/samtools/fastq/tests/main.nf.test b/modules/nf-core/samtools/fastq/tests/main.nf.test
new file mode 100644
index 0000000..f6ac112
--- /dev/null
+++ b/modules/nf-core/samtools/fastq/tests/main.nf.test
@@ -0,0 +1,67 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_FASTQ"
+ script "../main.nf"
+ process "SAMTOOLS_FASTQ"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/fastq"
+
+ test("bam") {
+
+ when {
+ process {
+ """
+ interleave = false
+
+ 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] = interleave
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.fastq[0][1].collect { path(it).linesGzip[0..6] }).match("bam_fastq") },
+ { assert snapshot(process.out.interleaved).match("bam_interleaved") },
+ { assert snapshot(file(process.out.singleton[0][1]).name).match("bam_singleton") },
+ { assert snapshot(file(process.out.other[0][1]).name).match("bam_other") },
+ { assert snapshot(process.out.versions).match("bam_versions") }
+ )
+ }
+ }
+
+ test("bam_interleave") {
+
+ when {
+ process {
+ """
+ interleave = true
+
+ 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] = interleave
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.fastq).match("bam_interleave_fastq") },
+ { assert snapshot(path(process.out.interleaved[0][1]).readLines()[0..6]).match("bam_interlinterleave_eaved") },
+ { assert snapshot(process.out.singleton).match("bam_singinterleave_leton") },
+ { assert snapshot(file(process.out.other[0][1]).name).match("bam_interleave_other") },
+ { assert snapshot(process.out.versions).match("bam_verinterleave_sions") }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/samtools/fastq/tests/main.nf.test.snap b/modules/nf-core/samtools/fastq/tests/main.nf.test.snap
new file mode 100644
index 0000000..10e5cd3
--- /dev/null
+++ b/modules/nf-core/samtools/fastq/tests/main.nf.test.snap
@@ -0,0 +1,139 @@
+{
+ "bam_interlinterleave_eaved": {
+ "content": [
+ [
+ "@ERR5069949.2151832/1",
+ "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
+ "+",
+ "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE versions.yml
"${task.process}":
diff --git a/modules/nf-core/samtools/merge/meta.yml b/modules/nf-core/samtools/merge/meta.yml
index 2e8f3db..235aa21 100644
--- a/modules/nf-core/samtools/merge/meta.yml
+++ b/modules/nf-core/samtools/merge/meta.yml
@@ -15,60 +15,81 @@ tools:
documentation: http://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:samtools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input_files:
- type: file
- description: BAM/CRAM file
- pattern: "*.{bam,cram,sam}"
- - meta2:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'genome' ]
- - fasta:
- type: file
- description: Reference file the CRAM was created with (optional)
- pattern: "*.{fasta,fa}"
- - meta3:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'genome' ]
- - fai:
- type: file
- description: Index of the reference file the CRAM was created with (optional)
- pattern: "*.fai"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input_files:
+ type: file
+ description: BAM/CRAM file
+ pattern: "*.{bam,cram,sam}"
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fasta:
+ type: file
+ description: Reference file the CRAM was created with (optional)
+ pattern: "*.{fasta,fa}"
+ - - meta3:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fai:
+ type: file
+ description: Index of the reference file the CRAM was created with (optional)
+ pattern: "*.fai"
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- bam:
- type: file
- description: BAM file
- pattern: "*.{bam}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.bam:
+ type: file
+ description: BAM file
+ pattern: "*.{bam}"
- cram:
- type: file
- description: CRAM file
- pattern: "*.{cram}"
- - versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.cram:
+ type: file
+ description: CRAM file
+ pattern: "*.{cram}"
- csi:
- type: file
- description: BAM index file (optional)
- pattern: "*.csi"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.csi":
+ type: file
+ description: BAM index file (optional)
+ pattern: "*.csi"
- crai:
- type: file
- description: CRAM index file (optional)
- pattern: "*.crai"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.crai":
+ type: file
+ description: CRAM index file (optional)
+ pattern: "*.crai"
+ - versions:
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@drpatelh"
- "@yuukiiwa "
diff --git a/modules/nf-core/samtools/merge/tests/index.config b/modules/nf-core/samtools/merge/tests/index.config
new file mode 100644
index 0000000..8c5668c
--- /dev/null
+++ b/modules/nf-core/samtools/merge/tests/index.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = "--write-index"
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/merge/tests/main.nf.test b/modules/nf-core/samtools/merge/tests/main.nf.test
new file mode 100644
index 0000000..40b36e8
--- /dev/null
+++ b/modules/nf-core/samtools/merge/tests/main.nf.test
@@ -0,0 +1,137 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_MERGE"
+ script "../main.nf"
+ process "SAMTOOLS_MERGE"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/merge"
+
+ test("bams") {
+
+ config "./index.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.methylated.sorted.bam', checkIfExists: true),
+ 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.single_end.sorted.bam', checkIfExists: true) ]
+ ])
+ input[1] = [[],[]]
+ input[2] = [[],[]]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("bams_bam") },
+ { assert snapshot(process.out.cram).match("bams_cram") },
+ { assert snapshot(file(process.out.csi[0][1]).name).match("bams_csi") },
+ { assert snapshot(process.out.crai).match("bams_crai") },
+ { assert snapshot(process.out.versions).match("bams_versions") }
+ )
+ }
+ }
+
+ test("crams") {
+
+ config "./index.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram', checkIfExists: true) ]
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ input[2] = Channel.of([
+ [ id:'genome' ], // meta map
+ 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).match("crams_cram") },
+ { assert snapshot(process.out.bam).match("crams_bam") },
+ { assert snapshot(file(process.out.crai[0][1]).name).match("crams_crai") },
+ { assert snapshot(process.out.csi).match("crams_csi") },
+ { assert snapshot(process.out.versions).match("crams_versions") }
+ )
+ }
+ }
+
+ test("bam") {
+
+ 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.methylated.sorted.bam', checkIfExists: true) ]
+ ])
+ input[1] = [[],[]]
+ input[2] = [[],[]]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("bam_bam") },
+ { assert snapshot(process.out.cram).match("bam_cram") },
+ { assert snapshot(process.out.crai).match("bam_crai") },
+ { assert snapshot(process.out.csi).match("bam_csi") },
+ { assert snapshot(process.out.versions).match("bam_versions") }
+ )
+ }
+ }
+
+ test("bams_stub") {
+
+ config "./index.config"
+ options "-stub"
+
+ 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.methylated.sorted.bam', checkIfExists: true),
+ 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.single_end.sorted.bam', checkIfExists: true) ]
+ ])
+ input[1] = [[],[]]
+ input[2] = [[],[]]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("bams_stub_bam") },
+ { assert snapshot(process.out.cram).match("bams_stub_cram") },
+ { assert snapshot(file(process.out.csi[0][1]).name).match("bams_stub_csi") },
+ { assert snapshot(process.out.crai).match("bams_stub_crai") },
+ { assert snapshot(process.out.versions).match("bams_stub_versions") }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/samtools/merge/tests/main.nf.test.snap b/modules/nf-core/samtools/merge/tests/main.nf.test.snap
new file mode 100644
index 0000000..0a41e01
--- /dev/null
+++ b/modules/nf-core/samtools/merge/tests/main.nf.test.snap
@@ -0,0 +1,228 @@
+{
+ "crams_cram": {
+ "content": [
+ "test.cram"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:00.647389"
+ },
+ "bams_stub_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:19.937013"
+ },
+ "bams_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:49:24.928616"
+ },
+ "bams_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:49:24.923289"
+ },
+ "bams_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:49:24.925716"
+ },
+ "crams_csi": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:00.655959"
+ },
+ "bam_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:10.319539"
+ },
+ "bam_versions": {
+ "content": [
+ [
+ "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:16:30.476887194"
+ },
+ "bams_csi": {
+ "content": [
+ "test.bam.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:49:24.92719"
+ },
+ "bams_stub_csi": {
+ "content": [
+ "test.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:19.940498"
+ },
+ "bam_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:10.328852"
+ },
+ "bams_stub_versions": {
+ "content": [
+ [
+ "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:16:52.203823961"
+ },
+ "bam_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:10.324219"
+ },
+ "bams_stub_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:19.933153"
+ },
+ "bams_versions": {
+ "content": [
+ [
+ "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T08:29:57.524363148"
+ },
+ "crams_bam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:00.650652"
+ },
+ "crams_versions": {
+ "content": [
+ [
+ "versions.yml:md5,d51d18a97513e370e43f0c891c51dfc4"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:16:06.977096207"
+ },
+ "bam_csi": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:10.33292"
+ },
+ "crams_crai": {
+ "content": [
+ "test.cram.crai"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:00.653512"
+ },
+ "bams_stub_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T18:50:19.943839"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/merge/tests/tags.yml b/modules/nf-core/samtools/merge/tests/tags.yml
new file mode 100644
index 0000000..b869abc
--- /dev/null
+++ b/modules/nf-core/samtools/merge/tests/tags.yml
@@ -0,0 +1,2 @@
+samtools/merge:
+ - "modules/nf-core/samtools/merge/**"
diff --git a/modules/nf-core/samtools/sort/environment.yml b/modules/nf-core/samtools/sort/environment.yml
new file mode 100644
index 0000000..62054fc
--- /dev/null
+++ b/modules/nf-core/samtools/sort/environment.yml
@@ -0,0 +1,8 @@
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
+channels:
+ - conda-forge
+ - bioconda
+dependencies:
+ - bioconda::htslib=1.21
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf
index 2b7753f..caf3c61 100644
--- a/modules/nf-core/samtools/sort/main.nf
+++ b/modules/nf-core/samtools/sort/main.nf
@@ -2,18 +2,21 @@ process SAMTOOLS_SORT {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::samtools=1.17"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
- 'biocontainers/samtools:1.17--h00cdaf9_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
+ 'biocontainers/samtools:1.21--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
- 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("*.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
@@ -21,14 +24,23 @@ 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 \\
+ ${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}":
@@ -37,9 +49,20 @@ process SAMTOOLS_SORT {
"""
stub:
+ 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"
"""
- touch ${prefix}.bam
+ touch ${prefix}.${extension}
+ if [ "${extension}" == "bam" ];
+ then
+ touch ${prefix}.${extension}.csi
+ elif [ "${extension}" == "cram" ];
+ then
+ touch ${prefix}.${extension}.crai
+ fi
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 0732843..a9dbec5 100644
--- a/modules/nf-core/samtools/sort/meta.yml
+++ b/modules/nf-core/samtools/sort/meta.yml
@@ -15,34 +15,78 @@ tools:
documentation: http://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:samtools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - bam:
- type: file
- description: BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - bam:
+ type: 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
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- bam:
- type: file
- description: Sorted BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
- - versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.bam":
+ type: file
+ description: Sorted BAM file
+ pattern: "*.{bam}"
+ - cram:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.cram":
+ type: file
+ description: Sorted CRAM file
+ pattern: "*.{cram}"
+ - crai:
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.crai":
+ type: file
+ description: CRAM index file (optional)
+ pattern: "*.crai"
- csi:
- type: file
- description: BAM index file (optional)
- pattern: "*.csi"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.csi":
+ type: file
+ description: BAM index file (optional)
+ pattern: "*.csi"
+ - versions:
+ - versions.yml:
+ 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
new file mode 100644
index 0000000..b05e669
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/main.nf.test
@@ -0,0 +1,192 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_SORT"
+ script "../main.nf"
+ process "SAMTOOLS_SORT"
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/sort"
+
+ test("bam") {
+
+ 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)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(
+ process.out.bam,
+ process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.versions
+ ).match()}
+ )
+ }
+ }
+
+ test("multiple bam") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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/test2.paired_end.sorted.bam', checkIfExists: true)
+ ]
+ ])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(
+ process.out.bam,
+ process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.versions
+ ).match()}
+ )
+ }
+ }
+
+ test("cram") {
+
+ config "./nextflow_cram.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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)
+ ])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(
+ process.out.cram.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.crai.collect { it.collect { it instanceof Map ? it : file(it).name } },
+ process.out.versions
+ ).match()}
+ )
+ }
+ }
+
+ test("bam - stub") {
+
+ options "-stub"
+ 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)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("multiple bam - stub") {
+
+ config "./nextflow.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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/test2.paired_end.sorted.bam', checkIfExists: true)
+ ]
+ ])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+
+ test("cram - stub") {
+
+ options "-stub"
+ config "./nextflow_cram.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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)
+ ])
+ input[1] = Channel.of([
+ [ id:'fasta' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test.snap b/modules/nf-core/samtools/sort/tests/main.nf.test.snap
new file mode 100644
index 0000000..469891f
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap
@@ -0,0 +1,287 @@
+{
+ "cram": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.cram"
+ ]
+ ],
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.cram.crai"
+ ]
+ ],
+ [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T08:49:58.207549273"
+ },
+ "bam - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "crai": [
+
+ ],
+ "cram": [
+
+ ],
+ "csi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T08:50:08.630951018"
+ },
+ "cram - stub": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.cram:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+
+ ],
+ "4": [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ],
+ "bam": [
+
+ ],
+ "crai": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "cram": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.cram:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "csi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T08:50:19.061912443"
+ },
+ "multiple bam": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,8a16ba90c7d294cbb4c33ac0f7127a12"
+ ]
+ ],
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi"
+ ]
+ ],
+ [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.09.0"
+ },
+ "timestamp": "2024-10-08T11:59:55.479443"
+ },
+ "multiple bam - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,8a16ba90c7d294cbb4c33ac0f7127a12"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+
+ ],
+ "3": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,d185916eaff9afeb4d0aeab3310371f9"
+ ]
+ ],
+ "4": [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,8a16ba90c7d294cbb4c33ac0f7127a12"
+ ]
+ ],
+ "crai": [
+
+ ],
+ "cram": [
+
+ ],
+ "csi": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi:md5,d185916eaff9afeb4d0aeab3310371f9"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.09.0"
+ },
+ "timestamp": "2024-10-08T11:36:13.781404"
+ },
+ "bam": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,34aa85e86abefe637f7a4a9887f016fc"
+ ]
+ ],
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam.csi"
+ ]
+ ],
+ [
+ "versions.yml:md5,2659b187d681241451539d4c53500b9f"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.09.0"
+ },
+ "timestamp": "2024-10-08T11:59:46.372244"
+ }
+}
\ 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
new file mode 100644
index 0000000..f642771
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/nextflow.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: SAMTOOLS_SORT {
+ ext.prefix = { "${meta.id}.sorted" }
+ ext.args = "--write-index"
+ }
+
+}
diff --git a/modules/nf-core/samtools/sort/tests/nextflow_cram.config b/modules/nf-core/samtools/sort/tests/nextflow_cram.config
new file mode 100644
index 0000000..3a8c018
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/nextflow_cram.config
@@ -0,0 +1,8 @@
+process {
+
+ withName: SAMTOOLS_SORT {
+ ext.prefix = { "${meta.id}.sorted" }
+ ext.args = "--write-index --output-fmt cram"
+ }
+
+}
diff --git a/modules/nf-core/samtools/sort/tests/tags.yml b/modules/nf-core/samtools/sort/tests/tags.yml
new file mode 100644
index 0000000..cd63ea2
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/tags.yml
@@ -0,0 +1,3 @@
+samtools/sort:
+ - modules/nf-core/samtools/sort/**
+ - tests/modules/nf-core/samtools/sort/**
diff --git a/modules/nf-core/samtools/stats/environment.yml b/modules/nf-core/samtools/stats/environment.yml
index ed4e896..62054fc 100644
--- a/modules/nf-core/samtools/stats/environment.yml
+++ b/modules/nf-core/samtools/stats/environment.yml
@@ -1,7 +1,8 @@
-name: samtools_stats
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - bioconda::samtools=1.17
+ - bioconda::htslib=1.21
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf
index 07286ef..4443948 100644
--- a/modules/nf-core/samtools/stats/main.nf
+++ b/modules/nf-core/samtools/stats/main.nf
@@ -4,8 +4,8 @@ process SAMTOOLS_STATS {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
- 'biocontainers/samtools:1.17--h00cdaf9_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
+ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
input:
tuple val(meta), path(input), path(input_index)
@@ -19,7 +19,6 @@ process SAMTOOLS_STATS {
task.ext.when == null || task.ext.when
script:
- def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def reference = fasta ? "--reference ${fasta}" : ""
"""
diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml
index 735ff81..77b020f 100644
--- a/modules/nf-core/samtools/stats/meta.yml
+++ b/modules/nf-core/samtools/stats/meta.yml
@@ -16,43 +16,46 @@ tools:
documentation: http://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:samtools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input:
- type: file
- description: BAM/CRAM file from alignment
- pattern: "*.{bam,cram}"
- - input_index:
- type: file
- description: BAI/CRAI file from alignment
- pattern: "*.{bai,crai}"
- - meta2:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'genome' ]
- - fasta:
- type: file
- description: Reference file the CRAM was created with (optional)
- pattern: "*.{fasta,fa}"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input:
+ type: file
+ description: BAM/CRAM file from alignment
+ pattern: "*.{bam,cram}"
+ - input_index:
+ type: file
+ description: BAI/CRAI file from alignment
+ pattern: "*.{bai,crai}"
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'genome' ]
+ - fasta:
+ type: file
+ description: Reference file the CRAM was created with (optional)
+ pattern: "*.{fasta,fa}"
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- stats:
- type: file
- description: File containing samtools stats output
- pattern: "*.{stats}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.stats":
+ type: file
+ description: File containing samtools stats output
+ pattern: "*.{stats}"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@drpatelh"
- "@FriederikeHanssen"
diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test b/modules/nf-core/samtools/stats/tests/main.nf.test
index e037132..5bc8930 100644
--- a/modules/nf-core/samtools/stats/tests/main.nf.test
+++ b/modules/nf-core/samtools/stats/tests/main.nf.test
@@ -3,76 +3,111 @@ nextflow_process {
name "Test Process SAMTOOLS_STATS"
script "../main.nf"
process "SAMTOOLS_STATS"
+
tag "modules"
- tag "modules/nf-core"
+ tag "modules_nfcore"
tag "samtools"
tag "samtools/stats"
- test("SAMTOOLS STATS Should run without failures") {
+ test("bam") {
when {
- params {
-
- outdir = "$outputDir"
- }
process {
"""
- // define inputs of the process here.
- input[0] = [
- [ id:'test', single_end:false ], // meta map
- file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
- file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
-
- ]
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // 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)
+ ])
input[1] = [[],[]]
"""
-
}
}
then {
assertAll(
- {assert process.success},
- {assert snapshot(process.out).match()}
+ {assert process.success},
+ {assert snapshot(process.out).match()}
)
}
-
}
- test("SAMTOOLS CRAM Should run without failures") {
+ test("cram") {
when {
- params {
-
- outdir = "$outputDir"
- }
process {
"""
- // define inputs of the process here
- input[0] = [
- [ id:'test', single_end:false ], // meta map
- file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true),
- file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true)
-
- ]
- input[1] = [
- [ id:'genome' ],
- file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
- ]
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai', checkIfExists: true)
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
+ ])
"""
}
-
-
}
then {
assertAll(
- {assert process.success},
- {assert snapshot(process.out).match()}
+ {assert process.success},
+ {assert snapshot(process.out).match()}
)
}
+ }
+
+ test("bam - stub") {
+
+ options "-stub"
+
+ 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.sorted.bam', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
+ ])
+ input[1] = [[],[]]
+ """
+ }
+ }
+ then {
+ assertAll(
+ {assert process.success},
+ {assert snapshot(process.out).match()}
+ )
+ }
}
+ test("cram - stub") {
+
+ options "-stub"
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ id:'test', single_end:false ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai', checkIfExists: true)
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ {assert process.success},
+ {assert snapshot(process.out).match()}
+ )
+ }
+ }
}
diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test.snap b/modules/nf-core/samtools/stats/tests/main.nf.test.snap
index 516b2b0..df507be 100644
--- a/modules/nf-core/samtools/stats/tests/main.nf.test.snap
+++ b/modules/nf-core/samtools/stats/tests/main.nf.test.snap
@@ -1,5 +1,5 @@
{
- "SAMTOOLS STATS Should run without failures": {
+ "cram": {
"content": [
{
"0": [
@@ -8,11 +8,11 @@
"id": "test",
"single_end": false
},
- "test.stats:md5,6e768486d5df0257351c5419a79f9c9b"
+ "test.stats:md5,a27fe55e49a341f92379bb20a65c6a06"
]
],
"1": [
- "versions.yml:md5,08035f3409d934d47a416150884bb0df"
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
],
"stats": [
[
@@ -20,17 +20,21 @@
"id": "test",
"single_end": false
},
- "test.stats:md5,6e768486d5df0257351c5419a79f9c9b"
+ "test.stats:md5,a27fe55e49a341f92379bb20a65c6a06"
]
],
"versions": [
- "versions.yml:md5,08035f3409d934d47a416150884bb0df"
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
]
}
],
- "timestamp": "2023-10-18T12:12:42.998746"
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:29:16.767396182"
},
- "SAMTOOLS CRAM Should run without failures": {
+ "bam - stub": {
"content": [
{
"0": [
@@ -39,11 +43,11 @@
"id": "test",
"single_end": false
},
- "test.stats:md5,7c9ee5747793cceb9d6f4d733345641a"
+ "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
- "versions.yml:md5,08035f3409d934d47a416150884bb0df"
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
],
"stats": [
[
@@ -51,14 +55,88 @@
"id": "test",
"single_end": false
},
- "test.stats:md5,7c9ee5747793cceb9d6f4d733345641a"
+ "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
- "versions.yml:md5,08035f3409d934d47a416150884bb0df"
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
]
}
],
- "timestamp": "2023-10-18T12:13:30.747222"
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:29:29.721580274"
+ },
+ "cram - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
+ ],
+ "stats": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:29:53.567964304"
+ },
+ "bam": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.stats:md5,d53a2584376d78942839e9933a34d11b"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
+ ],
+ "stats": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.stats:md5,d53a2584376d78942839e9933a34d11b"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:28:50.73610604"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/view/environment.yml b/modules/nf-core/samtools/view/environment.yml
index 150c377..02cda6e 100644
--- a/modules/nf-core/samtools/view/environment.yml
+++ b/modules/nf-core/samtools/view/environment.yml
@@ -1,8 +1,10 @@
-name: samtools_view
+---
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - bioconda::samtools=1.20
- - bioconda::htslib=1.20
+ # renovate: datasource=conda depName=bioconda/htslib
+ - bioconda::htslib=1.21
+ # renovate: datasource=conda depName=bioconda/samtools
+ - bioconda::samtools=1.21
diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf
index dc61144..4f69a94 100644
--- a/modules/nf-core/samtools/view/main.nf
+++ b/modules/nf-core/samtools/view/main.nf
@@ -4,8 +4,8 @@ process SAMTOOLS_VIEW {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' :
- 'biocontainers/samtools:1.20--h50ea8bc_0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
+ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
input:
tuple val(meta), path(input), path(index)
@@ -63,7 +63,7 @@ process SAMTOOLS_VIEW {
input.getExtension()
if ("$input" == "${prefix}.${file_type}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
- def index = args.contains("--write-index") ? "touch ${prefix}.${file_type}.csi" : ""
+ index = args.contains("--write-index") ? "touch ${prefix}.${file_type}.csi" : ""
"""
touch ${prefix}.${file_type}
diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml
index 27be60d..caa7b01 100644
--- a/modules/nf-core/samtools/view/meta.yml
+++ b/modules/nf-core/samtools/view/meta.yml
@@ -15,77 +15,120 @@ tools:
documentation: http://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
licence: ["MIT"]
+ identifier: biotools:samtools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - input:
- type: file
- description: BAM/CRAM/SAM file
- pattern: "*.{bam,cram,sam}"
- - index:
- type: file
- description: BAM.BAI/BAM.CSI/CRAM.CRAI file (optional)
- pattern: "*.{.bai,.csi,.crai}"
- - meta2:
- type: map
- description: |
- Groovy Map containing reference information
- e.g. [ id:'test' ]
- - fasta:
- type: file
- description: Reference file the CRAM was created with (optional)
- pattern: "*.{fasta,fa}"
- - qname:
- type: file
- description: Optional file with read names to output only select alignments
- pattern: "*.{txt,list}"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - input:
+ type: file
+ description: BAM/CRAM/SAM file
+ pattern: "*.{bam,cram,sam}"
+ - index:
+ type: file
+ description: BAM.BAI/BAM.CSI/CRAM.CRAI file (optional)
+ pattern: "*.{.bai,.csi,.crai}"
+ - - meta2:
+ type: map
+ description: |
+ Groovy Map containing reference information
+ e.g. [ id:'test' ]
+ - fasta:
+ type: file
+ description: Reference file the CRAM was created with (optional)
+ pattern: "*.{fasta,fa}"
+ - - qname:
+ type: file
+ description: Optional file with read names to output only select alignments
+ pattern: "*.{txt,list}"
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- bam:
- type: file
- description: optional filtered/converted BAM file
- pattern: "*.{bam}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.bam:
+ type: file
+ description: optional filtered/converted BAM file
+ pattern: "*.{bam}"
- cram:
- type: file
- description: optional filtered/converted CRAM file
- pattern: "*.{cram}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.cram:
+ type: file
+ description: optional filtered/converted CRAM file
+ pattern: "*.{cram}"
- sam:
- type: file
- description: optional filtered/converted SAM file
- pattern: "*.{sam}"
- # bai, csi, and crai are created with `--write-index`
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.sam:
+ type: file
+ description: optional filtered/converted SAM file
+ pattern: "*.{sam}"
- bai:
- type: file
- description: optional BAM file index
- pattern: "*.{bai}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.${file_type}.bai:
+ type: file
+ description: optional BAM file index
+ pattern: "*.{bai}"
- csi:
- type: file
- description: optional tabix BAM file index
- pattern: "*.{csi}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.${file_type}.csi:
+ type: file
+ description: optional tabix BAM file index
+ pattern: "*.{csi}"
- crai:
- type: file
- description: optional CRAM file index
- pattern: "*.{crai}"
- # unselected and unselected_index are created when passing a qname
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.${file_type}.crai:
+ type: file
+ description: optional CRAM file index
+ pattern: "*.{crai}"
- unselected:
- type: file
- description: optional file with unselected alignments
- pattern: "*.unselected.{bam,cram,sam}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.unselected.${file_type}:
+ type: file
+ description: optional file with unselected alignments
+ pattern: "*.unselected.{bam,cram,sam}"
- unselected_index:
- type: file
- description: index for the "unselected" file
- pattern: "*.unselected.{bai,csi,crai}"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - ${prefix}.unselected.${file_type}.{bai,csi,crsi}:
+ type: file
+ description: index for the "unselected" file
+ pattern: "*.unselected.{bai,csi,crai}"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@drpatelh"
- "@joseespinosa"
diff --git a/modules/nf-core/samtools/view/samtools-view.diff b/modules/nf-core/samtools/view/samtools-view.diff
new file mode 100644
index 0000000..fb47ba9
--- /dev/null
+++ b/modules/nf-core/samtools/view/samtools-view.diff
@@ -0,0 +1,16 @@
+Changes in module 'nf-core/samtools/view'
+--- modules/nf-core/samtools/view/main.nf
++++ modules/nf-core/samtools/view/main.nf
+@@ -4,8 +4,8 @@
+
+ conda "${moduleDir}/environment.yml"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+- 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9e/9edc2564215d5cd137a8b25ca8a311600987186d406b092022444adf3c4447f7/data' :
+- 'community.wave.seqera.io/library/htslib_samtools:1.21--6cb89bfd40cbaabf' }"
++ 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' :
++ 'biocontainers/samtools:1.21--h50ea8bc_0' }"
+
+ input:
+ tuple val(meta), path(input), path(index)
+
+************************************************************
diff --git a/modules/nf-core/samtools/view/tests/bam.config b/modules/nf-core/samtools/view/tests/bam.config
new file mode 100644
index 0000000..c10d108
--- /dev/null
+++ b/modules/nf-core/samtools/view/tests/bam.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = "--output-fmt bam"
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/view/tests/bam_index.config b/modules/nf-core/samtools/view/tests/bam_index.config
new file mode 100644
index 0000000..771ae03
--- /dev/null
+++ b/modules/nf-core/samtools/view/tests/bam_index.config
@@ -0,0 +1,3 @@
+process {
+ ext.args = "--output-fmt bam --write-index"
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/view/tests/main.nf.test b/modules/nf-core/samtools/view/tests/main.nf.test
new file mode 100644
index 0000000..37b81a9
--- /dev/null
+++ b/modules/nf-core/samtools/view/tests/main.nf.test
@@ -0,0 +1,214 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_VIEW"
+ script "../main.nf"
+ process "SAMTOOLS_VIEW"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/view"
+
+ test("bam") {
+
+ 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] = [[],[]]
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("bam_bam") },
+ { assert snapshot(process.out.bai).match("bam_bai") },
+ { assert snapshot(process.out.crai).match("bam_crai") },
+ { assert snapshot(process.out.cram).match("bam_cram") },
+ { assert snapshot(process.out.csi).match("bam_csi") },
+ { assert snapshot(process.out.sam).match("bam_sam") },
+ { assert snapshot(process.out.versions).match("bam_versions") }
+ )
+ }
+ }
+
+ test("cram") {
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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)
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.cram[0][1]).name).match("cram_cram") },
+ { assert snapshot(process.out.bai).match("cram_bai") },
+ { assert snapshot(process.out.bam).match("cram_bam") },
+ { assert snapshot(process.out.crai).match("cram_crai") },
+ { assert snapshot(process.out.csi).match("cram_csi") },
+ { assert snapshot(process.out.sam).match("cram_sam") },
+ { assert snapshot(process.out.versions).match("cram_versions") }
+ )
+ }
+ }
+
+ test("cram_to_bam") {
+
+ config "./bam.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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),
+ []
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_bam") },
+ { assert snapshot(process.out.bai).match("cram_to_bam_bai") },
+ { assert snapshot(process.out.crai).match("cram_to_bam_crai") },
+ { assert snapshot(process.out.cram).match("cram_to_bam_cram") },
+ { assert snapshot(process.out.csi).match("cram_to_bam_csi") },
+ { assert snapshot(process.out.sam).match("cram_to_bam_sam") },
+ { assert snapshot(process.out.versions).match("cram_to_bam_versions") }
+ )
+ }
+ }
+
+ test("cram_to_bam_index") {
+
+ config "./bam_index.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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),
+ []
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_index_bam") },
+ { assert snapshot(file(process.out.csi[0][1]).name).match("cram_to_bam_index_csi") },
+ { assert snapshot(process.out.bai).match("cram_to_bam_index_bai") },
+ { assert snapshot(process.out.crai).match("cram_to_bam_index_crai") },
+ { assert snapshot(process.out.cram).match("cram_to_bam_index_cram") },
+ { assert snapshot(process.out.sam).match("cram_to_bam_index_sam") },
+ { assert snapshot(process.out.versions).match("cram_to_bam_index_versions") }
+ )
+ }
+ }
+
+ test("cram_to_bam_index_qname") {
+
+ config "./bam_index.config"
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [ 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),
+ []
+ ])
+ input[1] = Channel.of([
+ [ id:'genome' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
+ ])
+ input[2] = Channel.of("testN:2817", "testN:2814").collectFile(name: "readnames.list", newLine: true)
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_index_qname_bam") },
+ { assert snapshot(file(process.out.csi[0][1]).name).match("cram_to_bam_index_qname_csi") },
+ { assert snapshot(process.out.bai).match("cram_to_bam_index_qname_bai") },
+ { assert snapshot(process.out.crai).match("cram_to_bam_index_qname_crai") },
+ { assert snapshot(process.out.cram).match("cram_to_bam_index_qname_cram") },
+ { assert snapshot(process.out.sam).match("cram_to_bam_index_qname_sam") },
+ { assert snapshot(file(process.out.unselected[0][1]).name).match("cram_to_bam_index_qname_unselected") },
+ { assert snapshot(file(process.out.unselected_index[0][1]).name).match("cram_to_bam_index_qname_unselected_csi") },
+ { assert snapshot(process.out.versions).match("cram_to_bam_index_qname_versions") }
+ )
+ }
+ }
+
+ test("bam_stub") {
+
+ options "-stub"
+ config "./bam_index.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] = [[],[]]
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(file(process.out.bam[0][1]).name).match("bam_stub_bam") },
+ { assert snapshot(file(process.out.csi[0][1]).name).match("bam_stub_csi") },
+ { assert snapshot(process.out.bai).match("bam_stub_bai") },
+ { assert snapshot(process.out.crai).match("bam_stub_crai") },
+ { assert snapshot(process.out.cram).match("bam_stub_cram") },
+ { assert snapshot(process.out.sam).match("bam_stub_sam") },
+ { assert snapshot(process.out.versions).match("bam_stub_versions") }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/samtools/view/tests/main.nf.test.snap b/modules/nf-core/samtools/view/tests/main.nf.test.snap
new file mode 100644
index 0000000..63849b0
--- /dev/null
+++ b/modules/nf-core/samtools/view/tests/main.nf.test.snap
@@ -0,0 +1,528 @@
+{
+ "bam_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:51.256068"
+ },
+ "cram_to_bam_index_csi": {
+ "content": [
+ "test.bam.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:12.958617"
+ },
+ "bam_stub_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:32.065301"
+ },
+ "bam_bai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:51.258578"
+ },
+ "bam_stub_bai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:32.071284"
+ },
+ "bam_stub_versions": {
+ "content": [
+ [
+ "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:26:24.461775464"
+ },
+ "cram_to_bam_index_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:12.972288"
+ },
+ "cram_to_bam_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:04.999247"
+ },
+ "cram_to_bam_index_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:12.976457"
+ },
+ "cram_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:56.497581"
+ },
+ "cram_csi": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:56.50038"
+ },
+ "cram_to_bam_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:04.992239"
+ },
+ "cram_to_bam_index_qname_csi": {
+ "content": [
+ "test.bam.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.325496"
+ },
+ "bam_stub_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:32.079529"
+ },
+ "cram_cram": {
+ "content": [
+ "test.cram"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:56.490286"
+ },
+ "cram_to_bam_index_qname_unselected_csi": {
+ "content": [
+ "test.unselected.bam.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.328458"
+ },
+ "bam_csi": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:51.262882"
+ },
+ "cram_to_bam_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:04.989247"
+ },
+ "cram_to_bam_index_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:12.967681"
+ },
+ "cram_to_bam_index_qname_versions": {
+ "content": [
+ [
+ "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:25:51.953436682"
+ },
+ "cram_to_bam_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:04.982361"
+ },
+ "cram_to_bam_index_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:12.95456"
+ },
+ "cram_to_bam_index_versions": {
+ "content": [
+ [
+ "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:25:14.475388399"
+ },
+ "cram_to_bam_bai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:04.98601"
+ },
+ "cram_to_bam_versions": {
+ "content": [
+ [
+ "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:24:49.673441798"
+ },
+ "cram_bam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:56.495512"
+ },
+ "bam_stub_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:32.076908"
+ },
+ "cram_to_bam_index_qname_bai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.328458"
+ },
+ "cram_to_bam_index_qname_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.330789"
+ },
+ "cram_bai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:56.493129"
+ },
+ "bam_stub_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:32.074313"
+ },
+ "cram_to_bam_index_qname_bam": {
+ "content": [
+ "test.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.322874"
+ },
+ "cram_to_bam_index_qname_unselected": {
+ "content": [
+ "test.unselected.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.322874"
+ },
+ "cram_to_bam_index_qname_unselected_csi": {
+ "content": [
+ "test.unselected.bam.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.328458"
+ },
+ "bam_versions": {
+ "content": [
+ [
+ "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:23:27.151650338"
+ },
+ "cram_to_bam_index_qname_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.333248"
+ },
+ "bam_crai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:51.259774"
+ },
+ "bam_cram": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:51.261287"
+ },
+ "cram_to_bam_csi": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:04.995454"
+ },
+ "cram_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:56.502625"
+ },
+ "cram_versions": {
+ "content": [
+ [
+ "versions.yml:md5,176db5ec46b965219604bcdbb3ef9e07"
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.9.0",
+ "nextflow": "24.04.4"
+ },
+ "timestamp": "2024-09-16T09:24:12.95416913"
+ },
+ "cram_to_bam_index_qname_unselected": {
+ "content": [
+ "test.unselected.bam"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.322874"
+ },
+ "bam_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:37:51.264651"
+ },
+ "cram_to_bam_index_bai": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:12.962863"
+ },
+ "cram_to_bam_index_qname_sam": {
+ "content": [
+ [
+
+ ]
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:23.337634"
+ },
+ "bam_stub_csi": {
+ "content": [
+ "test.bam.csi"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.04.3"
+ },
+ "timestamp": "2024-02-12T19:38:32.068596"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/view/tests/tags.yml b/modules/nf-core/samtools/view/tests/tags.yml
new file mode 100644
index 0000000..4fdf1dd
--- /dev/null
+++ b/modules/nf-core/samtools/view/tests/tags.yml
@@ -0,0 +1,2 @@
+samtools/view:
+ - "modules/nf-core/samtools/view/**"
diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml
index d6917da..c779485 100644
--- a/modules/nf-core/untar/environment.yml
+++ b/modules/nf-core/untar/environment.yml
@@ -1,9 +1,7 @@
-name: untar
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- - conda-forge::sed=4.7
- conda-forge::grep=3.11
+ - conda-forge::sed=4.8
- conda-forge::tar=1.34
diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf
index 8a75bb9..9bd8f55 100644
--- a/modules/nf-core/untar/main.nf
+++ b/modules/nf-core/untar/main.nf
@@ -4,8 +4,8 @@ process UNTAR {
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
- 'nf-core/ubuntu:20.04' }"
+ 'https://depot.galaxyproject.org/singularity/ubuntu:22.04' :
+ 'nf-core/ubuntu:22.04' }"
input:
tuple val(meta), path(archive)
@@ -52,8 +52,29 @@ process UNTAR {
stub:
prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.toString().replaceFirst(/\.[^\.]+(.gz)?$/, ""))
"""
- mkdir $prefix
- touch ${prefix}/file.txt
+ mkdir ${prefix}
+ ## Dry-run untaring the archive to get the files and place all in prefix
+ if [[ \$(tar -taf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then
+ for i in `tar -tf ${archive}`;
+ do
+ if [[ \$(echo "\${i}" | grep -E "/\$") == "" ]];
+ then
+ touch \${i}
+ else
+ mkdir -p \${i}
+ fi
+ done
+ else
+ for i in `tar -tf ${archive}`;
+ do
+ if [[ \$(echo "\${i}" | grep -E "/\$") == "" ]];
+ then
+ touch ${prefix}/\${i}
+ else
+ mkdir -p ${prefix}/\${i}
+ fi
+ done
+ fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml
index a9a2110..290346b 100644
--- a/modules/nf-core/untar/meta.yml
+++ b/modules/nf-core/untar/meta.yml
@@ -10,30 +10,33 @@ tools:
Extract tar.gz files.
documentation: https://www.gnu.org/software/tar/manual/
licence: ["GPL-3.0-or-later"]
+ identifier: ""
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - archive:
- type: file
- description: File to be untar
- pattern: "*.{tar}.{gz}"
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - archive:
+ type: file
+ description: File to be untar
+ pattern: "*.{tar}.{gz}"
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- untar:
- type: directory
- description: Directory containing contents of archive
- pattern: "*/"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - $prefix:
+ type: directory
+ description: Directory containing contents of archive
+ pattern: "*/"
- versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@joseespinosa"
- "@drpatelh"
diff --git a/modules/nf-core/untar/tests/main.nf.test b/modules/nf-core/untar/tests/main.nf.test
index d40db13..c957517 100644
--- a/modules/nf-core/untar/tests/main.nf.test
+++ b/modules/nf-core/untar/tests/main.nf.test
@@ -3,7 +3,6 @@ nextflow_process {
name "Test Process UNTAR"
script "../main.nf"
process "UNTAR"
-
tag "modules"
tag "modules_nfcore"
tag "untar"
@@ -11,12 +10,9 @@ nextflow_process {
test("test_untar") {
when {
- params {
- outdir = "$outputDir"
- }
process {
"""
- input[0] = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ]
+ input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) ]
"""
}
}
@@ -24,21 +20,17 @@ nextflow_process {
then {
assertAll (
{ assert process.success },
- { assert snapshot(process.out.untar).match("test_untar") },
+ { assert snapshot(process.out).match() },
)
}
-
}
- test("test_untar_different_output_path") {
+ test("test_untar_onlyfiles") {
when {
- params {
- outdir = "$outputDir"
- }
process {
"""
- input[0] = [ [], file(params.test_data['homo_sapiens']['illumina']['test_flowcell'], checkIfExists: true) ]
+ input[0] = [ [], file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) ]
"""
}
}
@@ -46,21 +38,19 @@ nextflow_process {
then {
assertAll (
{ assert process.success },
- { assert snapshot(process.out.untar).match("test_untar_different_output_path") },
+ { assert snapshot(process.out).match() },
)
}
-
}
- test("test_untar_onlyfiles") {
+ test("test_untar - stub") {
+
+ options "-stub"
when {
- params {
- outdir = "$outputDir"
- }
process {
"""
- input[0] = [ [], file(params.test_data['generic']['tar']['tar_gz'], checkIfExists: true) ]
+ input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) ]
"""
}
}
@@ -68,10 +58,28 @@ nextflow_process {
then {
assertAll (
{ assert process.success },
- { assert snapshot(process.out.untar).match("test_untar_onlyfiles") },
+ { assert snapshot(process.out).match() },
)
}
-
}
+ test("test_untar_onlyfiles - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [], file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) ]
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(process.out).match() },
+ )
+ }
+ }
}
diff --git a/modules/nf-core/untar/tests/main.nf.test.snap b/modules/nf-core/untar/tests/main.nf.test.snap
index 146c867..ceb91b7 100644
--- a/modules/nf-core/untar/tests/main.nf.test.snap
+++ b/modules/nf-core/untar/tests/main.nf.test.snap
@@ -1,513 +1,158 @@
{
- "test_untar_different_output_path": {
+ "test_untar_onlyfiles": {
"content": [
- [
- [
+ {
+ "0": [
[
-
- ],
+ [
+
+ ],
+ [
+ "hello.txt:md5,e59ff97941044f85df5297e1c302d260"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
+ ],
+ "untar": [
[
[
- [
- [
- [
- [
- "s_1_1101.bcl:md5,ad01889e2ff43e2f194224e20bdb600c",
- "s_1_1101.stats:md5,4bbbf103454b37fbc3138fadf1b4446b"
- ],
- [
- "s_1_1101.bcl:md5,565384bbe67a694dfd690bae6d1d30c2",
- "s_1_1101.stats:md5,55e5abd8f129ff38ef169873547abdb8"
- ],
- [
- "s_1_1101.bcl:md5,650fa58a630a9148835ba79e323d4237",
- "s_1_1101.stats:md5,77403669ca1b05340c390dff64425c1e"
- ],
- [
- "s_1_1101.bcl:md5,54471c9e97299cd141e202e204637702",
- "s_1_1101.stats:md5,67b14c9a89b7f8556674a7524d5cfb2d"
- ],
- [
- "s_1_1101.bcl:md5,74e4f929fc7476c380fd9d741ddb6700",
- "s_1_1101.stats:md5,5730a4c35463eaa12a06b6758710b98c"
- ],
- [
- "s_1_1101.bcl:md5,c785f472f4350c120c02c888c8189590",
- "s_1_1101.stats:md5,fee4ec63895ea81007e06ee6a36ba5e0"
- ],
- [
- "s_1_1101.bcl:md5,b7ea50bb25f08d43c301741d77050a9b",
- "s_1_1101.stats:md5,fa7c68f3122c74d14364e6f7b011af70"
- ],
- [
- "s_1_1101.bcl:md5,9d5087dc4bcae39d66486363d4f68ecf",
- "s_1_1101.stats:md5,23cdceee4d82c4b8e7c60018b9276ace"
- ],
- [
- "s_1_1101.bcl:md5,581e0c5ee94e8f2de14b2b1d8e777530",
- "s_1_1101.stats:md5,9a3536d573c97f66bb56b49463612607"
- ],
- [
- "s_1_1101.bcl:md5,296fc026bb34c67bbe2b44845fe0d1de",
- "s_1_1101.stats:md5,a7f57a7770fb9c5ae2a0fb1ef403ec4f"
- ],
- [
- "s_1_1101.bcl:md5,2a3ca15531556c36d10d132a9e051de8",
- "s_1_1101.stats:md5,2d0bcdb0a1b51d3d79e415db2ab2d3b1"
- ],
- [
- "s_1_1101.bcl:md5,1150d46a2ccd4ac58aee0585d3e4ffd7",
- "s_1_1101.stats:md5,2e97550bd5b5864ffd0565bb7a3f6d40"
- ],
- [
- "s_1_1101.bcl:md5,0b85c4b3da0de95e7b862d849c5333ae",
- "s_1_1101.stats:md5,6eab9746fbeb783b0cd70398f44e0c1a"
- ],
- [
- "s_1_1101.bcl:md5,e0e9c91f4698804d7a6d1058ef68b34f",
- "s_1_1101.stats:md5,790022cdc7878a02b2ebd166e1ddf0a7"
- ],
- [
- "s_1_1101.bcl:md5,38cd0ad4de359e651c8ac0d5777ea625",
- "s_1_1101.stats:md5,a1b1d5ea5371d326abb029774483c5e6"
- ],
- [
- "s_1_1101.bcl:md5,b0ddc05c4012ccba24e712a1cfec748f",
- "s_1_1101.stats:md5,af3d232f839d720f76f40ba06caa2987"
- ],
- [
- "s_1_1101.bcl:md5,af32fcc5dc3b836cf7a5ba3db85a75dd",
- "s_1_1101.stats:md5,f93f2c09bd4e486c74a5f6e2040f7296"
- ],
- [
- "s_1_1101.bcl:md5,54b7428e037ca87816107647d4a3d9db",
- "s_1_1101.stats:md5,e5ac77a72cd7bed5e9bf03cccda0e48c"
- ],
- [
- "s_1_1101.bcl:md5,fc8b4eacd493bf3d0b20bc23998dc7ff",
- "s_1_1101.stats:md5,190315e159e2f4bc4c057ded7470dc52"
- ],
- [
- "s_1_1101.bcl:md5,9484ecffda489927fce424ac6a44fa9d",
- "s_1_1101.stats:md5,0825feeb457ecc9efcf6f8526ba32311"
- ],
- [
- "s_1_1101.bcl:md5,eec59e21036e31c95ce1e847bfb0a9c4",
- "s_1_1101.stats:md5,9acc13f63c98e5a8445e7be70d49222b"
- ],
- [
- "s_1_1101.bcl:md5,a9fb24476f87cba4fba68e2b3c3f2c07",
- "s_1_1101.stats:md5,dc0aa7db9790733291c3e6480ca2a0fc"
- ],
- [
- "s_1_1101.bcl:md5,ed950b3e82c500927c2e236c9df005c6",
- "s_1_1101.stats:md5,dccb71ec47d1f9d33a192da6d5660a45"
- ],
- [
- "s_1_1101.bcl:md5,b3e992025e995ca56b5ea2820144ef47",
- "s_1_1101.stats:md5,a6a829bf2cffb26ac5d9dc3012057699"
- ],
- [
- "s_1_1101.bcl:md5,89edc726a5a4e0b4ff8ca3899ed0232b",
- "s_1_1101.stats:md5,5b9b4fd8110577a59b82d0c419519d29"
- ],
- [
- "s_1_1101.bcl:md5,4dc696149169f232c451225f563cb5cd",
- "s_1_1101.stats:md5,d3514a71ea3adc60e2943c6b8f6e2598"
- ],
- [
- "s_1_1101.bcl:md5,35b992d0318afb7c825ceaa31b0755e6",
- "s_1_1101.stats:md5,2826093acc175c16c3795de7c4ca8f07"
- ],
- [
- "s_1_1101.bcl:md5,7bc927f56a362e49c00b5d76ee048901",
- "s_1_1101.stats:md5,e47d862b795fd6b88a31d7d482ab22f6"
- ],
- [
- "s_1_1101.bcl:md5,84742233ff2a651626fe9036f27f7cb2",
- "s_1_1101.stats:md5,b78fad11d3c50bc76b722cdc03e3028b"
- ],
- [
- "s_1_1101.bcl:md5,3935341c86263a7938e8c49620ef39f8",
- "s_1_1101.stats:md5,cc6585b2daac5354073d150874da9704"
- ],
- [
- "s_1_1101.bcl:md5,3627f4fd548bf6e64aaf08fba3a342be",
- "s_1_1101.stats:md5,120ae4831ae004ff7d16728aef36e82f"
- ],
- [
- "s_1_1101.bcl:md5,07631014bc35124149fabd80ef19f933",
- "s_1_1101.stats:md5,eadd63d91f47cc6db6b6f0a967a23927"
- ],
- [
- "s_1_1101.bcl:md5,a1149c80415dc2f34d768eeb397c43fb",
- "s_1_1101.stats:md5,ca89a9def67611a9151c6ce685b7cce1"
- ],
- [
- "s_1_1101.bcl:md5,eb5f71d4741d2f40618756bc72eaf8b4",
- "s_1_1101.stats:md5,90f48501e735e5915b843478e23d1ae2"
- ],
- [
- "s_1_1101.bcl:md5,9bf270fe3f6add1a591ebc24fff10078",
- "s_1_1101.stats:md5,a4e429671d4098034293c638aa655e16"
- ],
- [
- "s_1_1101.bcl:md5,219bedcbd24bae54fe4cf05dae05282c",
- "s_1_1101.stats:md5,dd97525b65b68207137d51fcf19132c7"
- ],
- [
- "s_1_1101.bcl:md5,5163bc00a68fd57ae50cae0b76350892",
- "s_1_1101.stats:md5,b606a5368eff1f012f3ea5d11ccdf2e0"
- ],
- [
- "s_1_1101.bcl:md5,fc429195a5af59a59e0cc4c48e6c05ea",
- "s_1_1101.stats:md5,d809aa19698053f90d639da4dcad8008"
- ],
- [
- "s_1_1101.bcl:md5,383340219a1dd77076a092a64a71a7e4",
- "s_1_1101.stats:md5,b204a5cf256378679ffc906c15cc1bae"
- ],
- [
- "s_1_1101.bcl:md5,0c369540d3e24696cf1f9c55bab69315",
- "s_1_1101.stats:md5,a2bc69a4031a22ce9621dcc623a0bf4b"
- ],
- [
- "s_1_1101.bcl:md5,3127abc8016ba8eb954f8f8015dff387",
- "s_1_1101.stats:md5,5deafff31150b7bf757f814e49a53bc2"
- ],
- [
- "s_1_1101.bcl:md5,045f40c82de676bafec3d59f91376a7a",
- "s_1_1101.stats:md5,890700edc20687c090ef52248c7884b1"
- ],
- [
- "s_1_1101.bcl:md5,78af269aa2b39a1d765703f0a4739a86",
- "s_1_1101.stats:md5,303cf457aa1543a8208544f694cbc531"
- ],
- [
- "s_1_1101.bcl:md5,0ab8c781959b783b62888e9274364a46",
- "s_1_1101.stats:md5,2605b0e8322f83aa4d0dae5da4ec7a7a"
- ],
- [
- "s_1_1101.bcl:md5,d0cf823ffe352e8b3f75d589544ab617",
- "s_1_1101.stats:md5,efa3c0e01e3db71e12fd961cb2d03739"
- ],
- [
- "s_1_1101.bcl:md5,db4ca4ab7a01e03c246f9160c3758d82",
- "s_1_1101.stats:md5,f61550d9e4a90df6b860e68f41f82f60"
- ],
- [
- "s_1_1101.bcl:md5,1af39a2c7e5ff20ece91cb8160b51d17",
- "s_1_1101.stats:md5,d0e20879afcaf6dfcd88c73f1c5c78cf"
- ],
- [
- "s_1_1101.bcl:md5,4cf7123bb0fffcd79266df03aef01665",
- "s_1_1101.stats:md5,29bff4075109a121b087116b58d7e927"
- ],
- [
- "s_1_1101.bcl:md5,aa9980428cb60cd6320f4b48f4dd0d74",
- "s_1_1101.stats:md5,6b0e20bde93133117a8d1a6df3d6f37b"
- ],
- [
- "s_1_1101.bcl:md5,0f6e440374e15b9b491d52fb83a8adfe",
- "s_1_1101.stats:md5,55cb5eb0ecdabd23dca39ab8c4607598"
- ],
- [
- "s_1_1101.bcl:md5,2c645d7bdaddaa403f6e304d36df9e4b",
- "s_1_1101.stats:md5,53acf33d21f832779b400c2447386ce4"
- ],
- [
- "s_1_1101.bcl:md5,3bbf0863b423b770c879203644420206",
- "s_1_1101.stats:md5,579bdc7293cac8c3d7407249cacf4c25"
- ],
- [
- "s_1_1101.bcl:md5,6658a08409e81d29cfeb2d096b491985",
- "s_1_1101.stats:md5,bb559ffbea46d612f9933cefa84c4c03"
- ],
- [
- "s_1_1101.bcl:md5,1700d9a13d3d4f7643af2943ef838acb",
- "s_1_1101.stats:md5,f01cb6050ebfb15da1e0399ebd791eb4"
- ],
- [
- "s_1_1101.bcl:md5,1ac7aa9ffae25eb103f755f33e4a39c6",
- "s_1_1101.stats:md5,0b9d45d7929ccf336d5e5b95373ed3c2"
- ],
- [
- "s_1_1101.bcl:md5,812a97af2e983a53226e18c75190b06c",
- "s_1_1101.stats:md5,d2410c7b0e506dab2972e77e2398de1e"
- ],
- [
- "s_1_1101.bcl:md5,c981e8e4dcc434956c2b86159da268bc",
- "s_1_1101.stats:md5,e9c826e85361ce673f1f248786c9a611"
- ],
- [
- "s_1_1101.bcl:md5,88e09e99a0a4ef3357b203a41b22f77c",
- "s_1_1101.stats:md5,ef06f2e5ad667bbd383f9ed6a05b7b42"
- ],
- [
- "s_1_1101.bcl:md5,461c8b146fc8a7938be38689978ecd09",
- "s_1_1101.stats:md5,65115693935da66f9791b27136e22fb0"
- ],
- [
- "s_1_1101.bcl:md5,c7b827df5ce20e0f21916fe60860ca3f",
- "s_1_1101.stats:md5,87be73613aeb507847f94d3cac5bb30a"
- ],
- [
- "s_1_1101.bcl:md5,7c4cc3dc9c8a1b0f15917b282dfb40ce",
- "s_1_1101.stats:md5,bdd9181fa89debbfafe7b6ea3e064065"
- ],
- [
- "s_1_1101.bcl:md5,19f4debaf91e118aca8934517179ac33",
- "s_1_1101.stats:md5,1143082719e136241d21b14a6b19b8a2"
- ],
- [
- "s_1_1101.bcl:md5,38aa256ad2d697d84b0b2c0e876a3eba",
- "s_1_1101.stats:md5,64dd82f03df23f7f437eede2671ed4fe"
- ],
- [
- "s_1_1101.bcl:md5,b7929970378949571fed922c1b8cab32",
- "s_1_1101.stats:md5,3d6d7985a41629fe196e4342d7fe36aa"
- ],
- [
- "s_1_1101.bcl:md5,fb2ed0bf6e89d79624ee78754e773491",
- "s_1_1101.stats:md5,f34940810ff255aee79953496a12716d"
- ],
- [
- "s_1_1101.bcl:md5,4f8a8311f5f9c3a7629c1a973a7b280e",
- "s_1_1101.stats:md5,4fd7cd28c09f4e152e7c2ad1ab541cd2"
- ],
- [
- "s_1_1101.bcl:md5,9eb46c903d0344e25af51f88cc311d60",
- "s_1_1101.stats:md5,df3abd5f620d9e7f99496098d9fd3f7f"
- ],
- [
- "s_1_1101.bcl:md5,3ecbc17f3660e2014b58d7fe70ae62d5",
- "s_1_1101.stats:md5,8e89a13c85a6d6ab3ccd251b66d1f165"
- ],
- [
- "s_1_1101.bcl:md5,5d59cc2499a77791233a64f73fe82894",
- "s_1_1101.stats:md5,32ec99cd400f4b80cb26e2fa8e07ece0"
- ],
- [
- "s_1_1101.bcl:md5,1c052da47b9ae8554388f0fa3aade482",
- "s_1_1101.stats:md5,d23f438772673688aa7bc92421dc6dce"
- ],
- [
- "s_1_1101.bcl:md5,1a52bd4f23130c0c96bc967ccd448a2b",
- "s_1_1101.stats:md5,9b597e3388d59ef1f61aba30ac90ea79"
- ],
- [
- "s_1_1101.bcl:md5,8a1e84b79cf3f80794c20e3a0cc84688",
- "s_1_1101.stats:md5,9561f7b6ef4b1849afc72b2bb49792bd"
- ],
- [
- "s_1_1101.bcl:md5,75c00111051f3fa95d04286823cb9109",
- "s_1_1101.stats:md5,1fe786cdf8181767deafbd60b3c76610"
- ],
- [
- "s_1_1101.bcl:md5,529255d8deee0873ed5565e6d1a2ebda",
- "s_1_1101.stats:md5,3fa7f467e97a75880f32d17b7429d316"
- ],
- [
- "s_1_1101.bcl:md5,ea4d960e3d9355d2149da71b88a21df4",
- "s_1_1101.stats:md5,2540fe65586e8e800c1ddd8cddd1e8cd"
- ],
- [
- "s_1_1101.bcl:md5,0dfe1fd92a2dce2f23119aa483429744",
- "s_1_1101.stats:md5,78257b2169fb9f0cf40966e06e847e86"
- ],
- [
- "s_1_1101.bcl:md5,f692ddc9aa3ab849271d07c666d0b3b9",
- "s_1_1101.stats:md5,aa2ec6a3e3a9c116e34fe74a21e6459e"
- ],
- [
- "s_1_1101.bcl:md5,29cc4c239eae7c871c9a1adf92ebdb98",
- "s_1_1101.stats:md5,263184813090acd740a5bf25304aed3a"
- ],
- [
- "s_1_1101.bcl:md5,e005af6a84925e326afbfe264241f047",
- "s_1_1101.stats:md5,b6fb20868eebaffcc19daa694a449795"
- ],
- [
- "s_1_1101.bcl:md5,02f1a699b1ba9967accccf99a7af3d24",
- "s_1_1101.stats:md5,4f007efacecaf26dc0e0231aede28754"
- ],
- [
- "s_1_1101.bcl:md5,df308c72a2dcc655cd95e98f5457187a",
- "s_1_1101.stats:md5,130c4b07f4c14030bab012824cbe34da"
- ],
- [
- "s_1_1101.bcl:md5,f3ce10d8d2406b72355023bfa8c96822",
- "s_1_1101.stats:md5,2638f4db393ed5b699ec2ce59ff0ec19"
- ],
- [
- "s_1_1101.bcl:md5,cc2f6d675ad1593ff96f734b172d249e",
- "s_1_1101.stats:md5,f5b13f1e1ababc9e1a7a73b0b993cbf1"
- ],
- [
- "s_1_1101.bcl:md5,7938a0b21448305a951b023b1845b3a7",
- "s_1_1101.stats:md5,fcd57511adabfc3ba1ac045165330006"
- ],
- [
- "s_1_1101.bcl:md5,44879bc6a38df1fee8def61868115041",
- "s_1_1101.stats:md5,517e20e4b58a8023a37f9af62e0e2036"
- ],
- [
- "s_1_1101.bcl:md5,8749611e62406a7d2f34c610a55e56af",
- "s_1_1101.stats:md5,8ccf24b3676ef84f2e513be8f2a9f3d1"
- ],
- [
- "s_1_1101.bcl:md5,a9846a037611cda3721958088f714c0e",
- "s_1_1101.stats:md5,6438fa5a1892f328cab1605a95d80a3b"
- ],
- [
- "s_1_1101.bcl:md5,d6c4a2a726496476eb826532f974ed5f",
- "s_1_1101.stats:md5,8c2c65b5e8b00dbf61ada65252aeb266"
- ],
- [
- "s_1_1101.bcl:md5,be3dde6cae7dd85855a6bf295ebfacfe",
- "s_1_1101.stats:md5,93bc13f3b0749b2b8d8bcb0b1199f4f0"
- ],
- [
- "s_1_1101.bcl:md5,7c64514735a6cf1565b60647edd17d20",
- "s_1_1101.stats:md5,4a0aa6c49b24f876415e5878cef7f805"
- ],
- [
- "s_1_1101.bcl:md5,3983b4043bc9df4b505202a5134ccf03",
- "s_1_1101.stats:md5,1c9d9a8558adc1279ca27c96bc1b9758"
- ],
- [
- "s_1_1101.bcl:md5,a0b8d77f116ec95975f9253dcb768136",
- "s_1_1101.stats:md5,c3992b786756e7ec42f65ef4b13b50d4"
- ],
- [
- "s_1_1101.bcl:md5,43c95ba35d06bb7c57fbd16f3d1cfd6c",
- "s_1_1101.stats:md5,3cb69d04698c39f97f962e5bf1eea7f0"
- ],
- [
- "s_1_1101.bcl:md5,3dbeea0cad7052f19f53ff6f19dd4d90",
- "s_1_1101.stats:md5,58bbc8254f0f5f4a244531e8e9c12a04"
- ],
- [
- "s_1_1101.bcl:md5,da56d088996376c898d855b6cd0a7dfc",
- "s_1_1101.stats:md5,9f2d78af6908ce1576b89cdc059844ff"
- ],
- [
- "s_1_1101.bcl:md5,7b641a5565f095e9a6ffcad9e4305033",
- "s_1_1101.stats:md5,3ada06c59b4fb41b83ab6abd0979e9fc"
- ],
- [
- "s_1_1101.bcl:md5,a3843d397a01d51657825bb652c191e5",
- "s_1_1101.stats:md5,19341e52a4bfc7d9d48e9d2acc68c519"
- ],
- [
- "s_1_1101.bcl:md5,048e3ebfc8efeb8012def6b741c9060d",
- "s_1_1101.stats:md5,88bd38deca1e87d700effab1fd099565"
- ],
- [
- "s_1_1101.bcl:md5,b340db0e07e829dd5da22371916a1a9e",
- "s_1_1101.stats:md5,e44cfaddcc4ffb968e5b1a2f41ac48a5"
- ],
- [
- "s_1_1101.bcl:md5,e6011ec6eabbc2b8792deb283c621ce0",
- "s_1_1101.stats:md5,090875dcd1a431af24bc631333f089c4"
- ],
- [
- "s_1_1101.bcl:md5,a08f216e3352345031ed100ec4245082",
- "s_1_1101.stats:md5,97b949ef4b96219e1369f673cf5f8a6c"
- ],
- [
- "s_1_1101.bcl:md5,b43337c76fb037dfcf5f8f7bcb3618e5",
- "s_1_1101.stats:md5,ddef585805e79951f69d23ab7354f69b"
- ],
- [
- "s_1_1101.bcl:md5,8c61fd004104397b360855e058bbf1bf",
- "s_1_1101.stats:md5,0f8d253816d594dcfea3ccf48c826401"
- ],
- [
- "s_1_1101.bcl:md5,594d06310d328b188aa0b3edfff22cb2",
- "s_1_1101.stats:md5,3160bf271b39aeb7590e4fd2984710ba"
- ],
- [
- "s_1_1101.bcl:md5,4c9eada67c9d55437211d83e111961d5",
- "s_1_1101.stats:md5,2901b46ab16ec4863d30e4c84ec29c97"
- ],
- [
- "s_1_1101.bcl:md5,e03971ae5282f0accc0c1b7374d9ef1b",
- "s_1_1101.stats:md5,60d2a19ce59bf70a21a28555484cead8"
- ],
- [
- "s_1_1101.bcl:md5,e1c6f7a06e63d149895d3e48e63df155",
- "s_1_1101.stats:md5,44beb10af847ea3dddaf06dda7031126"
- ],
- [
- "s_1_1101.bcl:md5,960a99bf29a8f9d936e9b8582d46c9c6",
- "s_1_1101.stats:md5,544cd1a7aaaa841914b40ece43399334"
- ],
- [
- "s_1_1101.bcl:md5,5706679f349fd4a6b6313bc2c41c7a42",
- "s_1_1101.stats:md5,627eea844b26dae033848c2f9f69177b"
- ],
- [
- "s_1_1101.bcl:md5,21da5abc4b0402bbac14b5ab998b0b4f",
- "s_1_1101.stats:md5,515bd140b095ad90473ca7a9a69877ab"
- ],
- "s_1_1101.control:md5,08a72e2198ae95150718e8adf011d105",
- "s_1_1101.filter:md5,3a72bc73b323c8cb0ac5bfeb62d98989"
- ]
- ],
- [
- "s_1_1101.locs:md5,0827ea802e5257cc5b20e757a33d4c98"
- ],
- "RTAConfiguration.xml:md5,c7d6e257bc374f142dc64b9d2281d4c9",
- "config.xml:md5,9a4cc7ec01fefa2f1ce9bcb45bbad6e9"
- ]
+
],
[
- "ControlMetricsOut.bin:md5,6d77b38d0793a6e1ce1e85706e488953",
- "CorrectedIntMetricsOut.bin:md5,2bbf84d3be72734addaa2fe794711434",
- "ErrorMetricsOut.bin:md5,38c88def138e9bb832539911affdb286",
- "ExtractionMetricsOut.bin:md5,7497c3178837eea8f09350b5cd252e99",
- "IndexMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e",
- "QMetricsOut.bin:md5,7e9f198d53ebdfbb699a5f94cf1ed51c",
- "TileMetricsOut.bin:md5,83891751ec1c91a425a524b476b6ca3c"
+ "hello.txt:md5,e59ff97941044f85df5297e1c302d260"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-10T12:04:28.231047"
+ },
+ "test_untar_onlyfiles - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ [
+
],
- "RunInfo.xml:md5,03038959f4dd181c86bc97ae71fe270a"
+ [
+ "hello.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
]
+ ],
+ "1": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
+ ],
+ "untar": [
+ [
+ [
+
+ ],
+ [
+ "hello.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
]
- ]
+ }
],
- "timestamp": "2023-10-18T11:56:39.562418"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-10T12:04:45.773103"
},
- "test_untar_onlyfiles": {
+ "test_untar - stub": {
"content": [
- [
- [
+ {
+ "0": [
[
-
- ],
+ [
+
+ ],
+ [
+ "hash.k2d:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "opts.k2d:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "taxo.k2d:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
+ ],
+ "untar": [
[
- "hello.txt:md5,e59ff97941044f85df5297e1c302d260"
+ [
+
+ ],
+ [
+ "hash.k2d:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "opts.k2d:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "taxo.k2d:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
]
+ ],
+ "versions": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
]
- ]
+ }
],
- "timestamp": "2023-10-18T11:56:46.878844"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-10T12:04:36.777441"
},
"test_untar": {
"content": [
- [
- [
+ {
+ "0": [
[
-
- ],
+ [
+
+ ],
+ [
+ "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9",
+ "opts.k2d:md5,a033d00cf6759407010b21700938f543",
+ "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c"
+ ]
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
+ ],
+ "untar": [
[
- "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9",
- "opts.k2d:md5,a033d00cf6759407010b21700938f543",
- "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c"
+ [
+
+ ],
+ [
+ "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9",
+ "opts.k2d:md5,a033d00cf6759407010b21700938f543",
+ "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c"
+ ]
]
+ ],
+ "versions": [
+ "versions.yml:md5,6063247258c56fd271d076bb04dd7536"
]
- ]
+ }
],
- "timestamp": "2023-10-18T11:56:08.16574"
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.3"
+ },
+ "timestamp": "2024-07-10T12:04:19.377674"
}
}
\ No newline at end of file
diff --git a/modules/nf-core/vcftools/environment.yml b/modules/nf-core/vcftools/environment.yml
index 503449e..7dcc752 100644
--- a/modules/nf-core/vcftools/environment.yml
+++ b/modules/nf-core/vcftools/environment.yml
@@ -1,7 +1,5 @@
-name: vcftools
channels:
- conda-forge
- bioconda
- - defaults
dependencies:
- bioconda::vcftools=0.1.16
diff --git a/modules/nf-core/vcftools/main.nf b/modules/nf-core/vcftools/main.nf
index 0e61955..24e0fc3 100644
--- a/modules/nf-core/vcftools/main.nf
+++ b/modules/nf-core/vcftools/main.nf
@@ -124,4 +124,76 @@ process VCFTOOLS {
vcftools: \$(echo \$(vcftools --version 2>&1) | sed 's/^.*VCFtools (//;s/).*//')
END_VERSIONS
"""
+
+ stub:
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ """
+ touch ${prefix}.vcf
+ touch ${prefix}.bcf
+ touch ${prefix}.frq
+ touch ${prefix}.frq.count
+ touch ${prefix}.idepth
+ touch ${prefix}.ldepth
+ touch ${prefix}.ldepth.mean
+ touch ${prefix}.gdepth
+ touch ${prefix}.hap.ld
+ touch ${prefix}.geno.ld
+ touch ${prefix}.geno.chisq
+ touch ${prefix}.list.hap.ld
+ touch ${prefix}.list.geno.ld
+ touch ${prefix}.interchrom.hap.ld
+ touch ${prefix}.interchrom.geno.ld
+ touch ${prefix}.TsTv
+ touch ${prefix}.TsTv.summary
+ touch ${prefix}.TsTv.count
+ touch ${prefix}.TsTv.qual
+ touch ${prefix}.FILTER.summary
+ touch ${prefix}.sites.pi
+ touch ${prefix}.windowed.pi
+ touch ${prefix}.weir.fst
+ touch ${prefix}.het
+ touch ${prefix}.hwe
+ touch ${prefix}.Tajima.D
+ touch ${prefix}.ifreqburden
+ touch ${prefix}.LROH
+ touch ${prefix}.relatedness
+ touch ${prefix}.relatedness2
+ touch ${prefix}.lqual
+ touch ${prefix}.imiss
+ touch ${prefix}.lmiss
+ touch ${prefix}.snpden
+ touch ${prefix}.kept.sites
+ touch ${prefix}.removed.sites
+ touch ${prefix}.singletons
+ touch ${prefix}.indel.hist
+ touch ${prefix}.hapcount
+ touch ${prefix}.mendel
+ touch ${prefix}.FORMAT
+ touch ${prefix}.INFO
+ touch ${prefix}.012
+ touch ${prefix}.012.indv
+ touch ${prefix}.012.pos
+ touch ${prefix}.impute.hap
+ touch ${prefix}.impute.hap.legend
+ touch ${prefix}.impute.hap.indv
+ touch ${prefix}.ldhat.sites
+ touch ${prefix}.ldhat.locs
+ touch ${prefix}.BEAGLE.GL
+ touch ${prefix}.BEAGLE.PL
+ touch ${prefix}.ped
+ touch ${prefix}.map
+ touch ${prefix}.tped
+ touch ${prefix}.tfam
+ touch ${prefix}.diff.sites_in_files
+ touch ${prefix}.diff.indv_in_files
+ touch ${prefix}.diff.sites
+ touch ${prefix}.diff.indv
+ touch ${prefix}.diff.discordance.matrix
+ touch ${prefix}.diff.switch
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ vcftools: \$(echo \$(vcftools --version 2>&1) | sed 's/^.*VCFtools (//;s/).*//')
+ END_VERSIONS
+ """
}
diff --git a/modules/nf-core/vcftools/meta.yml b/modules/nf-core/vcftools/meta.yml
index 09ad590..b4c564e 100644
--- a/modules/nf-core/vcftools/meta.yml
+++ b/modules/nf-core/vcftools/meta.yml
@@ -6,287 +6,681 @@ keywords:
- sort
tools:
- vcftools:
- description: A set of tools written in Perl and C++ for working with VCF files. This package only contains the C++ libraries whereas the package perl-vcftools-vcf contains the perl libraries
+ description: A set of tools written in Perl and C++ for working with VCF files.
+ This package only contains the C++ libraries whereas the package perl-vcftools-vcf
+ contains the perl libraries
homepage: http://vcftools.sourceforge.net/
documentation: http://vcftools.sourceforge.net/man_latest.html
licence: ["LGPL"]
+ identifier: biotools:vcftools
input:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - variant_file:
- type: file
- description: variant input file which can be vcf, vcf.gz, or bcf format.
- - bed:
- type: file
- description: bed file which can be used with different arguments in vcftools (optional)
- - diff_variant_file:
- type: file
- description: secondary variant file which can be used with the 'diff' suite of tools (optional)
+ - - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - variant_file:
+ type: file
+ description: variant input file which can be vcf, vcf.gz, or bcf format.
+ - - bed:
+ type: file
+ description: bed file which can be used with different arguments in vcftools
+ (optional)
+ - - diff_variant_file:
+ type: file
+ description: secondary variant file which can be used with the 'diff' suite
+ of tools (optional)
output:
- - meta:
- type: map
- description: |
- Groovy Map containing sample information
- e.g. [ id:'test', single_end:false ]
- - versions:
- type: file
- description: File containing software versions
- pattern: "versions.yml"
- vcf:
- type: file
- description: vcf file (optional)
- pattern: "*.vcf"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.vcf":
+ type: file
+ description: vcf file (optional)
+ pattern: "*.vcf"
- bcf:
- type: file
- description: bcf file (optional)
- pattern: "*.bcf"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.bcf":
+ type: file
+ description: bcf file (optional)
+ pattern: "*.bcf"
- frq:
- type: file
- description: Allele frequency for each site (optional)
- pattern: "*.frq"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.frq":
+ type: file
+ description: Allele frequency for each site (optional)
+ pattern: "*.frq"
- frq_count:
- type: file
- description: Allele counts for each site (optional)
- pattern: "*.frq.count"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.frq.count":
+ type: file
+ description: Allele counts for each site (optional)
+ pattern: "*.frq.count"
- idepth:
- type: file
- description: mean depth per individual (optional)
- pattern: "*.idepth"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.idepth":
+ type: file
+ description: mean depth per individual (optional)
+ pattern: "*.idepth"
- ldepth:
- type: file
- description: depth per site summed across individuals (optional)
- pattern: "*.ildepth"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.ldepth":
+ type: file
+ description: depth per site summed across individuals (optional)
+ pattern: "*.ildepth"
- ldepth_mean:
- type: file
- description: mean depth per site calculated across individuals (optional)
- pattern: "*.ldepth.mean"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.ldepth.mean":
+ type: file
+ description: mean depth per site calculated across individuals (optional)
+ pattern: "*.ldepth.mean"
- gdepth:
- type: file
- description: depth for each genotype in vcf file (optional)
- pattern: "*.gdepth"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.gdepth":
+ type: file
+ description: depth for each genotype in vcf file (optional)
+ pattern: "*.gdepth"
- hap_ld:
- type: file
- description: r2, D, and D’ statistics using phased haplotypes (optional)
- pattern: "*.hap.ld"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.hap.ld":
+ type: file
+ description: r2, D, and D’ statistics using phased haplotypes (optional)
+ pattern: "*.hap.ld"
- geno_ld:
- type: file
- description: squared correlation coefficient between genotypes encoded as 0, 1 and 2 to represent the number of non-reference alleles in each individual (optional)
- pattern: "*.geno.ld"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.geno.ld":
+ type: file
+ description: squared correlation coefficient between genotypes encoded as 0,
+ 1 and 2 to represent the number of non-reference alleles in each individual
+ (optional)
+ pattern: "*.geno.ld"
- geno_chisq:
- type: file
- description: test for genotype independence via the chi-squared statistic (optional)
- pattern: "*.geno.chisq"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.geno.chisq":
+ type: file
+ description: test for genotype independence via the chi-squared statistic (optional)
+ pattern: "*.geno.chisq"
- list_hap_ld:
- type: file
- description: r2 statistics of the sites contained in the provided input file verses all other sites (optional)
- pattern: "*.list.hap.ld"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.list.hap.ld":
+ type: file
+ description: r2 statistics of the sites contained in the provided input file
+ verses all other sites (optional)
+ pattern: "*.list.hap.ld"
- list_geno_ld:
- type: file
- description: r2 statistics of the sites contained in the provided input file verses all other sites (optional)
- pattern: "*.list.geno.ld"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.list.geno.ld":
+ type: file
+ description: r2 statistics of the sites contained in the provided input file
+ verses all other sites (optional)
+ pattern: "*.list.geno.ld"
- interchrom_hap_ld:
- type: file
- description: r2 statistics for sites (haplotypes) on different chromosomes (optional)
- pattern: "*.interchrom.hap.ld"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.interchrom.hap.ld":
+ type: file
+ description: r2 statistics for sites (haplotypes) on different chromosomes (optional)
+ pattern: "*.interchrom.hap.ld"
- interchrom_geno_ld:
- type: file
- description: r2 statistics for sites (genotypes) on different chromosomes (optional)
- pattern: "*.interchrom.geno.ld"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.interchrom.geno.ld":
+ type: file
+ description: r2 statistics for sites (genotypes) on different chromosomes (optional)
+ pattern: "*.interchrom.geno.ld"
- tstv:
- type: file
- description: Transition / Transversion ratio in bins of size defined in options (optional)
- pattern: "*.TsTv"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.TsTv":
+ type: file
+ description: Transition / Transversion ratio in bins of size defined in options
+ (optional)
+ pattern: "*.TsTv"
- tstv_summary:
- type: file
- description: Summary of all Transitions and Transversions (optional)
- pattern: "*.TsTv.summary"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.TsTv.summary":
+ type: file
+ description: Summary of all Transitions and Transversions (optional)
+ pattern: "*.TsTv.summary"
- tstv_count:
- type: file
- description: Transition / Transversion ratio as a function of alternative allele count (optional)
- pattern: "*.TsTv.count"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.TsTv.count":
+ type: file
+ description: Transition / Transversion ratio as a function of alternative allele
+ count (optional)
+ pattern: "*.TsTv.count"
- tstv_qual:
- type: file
- description: Transition / Transversion ratio as a function of SNP quality threshold (optional)
- pattern: "*.TsTv.qual"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.TsTv.qual":
+ type: file
+ description: Transition / Transversion ratio as a function of SNP quality threshold
+ (optional)
+ pattern: "*.TsTv.qual"
- filter_summary:
- type: file
- description: Summary of the number of SNPs and Ts/Tv ratio for each FILTER category (optional)
- pattern: "*.FILTER.summary"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.FILTER.summary":
+ type: file
+ description: Summary of the number of SNPs and Ts/Tv ratio for each FILTER category
+ (optional)
+ pattern: "*.FILTER.summary"
- sites_pi:
- type: file
- description: Nucleotide divergency on a per-site basis (optional)
- pattern: "*.sites.pi"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.sites.pi":
+ type: file
+ description: Nucleotide divergency on a per-site basis (optional)
+ pattern: "*.sites.pi"
- windowed_pi:
- type: file
- description: Nucleotide diversity in windows, with window size determined by options (optional)
- pattern: "*windowed.pi"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.windowed.pi":
+ type: file
+ description: Nucleotide diversity in windows, with window size determined by
+ options (optional)
+ pattern: "*windowed.pi"
- weir_fst:
- type: file
- description: Fst estimate from Weir and Cockerham’s 1984 paper (optional)
- pattern: "*.weir.fst"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.weir.fst":
+ type: file
+ description: Fst estimate from Weir and Cockerham’s 1984 paper (optional)
+ pattern: "*.weir.fst"
- heterozygosity:
- type: file
- description: Heterozygosity on a per-individual basis (optional)
- pattern: "*.het"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.het":
+ type: file
+ description: Heterozygosity on a per-individual basis (optional)
+ pattern: "*.het"
- hwe:
- type: file
- description: Contains the Observed numbers of Homozygotes and Heterozygotes and the corresponding Expected numbers under HWE (optional)
- pattern: "*.hwe"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.hwe":
+ type: file
+ description: Contains the Observed numbers of Homozygotes and Heterozygotes
+ and the corresponding Expected numbers under HWE (optional)
+ pattern: "*.hwe"
- tajima_d:
- type: file
- description: Tajima’s D statistic in bins with size of the specified number in options (optional)
- pattern: "*.Tajima.D"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.Tajima.D":
+ type: file
+ description: Tajima’s D statistic in bins with size of the specified number
+ in options (optional)
+ pattern: "*.Tajima.D"
- freq_burden:
- type: file
- description: Number of variants within each individual of a specific frequency in options (optional)
- pattern: "*.ifreqburden"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.ifreqburden":
+ type: file
+ description: Number of variants within each individual of a specific frequency
+ in options (optional)
+ pattern: "*.ifreqburden"
- lroh:
- type: file
- description: Long Runs of Homozygosity (optional)
- pattern: "*.LROH"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.LROH":
+ type: file
+ description: Long Runs of Homozygosity (optional)
+ pattern: "*.LROH"
- relatedness:
- type: file
- description: Relatedness statistic based on the method of Yang et al, Nature Genetics 2010 (doi:10.1038/ng.608) (optional)
- pattern: "*.relatedness"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.relatedness":
+ type: file
+ description: Relatedness statistic based on the method of Yang et al, Nature
+ Genetics 2010 (doi:10.1038/ng.608) (optional)
+ pattern: "*.relatedness"
- relatedness2:
- type: file
- description: Relatedness statistic based on the method of Manichaikul et al., BIOINFORMATICS 2010 (doi:10.1093/bioinformatics/btq559) (optional)
- pattern: "*.relatedness2"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.relatedness2":
+ type: file
+ description: Relatedness statistic based on the method of Manichaikul et al.,
+ BIOINFORMATICS 2010 (doi:10.1093/bioinformatics/btq559) (optional)
+ pattern: "*.relatedness2"
- lqual:
- type: file
- description: per-site SNP quality (optional)
- pattern: "*.lqual"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.lqual":
+ type: file
+ description: per-site SNP quality (optional)
+ pattern: "*.lqual"
- missing_individual:
- type: file
- description: Missingness on a per-individual basis (optional)
- pattern: "*.imiss"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.imiss":
+ type: file
+ description: Missingness on a per-individual basis (optional)
+ pattern: "*.imiss"
- missing_site:
- type: file
- description: Missingness on a per-site basis (optional)
- pattern: "*.lmiss"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.lmiss":
+ type: file
+ description: Missingness on a per-site basis (optional)
+ pattern: "*.lmiss"
- snp_density:
- type: file
- description: Number and density of SNPs in bins of size defined by option (optional)
- pattern: "*.snpden"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.snpden":
+ type: file
+ description: Number and density of SNPs in bins of size defined by option (optional)
+ pattern: "*.snpden"
- kept_sites:
- type: file
- description: All sites that have been kept after filtering (optional)
- pattern: "*.kept.sites"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.kept.sites":
+ type: file
+ description: All sites that have been kept after filtering (optional)
+ pattern: "*.kept.sites"
- removed_sites:
- type: file
- description: All sites that have been removed after filtering (optional)
- pattern: "*.removed.sites"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.removed.sites":
+ type: file
+ description: All sites that have been removed after filtering (optional)
+ pattern: "*.removed.sites"
- singeltons:
- type: file
- description: Location of singletons, and the individual they occur in (optional)
- pattern: "*.singeltons"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.singletons":
+ type: file
+ description: Location of singletons, and the individual they occur in (optional)
+ pattern: "*.singeltons"
- indel_hist:
- type: file
- description: Histogram file of the length of all indels (including SNPs) (optional)
- pattern: "*.indel_hist"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.indel.hist":
+ type: file
+ description: Histogram file of the length of all indels (including SNPs) (optional)
+ pattern: "*.indel_hist"
- hapcount:
- type: file
- description: Unique haplotypes within user specified bins (optional)
- pattern: "*.hapcount"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.hapcount":
+ type: file
+ description: Unique haplotypes within user specified bins (optional)
+ pattern: "*.hapcount"
- mendel:
- type: file
- description: Mendel errors identified in trios (optional)
- pattern: "*.mendel"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.mendel":
+ type: file
+ description: Mendel errors identified in trios (optional)
+ pattern: "*.mendel"
- format:
- type: file
- description: Extracted information from the genotype fields in the VCF file relating to a specfied FORMAT identifier (optional)
- pattern: "*.FORMAT"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.FORMAT":
+ type: file
+ description: Extracted information from the genotype fields in the VCF file
+ relating to a specfied FORMAT identifier (optional)
+ pattern: "*.FORMAT"
- info:
- type: file
- description: Extracted information from the INFO field in the VCF file (optional)
- pattern: "*.INFO"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.INFO":
+ type: file
+ description: Extracted information from the INFO field in the VCF file (optional)
+ pattern: "*.INFO"
- genotypes_matrix:
- type: file
- description: |
- Genotypes output as large matrix.
- Genotypes of each individual on a separate line.
- Genotypes are represented as 0, 1 and 2, where the number represent that number of non-reference alleles.
- Missing genotypes are represented by -1 (optional)
- pattern: "*.012"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.012":
+ type: file
+ description: |
+ Genotypes output as large matrix.
+ Genotypes of each individual on a separate line.
+ Genotypes are represented as 0, 1 and 2, where the number represent that number of non-reference alleles.
+ Missing genotypes are represented by -1 (optional)
+ pattern: "*.012"
- genotypes_matrix_individual:
- type: file
- description: Details the individuals included in the main genotypes_matrix file (optional)
- pattern: "*.012.indv"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.012.indv":
+ type: file
+ description: Details the individuals included in the main genotypes_matrix file
+ (optional)
+ pattern: "*.012.indv"
- genotypes_matrix_position:
- type: file
- description: Details the site locations included in the main genotypes_matrix file (optional)
- pattern: "*.012.pos"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.012.pos":
+ type: file
+ description: Details the site locations included in the main genotypes_matrix
+ file (optional)
+ pattern: "*.012.pos"
- impute_hap:
- type: file
- description: Phased haplotypes in IMPUTE reference-panel format (optional)
- pattern: "*.impute.hap"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.impute.hap":
+ type: file
+ description: Phased haplotypes in IMPUTE reference-panel format (optional)
+ pattern: "*.impute.hap"
- impute_hap_legend:
- type: file
- description: Impute haplotype legend file (optional)
- pattern: "*.impute.hap.legend"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.impute.hap.legend":
+ type: file
+ description: Impute haplotype legend file (optional)
+ pattern: "*.impute.hap.legend"
- impute_hap_indv:
- type: file
- description: Impute haplotype individuals file (optional)
- pattern: "*.impute.hap.indv"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.impute.hap.indv":
+ type: file
+ description: Impute haplotype individuals file (optional)
+ pattern: "*.impute.hap.indv"
- ldhat_sites:
- type: file
- description: Output data in LDhat format, sites (optional)
- pattern: "*.ldhat.sites"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.ldhat.sites":
+ type: file
+ description: Output data in LDhat format, sites (optional)
+ pattern: "*.ldhat.sites"
- ldhat_locs:
- type: file
- description: output data in LDhat format, locations (optional)
- pattern: "*.ldhat.locs"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.ldhat.locs":
+ type: file
+ description: output data in LDhat format, locations (optional)
+ pattern: "*.ldhat.locs"
- beagle_gl:
- type: file
- description: Genotype likelihoods for biallelic sites (optional)
- pattern: "*.BEAGLE.GL"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.BEAGLE.GL":
+ type: file
+ description: Genotype likelihoods for biallelic sites (optional)
+ pattern: "*.BEAGLE.GL"
- beagle_pl:
- type: file
- description: Genotype likelihoods for biallelic sites (optional)
- pattern: "*.BEAGLE.PL"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.BEAGLE.PL":
+ type: file
+ description: Genotype likelihoods for biallelic sites (optional)
+ pattern: "*.BEAGLE.PL"
- ped:
- type: file
- description: output the genotype data in PLINK PED format (optional)
- pattern: "*.ped"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.ped":
+ type: file
+ description: output the genotype data in PLINK PED format (optional)
+ pattern: "*.ped"
- map_:
- type: file
- description: output the genotype data in PLINK PED format (optional)
- pattern: "*.map"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.map":
+ type: file
+ description: output the genotype data in PLINK PED format (optional)
+ pattern: "*.map"
- tped:
- type: file
- description: output the genotype data in PLINK PED format (optional)
- pattern: "*.tped"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.tped":
+ type: file
+ description: output the genotype data in PLINK PED format (optional)
+ pattern: "*.tped"
- tfam:
- type: file
- description: output the genotype data in PLINK PED format (optional)
- pattern: "*.tfam"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.tfam":
+ type: file
+ description: output the genotype data in PLINK PED format (optional)
+ pattern: "*.tfam"
- diff_sites_in_files:
- type: file
- description: Sites that are common / unique to each file specified in optional inputs (optional)
- pattern: "*.diff.sites.in.files"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.diff.sites_in_files":
+ type: file
+ description: Sites that are common / unique to each file specified in optional
+ inputs (optional)
+ pattern: "*.diff.sites.in.files"
- diff_indv_in_files:
- type: file
- description: Individuals that are common / unique to each file specified in optional inputs (optional)
- pattern: "*.diff.indv.in.files"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.diff.indv_in_files":
+ type: file
+ description: Individuals that are common / unique to each file specified in
+ optional inputs (optional)
+ pattern: "*.diff.indv.in.files"
- diff_sites:
- type: file
- description: Discordance on a site by site basis, specified in optional inputs (optional)
- pattern: "*.diff.sites"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.diff.sites":
+ type: file
+ description: Discordance on a site by site basis, specified in optional inputs
+ (optional)
+ pattern: "*.diff.sites"
- diff_indv:
- type: file
- description: Discordance on a individual by individual basis, specified in optional inputs (optional)
- pattern: "*.diff.indv"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.diff.indv":
+ type: file
+ description: Discordance on a individual by individual basis, specified in optional
+ inputs (optional)
+ pattern: "*.diff.indv"
- diff_discd_matrix:
- type: file
- description: Discordance matrix between files specified in optional inputs (optional)
- pattern: "*.diff.discordance.matrix"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.diff.discordance.matrix":
+ type: file
+ description: Discordance matrix between files specified in optional inputs (optional)
+ pattern: "*.diff.discordance.matrix"
- diff_switch_error:
- type: file
- description: Switch errors found between sites (optional)
- pattern: "*.diff.switch"
+ - meta:
+ type: map
+ description: |
+ Groovy Map containing sample information
+ e.g. [ id:'test', single_end:false ]
+ - "*.diff.switch":
+ type: file
+ description: Switch errors found between sites (optional)
+ pattern: "*.diff.switch"
+ - versions:
+ - versions.yml:
+ type: file
+ description: File containing software versions
+ pattern: "versions.yml"
authors:
- "@Mark-S-Hill"
maintainers:
diff --git a/modules/nf-core/vcftools/tests/base.config b/modules/nf-core/vcftools/tests/base.config
new file mode 100644
index 0000000..2b749b6
--- /dev/null
+++ b/modules/nf-core/vcftools/tests/base.config
@@ -0,0 +1,5 @@
+process {
+ withName: VCFTOOLS {
+ ext.args = '--freq'
+ }
+}
diff --git a/modules/nf-core/vcftools/tests/bed.config b/modules/nf-core/vcftools/tests/bed.config
new file mode 100644
index 0000000..14c0aea
--- /dev/null
+++ b/modules/nf-core/vcftools/tests/bed.config
@@ -0,0 +1,5 @@
+process {
+ withName: VCFTOOLS {
+ ext.args = '--freq --exclude-bed'
+ }
+}
diff --git a/modules/nf-core/vcftools/tests/main.nf.test b/modules/nf-core/vcftools/tests/main.nf.test
new file mode 100644
index 0000000..d8f578d
--- /dev/null
+++ b/modules/nf-core/vcftools/tests/main.nf.test
@@ -0,0 +1,151 @@
+nextflow_process {
+
+ name "Test Process VCFTOOLS"
+ script "../main.nf"
+ process "VCFTOOLS"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "vcftools"
+
+ test("sarscov2 - vcf") {
+
+ config "./base.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
+ ]
+ // bed
+ input[1] = []
+ // diff_variant_file
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcfgz") {
+
+ config "./base.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true)
+ ]
+ // bed
+ input[1] = []
+ // diff_variant_file
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcf - bed") {
+
+ config "./bed.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf', checkIfExists: true)
+ ]
+ // bed
+ input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)
+ // diff_variant_file
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcfgz - bed") {
+
+ config "./bed.config"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true)
+ ]
+ // bed
+ input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)
+ // diff_variant_file
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - vcfgz - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test' ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true)
+ ]
+ // bed
+ input[1] = []
+ // diff_variant_file
+ input[2] = []
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/vcftools/tests/main.nf.test.snap b/modules/nf-core/vcftools/tests/main.nf.test.snap
new file mode 100644
index 0000000..e178655
--- /dev/null
+++ b/modules/nf-core/vcftools/tests/main.nf.test.snap
@@ -0,0 +1,2623 @@
+{
+ "sarscov2 - vcfgz - bed": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+
+ ],
+ "10": [
+
+ ],
+ "11": [
+
+ ],
+ "12": [
+
+ ],
+ "13": [
+
+ ],
+ "14": [
+
+ ],
+ "15": [
+
+ ],
+ "16": [
+
+ ],
+ "17": [
+
+ ],
+ "18": [
+
+ ],
+ "19": [
+
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "20": [
+
+ ],
+ "21": [
+
+ ],
+ "22": [
+
+ ],
+ "23": [
+
+ ],
+ "24": [
+
+ ],
+ "25": [
+
+ ],
+ "26": [
+
+ ],
+ "27": [
+
+ ],
+ "28": [
+
+ ],
+ "29": [
+
+ ],
+ "3": [
+
+ ],
+ "30": [
+
+ ],
+ "31": [
+
+ ],
+ "32": [
+
+ ],
+ "33": [
+
+ ],
+ "34": [
+
+ ],
+ "35": [
+
+ ],
+ "36": [
+
+ ],
+ "37": [
+
+ ],
+ "38": [
+
+ ],
+ "39": [
+
+ ],
+ "4": [
+
+ ],
+ "40": [
+
+ ],
+ "41": [
+
+ ],
+ "42": [
+
+ ],
+ "43": [
+
+ ],
+ "44": [
+
+ ],
+ "45": [
+
+ ],
+ "46": [
+
+ ],
+ "47": [
+
+ ],
+ "48": [
+
+ ],
+ "49": [
+
+ ],
+ "5": [
+
+ ],
+ "50": [
+
+ ],
+ "51": [
+
+ ],
+ "52": [
+
+ ],
+ "53": [
+
+ ],
+ "54": [
+
+ ],
+ "55": [
+
+ ],
+ "56": [
+
+ ],
+ "57": [
+
+ ],
+ "58": [
+
+ ],
+ "59": [
+
+ ],
+ "6": [
+
+ ],
+ "60": [
+
+ ],
+ "61": [
+
+ ],
+ "62": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "7": [
+
+ ],
+ "8": [
+
+ ],
+ "9": [
+
+ ],
+ "bcf": [
+
+ ],
+ "beagle_gl": [
+
+ ],
+ "beagle_pl": [
+
+ ],
+ "diff_discd_matrix": [
+
+ ],
+ "diff_indv": [
+
+ ],
+ "diff_indv_in_files": [
+
+ ],
+ "diff_sites": [
+
+ ],
+ "diff_sites_in_files": [
+
+ ],
+ "diff_switch_error": [
+
+ ],
+ "filter_summary": [
+
+ ],
+ "format": [
+
+ ],
+ "freq_burden": [
+
+ ],
+ "frq": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "frq_count": [
+
+ ],
+ "gdepth": [
+
+ ],
+ "geno_chisq": [
+
+ ],
+ "geno_ld": [
+
+ ],
+ "genotypes_matrix": [
+
+ ],
+ "genotypes_matrix_individual": [
+
+ ],
+ "genotypes_matrix_position": [
+
+ ],
+ "hap_ld": [
+
+ ],
+ "hapcount": [
+
+ ],
+ "heterozygosity": [
+
+ ],
+ "hwe": [
+
+ ],
+ "idepth": [
+
+ ],
+ "impute_hap": [
+
+ ],
+ "impute_hap_indv": [
+
+ ],
+ "impute_hap_legend": [
+
+ ],
+ "indel_hist": [
+
+ ],
+ "info": [
+
+ ],
+ "interchrom_geno_ld": [
+
+ ],
+ "interchrom_hap_ld": [
+
+ ],
+ "kept_sites": [
+
+ ],
+ "ldepth": [
+
+ ],
+ "ldepth_mean": [
+
+ ],
+ "ldhat_locs": [
+
+ ],
+ "ldhat_sites": [
+
+ ],
+ "list_geno_ld": [
+
+ ],
+ "list_hap_ld": [
+
+ ],
+ "lqual": [
+
+ ],
+ "lroh": [
+
+ ],
+ "map_": [
+
+ ],
+ "mendel": [
+
+ ],
+ "missing_individual": [
+
+ ],
+ "missing_site": [
+
+ ],
+ "ped": [
+
+ ],
+ "relatedness": [
+
+ ],
+ "relatedness2": [
+
+ ],
+ "removed_sites": [
+
+ ],
+ "singeltons": [
+
+ ],
+ "sites_pi": [
+
+ ],
+ "snp_density": [
+
+ ],
+ "tajima_d": [
+
+ ],
+ "tfam": [
+
+ ],
+ "tped": [
+
+ ],
+ "tstv": [
+
+ ],
+ "tstv_count": [
+
+ ],
+ "tstv_qual": [
+
+ ],
+ "tstv_summary": [
+
+ ],
+ "vcf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "weir_fst": [
+
+ ],
+ "windowed_pi": [
+
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T13:07:26.598512"
+ },
+ "sarscov2 - vcf": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+
+ ],
+ "10": [
+
+ ],
+ "11": [
+
+ ],
+ "12": [
+
+ ],
+ "13": [
+
+ ],
+ "14": [
+
+ ],
+ "15": [
+
+ ],
+ "16": [
+
+ ],
+ "17": [
+
+ ],
+ "18": [
+
+ ],
+ "19": [
+
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "20": [
+
+ ],
+ "21": [
+
+ ],
+ "22": [
+
+ ],
+ "23": [
+
+ ],
+ "24": [
+
+ ],
+ "25": [
+
+ ],
+ "26": [
+
+ ],
+ "27": [
+
+ ],
+ "28": [
+
+ ],
+ "29": [
+
+ ],
+ "3": [
+
+ ],
+ "30": [
+
+ ],
+ "31": [
+
+ ],
+ "32": [
+
+ ],
+ "33": [
+
+ ],
+ "34": [
+
+ ],
+ "35": [
+
+ ],
+ "36": [
+
+ ],
+ "37": [
+
+ ],
+ "38": [
+
+ ],
+ "39": [
+
+ ],
+ "4": [
+
+ ],
+ "40": [
+
+ ],
+ "41": [
+
+ ],
+ "42": [
+
+ ],
+ "43": [
+
+ ],
+ "44": [
+
+ ],
+ "45": [
+
+ ],
+ "46": [
+
+ ],
+ "47": [
+
+ ],
+ "48": [
+
+ ],
+ "49": [
+
+ ],
+ "5": [
+
+ ],
+ "50": [
+
+ ],
+ "51": [
+
+ ],
+ "52": [
+
+ ],
+ "53": [
+
+ ],
+ "54": [
+
+ ],
+ "55": [
+
+ ],
+ "56": [
+
+ ],
+ "57": [
+
+ ],
+ "58": [
+
+ ],
+ "59": [
+
+ ],
+ "6": [
+
+ ],
+ "60": [
+
+ ],
+ "61": [
+
+ ],
+ "62": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "7": [
+
+ ],
+ "8": [
+
+ ],
+ "9": [
+
+ ],
+ "bcf": [
+
+ ],
+ "beagle_gl": [
+
+ ],
+ "beagle_pl": [
+
+ ],
+ "diff_discd_matrix": [
+
+ ],
+ "diff_indv": [
+
+ ],
+ "diff_indv_in_files": [
+
+ ],
+ "diff_sites": [
+
+ ],
+ "diff_sites_in_files": [
+
+ ],
+ "diff_switch_error": [
+
+ ],
+ "filter_summary": [
+
+ ],
+ "format": [
+
+ ],
+ "freq_burden": [
+
+ ],
+ "frq": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "frq_count": [
+
+ ],
+ "gdepth": [
+
+ ],
+ "geno_chisq": [
+
+ ],
+ "geno_ld": [
+
+ ],
+ "genotypes_matrix": [
+
+ ],
+ "genotypes_matrix_individual": [
+
+ ],
+ "genotypes_matrix_position": [
+
+ ],
+ "hap_ld": [
+
+ ],
+ "hapcount": [
+
+ ],
+ "heterozygosity": [
+
+ ],
+ "hwe": [
+
+ ],
+ "idepth": [
+
+ ],
+ "impute_hap": [
+
+ ],
+ "impute_hap_indv": [
+
+ ],
+ "impute_hap_legend": [
+
+ ],
+ "indel_hist": [
+
+ ],
+ "info": [
+
+ ],
+ "interchrom_geno_ld": [
+
+ ],
+ "interchrom_hap_ld": [
+
+ ],
+ "kept_sites": [
+
+ ],
+ "ldepth": [
+
+ ],
+ "ldepth_mean": [
+
+ ],
+ "ldhat_locs": [
+
+ ],
+ "ldhat_sites": [
+
+ ],
+ "list_geno_ld": [
+
+ ],
+ "list_hap_ld": [
+
+ ],
+ "lqual": [
+
+ ],
+ "lroh": [
+
+ ],
+ "map_": [
+
+ ],
+ "mendel": [
+
+ ],
+ "missing_individual": [
+
+ ],
+ "missing_site": [
+
+ ],
+ "ped": [
+
+ ],
+ "relatedness": [
+
+ ],
+ "relatedness2": [
+
+ ],
+ "removed_sites": [
+
+ ],
+ "singeltons": [
+
+ ],
+ "sites_pi": [
+
+ ],
+ "snp_density": [
+
+ ],
+ "tajima_d": [
+
+ ],
+ "tfam": [
+
+ ],
+ "tped": [
+
+ ],
+ "tstv": [
+
+ ],
+ "tstv_count": [
+
+ ],
+ "tstv_qual": [
+
+ ],
+ "tstv_summary": [
+
+ ],
+ "vcf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "weir_fst": [
+
+ ],
+ "windowed_pi": [
+
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T13:07:10.654082"
+ },
+ "sarscov2 - vcfgz": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+
+ ],
+ "10": [
+
+ ],
+ "11": [
+
+ ],
+ "12": [
+
+ ],
+ "13": [
+
+ ],
+ "14": [
+
+ ],
+ "15": [
+
+ ],
+ "16": [
+
+ ],
+ "17": [
+
+ ],
+ "18": [
+
+ ],
+ "19": [
+
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "20": [
+
+ ],
+ "21": [
+
+ ],
+ "22": [
+
+ ],
+ "23": [
+
+ ],
+ "24": [
+
+ ],
+ "25": [
+
+ ],
+ "26": [
+
+ ],
+ "27": [
+
+ ],
+ "28": [
+
+ ],
+ "29": [
+
+ ],
+ "3": [
+
+ ],
+ "30": [
+
+ ],
+ "31": [
+
+ ],
+ "32": [
+
+ ],
+ "33": [
+
+ ],
+ "34": [
+
+ ],
+ "35": [
+
+ ],
+ "36": [
+
+ ],
+ "37": [
+
+ ],
+ "38": [
+
+ ],
+ "39": [
+
+ ],
+ "4": [
+
+ ],
+ "40": [
+
+ ],
+ "41": [
+
+ ],
+ "42": [
+
+ ],
+ "43": [
+
+ ],
+ "44": [
+
+ ],
+ "45": [
+
+ ],
+ "46": [
+
+ ],
+ "47": [
+
+ ],
+ "48": [
+
+ ],
+ "49": [
+
+ ],
+ "5": [
+
+ ],
+ "50": [
+
+ ],
+ "51": [
+
+ ],
+ "52": [
+
+ ],
+ "53": [
+
+ ],
+ "54": [
+
+ ],
+ "55": [
+
+ ],
+ "56": [
+
+ ],
+ "57": [
+
+ ],
+ "58": [
+
+ ],
+ "59": [
+
+ ],
+ "6": [
+
+ ],
+ "60": [
+
+ ],
+ "61": [
+
+ ],
+ "62": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "7": [
+
+ ],
+ "8": [
+
+ ],
+ "9": [
+
+ ],
+ "bcf": [
+
+ ],
+ "beagle_gl": [
+
+ ],
+ "beagle_pl": [
+
+ ],
+ "diff_discd_matrix": [
+
+ ],
+ "diff_indv": [
+
+ ],
+ "diff_indv_in_files": [
+
+ ],
+ "diff_sites": [
+
+ ],
+ "diff_sites_in_files": [
+
+ ],
+ "diff_switch_error": [
+
+ ],
+ "filter_summary": [
+
+ ],
+ "format": [
+
+ ],
+ "freq_burden": [
+
+ ],
+ "frq": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "frq_count": [
+
+ ],
+ "gdepth": [
+
+ ],
+ "geno_chisq": [
+
+ ],
+ "geno_ld": [
+
+ ],
+ "genotypes_matrix": [
+
+ ],
+ "genotypes_matrix_individual": [
+
+ ],
+ "genotypes_matrix_position": [
+
+ ],
+ "hap_ld": [
+
+ ],
+ "hapcount": [
+
+ ],
+ "heterozygosity": [
+
+ ],
+ "hwe": [
+
+ ],
+ "idepth": [
+
+ ],
+ "impute_hap": [
+
+ ],
+ "impute_hap_indv": [
+
+ ],
+ "impute_hap_legend": [
+
+ ],
+ "indel_hist": [
+
+ ],
+ "info": [
+
+ ],
+ "interchrom_geno_ld": [
+
+ ],
+ "interchrom_hap_ld": [
+
+ ],
+ "kept_sites": [
+
+ ],
+ "ldepth": [
+
+ ],
+ "ldepth_mean": [
+
+ ],
+ "ldhat_locs": [
+
+ ],
+ "ldhat_sites": [
+
+ ],
+ "list_geno_ld": [
+
+ ],
+ "list_hap_ld": [
+
+ ],
+ "lqual": [
+
+ ],
+ "lroh": [
+
+ ],
+ "map_": [
+
+ ],
+ "mendel": [
+
+ ],
+ "missing_individual": [
+
+ ],
+ "missing_site": [
+
+ ],
+ "ped": [
+
+ ],
+ "relatedness": [
+
+ ],
+ "relatedness2": [
+
+ ],
+ "removed_sites": [
+
+ ],
+ "singeltons": [
+
+ ],
+ "sites_pi": [
+
+ ],
+ "snp_density": [
+
+ ],
+ "tajima_d": [
+
+ ],
+ "tfam": [
+
+ ],
+ "tped": [
+
+ ],
+ "tstv": [
+
+ ],
+ "tstv_count": [
+
+ ],
+ "tstv_qual": [
+
+ ],
+ "tstv_summary": [
+
+ ],
+ "vcf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "weir_fst": [
+
+ ],
+ "windowed_pi": [
+
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T13:07:15.930382"
+ },
+ "sarscov2 - vcf - bed": {
+ "content": [
+ {
+ "0": [
+
+ ],
+ "1": [
+
+ ],
+ "10": [
+
+ ],
+ "11": [
+
+ ],
+ "12": [
+
+ ],
+ "13": [
+
+ ],
+ "14": [
+
+ ],
+ "15": [
+
+ ],
+ "16": [
+
+ ],
+ "17": [
+
+ ],
+ "18": [
+
+ ],
+ "19": [
+
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "20": [
+
+ ],
+ "21": [
+
+ ],
+ "22": [
+
+ ],
+ "23": [
+
+ ],
+ "24": [
+
+ ],
+ "25": [
+
+ ],
+ "26": [
+
+ ],
+ "27": [
+
+ ],
+ "28": [
+
+ ],
+ "29": [
+
+ ],
+ "3": [
+
+ ],
+ "30": [
+
+ ],
+ "31": [
+
+ ],
+ "32": [
+
+ ],
+ "33": [
+
+ ],
+ "34": [
+
+ ],
+ "35": [
+
+ ],
+ "36": [
+
+ ],
+ "37": [
+
+ ],
+ "38": [
+
+ ],
+ "39": [
+
+ ],
+ "4": [
+
+ ],
+ "40": [
+
+ ],
+ "41": [
+
+ ],
+ "42": [
+
+ ],
+ "43": [
+
+ ],
+ "44": [
+
+ ],
+ "45": [
+
+ ],
+ "46": [
+
+ ],
+ "47": [
+
+ ],
+ "48": [
+
+ ],
+ "49": [
+
+ ],
+ "5": [
+
+ ],
+ "50": [
+
+ ],
+ "51": [
+
+ ],
+ "52": [
+
+ ],
+ "53": [
+
+ ],
+ "54": [
+
+ ],
+ "55": [
+
+ ],
+ "56": [
+
+ ],
+ "57": [
+
+ ],
+ "58": [
+
+ ],
+ "59": [
+
+ ],
+ "6": [
+
+ ],
+ "60": [
+
+ ],
+ "61": [
+
+ ],
+ "62": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "7": [
+
+ ],
+ "8": [
+
+ ],
+ "9": [
+
+ ],
+ "bcf": [
+
+ ],
+ "beagle_gl": [
+
+ ],
+ "beagle_pl": [
+
+ ],
+ "diff_discd_matrix": [
+
+ ],
+ "diff_indv": [
+
+ ],
+ "diff_indv_in_files": [
+
+ ],
+ "diff_sites": [
+
+ ],
+ "diff_sites_in_files": [
+
+ ],
+ "diff_switch_error": [
+
+ ],
+ "filter_summary": [
+
+ ],
+ "format": [
+
+ ],
+ "freq_burden": [
+
+ ],
+ "frq": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,7f126655f17268fd1a338734f62868e9"
+ ]
+ ],
+ "frq_count": [
+
+ ],
+ "gdepth": [
+
+ ],
+ "geno_chisq": [
+
+ ],
+ "geno_ld": [
+
+ ],
+ "genotypes_matrix": [
+
+ ],
+ "genotypes_matrix_individual": [
+
+ ],
+ "genotypes_matrix_position": [
+
+ ],
+ "hap_ld": [
+
+ ],
+ "hapcount": [
+
+ ],
+ "heterozygosity": [
+
+ ],
+ "hwe": [
+
+ ],
+ "idepth": [
+
+ ],
+ "impute_hap": [
+
+ ],
+ "impute_hap_indv": [
+
+ ],
+ "impute_hap_legend": [
+
+ ],
+ "indel_hist": [
+
+ ],
+ "info": [
+
+ ],
+ "interchrom_geno_ld": [
+
+ ],
+ "interchrom_hap_ld": [
+
+ ],
+ "kept_sites": [
+
+ ],
+ "ldepth": [
+
+ ],
+ "ldepth_mean": [
+
+ ],
+ "ldhat_locs": [
+
+ ],
+ "ldhat_sites": [
+
+ ],
+ "list_geno_ld": [
+
+ ],
+ "list_hap_ld": [
+
+ ],
+ "lqual": [
+
+ ],
+ "lroh": [
+
+ ],
+ "map_": [
+
+ ],
+ "mendel": [
+
+ ],
+ "missing_individual": [
+
+ ],
+ "missing_site": [
+
+ ],
+ "ped": [
+
+ ],
+ "relatedness": [
+
+ ],
+ "relatedness2": [
+
+ ],
+ "removed_sites": [
+
+ ],
+ "singeltons": [
+
+ ],
+ "sites_pi": [
+
+ ],
+ "snp_density": [
+
+ ],
+ "tajima_d": [
+
+ ],
+ "tfam": [
+
+ ],
+ "tped": [
+
+ ],
+ "tstv": [
+
+ ],
+ "tstv_count": [
+
+ ],
+ "tstv_qual": [
+
+ ],
+ "tstv_summary": [
+
+ ],
+ "vcf": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "weir_fst": [
+
+ ],
+ "windowed_pi": [
+
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.0"
+ },
+ "timestamp": "2024-03-22T13:07:21.295463"
+ },
+ "sarscov2 - vcfgz - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.bcf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "10": [
+ [
+ {
+ "id": "test"
+ },
+ "test.geno.chisq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "11": [
+ [
+ {
+ "id": "test"
+ },
+ "test.list.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "12": [
+ [
+ {
+ "id": "test"
+ },
+ "test.list.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "13": [
+ [
+ {
+ "id": "test"
+ },
+ "test.interchrom.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "14": [
+ [
+ {
+ "id": "test"
+ },
+ "test.interchrom.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "15": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "16": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv.summary:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "17": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv.count:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "18": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv.qual:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "19": [
+ [
+ {
+ "id": "test"
+ },
+ "test.FILTER.summary:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "20": [
+ [
+ {
+ "id": "test"
+ },
+ "test.sites.pi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "21": [
+ [
+ {
+ "id": "test"
+ },
+ "test.windowed.pi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "22": [
+ [
+ {
+ "id": "test"
+ },
+ "test.weir.fst:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "23": [
+ [
+ {
+ "id": "test"
+ },
+ "test.het:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "24": [
+ [
+ {
+ "id": "test"
+ },
+ "test.hwe:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "25": [
+ [
+ {
+ "id": "test"
+ },
+ "test.Tajima.D:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "26": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ifreqburden:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "27": [
+ [
+ {
+ "id": "test"
+ },
+ "test.LROH:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "28": [
+ [
+ {
+ "id": "test"
+ },
+ "test.relatedness:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "29": [
+ [
+ {
+ "id": "test"
+ },
+ "test.relatedness2:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq.count:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "30": [
+ [
+ {
+ "id": "test"
+ },
+ "test.lqual:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "31": [
+ [
+ {
+ "id": "test"
+ },
+ "test.imiss:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "32": [
+ [
+ {
+ "id": "test"
+ },
+ "test.lmiss:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "33": [
+ [
+ {
+ "id": "test"
+ },
+ "test.snpden:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "34": [
+ [
+ {
+ "id": "test"
+ },
+ "test.kept.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "35": [
+ [
+ {
+ "id": "test"
+ },
+ "test.removed.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "36": [
+ [
+ {
+ "id": "test"
+ },
+ "test.singletons:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "37": [
+ [
+ {
+ "id": "test"
+ },
+ "test.indel.hist:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "38": [
+ [
+ {
+ "id": "test"
+ },
+ "test.hapcount:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "39": [
+ [
+ {
+ "id": "test"
+ },
+ "test.mendel:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "4": [
+ [
+ {
+ "id": "test"
+ },
+ "test.idepth:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "40": [
+ [
+ {
+ "id": "test"
+ },
+ "test.FORMAT:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "41": [
+ [
+ {
+ "id": "test"
+ },
+ "test.INFO:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "42": [
+ [
+ {
+ "id": "test"
+ },
+ "test.012:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "43": [
+ [
+ {
+ "id": "test"
+ },
+ "test.012.indv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "44": [
+ [
+ {
+ "id": "test"
+ },
+ "test.012.pos:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "45": [
+ [
+ {
+ "id": "test"
+ },
+ "test.impute.hap:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "46": [
+ [
+ {
+ "id": "test"
+ },
+ "test.impute.hap.legend:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "47": [
+ [
+ {
+ "id": "test"
+ },
+ "test.impute.hap.indv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "48": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldhat.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "49": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldhat.locs:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "5": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldepth:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "50": [
+ [
+ {
+ "id": "test"
+ },
+ "test.BEAGLE.GL:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "51": [
+ [
+ {
+ "id": "test"
+ },
+ "test.BEAGLE.PL:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "52": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ped:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "53": [
+ [
+ {
+ "id": "test"
+ },
+ "test.map:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "54": [
+ [
+ {
+ "id": "test"
+ },
+ "test.tped:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "55": [
+ [
+ {
+ "id": "test"
+ },
+ "test.tfam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "56": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.sites_in_files:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "57": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.indv_in_files:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "58": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "59": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.indv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "6": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldepth.mean:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "60": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.discordance.matrix:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "61": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.switch:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "62": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "7": [
+ [
+ {
+ "id": "test"
+ },
+ "test.gdepth:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "8": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "test.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.interchrom.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.list.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "9": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "test.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.interchrom.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.list.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "bcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.bcf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "beagle_gl": [
+ [
+ {
+ "id": "test"
+ },
+ "test.BEAGLE.GL:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "beagle_pl": [
+ [
+ {
+ "id": "test"
+ },
+ "test.BEAGLE.PL:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diff_discd_matrix": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.discordance.matrix:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diff_indv": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.indv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diff_indv_in_files": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.indv_in_files:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diff_sites": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diff_sites_in_files": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.sites_in_files:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "diff_switch_error": [
+ [
+ {
+ "id": "test"
+ },
+ "test.diff.switch:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "filter_summary": [
+ [
+ {
+ "id": "test"
+ },
+ "test.FILTER.summary:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "format": [
+ [
+ {
+ "id": "test"
+ },
+ "test.FORMAT:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "freq_burden": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ifreqburden:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "frq": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "frq_count": [
+ [
+ {
+ "id": "test"
+ },
+ "test.frq.count:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "gdepth": [
+ [
+ {
+ "id": "test"
+ },
+ "test.gdepth:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "geno_chisq": [
+ [
+ {
+ "id": "test"
+ },
+ "test.geno.chisq:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "geno_ld": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "test.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.interchrom.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.list.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "genotypes_matrix": [
+ [
+ {
+ "id": "test"
+ },
+ "test.012:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "genotypes_matrix_individual": [
+ [
+ {
+ "id": "test"
+ },
+ "test.012.indv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "genotypes_matrix_position": [
+ [
+ {
+ "id": "test"
+ },
+ "test.012.pos:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "hap_ld": [
+ [
+ {
+ "id": "test"
+ },
+ [
+ "test.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.interchrom.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e",
+ "test.list.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ ],
+ "hapcount": [
+ [
+ {
+ "id": "test"
+ },
+ "test.hapcount:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "heterozygosity": [
+ [
+ {
+ "id": "test"
+ },
+ "test.het:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "hwe": [
+ [
+ {
+ "id": "test"
+ },
+ "test.hwe:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "idepth": [
+ [
+ {
+ "id": "test"
+ },
+ "test.idepth:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "impute_hap": [
+ [
+ {
+ "id": "test"
+ },
+ "test.impute.hap:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "impute_hap_indv": [
+ [
+ {
+ "id": "test"
+ },
+ "test.impute.hap.indv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "impute_hap_legend": [
+ [
+ {
+ "id": "test"
+ },
+ "test.impute.hap.legend:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "indel_hist": [
+ [
+ {
+ "id": "test"
+ },
+ "test.indel.hist:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "info": [
+ [
+ {
+ "id": "test"
+ },
+ "test.INFO:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "interchrom_geno_ld": [
+ [
+ {
+ "id": "test"
+ },
+ "test.interchrom.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "interchrom_hap_ld": [
+ [
+ {
+ "id": "test"
+ },
+ "test.interchrom.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "kept_sites": [
+ [
+ {
+ "id": "test"
+ },
+ "test.kept.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "ldepth": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldepth:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "ldepth_mean": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldepth.mean:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "ldhat_locs": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldhat.locs:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "ldhat_sites": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ldhat.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "list_geno_ld": [
+ [
+ {
+ "id": "test"
+ },
+ "test.list.geno.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "list_hap_ld": [
+ [
+ {
+ "id": "test"
+ },
+ "test.list.hap.ld:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "lqual": [
+ [
+ {
+ "id": "test"
+ },
+ "test.lqual:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "lroh": [
+ [
+ {
+ "id": "test"
+ },
+ "test.LROH:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "map_": [
+ [
+ {
+ "id": "test"
+ },
+ "test.map:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "mendel": [
+ [
+ {
+ "id": "test"
+ },
+ "test.mendel:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "missing_individual": [
+ [
+ {
+ "id": "test"
+ },
+ "test.imiss:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "missing_site": [
+ [
+ {
+ "id": "test"
+ },
+ "test.lmiss:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "ped": [
+ [
+ {
+ "id": "test"
+ },
+ "test.ped:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "relatedness": [
+ [
+ {
+ "id": "test"
+ },
+ "test.relatedness:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "relatedness2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.relatedness2:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "removed_sites": [
+ [
+ {
+ "id": "test"
+ },
+ "test.removed.sites:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "singeltons": [
+ [
+ {
+ "id": "test"
+ },
+ "test.singletons:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "sites_pi": [
+ [
+ {
+ "id": "test"
+ },
+ "test.sites.pi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "snp_density": [
+ [
+ {
+ "id": "test"
+ },
+ "test.snpden:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tajima_d": [
+ [
+ {
+ "id": "test"
+ },
+ "test.Tajima.D:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tfam": [
+ [
+ {
+ "id": "test"
+ },
+ "test.tfam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tped": [
+ [
+ {
+ "id": "test"
+ },
+ "test.tped:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tstv": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tstv_count": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv.count:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tstv_qual": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv.qual:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "tstv_summary": [
+ [
+ {
+ "id": "test"
+ },
+ "test.TsTv.summary:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "vcf": [
+ [
+ {
+ "id": "test"
+ },
+ "test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,577abe71f1ed8b94c633e71dc2cfc491"
+ ],
+ "weir_fst": [
+ [
+ {
+ "id": "test"
+ },
+ "test.weir.fst:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "windowed_pi": [
+ [
+ {
+ "id": "test"
+ },
+ "test.windowed.pi:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "24.04.2"
+ },
+ "timestamp": "2024-06-24T13:34:42.814188"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/vcftools/tests/tags.yml b/modules/nf-core/vcftools/tests/tags.yml
new file mode 100644
index 0000000..f3afd43
--- /dev/null
+++ b/modules/nf-core/vcftools/tests/tags.yml
@@ -0,0 +1,2 @@
+vcftools:
+ - "modules/nf-core/vcftools/**"
diff --git a/nextflow.config b/nextflow.config
index f67f186..f3d5366 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -210,12 +210,12 @@ dag {
manifest {
name = 'sanger-tol/variantcalling'
- author = """@muffato, @gq1, @priyanka-surana"""
+ author = """@muffato, @gq1, @priyanka-surana, @tkchafin"""
homePage = 'https://github.com/sanger-tol/variantcalling'
description = """Variant calling pipeline for PacBio data using DeepVariant"""
mainScript = 'main.nf'
nextflowVersion = '!>=22.10.1'
- version = '1.1.3'
+ version = '1.1.4'
doi = 'https://doi.org/10.5281/zenodo.7890527'
}
diff --git a/subworkflows/local/align_pacbio.nf b/subworkflows/local/align_pacbio.nf
index 75f4ac2..d5e7420 100644
--- a/subworkflows/local/align_pacbio.nf
+++ b/subworkflows/local/align_pacbio.nf
@@ -5,7 +5,6 @@
include { FILTER_PACBIO } from '../../subworkflows/local/filter_pacbio'
include { MINIMAP2_ALIGN } from '../../modules/nf-core/minimap2/align/main'
include { SAMTOOLS_MERGE } from '../../modules/nf-core/samtools/merge/main'
-include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main'
include { CONVERT_STATS } from '../../subworkflows/local/convert_stats'
@@ -35,7 +34,7 @@ workflow ALIGN_PACBIO {
| map { meta, bam -> [['id': meta.sample, 'datatype': meta.datatype, 'sample': meta.sample ], bam] }
| groupTuple ( by: [0] )
| set { ch_bams }
-
+
// Merge
SAMTOOLS_MERGE ( ch_bams, [ [], [] ], [ [], [] ] )
diff --git a/subworkflows/local/deepvariant_caller.nf b/subworkflows/local/deepvariant_caller.nf
index 7e4adf0..4992809 100644
--- a/subworkflows/local/deepvariant_caller.nf
+++ b/subworkflows/local/deepvariant_caller.nf
@@ -2,9 +2,9 @@
// Call variants with Deepvariant
//
-include { DEEPVARIANT } from '../../modules/nf-core/deepvariant/main'
-include { BCFTOOLS_CONCAT as BCFTOOLS_CONCAT_VCF } from '../../modules/nf-core/bcftools/concat/main'
-include { BCFTOOLS_CONCAT as BCFTOOLS_CONCAT_GVCF } from '../../modules/nf-core/bcftools/concat/main'
+include { DEEPVARIANT_RUNDEEPVARIANT as DEEPVARIANT } from '../../modules/nf-core/deepvariant/rundeepvariant/main'
+include { BCFTOOLS_CONCAT as BCFTOOLS_CONCAT_VCF } from '../../modules/nf-core/bcftools/concat/main'
+include { BCFTOOLS_CONCAT as BCFTOOLS_CONCAT_GVCF } from '../../modules/nf-core/bcftools/concat/main'
workflow DEEPVARIANT_CALLER {
take:
@@ -18,47 +18,48 @@ workflow DEEPVARIANT_CALLER {
sample: meta.id,
type: meta.datatype,
fasta_file_name: fasta_file_name
- ],
+ ],
cram,
- crai,
- interval
+ crai,
+ interval
] }
.set { cram_crai }
// fasta
- fasta = reads_fasta.map { meta, cram, crai, interval, fasta_file_name, fasta, fai ->
- [ [ id: meta.id + "_" + fasta_file_name, sample: meta.id, type: meta.datatype ],
- fasta
- ]
+ fasta = reads_fasta.map { meta, cram, crai, interval, fasta_file_name, fasta, fai ->
+ [ [ id: meta.id + "_" + fasta_file_name, sample: meta.id, type: meta.datatype ],
+ fasta
+ ]
}
// fai
fai = reads_fasta.map{ meta, cram, crai, interval, fasta_file_name, fasta, fai ->
[ [ id: meta.id + "_" + fasta_file_name, sample: meta.id, type: meta.datatype ],
- fai
- ]
+ fai
+ ]
}
// split fasta in compressed format, no gzi index file needed
gzi = [ [], [] ]
+ par_bed = [ [], [] ]
// call deepvariant
- DEEPVARIANT ( cram_crai, fasta, fai, gzi )
+ DEEPVARIANT ( cram_crai, fasta, fai, gzi, par_bed )
ch_versions = ch_versions.mix ( DEEPVARIANT.out.versions.first() )
// group the vcf files together by sample
DEEPVARIANT.out.vcf
- .map { meta, vcf -> [
+ .map { meta, vcf -> [
[ id: meta.fasta_file_name.tokenize(".")[0..-2].join(".")
+ "." + meta.type
- + "." + meta.sample
+ + "." + meta.sample
],
vcf
] }
.groupTuple()
.map { meta, vcf -> [ meta, vcf, [] ] }
.set { vcf }
-
+
// catcat vcf files
BCFTOOLS_CONCAT_VCF ( vcf )
ch_versions = ch_versions.mix ( BCFTOOLS_CONCAT_VCF.out.versions.first() )
@@ -68,14 +69,14 @@ workflow DEEPVARIANT_CALLER {
.map { meta, gvcf -> [
[ id: meta.fasta_file_name.tokenize(".")[0..-2].join(".")
+ "." + meta.type
- + "." + meta.sample
+ + "." + meta.sample
],
- gvcf
+ gvcf
] }
.groupTuple()
.map { meta, gvcf -> [ meta, gvcf, [] ] }
.set { g_vcf }
-
+
// catcat g vcf files
BCFTOOLS_CONCAT_GVCF ( g_vcf )
ch_versions = ch_versions.mix ( BCFTOOLS_CONCAT_GVCF.out.versions.first() )
diff --git a/subworkflows/local/input_merge.nf b/subworkflows/local/input_merge.nf
index 12f2653..078051d 100644
--- a/subworkflows/local/input_merge.nf
+++ b/subworkflows/local/input_merge.nf
@@ -21,7 +21,7 @@ workflow INPUT_MERGE {
.set{ grouped_reads_meta }
// sort input reads
- SAMTOOLS_SORT( reads )
+ SAMTOOLS_SORT( reads, fasta )
ch_versions = ch_versions.mix ( SAMTOOLS_SORT.out.versions )
sorted_reads = SAMTOOLS_SORT.out.bam
@@ -29,23 +29,23 @@ workflow INPUT_MERGE {
sorted_reads
.map{ meta, bam_cram -> [ meta.sample, bam_cram ] }
.groupTuple()
- .set{ grouped_reads }
+ .set{ grouped_reads }
// join grouped reads and meta
// use the first meta data for the combined reads
- grouped_reads_meta
+ grouped_reads_meta
.map { sample, meta_list -> [sample, meta_list[0]] }
.join( grouped_reads )
- .map { sample, meta, bam_cram_list -> [
+ .map { sample, meta, bam_cram_list -> [
[ id: sample,
- datatype: meta.datatype
- ],
- bam_cram_list
+ datatype: meta.datatype
+ ],
+ bam_cram_list
]}
.set { grouped_reads_with_meta }
// call samtool merge
- SAMTOOLS_MERGE( grouped_reads_with_meta,
+ SAMTOOLS_MERGE( grouped_reads_with_meta,
fasta,
fai
)