\n\
@@ -194,7 +195,6 @@ def header_def(sample):
sample
)
-
def build_fusioninspector_dataframe(file: str) -> pd.DataFrame:
"""
Read FusionInspector output from a CSV file, preprocess the data, and set 'FUSION' as the index.
From afda8fda8c5cb7674b6f437e384ab1537552237a Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 17:19:02 +0100
Subject: [PATCH 31/45] mend
---
conf/modules.config | 1 -
modules/local/vcf_collect/main.nf | 8 +++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/conf/modules.config b/conf/modules.config
index f49dd02c..39135aa3 100644
--- a/conf/modules.config
+++ b/conf/modules.config
@@ -344,6 +344,5 @@ process {
withName: VCF_COLLECT {
ext.when = {!params.fusioninspector_only}
- ext.prefix = { "${meta.id}_fusion_data" }
}
}
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index df999204..c634a6a3 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -2,8 +2,10 @@ process VCF_COLLECT {
tag "$meta.id"
label 'process_single'
- conda "bioconda::gtfparse=2.0.1"
- container "quay.io/biocontainers/gtfparse:2.0.1--pyh7cba7a3_1"
+ conda "conda-forge::python=3.8.3"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+ 'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
+ 'quay.io/biocontainers/pandas:1.5.2' }"
input:
tuple val(meta), path(fusioninspector_tsv), path(fusioninspector_gtf_tsv), path(fusionreport_report)
@@ -20,7 +22,7 @@ process VCF_COLLECT {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}.vcf
+ vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
From f14bd90558e09d6dcfaf6190199be5b640247789 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 17:22:08 +0100
Subject: [PATCH 32/45] Revert "mend"
This reverts commit afda8fda8c5cb7674b6f437e384ab1537552237a.
---
conf/modules.config | 1 +
modules/local/vcf_collect/main.nf | 8 +++-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/conf/modules.config b/conf/modules.config
index 39135aa3..f49dd02c 100644
--- a/conf/modules.config
+++ b/conf/modules.config
@@ -344,5 +344,6 @@ process {
withName: VCF_COLLECT {
ext.when = {!params.fusioninspector_only}
+ ext.prefix = { "${meta.id}_fusion_data" }
}
}
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index c634a6a3..df999204 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -2,10 +2,8 @@ process VCF_COLLECT {
tag "$meta.id"
label 'process_single'
- conda "conda-forge::python=3.8.3"
- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
- 'quay.io/biocontainers/pandas:1.5.2' }"
+ conda "bioconda::gtfparse=2.0.1"
+ container "quay.io/biocontainers/gtfparse:2.0.1--pyh7cba7a3_1"
input:
tuple val(meta), path(fusioninspector_tsv), path(fusioninspector_gtf_tsv), path(fusionreport_report)
@@ -22,7 +20,7 @@ process VCF_COLLECT {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf
+ vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
From 55d95d1f8c81e78bdabf7e2dfded65b95bd69b67 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 17:24:02 +0100
Subject: [PATCH 33/45] revert to plain pandas container
---
modules/local/vcf_collect/main.nf | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index df999204..c634a6a3 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -2,8 +2,10 @@ process VCF_COLLECT {
tag "$meta.id"
label 'process_single'
- conda "bioconda::gtfparse=2.0.1"
- container "quay.io/biocontainers/gtfparse:2.0.1--pyh7cba7a3_1"
+ conda "conda-forge::python=3.8.3"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+ 'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
+ 'quay.io/biocontainers/pandas:1.5.2' }"
input:
tuple val(meta), path(fusioninspector_tsv), path(fusioninspector_gtf_tsv), path(fusionreport_report)
@@ -20,7 +22,7 @@ process VCF_COLLECT {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}.vcf
+ vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
From 6bc7351dd1bf9e43e5c9c69312594d245841c0dd Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 17:24:52 +0100
Subject: [PATCH 34/45] sample should just be meta.id, add fusion_data in
module for output name
---
conf/modules.config | 1 -
1 file changed, 1 deletion(-)
diff --git a/conf/modules.config b/conf/modules.config
index f49dd02c..39135aa3 100644
--- a/conf/modules.config
+++ b/conf/modules.config
@@ -344,6 +344,5 @@ process {
withName: VCF_COLLECT {
ext.when = {!params.fusioninspector_only}
- ext.prefix = { "${meta.id}_fusion_data" }
}
}
From d559232b5da7a028c15b53a80e462ef352ee6dab Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 17:53:27 +0100
Subject: [PATCH 35/45] remove quotes and flatten the pseudo list in annots
---
bin/vcf_collect.py | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index 7156a806..d52031ef 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -159,7 +159,7 @@ def parse_args(argv=None):
return parser.parse_args(argv)
-def header_def(sample):
+def header_def(sample: str) -> str:
"""
Define the header of the VCF file
"""
@@ -195,6 +195,14 @@ def header_def(sample):
sample
)
+
+def convert_to_list(annots_str: str) -> list:
+ try:
+ return ast.literal_eval(annots_str)
+ except (SyntaxError, ValueError):
+ return np.nan
+
+
def build_fusioninspector_dataframe(file: str) -> pd.DataFrame:
"""
Read FusionInspector output from a CSV file, preprocess the data, and set 'FUSION' as the index.
@@ -205,6 +213,11 @@ def build_fusioninspector_dataframe(file: str) -> pd.DataFrame:
df[["ChromosomeB", "PosB", "Strand2"]] = df["RightBreakpoint"].str.split(":", expand=True)
df[["LeftGeneName", "Left_ensembl_gene_id"]] = df["LeftGene"].str.split("^", expand=True)
df[["RightGeneName", "Right_ensembl_gene_id"]] = df["RightGene"].str.split("^", expand=True)
+ df["annots"] = (
+ df["annots"]
+ .apply(convert_to_list)
+ .apply(lambda x: ",".join(map(str, x)) if isinstance(x, list) else str(x) if pd.notna(x) else "")
+ )
return df.set_index(["FUSION"])
@@ -328,12 +341,7 @@ def write_vcf(df_to_print: pd.DataFrame, header: str, out_file: str) -> None:
"FORMAT",
"Sample",
]
- ].to_csv(
- path_or_buf=out_file,
- sep="\t",
- header=None,
- index=False,
- )
+ ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE)
with open(out_file, "r+") as f:
content = f.read()
From d0a4bf2202945fcef640d335d0dddc91a00e7408 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 17:53:50 +0100
Subject: [PATCH 36/45] back to original container
---
modules/local/vcf_collect/main.nf | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index c634a6a3..5028b2c5 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -2,10 +2,8 @@ process VCF_COLLECT {
tag "$meta.id"
label 'process_single'
- conda "conda-forge::python=3.8.3"
- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
- 'quay.io/biocontainers/pandas:1.5.2' }"
+ conda "bioconda::gtfparse=2.0.1"
+ container "quay.io/biocontainers/gtfparse:2.0.1--pyh7cba7a3_1"
input:
tuple val(meta), path(fusioninspector_tsv), path(fusioninspector_gtf_tsv), path(fusionreport_report)
From b46894252fc26553a02a1bad13162a6b6113e595 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Mon, 13 Nov 2023 20:12:36 +0100
Subject: [PATCH 37/45] revert to pandas
---
modules/local/vcf_collect/main.nf | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index 5028b2c5..c634a6a3 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -2,8 +2,10 @@ process VCF_COLLECT {
tag "$meta.id"
label 'process_single'
- conda "bioconda::gtfparse=2.0.1"
- container "quay.io/biocontainers/gtfparse:2.0.1--pyh7cba7a3_1"
+ conda "conda-forge::python=3.8.3"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+ 'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
+ 'quay.io/biocontainers/pandas:1.5.2' }"
input:
tuple val(meta), path(fusioninspector_tsv), path(fusioninspector_gtf_tsv), path(fusionreport_report)
From 960db4cf090ced0022d7956dcfcf70ec3f7ded1c Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Tue, 14 Nov 2023 22:52:38 +0100
Subject: [PATCH 38/45] apply fixes
---
bin/vcf_collect.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index d52031ef..8e15ccfc 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -11,9 +11,11 @@
logger = logging.getLogger()
+# vcf_collect(args.fusioninspector, args.fusionreport, args.fusioninspector_gtf, args.hgnc, args.sample, args.out)
+
def vcf_collect(
- fusioninspector_in_file: str, fusionreport_in_file: str, sample: str, hgnc: str, gtf: str, out_file
+ fusioninspector_in_file: str, fusionreport_in_file: str, gtf: str, hgnc: str, sample: str, out_file
) -> None:
"""
Process FusionInspector and FusionReport data,
@@ -25,7 +27,7 @@ def vcf_collect(
fusionreport_in_file (str): Path to FusionReport input file.
sample (str): Sample name for the header.
hgnc (str): Path to HGNC file.
- gtf (str): Path to output GTF file from FusionInspector.
+ gtf (str): Path to output GTF file from FusionInspector in TSV format.
out (str): Output VCF file path.
Adapted from: https://github.com/J35P312/MegaFusion
@@ -116,7 +118,7 @@ def vcf_collect(
]
].drop_duplicates()
- return write_vcf(column_manipulation(all_df), header_def(sample), out)
+ return write_vcf(column_manipulation(all_df), header_def(sample), out_file)
def parse_args(argv=None):
@@ -371,7 +373,12 @@ def build_gtf_dataframe(file: str) -> pd.DataFrame:
def main(argv=None):
"""Coordinate argument parsing and program execution."""
args = parse_args(argv)
- if not args.fusioninspector.is_file() or not args.fusionreport.is_file():
+ if (
+ not args.fusioninspector.is_file()
+ or not args.fusionreport.is_file()
+ or not args.fusioninspector_gtf
+ or not args.hgnc
+ ):
logger.error(f"The given input file {args.fusioninspector} or {args.fusionreport} was not found!")
sys.exit(2)
vcf_collect(args.fusioninspector, args.fusionreport, args.fusioninspector_gtf, args.hgnc, args.sample, args.out)
From 852c6ac8290aa3819f51ee0e4ebcd36b465caade Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Wed, 15 Nov 2023 09:33:18 +0100
Subject: [PATCH 39/45] compress vcf output
---
bin/vcf_collect.py | 5 +++--
modules/local/vcf_collect/main.nf | 4 ++--
modules/local/vcf_collect/meta.yml | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index 8e15ccfc..6a97fb50 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -8,6 +8,7 @@
import ast
import numpy as np
import csv
+import gzip
logger = logging.getLogger()
@@ -343,9 +344,9 @@ def write_vcf(df_to_print: pd.DataFrame, header: str, out_file: str) -> None:
"FORMAT",
"Sample",
]
- ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE)
+ ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE, compression='gzip')
- with open(out_file, "r+") as f:
+ with gzip.open(out_file, "r+") as f:
content = f.read()
f.seek(0, 0)
f.write(header.rstrip("\r\n") + "\n" + content)
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index c634a6a3..42f94c40 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -14,7 +14,7 @@ process VCF_COLLECT {
output:
path "versions.yml" , emit: versions
- tuple val(meta), path("*vcf") , emit: vcf
+ tuple val(meta), path("*vcf.gz") , emit: vcf
when:
task.ext.when == null || task.ext.when
@@ -22,7 +22,7 @@ process VCF_COLLECT {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf
+ vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/local/vcf_collect/meta.yml b/modules/local/vcf_collect/meta.yml
index 40bdd6c0..de4667bb 100644
--- a/modules/local/vcf_collect/meta.yml
+++ b/modules/local/vcf_collect/meta.yml
@@ -32,8 +32,8 @@ output:
pattern: "versions.yml"
- vcf:
type: file
- description: File containing the summary of all fusions as vcf file
- pattern: "*.tsv"
+ description: File containing the summary of all fusions as compressed vcf file
+ pattern: "*.vcf.gz"
authors:
- "@rannick"
From 9643ed80b047441eda5735a6c61857a6e5b0a12c Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Wed, 15 Nov 2023 09:33:40 +0100
Subject: [PATCH 40/45] black
---
bin/vcf_collect.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index 6a97fb50..4d677de0 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -344,7 +344,7 @@ def write_vcf(df_to_print: pd.DataFrame, header: str, out_file: str) -> None:
"FORMAT",
"Sample",
]
- ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE, compression='gzip')
+ ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE, compression="gzip")
with gzip.open(out_file, "r+") as f:
content = f.read()
From bb703dd103fa91ab4e2f28b12c673d21dbbe6232 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Wed, 15 Nov 2023 09:44:42 +0100
Subject: [PATCH 41/45] modules updatge
---
modules.json | 40 +-
.../agat/convertspgff2tsv/environment.yml | 1 +
modules/nf-core/cat/cat/environment.yml | 7 +
modules/nf-core/cat/cat/main.nf | 2 +-
modules/nf-core/cat/cat/meta.yml | 7 +-
modules/nf-core/cat/cat/tests/main.nf.test | 153 ++++++
.../nf-core/cat/cat/tests/main.nf.test.snap | 121 +++++
.../cat/tests/nextflow_unzipped_zipped.config | 6 +
.../cat/tests/nextflow_zipped_unzipped.config | 8 +
modules/nf-core/cat/cat/tests/tags.yml | 2 +
modules/nf-core/cat/fastq/environment.yml | 7 +
modules/nf-core/cat/fastq/main.nf | 2 +-
modules/nf-core/cat/fastq/meta.yml | 4 +-
modules/nf-core/cat/fastq/tests/main.nf.test | 143 ++++++
.../nf-core/cat/fastq/tests/main.nf.test.snap | 78 +++
modules/nf-core/cat/fastq/tests/tags.yml | 2 +
.../dumpsoftwareversions/environment.yml | 7 +
.../custom/dumpsoftwareversions/main.nf | 6 +-
.../custom/dumpsoftwareversions/meta.yml | 7 +-
.../dumpsoftwareversions/tests/main.nf.test | 38 ++
.../tests/main.nf.test.snap | 27 +
.../dumpsoftwareversions/tests/tags.yml | 2 +
modules/nf-core/fastp/environment.yml | 7 +
modules/nf-core/fastp/main.nf | 2 +-
modules/nf-core/fastp/meta.yml | 4 +-
modules/nf-core/fastp/tests/main.nf.test | 485 ++++++++++++++++++
modules/nf-core/fastp/tests/main.nf.test.snap | 52 ++
modules/nf-core/fastp/tests/nextflow.config | 6 +
modules/nf-core/fastp/tests/tags.yml | 2 +
modules/nf-core/fastqc/environment.yml | 7 +
modules/nf-core/fastqc/main.nf | 6 +-
modules/nf-core/fastqc/meta.yml | 5 +
modules/nf-core/fastqc/tests/main.nf.test | 23 +-
.../nf-core/fastqc/tests/main.nf.test.snap | 10 +
modules/nf-core/fastqc/tests/tags.yml | 2 +
.../gatk4/bedtointervallist/environment.yml | 7 +
.../nf-core/gatk4/bedtointervallist/main.nf | 2 +-
.../nf-core/gatk4/bedtointervallist/meta.yml | 3 +
.../createsequencedictionary/environment.yml | 7 +
.../gatk4/createsequencedictionary/main.nf | 2 +-
.../gatk4/createsequencedictionary/meta.yml | 4 +-
.../gatk4/markduplicates/environment.yml | 8 +
modules/nf-core/gatk4/markduplicates/main.nf | 2 +-
modules/nf-core/gatk4/markduplicates/meta.yml | 12 +-
modules/nf-core/multiqc/environment.yml | 7 +
modules/nf-core/multiqc/main.nf | 6 +-
modules/nf-core/multiqc/meta.yml | 11 +-
.../collectinsertsizemetrics/environment.yml | 7 +
.../picard/collectinsertsizemetrics/main.nf | 6 +-
.../picard/collectinsertsizemetrics/meta.yml | 5 +-
.../picard/collectwgsmetrics/environment.yml | 8 +
.../nf-core/picard/collectwgsmetrics/main.nf | 6 +-
.../nf-core/picard/collectwgsmetrics/meta.yml | 5 +
.../nf-core/samtools/faidx/environment.yml | 7 +
modules/nf-core/samtools/faidx/main.nf | 2 +-
modules/nf-core/samtools/faidx/meta.yml | 4 +
.../nf-core/samtools/index/environment.yml | 7 +
modules/nf-core/samtools/index/main.nf | 2 +-
modules/nf-core/samtools/index/meta.yml | 4 +
modules/nf-core/samtools/sort/environment.yml | 7 +
modules/nf-core/samtools/sort/main.nf | 2 +-
modules/nf-core/samtools/sort/meta.yml | 3 +
.../nf-core/samtools/sort/tests/main.nf.test | 70 +++
.../samtools/sort/tests/main.nf.test.snap | 39 ++
.../samtools/sort/tests/nextflow.config | 7 +
modules/nf-core/samtools/sort/tests/tags.yml | 3 +
modules/nf-core/samtools/view/environment.yml | 7 +
modules/nf-core/samtools/view/main.nf | 2 +-
modules/nf-core/samtools/view/meta.yml | 5 +
modules/nf-core/star/align/environment.yml | 9 +
modules/nf-core/star/align/main.nf | 2 +-
modules/nf-core/star/align/meta.yml | 6 +-
.../star/genomegenerate/environment.yml | 9 +
modules/nf-core/star/genomegenerate/main.nf | 2 +-
modules/nf-core/star/genomegenerate/meta.yml | 5 +-
.../nf-core/stringtie/merge/environment.yml | 7 +
modules/nf-core/stringtie/merge/main.nf | 2 +-
modules/nf-core/stringtie/merge/meta.yml | 3 +-
.../stringtie/stringtie/environment.yml | 7 +
modules/nf-core/stringtie/stringtie/main.nf | 2 +-
modules/nf-core/stringtie/stringtie/meta.yml | 3 +-
81 files changed, 1531 insertions(+), 86 deletions(-)
create mode 100644 modules/nf-core/cat/cat/environment.yml
create mode 100644 modules/nf-core/cat/cat/tests/main.nf.test
create mode 100644 modules/nf-core/cat/cat/tests/main.nf.test.snap
create mode 100644 modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config
create mode 100644 modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config
create mode 100644 modules/nf-core/cat/cat/tests/tags.yml
create mode 100644 modules/nf-core/cat/fastq/environment.yml
create mode 100644 modules/nf-core/cat/fastq/tests/main.nf.test
create mode 100644 modules/nf-core/cat/fastq/tests/main.nf.test.snap
create mode 100644 modules/nf-core/cat/fastq/tests/tags.yml
create mode 100644 modules/nf-core/custom/dumpsoftwareversions/environment.yml
create mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test
create mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap
create mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml
create mode 100644 modules/nf-core/fastp/environment.yml
create mode 100644 modules/nf-core/fastp/tests/main.nf.test
create mode 100644 modules/nf-core/fastp/tests/main.nf.test.snap
create mode 100644 modules/nf-core/fastp/tests/nextflow.config
create mode 100644 modules/nf-core/fastp/tests/tags.yml
create mode 100644 modules/nf-core/fastqc/environment.yml
create mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap
create mode 100644 modules/nf-core/fastqc/tests/tags.yml
create mode 100644 modules/nf-core/gatk4/bedtointervallist/environment.yml
create mode 100644 modules/nf-core/gatk4/createsequencedictionary/environment.yml
create mode 100644 modules/nf-core/gatk4/markduplicates/environment.yml
create mode 100644 modules/nf-core/multiqc/environment.yml
create mode 100644 modules/nf-core/picard/collectinsertsizemetrics/environment.yml
create mode 100644 modules/nf-core/picard/collectwgsmetrics/environment.yml
create mode 100644 modules/nf-core/samtools/faidx/environment.yml
create mode 100644 modules/nf-core/samtools/index/environment.yml
create mode 100644 modules/nf-core/samtools/sort/environment.yml
create mode 100644 modules/nf-core/samtools/sort/tests/main.nf.test
create mode 100644 modules/nf-core/samtools/sort/tests/main.nf.test.snap
create mode 100644 modules/nf-core/samtools/sort/tests/nextflow.config
create mode 100644 modules/nf-core/samtools/sort/tests/tags.yml
create mode 100644 modules/nf-core/samtools/view/environment.yml
create mode 100644 modules/nf-core/star/align/environment.yml
create mode 100644 modules/nf-core/star/genomegenerate/environment.yml
create mode 100644 modules/nf-core/stringtie/merge/environment.yml
create mode 100644 modules/nf-core/stringtie/stringtie/environment.yml
diff --git a/modules.json b/modules.json
index a6ffdfd5..724634dc 100644
--- a/modules.json
+++ b/modules.json
@@ -7,7 +7,7 @@
"nf-core": {
"agat/convertspgff2tsv": {
"branch": "master",
- "git_sha": "53e6fd5d80141e00a3b70762f4361f6af1f4303b",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"arriba": {
@@ -17,97 +17,97 @@
},
"cat/cat": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"cat/fastq": {
"branch": "master",
- "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
"branch": "master",
- "git_sha": "05c280924b6c768d484c7c443dad5e605c4ff4b4",
+ "git_sha": "bba7e362e4afead70653f84d8700588ea28d0f9e",
"installed_by": ["modules"]
},
"fastp": {
"branch": "master",
- "git_sha": "d497a4868ace3302016ea8ed4b395072d5e833cd",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"fastqc": {
"branch": "master",
- "git_sha": "9a4517e720bc812e95b56d23d15a1653b6db4f53",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"gatk4/bedtointervallist": {
"branch": "master",
- "git_sha": "cf8f9ace77aac01caa5c7cb92af5bbda7adb77bd",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"gatk4/createsequencedictionary": {
"branch": "master",
- "git_sha": "cf8f9ace77aac01caa5c7cb92af5bbda7adb77bd",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"gatk4/markduplicates": {
"branch": "master",
- "git_sha": "2aa9c2981930687792ed861b0a5f9ff7bb568a7d",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
- "git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
+ "git_sha": "214d575774c172062924ad3564b4f66655600730",
"installed_by": ["modules"]
},
"picard/collectinsertsizemetrics": {
"branch": "master",
- "git_sha": "240937a2a9c30298110753292be041188891f2cb",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"picard/collectwgsmetrics": {
"branch": "master",
- "git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"samtools/faidx": {
"branch": "master",
- "git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"samtools/index": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"samtools/sort": {
"branch": "master",
- "git_sha": "a0f7be95788366c1923171e358da7d049eb440f9",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"samtools/view": {
"branch": "master",
- "git_sha": "3ffae3598260a99e8db3207dead9f73f87f90d1f",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"star/align": {
"branch": "master",
- "git_sha": "cc08a888069f67cab8120259bddab8032d4c0fe3",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"star/genomegenerate": {
"branch": "master",
- "git_sha": "cc08a888069f67cab8120259bddab8032d4c0fe3",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"stringtie/merge": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"stringtie/stringtie": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
}
}
diff --git a/modules/nf-core/agat/convertspgff2tsv/environment.yml b/modules/nf-core/agat/convertspgff2tsv/environment.yml
index 9ca0ea28..b5fdf3db 100644
--- a/modules/nf-core/agat/convertspgff2tsv/environment.yml
+++ b/modules/nf-core/agat/convertspgff2tsv/environment.yml
@@ -1,3 +1,4 @@
+name: agat_convertspgff2tsv
channels:
- conda-forge
- bioconda
diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml
new file mode 100644
index 00000000..17a04ef2
--- /dev/null
+++ b/modules/nf-core/cat/cat/environment.yml
@@ -0,0 +1,7 @@
+name: cat_cat
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+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 9f062219..4264a92c 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' }"
diff --git a/modules/nf-core/cat/cat/meta.yml b/modules/nf-core/cat/cat/meta.yml
index 8acc0bfa..00a8db0b 100644
--- a/modules/nf-core/cat/cat/meta.yml
+++ b/modules/nf-core/cat/cat/meta.yml
@@ -7,9 +7,7 @@ keywords:
tools:
- cat:
description: Just concatenation
-
documentation: https://man7.org/linux/man-pages/man1/cat.1.html
-
licence: ["GPL-3.0-or-later"]
input:
- meta:
@@ -21,7 +19,6 @@ input:
type: file
description: List of compressed / uncompressed files
pattern: "*"
-
output:
- versions:
type: file
@@ -31,7 +28,9 @@ output:
type: file
description: Concatenated file. Will be gzipped if file_out ends with ".gz"
pattern: "${file_out}"
-
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 00000000..5766daaf
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/main.nf.test
@@ -0,0 +1,153 @@
+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_unzipped_unzipped") {
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
+ file(params.test_data['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.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['genome']['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]).match("test_cat_zipped_zipped_lines") },
+ { assert snapshot(lines.size()).match("test_cat_zipped_zipped_size")}
+ )
+ }
+ }
+
+ test("test_cat_zipped_unzipped") {
+ config './nextflow_zipped_unzipped.config'
+
+ when {
+ params {
+ outdir = "${outputDir}"
+ }
+ process {
+ """
+ input[0] =
+ [
+ [ id:'test', single_end:true ],
+ [
+ file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['genome']['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.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
+ file(params.test_data['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]).match("test_cat_unzipped_zipped_lines") },
+ { assert snapshot(lines.size()).match("test_cat_unzipped_zipped_size")}
+ )
+ }
+ }
+
+ 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.test_data['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]).match("test_cat_one_file_unzipped_zipped_lines") },
+ { assert snapshot(lines.size()).match("test_cat_one_file_unzipped_zipped_size")}
+ )
+ }
+ }
+}
+
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 00000000..423571ba
--- /dev/null
+++ b/modules/nf-core/cat/cat/tests/main.nf.test.snap
@@ -0,0 +1,121 @@
+{
+ "test_cat_unzipped_zipped_size": {
+ "content": [
+ 375
+ ],
+ "timestamp": "2023-10-16T14:33:08.049445686"
+ },
+ "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"
+ ]
+ }
+ ],
+ "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"
+ ]
+ }
+ ],
+ "timestamp": "2023-10-16T14:32:49.642741302"
+ },
+ "test_cat_zipped_zipped_lines": {
+ "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"
+ ]
+ ],
+ "timestamp": "2023-10-16T14:32:33.629048645"
+ },
+ "test_cat_unzipped_zipped_lines": {
+ "content": [
+ [
+ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome",
+ "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT",
+ "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG",
+ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG",
+ "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT",
+ "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG"
+ ]
+ ],
+ "timestamp": "2023-10-16T14:33:08.038830506"
+ },
+ "test_cat_one_file_unzipped_zipped_lines": {
+ "content": [
+ [
+ ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome",
+ "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT",
+ "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG",
+ "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG",
+ "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT",
+ "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG"
+ ]
+ ],
+ "timestamp": "2023-10-16T14:33:21.39642399"
+ },
+ "test_cat_zipped_zipped_size": {
+ "content": [
+ 78
+ ],
+ "timestamp": "2023-10-16T14:32:33.641869244"
+ },
+ "test_cat_one_file_unzipped_zipped_size": {
+ "content": [
+ 374
+ ],
+ "timestamp": "2023-10-16T14:33:21.4094373"
+ }
+}
\ 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 00000000..ec26b0fd
--- /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 00000000..fbc79783
--- /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 00000000..37b578f5
--- /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/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml
new file mode 100644
index 00000000..bff93add
--- /dev/null
+++ b/modules/nf-core/cat/fastq/environment.yml
@@ -0,0 +1,7 @@
+name: cat_fastq
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - conda-forge::sed=4.7
diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf
index 5021e6fc..3d963784 100644
--- a/modules/nf-core/cat/fastq/main.nf
+++ b/modules/nf-core/cat/fastq/main.nf
@@ -2,7 +2,7 @@ process CAT_FASTQ {
tag "$meta.id"
label 'process_single'
- conda "conda-forge::sed=4.7"
+ 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' }"
diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml
index 8a39e309..db4ac3c7 100644
--- a/modules/nf-core/cat/fastq/meta.yml
+++ b/modules/nf-core/cat/fastq/meta.yml
@@ -34,7 +34,9 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
-
authors:
- "@joseespinosa"
- "@drpatelh"
+maintainers:
+ - "@joseespinosa"
+ - "@drpatelh"
diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test
new file mode 100644
index 00000000..f5f94182
--- /dev/null
+++ b/modules/nf-core/cat/fastq/tests/main.nf.test
@@ -0,0 +1,143 @@
+nextflow_process {
+
+ name "Test Process CAT_FASTQ"
+ script "../main.nf"
+ process "CAT_FASTQ"
+ tag "modules"
+ tag "modules_nfcore"
+ tag "cat"
+ tag "cat/fastq"
+
+ test("test_cat_fastq_single_end") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true) ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.reads).match() },
+ { assert path(process.out.versions.get(0)).getText().contains("cat") }
+ )
+ }
+ }
+
+ test("test_cat_fastq_paired_end") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.reads).match() },
+ { assert path(process.out.versions.get(0)).getText().contains("cat") }
+ )
+ }
+ }
+
+ test("test_cat_fastq_single_end_same_name") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.reads).match() },
+ { assert path(process.out.versions.get(0)).getText().contains("cat") }
+ )
+ }
+ }
+
+ test("test_cat_fastq_paired_end_same_name") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.reads).match() },
+ { assert path(process.out.versions.get(0)).getText().contains("cat") }
+ )
+ }
+ }
+
+ test("test_cat_fastq_single_end_single_file") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:true ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out.reads).match() },
+ { assert path(process.out.versions.get(0)).getText().contains("cat") }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap
new file mode 100644
index 00000000..ec2342e5
--- /dev/null
+++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap
@@ -0,0 +1,78 @@
+{
+ "test_cat_fastq_single_end": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.merged.fastq.gz:md5,f9cf5e375f7de81a406144a2c70cc64d"
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T23:19:12.990284837"
+ },
+ "test_cat_fastq_single_end_same_name": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.merged.fastq.gz:md5,63f817db7a29a03eb538104495556f66"
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T23:19:31.554568147"
+ },
+ "test_cat_fastq_single_end_single_file": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.merged.fastq.gz:md5,e325ef7deb4023447a1f074e285761af"
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T23:19:49.629360033"
+ },
+ "test_cat_fastq_paired_end_same_name": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ [
+ "test_1.merged.fastq.gz:md5,63f817db7a29a03eb538104495556f66",
+ "test_2.merged.fastq.gz:md5,fe9f266f43a6fc3dcab690a18419a56e"
+ ]
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T23:19:40.711617539"
+ },
+ "test_cat_fastq_paired_end": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ [
+ "test_1.merged.fastq.gz:md5,f9cf5e375f7de81a406144a2c70cc64d",
+ "test_2.merged.fastq.gz:md5,77c8e966e130d8c6b6ec9be52fcb2bda"
+ ]
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-18T07:53:20.923560211"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/cat/fastq/tests/tags.yml b/modules/nf-core/cat/fastq/tests/tags.yml
new file mode 100644
index 00000000..6ac43614
--- /dev/null
+++ b/modules/nf-core/cat/fastq/tests/tags.yml
@@ -0,0 +1,2 @@
+cat/fastq:
+ - modules/nf-core/cat/fastq/**
diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml
new file mode 100644
index 00000000..f0c63f69
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/environment.yml
@@ -0,0 +1,7 @@
+name: custom_dumpsoftwareversions
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::multiqc=1.17
diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf
index c9d014b1..7685b33c 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.17--pyhdfd78af_0' :
+ 'biocontainers/multiqc:1.17--pyhdfd78af_0' }"
input:
path versions
diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml
index c32657de..5f15a5fd 100644
--- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml
+++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml
@@ -1,4 +1,4 @@
-# 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
keywords:
@@ -16,7 +16,6 @@ input:
type: file
description: YML file containing software versions
pattern: "*.yml"
-
output:
- yml:
type: file
@@ -30,7 +29,9 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
-
authors:
- "@drpatelh"
- "@grst"
+maintainers:
+ - "@drpatelh"
+ - "@grst"
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 00000000..eec1db10
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test
@@ -0,0 +1,38 @@
+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).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 00000000..4274ed57
--- /dev/null
+++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap
@@ -0,0 +1,27 @@
+{
+ "Should run without failures": {
+ "content": [
+ {
+ "0": [
+ "software_versions.yml:md5,1c851188476409cda5752ce971b20b58"
+ ],
+ "1": [
+ "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d"
+ ],
+ "2": [
+ "versions.yml:md5,3843ac526e762117eedf8825b40683df"
+ ],
+ "mqc_yml": [
+ "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d"
+ ],
+ "versions": [
+ "versions.yml:md5,3843ac526e762117eedf8825b40683df"
+ ],
+ "yml": [
+ "software_versions.yml:md5,1c851188476409cda5752ce971b20b58"
+ ]
+ }
+ ],
+ "timestamp": "2023-11-03T14:43:22.157011"
+ }
+}
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 00000000..405aa24a
--- /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/fastp/environment.yml b/modules/nf-core/fastp/environment.yml
new file mode 100644
index 00000000..70389e66
--- /dev/null
+++ b/modules/nf-core/fastp/environment.yml
@@ -0,0 +1,7 @@
+name: fastp
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::fastp=0.23.4
diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf
index 831b7f12..c8e815ae 100644
--- a/modules/nf-core/fastp/main.nf
+++ b/modules/nf-core/fastp/main.nf
@@ -2,7 +2,7 @@ process FASTP {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::fastp=0.23.4"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/fastp:0.23.4--h5f740d0_0' :
'biocontainers/fastp:0.23.4--h5f740d0_0' }"
diff --git a/modules/nf-core/fastp/meta.yml b/modules/nf-core/fastp/meta.yml
index 197ea7ca..c22a16ab 100644
--- a/modules/nf-core/fastp/meta.yml
+++ b/modules/nf-core/fastp/meta.yml
@@ -33,7 +33,6 @@ input:
- save_merged:
type: boolean
description: Specify true to save all merged reads to the a file ending in `*.merged.fastq.gz`
-
output:
- meta:
type: map
@@ -71,3 +70,6 @@ output:
authors:
- "@drpatelh"
- "@kevinmenden"
+maintainers:
+ - "@drpatelh"
+ - "@kevinmenden"
diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test
new file mode 100644
index 00000000..f610b735
--- /dev/null
+++ b/modules/nf-core/fastp/tests/main.nf.test
@@ -0,0 +1,485 @@
+nextflow_process {
+
+ name "Test Process FASTP"
+ script "../main.nf"
+ process "FASTP"
+ tag "modules"
+ tag "modules_nfcore"
+ tag "fastp"
+
+ test("test_fastp_single_end") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = []
+ save_trimmed_fail = false
+ save_merged = false
+
+ input[0] = [
+ [ id:'test', single_end:true ],
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
+ ]
+
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ "Q20 bases:12.922000 K (92.984097%)",
+ "single end (151 cycles)" ]
+ def log_text = [ "Q20 bases: 12922(92.9841%)",
+ "reads passed filter: 99" ]
+ def read_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1",
+ "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
+ "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE
+ { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { assert snapshot(process.out.json).match("test_fastp_single_end_json") },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
+ test("test_fastp_paired_end") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = []
+ save_trimmed_fail = false
+ save_merged = false
+
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
+ ]
+
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ "Q20 bases: | 25.719000 K (93.033098%)",
+ "The input has little adapter percentage (~0.000000%), probably it's trimmed before."]
+ def log_text = [ "No adapter detected for read1",
+ "Q30 bases: 12281(88.3716%)"]
+ def json_text = ['"passed_filter_reads": 198']
+ def read1_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1",
+ "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
+ "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE
+ { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) }
+ }
+ },
+ { read2_lines.each { read2_line ->
+ { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { json_text.each { json_part ->
+ { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) }
+ }
+ },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
+ test("fastp test_fastp_interleaved") {
+ config './nextflow.config'
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = []
+ save_trimmed_fail = false
+ save_merged = false
+
+ input[0] = [ [ id:'test', single_end:true ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], checkIfExists: true) ]
+ ]
+
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ "Q20 bases: | 25.719000 K (93.033098%)",
+ "paired end (151 cycles + 151 cycles)"]
+ def log_text = [ "Q20 bases: 12922(92.9841%)",
+ "reads passed filter: 198"]
+ def read_lines = [ "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1",
+ "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
+ "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE
+ { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { assert snapshot(process.out.json).match("fastp test_fastp_interleaved_json") },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
+ test("test_fastp_single_end_trim_fail") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = []
+ save_trimmed_fail = true
+ save_merged = false
+
+ input[0] = [ [ id:'test', single_end:true ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
+ ]
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ "Q20 bases: | 12.922000 K (92.984097%)",
+ "single end (151 cycles)"]
+ def log_text = [ "Q20 bases: 12922(92.9841%)",
+ "reads passed filter: 99" ]
+ def read_lines = [ "@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1",
+ "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
+ "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE
+ { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) }
+ }
+ },
+ { failed_read_lines.each { failed_read_line ->
+ { assert path(process.out.reads_fail.get(0).get(1)).linesGzip.contains(failed_read_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { assert snapshot(process.out.json).match("test_fastp_single_end_trim_fail_json") },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
+ test("test_fastp_paired_end_trim_fail") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = []
+ save_trimmed_fail = true
+ save_merged = false
+
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [
+ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
+ ]
+ ]
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ "Q20 bases: | 25.719000 K (93.033098%)",
+ "The input has little adapter percentage (~0.000000%), probably it's trimmed before."]
+ def log_text = [ "No adapter detected for read1",
+ "Q30 bases: 12281(88.3716%)"]
+ def json_text = ['"passed_filter_reads": 198']
+ def read1_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1",
+ "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT",
+ "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE
+ { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) }
+ }
+ },
+ { read2_lines.each { read2_line ->
+ { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) }
+ }
+ },
+ { failed_read2_lines.each { failed_read2_line ->
+ { assert path(process.out.reads_fail.get(0).get(1).get(1)).linesGzip.contains(failed_read2_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { json_text.each { json_part ->
+ { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) }
+ }
+ },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
+ test("test_fastp_paired_end_merged") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = []
+ save_trimmed_fail = false
+ save_merged = true
+
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
+ ]
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ ""]
+ def log_text = [ "Merged and filtered:",
+ "total reads: 75",
+ "total bases: 13683"]
+ def json_text = ['"merged_and_filtered": {', '"total_reads": 75', '"total_bases": 13683']
+ def read1_lines = [ "@ERR5069949.1066259 NS500628:121:HK3MMAFX2:1:11312:18369:8333/1",
+ "CCTTATGACAGCAAGAACTGTGTATGATGATGGTGCTAGGAGAGTGTGGACACTTATGAATGTCTTGACACTCGTTTATAAAGTTTATTATGGTAATGCTTTAGATCAAGCCATTTCCATGTGGGCTCTTATAATCTCTGTTACTTC",
+ "AAAAAEAEEAEEEEEEEEEEEEEEEEAEEEEAEEEEEEEEAEEEEEEEEEEEEEEEEE/EAEEEEEE/6EEEEEEEEEEAEEAEEE/EE/AEEAEEEEEAEEEA/EEAAEAE
+ { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) }
+ }
+ },
+ { read2_lines.each { read2_line ->
+ { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) }
+ }
+ },
+ { read_merged_lines.each { read_merged_line ->
+ { assert path(process.out.reads_merged.get(0).get(1)).linesGzip.contains(read_merged_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { json_text.each { json_part ->
+ { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) }
+ }
+ },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
+ test("test_fastp_paired_end_merged_adapterlist") {
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ adapter_fasta = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/fastp/adapters.fasta", checkIfExists: true)
+ save_trimmed_fail = false
+ save_merged = true
+
+ input[0] = [ [ id:'test', single_end:false ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
+ ]
+ input[1] = adapter_fasta
+ input[2] = save_trimmed_fail
+ input[3] = save_merged
+ """
+ }
+ }
+
+ then {
+ def html_text = [ ""]
+ def log_text = [ "Merged and filtered:",
+ "total reads: 75",
+ "total bases: 13683"]
+ def json_text = ['"merged_and_filtered": {', '"total_reads": 75', '"total_bases": 13683',"--adapter_fasta"]
+ def read1_lines = ["@ERR5069949.1066259 NS500628:121:HK3MMAFX2:1:11312:18369:8333/1",
+ "CCTTATGACAGCAAGAACTGTGTATGATGATGGTGCTAGGAGAGTGTGGACACTTATGAATGTCTTGACACTCGTTTATAAAGTTTATTATGGTAATGCTTTAGATCAAGCCATTTCCATGTGGGCTCTTATAATCTCTGTTACTTC",
+ "AAAAAEAEEAEEEEEEEEEEEEEEEEAEEEEAEEEEEEEEAEEEEEEEEEEEEEEEEE/EAEEEEEE/6EEEEEEEEEEAEEAEEE/EE/AEEAEEEEEAEEEA/EEAAEAE
+ { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) }
+ }
+ },
+ { read2_lines.each { read2_line ->
+ { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) }
+ }
+ },
+ { read_merged_lines.each { read_merged_line ->
+ { assert path(process.out.reads_merged.get(0).get(1)).linesGzip.contains(read_merged_line) }
+ }
+ },
+ { html_text.each { html_part ->
+ { assert path(process.out.html.get(0).get(1)).getText().contains(html_part) }
+ }
+ },
+ { json_text.each { json_part ->
+ { assert path(process.out.json.get(0).get(1)).getText().contains(json_part) }
+ }
+ },
+ { log_text.each { log_part ->
+ { assert path(process.out.log.get(0).get(1)).getText().contains(log_part) }
+ }
+ },
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+}
diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap
new file mode 100644
index 00000000..0fa68c7d
--- /dev/null
+++ b/modules/nf-core/fastp/tests/main.nf.test.snap
@@ -0,0 +1,52 @@
+{
+ "fastp test_fastp_interleaved_json": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.fastp.json:md5,168f516f7bd4b7b6c32da7cba87299a4"
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T11:04:45.794175881"
+ },
+ "test_fastp_single_end_json": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc"
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T11:04:10.566343705"
+ },
+ "versions": {
+ "content": [
+ [
+ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02"
+ ]
+ ],
+ "timestamp": "2023-10-17T11:04:10.582076024"
+ },
+ "test_fastp_single_end_trim_fail_json": {
+ "content": [
+ [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5"
+ ]
+ ]
+ ],
+ "timestamp": "2023-10-17T11:05:00.379878948"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/fastp/tests/nextflow.config b/modules/nf-core/fastp/tests/nextflow.config
new file mode 100644
index 00000000..0f7849ad
--- /dev/null
+++ b/modules/nf-core/fastp/tests/nextflow.config
@@ -0,0 +1,6 @@
+process {
+
+ withName: FASTP {
+ ext.args = "--interleaved_in"
+ }
+}
diff --git a/modules/nf-core/fastp/tests/tags.yml b/modules/nf-core/fastp/tests/tags.yml
new file mode 100644
index 00000000..c1afcce7
--- /dev/null
+++ b/modules/nf-core/fastp/tests/tags.yml
@@ -0,0 +1,2 @@
+fastp:
+ - modules/nf-core/fastp/**
diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml
new file mode 100644
index 00000000..1787b38a
--- /dev/null
+++ b/modules/nf-core/fastqc/environment.yml
@@ -0,0 +1,7 @@
+name: fastqc
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::fastqc=0.12.1
diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf
index 249f9064..50e59f2b 100644
--- a/modules/nf-core/fastqc/main.nf
+++ b/modules/nf-core/fastqc/main.nf
@@ -2,10 +2,10 @@ process FASTQC {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::fastqc=0.11.9"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' :
- 'biocontainers/fastqc:0.11.9--0' }"
+ 'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' :
+ 'biocontainers/fastqc:0.12.1--hdfd78af_0' }"
input:
tuple val(meta), path(reads)
diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml
index 4da5bb5a..ee5507e0 100644
--- a/modules/nf-core/fastqc/meta.yml
+++ b/modules/nf-core/fastqc/meta.yml
@@ -50,3 +50,8 @@ authors:
- "@grst"
- "@ewels"
- "@FelixKrueger"
+maintainers:
+ - "@drpatelh"
+ - "@grst"
+ - "@ewels"
+ - "@FelixKrueger"
diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test
index 3961de60..6437a144 100644
--- a/modules/nf-core/fastqc/tests/main.nf.test
+++ b/modules/nf-core/fastqc/tests/main.nf.test
@@ -1,13 +1,18 @@
nextflow_process {
name "Test Process FASTQC"
- script "modules/nf-core/fastqc/main.nf"
+ script "../main.nf"
process "FASTQC"
+ tag "modules"
+ tag "modules_nfcore"
tag "fastqc"
test("Single-Read") {
when {
+ params {
+ outdir = "$outputDir"
+ }
process {
"""
input[0] = [
@@ -21,12 +26,16 @@ nextflow_process {
}
then {
- assert process.success
- assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html"
- assert path(process.out.html.get(0).get(1)).getText().contains("File type | Conventional base calls | ")
- assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip"
+ assertAll (
+ { assert process.success },
+ // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it.
+ // looks like this:
+ // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039
+ { assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" },
+ { assert path(process.out.html.get(0).get(1)).getText().contains("File type | Conventional base calls | ") },
+ { assert snapshot(process.out.versions).match("versions") },
+ { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" }
+ )
}
-
}
-
}
diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap
new file mode 100644
index 00000000..636a32ce
--- /dev/null
+++ b/modules/nf-core/fastqc/tests/main.nf.test.snap
@@ -0,0 +1,10 @@
+{
+ "versions": {
+ "content": [
+ [
+ "versions.yml:md5,e1cc25ca8af856014824abd842e93978"
+ ]
+ ],
+ "timestamp": "2023-10-09T23:40:54+0000"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/fastqc/tests/tags.yml b/modules/nf-core/fastqc/tests/tags.yml
new file mode 100644
index 00000000..7834294b
--- /dev/null
+++ b/modules/nf-core/fastqc/tests/tags.yml
@@ -0,0 +1,2 @@
+fastqc:
+ - modules/nf-core/fastqc/**
diff --git a/modules/nf-core/gatk4/bedtointervallist/environment.yml b/modules/nf-core/gatk4/bedtointervallist/environment.yml
new file mode 100644
index 00000000..e7cb4280
--- /dev/null
+++ b/modules/nf-core/gatk4/bedtointervallist/environment.yml
@@ -0,0 +1,7 @@
+name: gatk4_bedtointervallist
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::gatk4=4.4.0.0
diff --git a/modules/nf-core/gatk4/bedtointervallist/main.nf b/modules/nf-core/gatk4/bedtointervallist/main.nf
index 24968c38..88b24b1a 100644
--- a/modules/nf-core/gatk4/bedtointervallist/main.nf
+++ b/modules/nf-core/gatk4/bedtointervallist/main.nf
@@ -2,7 +2,7 @@ process GATK4_BEDTOINTERVALLIST {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::gatk4=4.4.0.0"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.4.0.0--py36hdfd78af_0':
'biocontainers/gatk4:4.4.0.0--py36hdfd78af_0' }"
diff --git a/modules/nf-core/gatk4/bedtointervallist/meta.yml b/modules/nf-core/gatk4/bedtointervallist/meta.yml
index 83617a7c..187da885 100644
--- a/modules/nf-core/gatk4/bedtointervallist/meta.yml
+++ b/modules/nf-core/gatk4/bedtointervallist/meta.yml
@@ -46,3 +46,6 @@ output:
authors:
- "@kevinmenden"
- "@ramprasadn"
+maintainers:
+ - "@kevinmenden"
+ - "@ramprasadn"
diff --git a/modules/nf-core/gatk4/createsequencedictionary/environment.yml b/modules/nf-core/gatk4/createsequencedictionary/environment.yml
new file mode 100644
index 00000000..db663e14
--- /dev/null
+++ b/modules/nf-core/gatk4/createsequencedictionary/environment.yml
@@ -0,0 +1,7 @@
+name: gatk4_createsequencedictionary
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::gatk4=4.4.0.0
diff --git a/modules/nf-core/gatk4/createsequencedictionary/main.nf b/modules/nf-core/gatk4/createsequencedictionary/main.nf
index 3e4efdd9..b47ad162 100644
--- a/modules/nf-core/gatk4/createsequencedictionary/main.nf
+++ b/modules/nf-core/gatk4/createsequencedictionary/main.nf
@@ -2,7 +2,7 @@ process GATK4_CREATESEQUENCEDICTIONARY {
tag "$fasta"
label 'process_medium'
- conda "bioconda::gatk4=4.4.0.0"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.4.0.0--py36hdfd78af_0':
'biocontainers/gatk4:4.4.0.0--py36hdfd78af_0' }"
diff --git a/modules/nf-core/gatk4/createsequencedictionary/meta.yml b/modules/nf-core/gatk4/createsequencedictionary/meta.yml
index 9b8b8c89..f9d70be0 100644
--- a/modules/nf-core/gatk4/createsequencedictionary/meta.yml
+++ b/modules/nf-core/gatk4/createsequencedictionary/meta.yml
@@ -15,7 +15,6 @@ tools:
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
doi: 10.1158/1538-7445.AM2017-3590
licence: ["Apache-2.0"]
-
input:
- meta:
type: map
@@ -38,3 +37,6 @@ output:
authors:
- "@maxulysse"
- "@ramprasadn"
+maintainers:
+ - "@maxulysse"
+ - "@ramprasadn"
diff --git a/modules/nf-core/gatk4/markduplicates/environment.yml b/modules/nf-core/gatk4/markduplicates/environment.yml
new file mode 100644
index 00000000..9adad104
--- /dev/null
+++ b/modules/nf-core/gatk4/markduplicates/environment.yml
@@ -0,0 +1,8 @@
+name: gatk4_markduplicates
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::gatk4=4.4.0.0
+ - bioconda::samtools=1.17
diff --git a/modules/nf-core/gatk4/markduplicates/main.nf b/modules/nf-core/gatk4/markduplicates/main.nf
index 59e52a3d..564b86d3 100644
--- a/modules/nf-core/gatk4/markduplicates/main.nf
+++ b/modules/nf-core/gatk4/markduplicates/main.nf
@@ -2,7 +2,7 @@ process GATK4_MARKDUPLICATES {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::gatk4=4.4.0.0 bioconda::samtools=1.17"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-d9e7bad0f7fbc8f4458d5c3ab7ffaaf0235b59fb:f857e2d6cc88d35580d01cf39e0959a68b83c1d9-0':
'biocontainers/mulled-v2-d9e7bad0f7fbc8f4458d5c3ab7ffaaf0235b59fb:f857e2d6cc88d35580d01cf39e0959a68b83c1d9-0' }"
diff --git a/modules/nf-core/gatk4/markduplicates/meta.yml b/modules/nf-core/gatk4/markduplicates/meta.yml
index d3e75505..b0f09d4b 100644
--- a/modules/nf-core/gatk4/markduplicates/meta.yml
+++ b/modules/nf-core/gatk4/markduplicates/meta.yml
@@ -7,16 +7,12 @@ keywords:
- sort
tools:
- gatk4:
- description:
- Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
- with a primary focus on variant discovery and genotyping. Its powerful processing engine
- and high-performance computing features make it capable of taking on projects of any size.
+ description: Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools with a primary focus on variant discovery and genotyping. Its powerful processing engine and high-performance computing features make it capable of taking on projects of any size.
homepage: https://gatk.broadinstitute.org/hc/en-us
documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard-
tool_dev_url: https://github.com/broadinstitute/gatk
doi: 10.1158/1538-7445.AM2017-3590
licence: ["MIT"]
-
input:
- meta:
type: map
@@ -35,7 +31,6 @@ input:
type: file
description: Fasta index file
pattern: "*.{fai}"
-
output:
- meta:
type: map
@@ -66,8 +61,11 @@ output:
type: file
description: Duplicate metrics file generated by GATK
pattern: "*.{metrics.txt}"
-
authors:
- "@ajodeh-juma"
- "@FriederikeHanssen"
- "@maxulysse"
+maintainers:
+ - "@ajodeh-juma"
+ - "@FriederikeHanssen"
+ - "@maxulysse"
diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml
new file mode 100644
index 00000000..d2a9f21a
--- /dev/null
+++ b/modules/nf-core/multiqc/environment.yml
@@ -0,0 +1,7 @@
+name: multiqc
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::multiqc=1.17
diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf
index 65d7dd0d..2bbc3983 100644
--- a/modules/nf-core/multiqc/main.nf
+++ b/modules/nf-core/multiqc/main.nf
@@ -1,10 +1,10 @@
process MULTIQC {
label 'process_single'
- 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.17--pyhdfd78af_0' :
+ 'biocontainers/multiqc:1.17--pyhdfd78af_0' }"
input:
path multiqc_files, stageAs: "?/*"
diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml
index f93b5ee5..f1aa660e 100644
--- a/modules/nf-core/multiqc/meta.yml
+++ b/modules/nf-core/multiqc/meta.yml
@@ -1,5 +1,5 @@
-# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
-name: MultiQC
+# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
+name: multiqc
description: Aggregate results from bioinformatics analyses across many samples into a single report
keywords:
- QC
@@ -13,7 +13,6 @@ tools:
homepage: https://multiqc.info/
documentation: https://multiqc.info/docs/
licence: ["GPL-3.0-or-later"]
-
input:
- multiqc_files:
type: file
@@ -31,7 +30,6 @@ input:
type: file
description: Optional logo file for MultiQC
pattern: "*.{png}"
-
output:
- report:
type: file
@@ -54,3 +52,8 @@ authors:
- "@bunop"
- "@drpatelh"
- "@jfy133"
+maintainers:
+ - "@abhi18av"
+ - "@bunop"
+ - "@drpatelh"
+ - "@jfy133"
diff --git a/modules/nf-core/picard/collectinsertsizemetrics/environment.yml b/modules/nf-core/picard/collectinsertsizemetrics/environment.yml
new file mode 100644
index 00000000..5c85f872
--- /dev/null
+++ b/modules/nf-core/picard/collectinsertsizemetrics/environment.yml
@@ -0,0 +1,7 @@
+name: picard_collectinsertsizemetrics
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::picard=3.1.0
diff --git a/modules/nf-core/picard/collectinsertsizemetrics/main.nf b/modules/nf-core/picard/collectinsertsizemetrics/main.nf
index 1d538fae..48e4d2ad 100644
--- a/modules/nf-core/picard/collectinsertsizemetrics/main.nf
+++ b/modules/nf-core/picard/collectinsertsizemetrics/main.nf
@@ -2,10 +2,10 @@ process PICARD_COLLECTINSERTSIZEMETRICS {
tag "$meta.id"
label 'process_single'
- conda "bioconda::picard=3.0.0"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' :
- 'biocontainers/picard:3.0.0--hdfd78af_1' }"
+ 'https://depot.galaxyproject.org/singularity/picard:3.1.0--hdfd78af_0' :
+ 'biocontainers/picard:3.1.0--hdfd78af_0' }"
input:
tuple val(meta), path(bam)
diff --git a/modules/nf-core/picard/collectinsertsizemetrics/meta.yml b/modules/nf-core/picard/collectinsertsizemetrics/meta.yml
index e611bdd4..efd5abe0 100644
--- a/modules/nf-core/picard/collectinsertsizemetrics/meta.yml
+++ b/modules/nf-core/picard/collectinsertsizemetrics/meta.yml
@@ -6,7 +6,6 @@ keywords:
- insert
- statistics
- bam
-
tools:
- "picard":
description: "Java tools for working with NGS data in the BAM format"
@@ -14,7 +13,6 @@ tools:
documentation: "https://broadinstitute.github.io/picard/"
tool_dev_url: "https://github.com/broadinstitute/picard"
licence: "['MIT']"
-
input:
- meta:
type: map
@@ -25,7 +23,6 @@ input:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
-
output:
- meta:
type: map
@@ -46,3 +43,5 @@ output:
pattern: "*.txt"
authors:
- "@FerriolCalvet"
+maintainers:
+ - "@FerriolCalvet"
diff --git a/modules/nf-core/picard/collectwgsmetrics/environment.yml b/modules/nf-core/picard/collectwgsmetrics/environment.yml
new file mode 100644
index 00000000..8adda491
--- /dev/null
+++ b/modules/nf-core/picard/collectwgsmetrics/environment.yml
@@ -0,0 +1,8 @@
+name: picard_collectwgsmetrics
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::picard=3.1.0
+ - r::r-base
diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf
index 1d59334c..67aa5b5e 100644
--- a/modules/nf-core/picard/collectwgsmetrics/main.nf
+++ b/modules/nf-core/picard/collectwgsmetrics/main.nf
@@ -2,10 +2,10 @@ process PICARD_COLLECTWGSMETRICS {
tag "$meta.id"
label 'process_single'
- conda "bioconda::picard=3.0.0 r::r-base"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' :
- 'biocontainers/picard:3.0.0--hdfd78af_1' }"
+ 'https://depot.galaxyproject.org/singularity/picard:3.1.0--hdfd78af_0' :
+ 'biocontainers/picard:3.1.0--hdfd78af_0' }"
input:
tuple val(meta), path(bam), path(bai)
diff --git a/modules/nf-core/picard/collectwgsmetrics/meta.yml b/modules/nf-core/picard/collectwgsmetrics/meta.yml
index 19906f08..5576ef92 100644
--- a/modules/nf-core/picard/collectwgsmetrics/meta.yml
+++ b/modules/nf-core/picard/collectwgsmetrics/meta.yml
@@ -68,3 +68,8 @@ authors:
- "@flowuenne"
- "@lassefolkersen"
- "@ramprasadn"
+maintainers:
+ - "@drpatelh"
+ - "@flowuenne"
+ - "@lassefolkersen"
+ - "@ramprasadn"
diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml
new file mode 100644
index 00000000..73badedb
--- /dev/null
+++ b/modules/nf-core/samtools/faidx/environment.yml
@@ -0,0 +1,7 @@
+name: samtools_faidx
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::samtools=1.17
diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf
index 59ed3088..3aa98822 100644
--- a/modules/nf-core/samtools/faidx/main.nf
+++ b/modules/nf-core/samtools/faidx/main.nf
@@ -2,7 +2,7 @@ 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' }"
diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml
index 957b25e5..e189af28 100644
--- a/modules/nf-core/samtools/faidx/meta.yml
+++ b/modules/nf-core/samtools/faidx/meta.yml
@@ -55,3 +55,7 @@ authors:
- "@drpatelh"
- "@ewels"
- "@phue"
+maintainers:
+ - "@drpatelh"
+ - "@ewels"
+ - "@phue"
diff --git a/modules/nf-core/samtools/index/environment.yml b/modules/nf-core/samtools/index/environment.yml
new file mode 100644
index 00000000..3c6f95b2
--- /dev/null
+++ b/modules/nf-core/samtools/index/environment.yml
@@ -0,0 +1,7 @@
+name: samtools_index
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::samtools=1.17
diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf
index 0b20aa4b..256bd7c4 100644
--- a/modules/nf-core/samtools/index/main.nf
+++ b/modules/nf-core/samtools/index/main.nf
@@ -2,7 +2,7 @@ process SAMTOOLS_INDEX {
tag "$meta.id"
label 'process_low'
- 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' }"
diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml
index 8bd2fa6f..01a4ee03 100644
--- a/modules/nf-core/samtools/index/meta.yml
+++ b/modules/nf-core/samtools/index/meta.yml
@@ -51,3 +51,7 @@ authors:
- "@drpatelh"
- "@ewels"
- "@maxulysse"
+maintainers:
+ - "@drpatelh"
+ - "@ewels"
+ - "@maxulysse"
diff --git a/modules/nf-core/samtools/sort/environment.yml b/modules/nf-core/samtools/sort/environment.yml
new file mode 100644
index 00000000..508659f0
--- /dev/null
+++ b/modules/nf-core/samtools/sort/environment.yml
@@ -0,0 +1,7 @@
+name: samtools_sort
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::samtools=1.17
diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf
index 2b7753fd..60f0c634 100644
--- a/modules/nf-core/samtools/sort/main.nf
+++ b/modules/nf-core/samtools/sort/main.nf
@@ -2,7 +2,7 @@ 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' }"
diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml
index 07328431..2200de72 100644
--- a/modules/nf-core/samtools/sort/meta.yml
+++ b/modules/nf-core/samtools/sort/meta.yml
@@ -46,3 +46,6 @@ output:
authors:
- "@drpatelh"
- "@ewels"
+maintainers:
+ - "@drpatelh"
+ - "@ewels"
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 00000000..1f72f3b9
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/main.nf.test
@@ -0,0 +1,70 @@
+nextflow_process {
+
+ name "Test Process SAMTOOLS_SORT"
+ script "../main.nf"
+ process "SAMTOOLS_SORT"
+ tag "modules"
+ tag "modules_nfcore"
+ tag "samtools"
+ tag "samtools/sort"
+
+ test("test_samtools_sort") {
+
+ config "./nextflow.config"
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ],
+ [
+ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
+ ]
+ ]
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+ test("test_samtools_sort_stub") {
+
+ config "./nextflow.config"
+ options "-stub-run"
+
+ when {
+ params {
+ outdir = "$outputDir"
+ }
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ],
+ [
+ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], 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 00000000..a43566da
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap
@@ -0,0 +1,39 @@
+{
+ "test_samtools_sort": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,a29570e7607d217c2fa4d75829e09cd7"
+ ]
+ ],
+ "1": [
+
+ ],
+ "2": [
+ "versions.yml:md5,46f7a36082fa1f68285fe30d689244e8"
+ ],
+ "bam": [
+ [
+ {
+ "id": "test",
+ "single_end": false
+ },
+ "test.sorted.bam:md5,a29570e7607d217c2fa4d75829e09cd7"
+ ]
+ ],
+ "csi": [
+
+ ],
+ "versions": [
+ "versions.yml:md5,46f7a36082fa1f68285fe30d689244e8"
+ ]
+ }
+ ],
+ "timestamp": "2023-10-17T17:21:46.5427968"
+ }
+}
\ 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 00000000..d0f35086
--- /dev/null
+++ b/modules/nf-core/samtools/sort/tests/nextflow.config
@@ -0,0 +1,7 @@
+process {
+
+ withName: SAMTOOLS_SORT {
+ ext.prefix = { "${meta.id}.sorted" }
+ }
+
+}
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 00000000..cd63ea20
--- /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/view/environment.yml b/modules/nf-core/samtools/view/environment.yml
new file mode 100644
index 00000000..141e7bd8
--- /dev/null
+++ b/modules/nf-core/samtools/view/environment.yml
@@ -0,0 +1,7 @@
+name: samtools_view
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::samtools=1.17
diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf
index cb91facf..ddf3f88a 100644
--- a/modules/nf-core/samtools/view/main.nf
+++ b/modules/nf-core/samtools/view/main.nf
@@ -2,7 +2,7 @@ process SAMTOOLS_VIEW {
tag "$meta.id"
label 'process_low'
- 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' }"
diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml
index 3b05450b..3dadafae 100644
--- a/modules/nf-core/samtools/view/meta.yml
+++ b/modules/nf-core/samtools/view/meta.yml
@@ -82,3 +82,8 @@ authors:
- "@joseespinosa"
- "@FriederikeHanssen"
- "@priyanka-surana"
+maintainers:
+ - "@drpatelh"
+ - "@joseespinosa"
+ - "@FriederikeHanssen"
+ - "@priyanka-surana"
diff --git a/modules/nf-core/star/align/environment.yml b/modules/nf-core/star/align/environment.yml
new file mode 100644
index 00000000..6db20988
--- /dev/null
+++ b/modules/nf-core/star/align/environment.yml
@@ -0,0 +1,9 @@
+name: star_align
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::star=2.7.10a
+ - bioconda::samtools=1.16.1
+ - conda-forge::gawk=5.1.0
diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf
index d0e20384..fa645a6d 100644
--- a/modules/nf-core/star/align/main.nf
+++ b/modules/nf-core/star/align/main.nf
@@ -2,7 +2,7 @@ process STAR_ALIGN {
tag "$meta.id"
label 'process_high'
- conda "bioconda::star=2.7.10a bioconda::samtools=1.16.1 conda-forge::gawk=5.1.0"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
diff --git a/modules/nf-core/star/align/meta.yml b/modules/nf-core/star/align/meta.yml
index 3d8fed0c..e80dbb7d 100644
--- a/modules/nf-core/star/align/meta.yml
+++ b/modules/nf-core/star/align/meta.yml
@@ -52,7 +52,6 @@ input:
- seq_center:
type: string
description: Sequencing center
-
output:
- bam:
type: file
@@ -106,8 +105,11 @@ output:
type: file
description: STAR output bedGraph format file(s) (optional)
pattern: "*.bg"
-
authors:
- "@kevinmenden"
- "@drpatelh"
- "@praveenraj2018"
+maintainers:
+ - "@kevinmenden"
+ - "@drpatelh"
+ - "@praveenraj2018"
diff --git a/modules/nf-core/star/genomegenerate/environment.yml b/modules/nf-core/star/genomegenerate/environment.yml
new file mode 100644
index 00000000..0b35ff51
--- /dev/null
+++ b/modules/nf-core/star/genomegenerate/environment.yml
@@ -0,0 +1,9 @@
+name: star_genomegenerate
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::star=2.7.10a
+ - bioconda::samtools=1.16.1
+ - conda-forge::gawk=5.1.0
diff --git a/modules/nf-core/star/genomegenerate/main.nf b/modules/nf-core/star/genomegenerate/main.nf
index 43424042..473e62a6 100644
--- a/modules/nf-core/star/genomegenerate/main.nf
+++ b/modules/nf-core/star/genomegenerate/main.nf
@@ -2,7 +2,7 @@ process STAR_GENOMEGENERATE {
tag "$fasta"
label 'process_high'
- conda "bioconda::star=2.7.10a bioconda::samtools=1.16.1 conda-forge::gawk=5.1.0"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
diff --git a/modules/nf-core/star/genomegenerate/meta.yml b/modules/nf-core/star/genomegenerate/meta.yml
index eba2d9cf..1061e1b8 100644
--- a/modules/nf-core/star/genomegenerate/meta.yml
+++ b/modules/nf-core/star/genomegenerate/meta.yml
@@ -31,7 +31,6 @@ input:
- gtf:
type: file
description: GTF file of the reference genome
-
output:
- meta:
type: map
@@ -46,7 +45,9 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
-
authors:
- "@kevinmenden"
- "@drpatelh"
+maintainers:
+ - "@kevinmenden"
+ - "@drpatelh"
diff --git a/modules/nf-core/stringtie/merge/environment.yml b/modules/nf-core/stringtie/merge/environment.yml
new file mode 100644
index 00000000..9914b202
--- /dev/null
+++ b/modules/nf-core/stringtie/merge/environment.yml
@@ -0,0 +1,7 @@
+name: stringtie_merge
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::stringtie=2.2.1
diff --git a/modules/nf-core/stringtie/merge/main.nf b/modules/nf-core/stringtie/merge/main.nf
index 12224f78..c2568219 100644
--- a/modules/nf-core/stringtie/merge/main.nf
+++ b/modules/nf-core/stringtie/merge/main.nf
@@ -2,7 +2,7 @@ process STRINGTIE_MERGE {
label 'process_medium'
// Note: 2.7X indices incompatible with AWS iGenomes.
- conda "bioconda::stringtie=2.2.1"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' :
'biocontainers/stringtie:2.2.1--hecb563c_2' }"
diff --git a/modules/nf-core/stringtie/merge/meta.yml b/modules/nf-core/stringtie/merge/meta.yml
index 2e9784fe..5d02d678 100644
--- a/modules/nf-core/stringtie/merge/meta.yml
+++ b/modules/nf-core/stringtie/merge/meta.yml
@@ -32,6 +32,7 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
-
authors:
- "@yuukiiwa"
+maintainers:
+ - "@yuukiiwa"
diff --git a/modules/nf-core/stringtie/stringtie/environment.yml b/modules/nf-core/stringtie/stringtie/environment.yml
new file mode 100644
index 00000000..7a0eccdb
--- /dev/null
+++ b/modules/nf-core/stringtie/stringtie/environment.yml
@@ -0,0 +1,7 @@
+name: stringtie_stringtie
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::stringtie=2.2.1
diff --git a/modules/nf-core/stringtie/stringtie/main.nf b/modules/nf-core/stringtie/stringtie/main.nf
index d0f8b563..6e25ba27 100644
--- a/modules/nf-core/stringtie/stringtie/main.nf
+++ b/modules/nf-core/stringtie/stringtie/main.nf
@@ -2,7 +2,7 @@ process STRINGTIE_STRINGTIE {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::stringtie=2.2.1"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' :
'biocontainers/stringtie:2.2.1--hecb563c_2' }"
diff --git a/modules/nf-core/stringtie/stringtie/meta.yml b/modules/nf-core/stringtie/stringtie/meta.yml
index 75518470..d8ebdd88 100644
--- a/modules/nf-core/stringtie/stringtie/meta.yml
+++ b/modules/nf-core/stringtie/stringtie/meta.yml
@@ -5,7 +5,6 @@ keywords:
- assembly
- quantification
- gtf
-
tools:
- stringtie2:
description: |
@@ -55,3 +54,5 @@ output:
pattern: "versions.yml"
authors:
- "@drpatelh"
+maintainers:
+ - "@drpatelh"
From ef9f57a869e79446397e22c260aa9c80cab962ab Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Wed, 15 Nov 2023 10:40:39 +0100
Subject: [PATCH 42/45] move compression out of vcf_collect
---
bin/vcf_collect.py | 5 ++---
modules/local/vcf_collect/main.nf | 3 ++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index 4d677de0..8e15ccfc 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -8,7 +8,6 @@
import ast
import numpy as np
import csv
-import gzip
logger = logging.getLogger()
@@ -344,9 +343,9 @@ def write_vcf(df_to_print: pd.DataFrame, header: str, out_file: str) -> None:
"FORMAT",
"Sample",
]
- ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE, compression="gzip")
+ ].to_csv(path_or_buf=out_file, sep="\t", header=None, index=False, quoting=csv.QUOTE_NONE)
- with gzip.open(out_file, "r+") as f:
+ with open(out_file, "r+") as f:
content = f.read()
f.seek(0, 0)
f.write(header.rstrip("\r\n") + "\n" + content)
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index 42f94c40..1b8e56fe 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -22,7 +22,8 @@ process VCF_COLLECT {
script:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
- vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf.gz
+ vcf_collect.py --fusioninspector $fusioninspector_tsv --fusionreport $fusionreport_report --fusioninspector_gtf $fusioninspector_gtf_tsv --hgnc $hgnc_ref --sample ${prefix} --out ${prefix}_fusion_data.vcf
+ gzip ${prefix}_fusion_data.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
From f33a5e9f36271d07c11cb28b762a2c3859aa7302 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Wed, 15 Nov 2023 13:25:59 +0100
Subject: [PATCH 43/45] fix ,/;
---
bin/vcf_collect.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index 8e15ccfc..57cfbcaa 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -319,7 +319,7 @@ def column_manipulation(df: pd.DataFrame) -> pd.DataFrame:
f"TRANSCRIPT_ID_A={row['CDS_LEFT_ID']};TRANSCRIPT_ID_B={row['CDS_RIGHT_ID']};"
f"TRANSCRIPT_VERSION_A={row['Left_transcript_version']};TRANSCRIPT_VERSION_B={row['Right_transcript_version']};"
f"HGNC_ID_A={row['Left_hgnc_id']};HGNC_ID_B={row['Right_hgnc_id']};"
- f"EXON_NUMBER_A={row['Left_exon_number']},EXON_NUMBER_B={row['Right_exon_number']};"
+ f"EXON_NUMBER_A={row['Left_exon_number']};EXON_NUMBER_B={row['Right_exon_number']};"
f"ANNOTATIONS={row['annots']}"
)
df.loc[index, "Sample"] = f"./1:{row['JunctionReadCount']}:{row['SpanningFragCount']}:{row['FFPM']}"
From a8b07438c70907de25960cfbf934e1b175e82cd2 Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Thu, 16 Nov 2023 21:35:59 +0100
Subject: [PATCH 44/45] fix values display vcf
---
bin/vcf_collect.py | 13 ++++++++++++-
modules/local/vcf_collect/main.nf | 2 +-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index 57cfbcaa..dbbd384e 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -275,7 +275,7 @@ def read_build_fusionreport(fusionreport_file: str) -> pd.DataFrame:
concatenate_columns, axis=1
)
fusion_report.columns = fusion_report.columns.str.upper()
- fusion_report["FOUND_DB"] = fusion_report["FOUND_DB"].apply(lambda x: ", ".join(x))
+ fusion_report["FOUND_DB"] = fusion_report["FOUND_DB"].apply(lambda x: ",".join(x))
fusion_report[["GeneA", "GeneB"]] = fusion_report["FUSION"].str.split("--", expand=True)
return fusion_report[["FUSION", "GeneA", "GeneB", "TOOLS_HITS", "SCORE", "FOUND_DB", "FOUND_IN"]].set_index(
@@ -297,6 +297,17 @@ def column_manipulation(df: pd.DataFrame) -> pd.DataFrame:
df["INFO"] = ""
df["Sample"] = ""
df["Strand1"] = df["Strand1"].astype(str)
+ df["JunctionReadCount"] = df["JunctionReadCount"].fillna(0).astype(int).astype(str)
+ df["SpanningFragCount"] = df["SpanningFragCount"].fillna(0).astype(int).astype(str)
+ df["FFPM"] = df["FFPM"].fillna(0).astype(float).astype(str)
+ df["ChromosomeA"] = df["ChromosomeA"].fillna(0).astype(int).astype(str)
+ df["ChromosomeB"] = df["ChromosomeB"].fillna(0).astype(int).astype(str)
+ df["Left_hgnc_id"] = df["Left_hgnc_id"].fillna(0).astype(int).astype(str)
+ df["Right_hgnc_id"] = df["Right_hgnc_id"].fillna(0).astype(int).astype(str)
+ df["Left_exon_number"] = df["Left_exon_number"].fillna(0).astype(int).astype(str)
+ df["Right_exon_number"] = df["Right_exon_number"].fillna(0).astype(int).astype(str)
+ df["Left_transcript_version"] = df["Left_transcript_version"].fillna(0).astype(int).astype(str)
+ df["Right_transcript_version"] = df["Right_transcript_version"].fillna(0).astype(int).astype(str)
for index, row in df.iterrows():
if row["Strand1"] == "nan":
diff --git a/modules/local/vcf_collect/main.nf b/modules/local/vcf_collect/main.nf
index 1b8e56fe..2af4a777 100644
--- a/modules/local/vcf_collect/main.nf
+++ b/modules/local/vcf_collect/main.nf
@@ -2,7 +2,7 @@ process VCF_COLLECT {
tag "$meta.id"
label 'process_single'
- conda "conda-forge::python=3.8.3"
+ conda "conda-forge::pandas=1.5.2"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pandas:1.5.2' :
'quay.io/biocontainers/pandas:1.5.2' }"
From acf64a1d862a7c16fd68d6bd736100e1c1c4ae1c Mon Sep 17 00:00:00 2001
From: Annick Renevey <47788523+rannick@users.noreply.github.com>
Date: Fri, 17 Nov 2023 13:54:11 +0100
Subject: [PATCH 45/45] add hgnc id for fusionreport-only entries in vcf and
add bug fix
---
bin/vcf_collect.py | 44 +++++++++++++++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 11 deletions(-)
diff --git a/bin/vcf_collect.py b/bin/vcf_collect.py
index dbbd384e..b5ff126d 100755
--- a/bin/vcf_collect.py
+++ b/bin/vcf_collect.py
@@ -37,19 +37,36 @@ def vcf_collect(
.join(read_build_fusionreport(fusionreport_in_file), how="outer", on="FUSION")
.reset_index()
)
+ hgnc_df = build_hgnc_dataframe(hgnc)
- df = build_hgcn_dataframe(hgnc).merge(
- merged_df, how="right", left_on="ensembl_gene_id", right_on="Left_ensembl_gene_id"
+ df_symbol = merged_df[merged_df["Left_ensembl_gene_id"].isna()]
+ df_not_symbol = merged_df[merged_df["Left_ensembl_gene_id"].notna()]
+
+ df_not_symbol = hgnc_df.merge(
+ df_not_symbol, how="right", left_on="ensembl_gene_id", right_on="Left_ensembl_gene_id"
)
+ df_symbol = hgnc_df.merge(df_symbol, how="right", left_on="symbol", right_on="GeneA")
+ df = pd.concat([df_not_symbol, df_symbol])
df = df.rename(columns={"hgnc_id": "Left_hgnc_id"})
- df = build_hgcn_dataframe(hgnc).merge(df, how="right", left_on="ensembl_gene_id", right_on="Right_ensembl_gene_id")
+
+ df_symbol = df[df["Right_ensembl_gene_id"].isna()]
+ df_not_symbol = df[df["Right_ensembl_gene_id"].notna()]
+
+ df_not_symbol = hgnc_df.merge(
+ df_not_symbol, how="right", left_on="ensembl_gene_id", right_on="Right_ensembl_gene_id"
+ )
+ df_symbol = hgnc_df.merge(df_symbol, how="right", left_on="symbol", right_on="GeneB")
+ df = pd.concat([df_not_symbol, df_symbol])
df = df.rename(columns={"hgnc_id": "Right_hgnc_id"})
+
gtf_df = build_gtf_dataframe(gtf)
all_df = df.merge(gtf_df, how="left", left_on="CDS_LEFT_ID", right_on="Transcript_id")
- all_df[["PosA", "orig_start", "orig_end"]] = all_df[["PosA", "orig_start", "orig_end"]].fillna(0)
- all_df[["PosA", "orig_start", "orig_end"]] = all_df[["PosA", "orig_start", "orig_end"]].astype(int)
+ all_df[["PosA", "orig_start", "orig_end"]] = all_df[["PosA", "orig_start", "orig_end"]].fillna(0).astype(int)
- all_df = all_df[(all_df["PosA"] >= all_df["orig_start"]) & (all_df["PosA"] <= all_df["orig_end"])]
+ all_df = all_df[
+ ((all_df["PosA"] >= all_df["orig_start"]) & (all_df["PosA"] <= all_df["orig_end"]))
+ | ((all_df["orig_start"] == 0) & (all_df["orig_end"] == 0))
+ ]
all_df = all_df.rename(columns={"transcript_version": "Left_transcript_version"})
all_df = all_df.rename(columns={"exon_number": "Left_exon_number"})
all_df = all_df[
@@ -83,10 +100,14 @@ def vcf_collect(
all_df = all_df.merge(gtf_df, how="left", left_on="CDS_RIGHT_ID", right_on="Transcript_id")
all_df[["PosB", "orig_start", "orig_end"]] = all_df[["PosB", "orig_start", "orig_end"]].fillna(0)
all_df[["PosB", "orig_start", "orig_end"]] = all_df[["PosB", "orig_start", "orig_end"]].astype(int)
- all_df = all_df[(all_df["PosB"] >= all_df["orig_start"]) & (all_df["PosB"] <= all_df["orig_end"])]
+ all_df = all_df[
+ ((all_df["PosB"] >= all_df["orig_start"]) & (all_df["PosB"] <= all_df["orig_end"]))
+ | ((all_df["orig_start"] == 0) & (all_df["orig_end"] == 0))
+ ]
all_df = all_df.rename(columns={"transcript_version": "Right_transcript_version"})
all_df = all_df.rename(columns={"exon_number": "Right_exon_number"})
+
all_df = all_df[
[
"FUSION",
@@ -300,8 +321,8 @@ def column_manipulation(df: pd.DataFrame) -> pd.DataFrame:
df["JunctionReadCount"] = df["JunctionReadCount"].fillna(0).astype(int).astype(str)
df["SpanningFragCount"] = df["SpanningFragCount"].fillna(0).astype(int).astype(str)
df["FFPM"] = df["FFPM"].fillna(0).astype(float).astype(str)
- df["ChromosomeA"] = df["ChromosomeA"].fillna(0).astype(int).astype(str)
- df["ChromosomeB"] = df["ChromosomeB"].fillna(0).astype(int).astype(str)
+ df["ChromosomeA"] = df["ChromosomeA"].fillna(0).astype(str)
+ df["ChromosomeB"] = df["ChromosomeB"].fillna(0).astype(str)
df["Left_hgnc_id"] = df["Left_hgnc_id"].fillna(0).astype(int).astype(str)
df["Right_hgnc_id"] = df["Right_hgnc_id"].fillna(0).astype(int).astype(str)
df["Left_exon_number"] = df["Left_exon_number"].fillna(0).astype(int).astype(str)
@@ -334,6 +355,7 @@ def column_manipulation(df: pd.DataFrame) -> pd.DataFrame:
f"ANNOTATIONS={row['annots']}"
)
df.loc[index, "Sample"] = f"./1:{row['JunctionReadCount']}:{row['SpanningFragCount']}:{row['FFPM']}"
+
return df
@@ -362,13 +384,13 @@ def write_vcf(df_to_print: pd.DataFrame, header: str, out_file: str) -> None:
f.write(header.rstrip("\r\n") + "\n" + content)
-def build_hgcn_dataframe(file: str) -> pd.DataFrame:
+def build_hgnc_dataframe(file: str) -> pd.DataFrame:
"""
Build a DataFrame from HGNC input file, extracting 'hgnc_id' and 'ensembl_gene_id' columns.
"""
df = pd.read_csv(file, sep="\t", low_memory=False)
df["hgnc_id"] = df["hgnc_id"].str.replace("HGNC:", "")
- return df[["hgnc_id", "ensembl_gene_id"]].dropna()
+ return df[["hgnc_id", "ensembl_gene_id", "symbol"]].dropna()
def build_gtf_dataframe(file: str) -> pd.DataFrame:
|