diff --git a/CHANGELOG.md b/CHANGELOG.md index a327cc30..ba9359f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 2.2.0 - TioDeNadal [2024-08-27] + +### `Added` + +- Fasta, gtf, vep cache and plugins can now be downloaded automatically by the pipeline if they are not provided by the user [#149](https://github.com/genomic-medicine-sweden/tomte/pull/149) +- Added `--gencode_annotation_version`, the version of the gencode reference version to download if fasta or gtf is not provided [#149](https://github.com/genomic-medicine-sweden/tomte/pull/149) +- Added the possibility to provide `--vep_refs_download`, a comma separated csv determining the vep references that should be downloaded (excluding gnomad ones) alongside with a switch `--skip_download_vep` for the vep reference download in general and `--skip_download_gnomad` for gnomad in particular [#149](https://github.com/genomic-medicine-sweden/tomte/pull/149) + +### `Fixed` + +- Input to BootstrapAnn is now supplied in a single channel. Previously they were supplied in separate channels, which could cause mix-ups if more than one sample was supplied [#151](https://github.com/genomic-medicine-sweden/tomte/pull/151) + +### `Parameters` + +| Old parameter | New parameter | +| ------------- | ------------------------------ | +| | `--gencode_annotation_version` | +| | `--vep_refs_download` | +| | `--skip_download_vep` | +| | `--skip_download_gnomad` | + +> [!NOTE] +> Parameter has been updated if both old and new parameter information is present. +> Parameter has been added if just thenew parameter information is present. +> Parameter has been removed if new parameter information isn't present. + +### `Changed` + +- Updated modules bcftools/annotate, bcftools/mpileup, bcftools/view, cat/fastq, ensemblvep/filtervep, fastp, fastqc, gatk4/haplotypecaller, gatk4/splitncigarreads, gunzip, multiqc, picard/collectrnaseqmetrics, samtools/index, star/align, star/genomegenerate, stringtie/stringtie, tabix/bgziptabix, tabix/tabix and untar [#153](https://github.com/genomic-medicine-sweden/tomte/pull/153) + +| Tool | Old version | New version | +| ------------------------------- | ----------- | ----------- | +| gunzip | 20.04 | 22.04 | +| multiqc | 1.22.3 | 1.24.1 | +| picard/collectinsertsizemetrics | 3.1.1 | 3.2.0 | +| tabix/bgziptabix | 1.19.1 | 1.20 | +| tabix/tabix | 1.19.1 | 1.20 | +| untar | 20.04 | 22.04 | + ## 2.1.0 - Elf [2024-06-26] ### `Added` diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 25b2f727..797b55eb 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,5 +1,5 @@ report_comment: > - This report has been generated by the genomic-medicine-sweden/tomte + This report has been generated by the genomic-medicine-sweden/tomte analysis pipeline. For information about how to interpret these results, please see the documentation. report_section_order: diff --git a/conf/base.config b/conf/base.config index 918fad7f..ed50b00c 100644 --- a/conf/base.config +++ b/conf/base.config @@ -52,6 +52,9 @@ process { withLabel:process_high_memory { memory = { check_max( 200.GB * task.attempt, 'memory' ) } } + withLabel:process_very_long { + time = { check_max( 100.h * task.attempt, 'time' ) } + } withLabel:error_ignore { errorStrategy = 'ignore' } diff --git a/conf/modules/download_references.config b/conf/modules/download_references.config new file mode 100644 index 00000000..6f8cc17e --- /dev/null +++ b/conf/modules/download_references.config @@ -0,0 +1,63 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Config file for defining DSL2 per module options and publishing paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Available keys to override module options: + ext.args = Additional arguments appended to command in module. + ext.args2 = Second set of arguments appended to command in module (multi-tool modules). + ext.args3 = Third set of arguments appended to command in module (multi-tool modules). + ext.prefix = File name prefix for output files. +---------------------------------------------------------------------------------------- +*/ + +// +// DOWNLOAD REFERENCES +// + +process { + + withName: '.*DOWNLOAD_REFERENCES:FASTA_DOWNLOAD' { + ext.when = { !params.fasta } + publishDir = [ + path: { "${params.outdir}/references" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_reference + ] + } + + withName: '.*DOWNLOAD_REFERENCES:GTF_DOWNLOAD' { + ext.when = { !params.gtf } + publishDir = [ + path: { "${params.outdir}/references" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_reference + ] + } + + withName: '.*DOWNLOAD_REFERENCES:WGET_DOWNLOAD' { + ext.when = { (!params.skip_download_vep && !params.vep_cache) } + publishDir = [ + enabled: false + ] + } + + withName: '.*DOWNLOAD_REFERENCES:VEP_GNOMAD_DOWNLOAD' { + ext.when = { !params.skip_download_gnomad } + publishDir = [ + enabled: false + ] + } + + withName: '.*DOWNLOAD_REFERENCES:BUILD_VEP_CACHE' { + ext.when = { (!params.skip_download_vep && !params.vep_cache) } + publishDir = [ + path: { "${params.outdir}/references" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_reference + ] + } + +} diff --git a/conf/modules/prepare_references.config b/conf/modules/prepare_references.config index 1e315494..3ea54b75 100644 --- a/conf/modules/prepare_references.config +++ b/conf/modules/prepare_references.config @@ -17,7 +17,7 @@ process { withName: '.*PREPARE_REFERENCES:GUNZIP_FASTA' { - ext.when = {params.fasta.endsWith(".gz")} + ext.when = { params.fasta && params.fasta.endsWith(".gz") } publishDir = [ path: { "${params.outdir}/references" }, mode: params.publish_dir_mode, @@ -51,7 +51,7 @@ process { } withName: '.*PREPARE_REFERENCES:GUNZIP_GTF' { - ext.when = { params.gtf.endsWith(".gz") } + ext.when = { params.gtf && params.gtf.endsWith(".gz") } publishDir = [ path: { "${params.outdir}/references" }, mode: params.publish_dir_mode, @@ -134,7 +134,7 @@ process { } withName: '.*PREPARE_REFERENCES:UNTAR_VEP_CACHE' { - ext.when = { (params.vep_cache.endsWith("tar.gz")) } + ext.when = { (params.vep_cache && params.vep_cache.endsWith(".gz")) } publishDir = [ enabled: false ] diff --git a/docs/usage.md b/docs/usage.md index 1f1c3b6f..d2aa9b6c 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -123,6 +123,8 @@ If you would like to see more examples of what a typical samplesheet looks like In genomic-medicine-sweden/tomte, references can be supplied using parameters. We have also introduced the possiblility of using the `--igenomes_base` parameter to point to a path where genome specific reference files are placed (fasta, fai, gtf, star_index, salmon_index, subsample_bed). To make sure that the names of the reference files match those in your directory, check [igenomes.config](https://github.com/genomic-medicine-sweden/tomte/blob/master/conf/igenomes.config). +If no references are provided by the user the pipeline will automatically download a fasta and a gtf file. The user can select the desired genome and gencode version using `--genome` and `--genome_annotation_version`. If the user also wants to download vep cache and vep plugins references they will have to set `--skip_download_vep false`. The user will have to provide a comma separated file containing the plugins they want to download `--vep_refs_download`, this file should NOT contain the path to gnomad database. If the user also wants to download the gnomad database they will have to set `--skip_download_gnomad false`, bare in mind that about ~900GB of data will be downloaded, so storage space and time are needed. The data will then be processed and its size significantly reduced to under 40GB. + Note that the pipeline is modular in architecture. It offers you the flexibility to choose between different tools. For example, you can call SNVs either with BCFtools or with GATK. You also have the option to turn off sections of the pipeline if you do not want to run them. For example, drop aberrant expression module can be turned off by setting `--skip_drop_ae true`. This flexibility means that in any given analysis run, a combination of tools included in the pipeline will not be executed. So the pipeline is written in a way that can account for these differences while working with reference parameters. If a tool is not going to be executed during the course of a run, parameters used only by that tool need not be provided. For example, if you are not running DROP aberrant splicing, you do not need to provide `--reference_drop_splice_folder`. genomic-medicine-sweden/tomte consists of several tools used for various purposes. For convenience, we have grouped those tools under the following categories: @@ -145,21 +147,24 @@ The mandatory and optional parameters for each category are tabulated below. | Mandatory | Optional | | --------- | ------------------------------ | -| fasta | fasta_fai1 | -| gtf | sequence_dict1 | -| | salmon_index1 | -| | star_index1 | -| | transcript_fasta1 | -| | genome2 | -| | platform3 | -| | min_trimmed_length4 | -| | star_two_pass_mode4 | - -1 If the parameter is not provided by the user, it will be generated from the fasta and gtf files.
-2 If it is not provided by the user, the default value is GRCh38.
-3 If it is not provided by the user, the default value is illumina.
-4 If it is not provided by the user, the default value is 40.
-5 If it is not provided by the user, the default value is Basic. +| | fasta1 | +| | gtf1 | +| | fasta_fai2 | +| | sequence_dict2 | +| | salmon_index2 | +| | star_index2 | +| | transcript_fasta2 | +| | genome3 | +| | platform4 | +| | min_trimmed_length5 | +| | star_two_pass_mode6 | + +1 If the parameter is not provided by the user, it will be downloaded.
+2 If the parameter is not provided by the user, it will be generated from the fasta and gtf files.
+3 If it is not provided by the user, the default value is GRCh38.
+4 If it is not provided by the user, the default value is illumina.
+5 If it is not provided by the user, the default value is 40.
+6 If it is not provided by the user, the default value is Basic. ##### 2. Junction track and bigwig @@ -191,16 +196,21 @@ The mandatory and optional parameters for each category are tabulated below. #### 5. SNV annotation (ensembl VEP) -| Mandatory | Optional | -| ---------------------------- | -------------------------- | -| vep_plugin_files1 | skip_vep2 | -| | vep_cache3 | -| | vep_cache_version | -| | gene_panel_clinical_filter | - -1 VEP caches can be downloaded [here](https://www.ensembl.org/info/docs/tools/vep/script/vep_cache.html#cache). VEP plugins may be installed in the cache directory, and the plugin pLI is mandatory to install. To supply files required by VEP plugins, use `vep_plugin_files` parameter. See example cache [here](https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/vep_cache_and_plugins.tar.gz).
-2 If it is not provided by the user, the default value is false
-3 If it is not provided by the user, the default value is 110, supported values are 107 and 110
+| Mandatory | Optional | +| --------- | -------------------------------- | +| | skip_vep1 | +| | vep_plugin_files2 | +| | vep_cache2 | +| | vep_cache_version3 | +| | skip_download_vep4 | +| | skip_download_gnomad4 | +| | vep_refs_download | +| | gene_panel_clinical_filter | + +1 If it is not provided by the user, the default value is false
+2 VEP cache and plugins can be automatically downloaded by the pipeline by setting `--skip_download_vep false`, `--skip_download_gnomad false` and providing a lcsv with a list of files to download `--vep_refs_download` as done [here](https://github.com/genomic-medicine-sweden/tomte/blob/dev/test_data/vep_to_download.csv). VEP caches can also be downloaded [here](https://www.ensembl.org/info/docs/tools/vep/script/vep_cache.html#cache). VEP plugins may also be installed in the cache directory, and the plugin pLI is mandatory to install. To supply files required by VEP plugins, use `vep_plugin_files` parameter. See example cache [here](https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/vep_cache_and_plugins.tar.gz).
+3 If it is not provided by the user, the default value is 110, supported values are 107 and 110 +4 If it is not provided by the user, the default value true #### 6. Stringtie & gffcompare diff --git a/modules.json b/modules.json index 8b8999c9..b795e834 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "nf-core": { "bcftools/annotate": { "branch": "master", - "git_sha": "c1a7fa1c038061b344f2a41be71942061ec40d2e", + "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", "installed_by": ["modules"] }, "bcftools/merge": { @@ -17,7 +17,7 @@ }, "bcftools/mpileup": { "branch": "master", - "git_sha": "a5ba4d59c2b248c0379b0f8aeb4e7e754566cd1f", + "git_sha": "cdf83b18471db290a28fe98c2a0852cb05864890", "installed_by": ["modules"], "patch": "modules/nf-core/bcftools/mpileup/bcftools-mpileup.diff" }, @@ -33,17 +33,17 @@ }, "bcftools/view": { "branch": "master", - "git_sha": "33ef773a7ea36e88323902f63662aa53c9b88988", + "git_sha": "34ac993e081b32d2170ab790d0386b74122f9d36", "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "4fc983ad0b30e6e32696fa7d980c76c7bfe1c03e", + "git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7", "installed_by": ["modules"] }, "ensemblvep/filtervep": { "branch": "master", - "git_sha": "1e6b8886d30f7a7129dcd1ff46ef3a20038294d5", + "git_sha": "c60c14b285b89bdd0607e371417dadb80385ad6e", "installed_by": ["modules"] }, "ensemblvep/vep": { @@ -53,12 +53,12 @@ }, "fastp": { "branch": "master", - "git_sha": "b90b5cd93149a1b3be263d916c7234fe0708a71c", + "git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7", "installed_by": ["modules"] }, "fastqc": { "branch": "master", - "git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd", + "git_sha": "b49b8992e5271ce427f3a7cdb29628fc58400eb5", "installed_by": ["modules"] }, "gatk4/asereadcounter": { @@ -78,12 +78,12 @@ }, "gatk4/haplotypecaller": { "branch": "master", - "git_sha": "d742e3143f2ccb8853c29b35cfcf50b5e5026980", + "git_sha": "c332ea831f95f750be962c4b5de655f7a1e6e245", "installed_by": ["modules"] }, "gatk4/splitncigarreads": { "branch": "master", - "git_sha": "1e15ad71d9022293985dd02e24186e5e496a0b3c", + "git_sha": "e4e61bf24a6069b762c21d5f3649c91237163f86", "installed_by": ["modules"] }, "gatk4/variantfiltration": { @@ -103,22 +103,22 @@ }, "gunzip": { "branch": "master", - "git_sha": "3a5fef109d113b4997c9822198664ca5f2716208", + "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "314d742bdb357a1df5f9b88427b3b6ac78aa33f7", + "git_sha": "fe9614c5d1d9820dae56a5e30a07ba336db45835", "installed_by": ["modules"] }, "picard/collectinsertsizemetrics": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "0dee12b56ccecc416d6f7a1ccd85fd571eab3307", "installed_by": ["modules"] }, "picard/collectrnaseqmetrics": { "branch": "master", - "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "git_sha": "0dee12b56ccecc416d6f7a1ccd85fd571eab3307", "installed_by": ["modules"] }, "salmon/index": { @@ -139,7 +139,7 @@ }, "samtools/index": { "branch": "master", - "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", + "git_sha": "46eca555142d6e597729fcb682adcc791796f514", "installed_by": ["modules"] }, "samtools/view": { @@ -149,27 +149,27 @@ }, "star/align": { "branch": "master", - "git_sha": "a21faa6a3481af92a343a10926f59c189a2c16c9", + "git_sha": "46eca555142d6e597729fcb682adcc791796f514", "installed_by": ["modules"] }, "star/genomegenerate": { "branch": "master", - "git_sha": "a21faa6a3481af92a343a10926f59c189a2c16c9", + "git_sha": "46eca555142d6e597729fcb682adcc791796f514", "installed_by": ["modules"] }, "stringtie/stringtie": { "branch": "master", - "git_sha": "b1b959609bda44341120aed1766329909f54b8d0", + "git_sha": "c789476080a150f87066ca3ed42a622339a26c0b", "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", - "git_sha": "09d3c8c29b31a2dfd610305b10550f0e1dbcd4a9", + "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", - "git_sha": "9502adb23c0b97ed8e616bbbdfa73b4585aec9a1", + "git_sha": "0840b387799172e77510393ed09e4d4ec1bc6d7c", "installed_by": ["modules"] }, "ucsc/wigtobigwig": { @@ -179,7 +179,7 @@ }, "untar": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", "installed_by": ["modules"] } } diff --git a/modules/local/bootstrapann.nf b/modules/local/bootstrapann.nf index 9b7fe988..3acc744d 100644 --- a/modules/local/bootstrapann.nf +++ b/modules/local/bootstrapann.nf @@ -8,8 +8,7 @@ process BOOTSTRAPANN { 'biocontainers/pydamage:0.70--pyhdfd78af_0' }" input: - tuple val(meta), path(vcf), path(tbi) - tuple val(meta2), path(csv) + tuple val(meta), path(vcf), path(tbi), path(csv) output: tuple val(meta), path("*.vcf"), emit: vcf diff --git a/modules/local/build_vep_cache.nf b/modules/local/build_vep_cache.nf new file mode 100644 index 00000000..c83c41ac --- /dev/null +++ b/modules/local/build_vep_cache.nf @@ -0,0 +1,60 @@ +process BUILD_VEP_CACHE { + tag "build_vep_cache" + label 'process_short' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" + + input: + path(vep_reference_files) + path(gnomad_files) + + output: + path("vep_cache") , emit: vep_cache + path("vep_plugin_files.csv"), emit: vep_plugin_file + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + # Create file listing all vep plugins to use. Note that file extension must be .csv + + echo "vep_files" > vep_plugin_files.csv + mkdir vep_cache + mkdir vep_cache/vep_plugins + + for file_path in ${vep_reference_files} ${gnomad_files}; do + file_name=\$(basename "\$file_path") + if [ -d "\${file_path}" ]; then + # If it's a directory, copy it to vep_cache + cp -r "\${file_path}" vep_cache/. + echo "vep_cache/\${file_name}" >> vep_plugin_files.csv + elif [ -f "\${file_path}" ]; then + # If it's a file, copy it to vep_cache/vep_plugins + cp "\${file_path}" vep_cache/vep_plugins/. + echo "vep_cache/vep_plugins/\${file_name}" >> vep_plugin_files.csv + fi + done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + END_VERSIONS + """ + + stub: + """ + mkdir vep_cache + touch vep_plugin_files.csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + END_VERSIONS + """ + +} diff --git a/modules/local/gencode_download.nf b/modules/local/gencode_download.nf new file mode 100644 index 00000000..63f93b41 --- /dev/null +++ b/modules/local/gencode_download.nf @@ -0,0 +1,51 @@ +process GENCODE_DOWNLOAD { + tag "gencode" + label 'process_low' + + conda "bioconda::gnu-wget=1.18" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gnu-wget:1.18--h5bf99c6_5' : + 'quay.io/biocontainers/gnu-wget:1.18--h5bf99c6_5' }" + + input: + val genome + val genome_gencode_version + val download + + output: + path("*.fa") , optional:true, emit: fasta + path("*.gtf") , optional:true, emit: gtf + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def folder_gencode = genome.contains("38") ? "" : "/${genome}_mapping" + def gtf_file_name = genome.contains("38") ? "gencode.v${genome_gencode_version}.primary_assembly.annotation.gtf.gz" : "gencode.v${genome_gencode_version}lift${genome_gencode_version}.annotation.gtf.gz" + """ + if [[ "${download}" == 'fasta' ]]; then + wget https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_${genome_gencode_version}$folder_gencode/${genome}.primary_assembly.genome.fa.gz + gunzip ${genome}.primary_assembly.genome.fa.gz + fi + if [[ "${download}" == 'gtf' ]]; then + wget https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_${genome_gencode_version}$folder_gencode/$gtf_file_name + gunzip $gtf_file_name + fi + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + END_VERSIONS + """ + + stub: + """ + touch ${genome}.primary_assembly.genome.fa + touch gencode.v${genome_gencode_version}.primary_assembly.annotation.gtf + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + END_VERSIONS + """ + +} diff --git a/modules/local/vep_gnomad_download.nf b/modules/local/vep_gnomad_download.nf new file mode 100644 index 00000000..caa0f0e1 --- /dev/null +++ b/modules/local/vep_gnomad_download.nf @@ -0,0 +1,63 @@ +process VEP_GNOMAD_DOWNLOAD { + tag "vep_gnomad_download" + label 'process_very_long' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bcftools:1.20--h8b25389_0': + 'biocontainers/bcftools:1.20--h8b25389_0' }" + + input: + val genome + val vep_cache_version + + output: + tuple path("*.vcf.gz"), path("*.vcf.gz.tbi"), emit: gnomad_vcf_tbi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def gnomad_version2download = "${genome}".contains("38") ? "4.0": "2.1.1" + def base_gnomad_path="https://storage.googleapis.com/gcp-public-data--gnomad/release/${gnomad_version2download}/vcf/genomes/gnomad.genomes." + + """ + # Gnomad + if [[ "${genome}" == *"38"* ]]; then + for chr in {1..22} X Y; do + wget ${base_gnomad_path}v${gnomad_version2download}.sites.chr\${chr}.vcf.bgz --timeout=0 + wget ${base_gnomad_path}v${gnomad_version2download}.sites.chr\${chr}.vcf.bgz.tbi + done + else + wget ${base_gnomad_path}r${gnomad_version2download}.sites.vcf.bgz --timeout=0 + wget ${base_gnomad_path}r${gnomad_version2download}.sites.vcf.bgz.tbi + fi + if [[ "${genome}" == *"38"* ]]; then + bcftools concat gnomad.genomes.*${gnomad_version2download}.sites.chr{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,X,Y}.vcf.bgz | bcftools annotate --output-type z --output gnomad_v${gnomad_version2download}.vcf.gz --include 'FILTER="PASS"' --remove ^INFO/AF,INFO/AF_grpmax,INFO/AF_popmax --threads $task.cpus --write-index=tbi + else + bcftools annotate --output-type z --output gnomad_v${gnomad_version2download}.vcf.gz --include 'FILTER="PASS"' --remove ^INFO/AF,INFO/AF_grpmax,INFO/AF_popmax --threads $task.cpus --write-index=tbi gnomad.genomes.*${gnomad_version2download}.sites.vcf.bgz + fi + rm gnomad.genomes.*${gnomad_version2download}.*.vcf.bgz* + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + + stub: + """ + touch gnomad_v${gnomad_version2download}.vcf.gz + touch gnomad_v${gnomad_version2download}.vcf.gz.tbi + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + +} diff --git a/modules/local/wget_download.nf b/modules/local/wget_download.nf new file mode 100644 index 00000000..a20480a2 --- /dev/null +++ b/modules/local/wget_download.nf @@ -0,0 +1,47 @@ +process WGET_DOWNLOAD { + tag "wget_gunzip" + label 'process_low' + + conda "bioconda::gnu-wget=1.18" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gnu-wget:1.18--h5bf99c6_5' : + 'quay.io/biocontainers/gnu-wget:1.18--h5bf99c6_5' }" + + input: + tuple val(meta), val(path_wget) + + output: + path(meta), emit: downloaded_file + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def filename = path_wget.split('/').last() + """ + + wget $path_wget + + if [[ $filename == *.tar.gz ]]; then + tar -xzf $filename + else + mv $filename $meta + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + END_VERSIONS + """ + + stub: + """ + touch $meta + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wget: \$(echo wget -V 2>&1 | grep "GNU Wget" | cut -d" " -f3 > versions.yml) + END_VERSIONS + """ + +} diff --git a/modules/nf-core/bcftools/annotate/tests/main.nf.test b/modules/nf-core/bcftools/annotate/tests/main.nf.test index 8cd87abc..fa499de7 100644 --- a/modules/nf-core/bcftools/annotate/tests/main.nf.test +++ b/modules/nf-core/bcftools/annotate/tests/main.nf.test @@ -17,11 +17,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -47,11 +47,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), []] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -76,11 +76,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -109,11 +109,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -142,11 +142,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -174,11 +174,11 @@ nextflow_process { process { """ input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), []]) - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = Channel.of( '##INFO=', '##INFO=' @@ -208,11 +208,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -236,11 +236,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -265,11 +265,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } @@ -294,11 +294,11 @@ nextflow_process { process { """ input[0] = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true)] - input[1] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi', checkIfExists: true) input[3] = [] """ } diff --git a/modules/nf-core/bcftools/mpileup/tests/main.nf.test b/modules/nf-core/bcftools/mpileup/tests/main.nf.test index dc35c542..665a349f 100644 --- a/modules/nf-core/bcftools/mpileup/tests/main.nf.test +++ b/modules/nf-core/bcftools/mpileup/tests/main.nf.test @@ -18,12 +18,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), [] ] input[1] = [ [ id:'sarscov2' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = false """ @@ -51,12 +51,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), [] ] input[1] = [ [ id:'sarscov2' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = false """ @@ -82,12 +82,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), [] ] input[1] = [ [ id:'sarscov2' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = true """ @@ -116,12 +116,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), [] ] input[1] = [ [ id:'sarscov2' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = true """ @@ -148,12 +148,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] input[1] = [ [ id:'sarscov2' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = false """ @@ -181,12 +181,12 @@ nextflow_process { """ input[0] = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] input[1] = [ [ id:'sarscov2' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] input[2] = false """ diff --git a/modules/nf-core/bcftools/view/tests/main.nf.test b/modules/nf-core/bcftools/view/tests/main.nf.test index 14a7283d..1e60c50d 100644 --- a/modules/nf-core/bcftools/view/tests/main.nf.test +++ b/modules/nf-core/bcftools/view/tests/main.nf.test @@ -18,8 +18,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -49,8 +49,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -83,8 +83,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -117,8 +117,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -151,11 +151,11 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] - input[1] = file(params.test_data['sarscov2']['illumina']['test3_vcf_gz'], checkIfExists: true) - input[2] = file(params.test_data['sarscov2']['illumina']['test2_vcf_targets_tsv_gz'], checkIfExists: true) + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test3.vcf.gz', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.targets.tsv.gz', checkIfExists: true) input[3] = [] """ } @@ -183,8 +183,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -215,8 +215,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -245,8 +245,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] @@ -275,8 +275,8 @@ nextflow_process { """ input[0] = [ [ id:'out', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi', checkIfExists: true) ] input[1] = [] input[2] = [] diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index f132b2ad..b68e5f91 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -53,9 +53,9 @@ process CAT_FASTQ { def prefix = task.ext.prefix ?: "${meta.id}" def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] if (meta.single_end) { - if (readList.size > 1) { + if (readList.size >= 1) { """ - touch ${prefix}.merged.fastq.gz + echo '' | gzip > ${prefix}.merged.fastq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -64,10 +64,10 @@ process CAT_FASTQ { """ } } else { - if (readList.size > 2) { + if (readList.size >= 2) { """ - touch ${prefix}_1.merged.fastq.gz - touch ${prefix}_2.merged.fastq.gz + echo '' | gzip > ${prefix}_1.merged.fastq.gz + echo '' | gzip > ${prefix}_2.merged.fastq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test index a71dcb8d..f88a78b6 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test +++ b/modules/nf-core/cat/fastq/tests/main.nf.test @@ -13,9 +13,6 @@ nextflow_process { test("test_cat_fastq_single_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -38,9 +35,6 @@ nextflow_process { test("test_cat_fastq_paired_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -65,9 +59,6 @@ nextflow_process { test("test_cat_fastq_single_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -90,9 +81,6 @@ nextflow_process { test("test_cat_fastq_paired_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -117,9 +105,129 @@ nextflow_process { test("test_cat_fastq_single_end_single_file") { when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_same_name - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end_same_name - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + """ } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_single_file - stub") { + + options "-stub" + + when { process { """ input[0] = Channel.of([ diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index 43dfe28f..aec119a9 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -28,6 +28,10 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-01-17T17:30:39.816981" }, "test_cat_fastq_single_end_same_name": { @@ -59,6 +63,10 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-01-17T17:32:35.229332" }, "test_cat_fastq_single_end_single_file": { @@ -90,6 +98,10 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-01-17T17:34:00.058829" }, "test_cat_fastq_paired_end_same_name": { @@ -127,8 +139,123 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-01-17T17:33:33.031555" }, + "test_cat_fastq_single_end - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T12:07:28.244999" + }, + "test_cat_fastq_paired_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "versions": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T12:07:57.070911" + }, + "test_cat_fastq_single_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T12:07:46.796254" + }, "test_cat_fastq_paired_end": { "content": [ { @@ -164,6 +291,86 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-01-17T17:32:02.270935" + }, + "test_cat_fastq_paired_end - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "versions": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T12:07:37.807553" + }, + "test_cat_fastq_single_end_single_file - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T12:14:51.861264" } } \ No newline at end of file diff --git a/modules/nf-core/ensemblvep/filtervep/main.nf b/modules/nf-core/ensemblvep/filtervep/main.nf index 7eec3cb7..cef3c7f4 100644 --- a/modules/nf-core/ensemblvep/filtervep/main.nf +++ b/modules/nf-core/ensemblvep/filtervep/main.nf @@ -47,4 +47,3 @@ process ENSEMBLVEP_FILTERVEP { END_VERSIONS """ } - diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index df60ff61..e1b9f565 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -106,14 +106,16 @@ process FASTP { stub: def prefix = task.ext.prefix ?: "${meta.id}" def is_single_output = task.ext.args?.contains('--interleaved_in') || meta.single_end - def touch_reads = (is_single_output && !discard_trimmed_pass) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_2.fastp.fastq.gz" + def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_2.fastp.fastq.gz" def touch_merged = (!is_single_output && save_merged) ? "echo '' | gzip > ${prefix}.merged.fastq.gz" : "" + def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_1.fail.fastq.gz ; echo '' | gzip > ${prefix}_2.fail.fastq.gz" """ $touch_reads + $touch_fail_fastq + $touch_merged touch "${prefix}.fastp.json" touch "${prefix}.fastp.html" touch "${prefix}.fastp.log" - $touch_merged cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test index a659ebd9..30dbb8aa 100644 --- a/modules/nf-core/fastp/tests/main.nf.test +++ b/modules/nf-core/fastp/tests/main.nf.test @@ -28,28 +28,33 @@ nextflow_process { then { assertAll( { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, { assert snapshot( - process.out.reads, process.out.json, - process.out.versions).match() }, - { assert process.out.reads_fail == [] }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") } + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("test_fastp_single_end-stub") { - - options '-stub' + test("test_fastp_paired_end") { when { + process { """ + adapter_fasta = [] + save_trimmed_pass = true + save_trimmed_fail = false + save_merged = false + input[0] = Channel.of([ - [ id:'test', single_end:true ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) input[1] = [] input[2] = false @@ -60,29 +65,29 @@ nextflow_process { } then { - assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("test_fastp_paired_end") { + test("fastp test_fastp_interleaved") { + config './nextflow.interleaved.config' when { - process { """ - adapter_fasta = [] - save_trimmed_pass = true - save_trimmed_fail = false - save_merged = false - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] ]) input[1] = [] input[2] = false @@ -95,34 +100,31 @@ nextflow_process { then { assertAll( { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("paired end (151 cycles + 151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, + { assert process.out.reads_fail == [] }, + { assert process.out.reads_merged == [] }, { assert snapshot( process.out.reads, process.out.json, - process.out.versions).match() }, - { assert process.out.reads_fail == [] }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") } + process.out.versions).match() } ) } } - test("test_fastp_paired_end - stub") { - - options '-stub' + test("test_fastp_single_end_trim_fail") { when { process { """ input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) input[1] = [] input[2] = false - input[3] = false + input[3] = true input[4] = false """ } @@ -131,24 +133,32 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("fastp test_fastp_interleaved") { + test("test_fastp_paired_end_trim_fail") { - config './nextflow.interleaved.config' + config './nextflow.save_failed.config' when { process { """ input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] ]) input[1] = [] input[2] = false - input[3] = false + input[3] = true input[4] = false """ } @@ -157,35 +167,32 @@ nextflow_process { then { assertAll( { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, { assert snapshot( process.out.reads, + process.out.reads_fail, + process.out.reads_merged, process.out.json, - process.out.versions).match() }, - { assert process.out.reads_fail == [] }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("paired end (151 cycles + 151 cycles)") } + process.out.versions).match() } ) } } - test("fastp test_fastp_interleaved - stub") { - - options '-stub' + test("test_fastp_paired_end_merged") { - config './nextflow.interleaved.config' when { - process { """ input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) input[1] = [] input[2] = false input[3] = false - input[4] = false + input[4] = true """ } } @@ -193,25 +200,32 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("total reads: 75") }, + { assert snapshot( + process.out.json, + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.versions).match() }, ) } } - test("test_fastp_single_end_trim_fail") { + test("test_fastp_paired_end_merged_adapterlist") { when { - process { """ input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = [] + input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) input[2] = false - input[3] = true - input[4] = false + input[3] = false + input[4] = true """ } } @@ -219,32 +233,30 @@ nextflow_process { then { assertAll( { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("
") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("total bases: 13683") }, { assert snapshot( + process.out.json, process.out.reads, process.out.reads_fail, - process.out.json, - process.out.versions).match() }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("test_fastp_paired_end_trim_fail") { + test("test_fastp_single_end_qc_only") { - config './nextflow.save_failed.config' when { process { """ input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) input[1] = [] - input[2] = false - input[3] = true + input[2] = true + input[3] = false input[4] = false """ } @@ -253,19 +265,22 @@ nextflow_process { then { assertAll( { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, { assert snapshot( + process.out.json, + process.out.reads, process.out.reads, process.out.reads_fail, - process.out.json, - process.out.versions).match() }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") } + process.out.reads_fail, + process.out.reads_merged, + process.out.reads_merged, + process.out.versions).match() } ) } } - test("test_fastp_paired_end_merged") { + test("test_fastp_paired_end_qc_only") { when { process { @@ -276,9 +291,9 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) input[1] = [] - input[2] = false + input[2] = true input[3] = false - input[4] = true + input[4] = false """ } } @@ -286,34 +301,37 @@ nextflow_process { then { assertAll( { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, { assert snapshot( + process.out.json, process.out.reads, + process.out.reads, + process.out.reads_fail, + process.out.reads_fail, process.out.reads_merged, - process.out.json, - process.out.versions).match() }, - { assert process.out.reads_fail == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("total reads: 75") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") } + process.out.reads_merged, + process.out.versions).match() } ) } } - test("test_fastp_paired_end_merged-stub") { + test("test_fastp_single_end - stub") { - options '-stub' + options "-stub" when { + process { """ input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) input[1] = [] input[2] = false input[3] = false - input[4] = true + input[4] = false """ } } @@ -321,25 +339,33 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_merged_adapterlist") { + test("test_fastp_paired_end - stub") { + + options "-stub" when { + process { """ + adapter_fasta = [] + save_trimmed_pass = true + save_trimmed_fail = false + save_merged = false + input[0] = Channel.of([ [ id:'test', single_end:false ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) - input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) + input[1] = [] input[2] = false input[3] = false - input[4] = true + input[4] = false """ } } @@ -347,29 +373,25 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.reads, - process.out.reads_merged, - process.out.json, - process.out.versions).match() }, - { assert process.out.reads_fail == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("total bases: 13683") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("
") } + { assert snapshot(process.out).match() } ) } } - test("test_fastp_single_end_qc_only") { + test("fastp - stub test_fastp_interleaved") { + + options "-stub" + config './nextflow.interleaved.config' when { process { """ input[0] = Channel.of([ - [ id:'test', single_end:true ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] ]) input[1] = [] - input[2] = true + input[2] = false input[3] = false input[4] = false """ @@ -379,55 +401,101 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.json, - process.out.versions).match() }, - { assert process.out.reads == [] }, - { assert process.out.reads_fail == [] }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert snapshot(process.out).match() } ) } } - test("test_fastp_single_end_qc_only-stub") { + test("test_fastp_single_end_trim_fail - stub") { - options '-stub' + options "-stub" when { + process { """ input[0] = Channel.of([ - [ id:'test', single_end:true ], + [ id:'test', single_end:true ], // meta map [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) input[1] = [] - input[2] = true - input[3] = false + input[2] = false + input[3] = true input[4] = false """ } } then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_trim_fail - stub") { + options "-stub" + + config './nextflow.save_failed.config' + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + input[1] = [] + input[2] = false + input[3] = true + input[4] = false + """ + } + } + + then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_qc_only") { + test("test_fastp_paired_end_merged - stub") { + + options "-stub" when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + ]) + input[1] = [] + input[2] = false + input[3] = false + input[4] = true + """ } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_merged_adapterlist - stub") { + + options "-stub" + + when { process { """ input[0] = Channel.of([ @@ -435,6 +503,33 @@ nextflow_process { [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] ]) + input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) + input[2] = false + input[3] = false + input[4] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_single_end_qc_only - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) input[1] = [] input[2] = true input[3] = false @@ -446,24 +541,14 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot( - process.out.reads, - process.out.reads_merged, - process.out.reads_fail, - process.out.json, - process.out.versions).match() }, - { assert process.out.reads == [] }, - { assert process.out.reads_fail == [] }, - { assert process.out.reads_merged == [] }, - { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert snapshot(process.out).match() } ) } } - test("test_fastp_paired_end_qc_only-stub") { + test("test_fastp_paired_end_qc_only - stub") { - options '-stub' + options "-stub" when { process { @@ -484,7 +569,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap index b609b9a2..54be7e45 100644 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -1,24 +1,15 @@ { - "test_fastp_paired_end_qc_only-stub": { + "test_fastp_single_end_qc_only - stub": { "content": [ { "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] + ], "1": [ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -27,7 +18,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -36,7 +27,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -54,7 +45,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -63,7 +54,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -72,22 +63,13 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] + ], "reads_fail": [ @@ -104,10 +86,19 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-08T05:42:26.603745039" + "timestamp": "2024-07-05T14:31:10.841098" }, "test_fastp_paired_end": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + ] + ], [ [ { @@ -119,6 +110,48 @@ "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T13:43:28.665779" + }, + "test_fastp_paired_end_merged_adapterlist": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,5914ca3f21ce162123a824e33e8564f6" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + ] + ] + ], + [ + ], [ [ @@ -126,7 +159,95 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], + [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T13:44:18.210375" + }, + "test_fastp_single_end_qc_only": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,5cc5f01e449309e0e689ed6f51a2294a" + ] + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T13:44:27.380974" + }, + "test_fastp_paired_end_trim_fail": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" + ] + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", + "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + ] + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" ] ], [ @@ -137,9 +258,9 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:02:09.747686552" + "timestamp": "2024-07-05T13:43:58.749589" }, - "fastp test_fastp_interleaved - stub": { + "fastp - stub test_fastp_interleaved": { "content": [ { "0": [ @@ -238,97 +359,248 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:03:09.374379128" + "timestamp": "2024-07-05T13:50:00.270029" }, - "test_fastp_paired_end_merged_adapterlist": { + "test_fastp_single_end - stub": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, + { + "0": [ [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,5914ca3f21ce162123a824e33e8564f6" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] + } ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:04:47.637461379" + "timestamp": "2024-07-05T13:49:42.502789" }, - "test_fastp_single_end_qc_only": { + "test_fastp_paired_end_merged_adapterlist - stub": { "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,5cc5f01e449309e0e689ed6f51a2294a" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] + } ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T20:11:50.885505279" + "timestamp": "2024-07-05T13:54:53.458252" }, - "test_fastp_single_end-stub": { + "test_fastp_paired_end_merged - stub": { "content": [ { "0": [ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ] ], "1": [ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -337,7 +609,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -346,7 +618,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -355,7 +627,13 @@ ], "5": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ], "6": [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -364,7 +642,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -373,7 +651,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -382,7 +660,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -391,16 +669,25 @@ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + [ + "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ] ], "reads_fail": [ ], "reads_merged": [ - + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] ], "versions": [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -411,9 +698,9 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:01:55.987280865" + "timestamp": "2024-07-05T13:50:27.689379" }, - "test_fastp_paired_end_trim_fail": { + "test_fastp_paired_end_merged": { "content": [ [ [ @@ -421,10 +708,7 @@ "id": "test", "single_end": false }, - [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" - ] + "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" ] ], [ @@ -434,11 +718,13 @@ "single_end": false }, [ - "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] + ], + [ + ], [ [ @@ -446,7 +732,7 @@ "id": "test", "single_end": false }, - "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" ] ], [ @@ -457,7 +743,7 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:03:46.458766801" + "timestamp": "2024-07-05T13:44:08.68476" }, "test_fastp_paired_end - stub": { "content": [ @@ -564,52 +850,19 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-08T05:36:36.446112695" + "timestamp": "2024-07-05T13:49:51.679221" }, - "test_fastp_paired_end_merged": { + "test_fastp_single_end": { "content": [ [ [ { "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - [ - { - "id": "test", - "single_end": false + "single_end": true }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" + "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc" ] ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-10T13:04:09.964580373" - }, - "test_fastp_single_end": { - "content": [ [ [ { @@ -620,13 +873,10 @@ ] ], [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc" - ] + + ], + [ + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -636,28 +886,25 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:01:34.044931225" + "timestamp": "2024-07-05T13:43:18.834322" }, - "test_fastp_paired_end_merged-stub": { + "test_fastp_single_end_trim_fail - stub": { "content": [ { "0": [ [ { "id": "test", - "single_end": false + "single_end": true }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "1": [ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -666,7 +913,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -675,22 +922,22 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "4": [ - - ], - "5": [ [ { "id": "test", - "single_end": false + "single_end": true }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] + ], + "5": [ + ], "6": [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -699,7 +946,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -708,7 +955,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -717,7 +964,7 @@ [ { "id": "test", - "single_end": false + "single_end": true }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -726,25 +973,22 @@ [ { "id": "test", - "single_end": false + "single_end": true }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "reads_fail": [ - - ], - "reads_merged": [ [ { "id": "test", - "single_end": false + "single_end": true }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] + ], + "reads_merged": [ + ], "versions": [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -755,16 +999,16 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-08T05:39:42.022707162" + "timestamp": "2024-07-05T14:05:36.898142" }, - "test_fastp_single_end_qc_only-stub": { + "test_fastp_paired_end_trim_fail - stub": { "content": [ { "0": [ [ { "id": "test", - "single_end": true + "single_end": false }, [ "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", @@ -776,7 +1020,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -785,7 +1029,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -794,13 +1038,23 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "4": [ - + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] ], "5": [ @@ -812,7 +1066,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -821,7 +1075,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -830,7 +1084,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -839,7 +1093,7 @@ [ { "id": "test", - "single_end": true + "single_end": false }, [ "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", @@ -848,7 +1102,17 @@ ] ], "reads_fail": [ - + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] ], "reads_merged": [ @@ -862,7 +1126,7 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:05:31.722431847" + "timestamp": "2024-07-05T14:05:49.212847" }, "fastp test_fastp_interleaved": { "content": [ @@ -892,7 +1156,7 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-07T22:35:04.608948751" + "timestamp": "2024-07-05T13:43:38.910832" }, "test_fastp_single_end_trim_fail": { "content": [ @@ -902,7 +1166,7 @@ "id": "test", "single_end": true }, - "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" + "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5" ] ], [ @@ -911,7 +1175,7 @@ "id": "test", "single_end": true }, - "test.fail.fastq.gz:md5,3e4aaadb66a5b8fc9b881bf39c227abd" + "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" ] ], [ @@ -920,8 +1184,11 @@ "id": "test", "single_end": true }, - "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5" + "test.fail.fastq.gz:md5,3e4aaadb66a5b8fc9b881bf39c227abd" ] + ], + [ + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -931,10 +1198,19 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T13:03:23.130471376" + "timestamp": "2024-07-05T13:43:48.22378" }, "test_fastp_paired_end_qc_only": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,623064a45912dac6f2b64e3f2e9901df" + ] + ], [ ], @@ -945,13 +1221,13 @@ ], [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,623064a45912dac6f2b64e3f2e9901df" - ] + + ], + [ + + ], + [ + ], [ "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" @@ -961,6 +1237,95 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-10T20:12:14.00927619" + "timestamp": "2024-07-05T13:44:36.334938" + }, + "test_fastp_paired_end_qc_only - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions": [ + "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-05T14:31:27.096468" } } \ No newline at end of file diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index d79f1c86..d8989f48 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -26,7 +26,10 @@ process FASTQC { def rename_to = old_new_pairs*.join(' ').join(' ') def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ') - def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') + // The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory) + // https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222 + // Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label + def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') / task.cpus // FastQC memory value allowed range (100 - 10000) def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb) diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index 70edae4d..e9d79a07 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -23,17 +23,14 @@ nextflow_process { then { 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:
Mon 2 Oct 2023
test.gz
- // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 - - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_single") } + { 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:
Mon 2 Oct 2023
test.gz
+ // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -54,16 +51,14 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, - { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, - { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, - { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, - { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_paired") } + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -83,13 +78,11 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_interleaved") } + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -109,13 +102,11 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_bam") } + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -138,22 +129,20 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, - { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, - { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, - { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, - { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, - { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, - { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, - { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, - { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_multiple") } + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, + { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, + { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } @@ -173,21 +162,18 @@ nextflow_process { then { assertAll ( - { assert process.success }, - - { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - - { assert snapshot(process.out.versions).match("fastqc_versions_custom_prefix") } + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } ) } } test("sarscov2 single-end [fastq] - stub") { - options "-stub" - + options "-stub" when { process { """ @@ -201,12 +187,123 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out.html.collect { file(it[1]).getName() } + - process.out.zip.collect { file(it[1]).getName() } + - process.out.versions ).match("fastqc_stub") } + { assert process.success }, + { assert snapshot(process.out).match() } ) } } + test("sarscov2 paired-end [fastq] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 interleaved [fastq] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 paired-end [bam] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 multiple [fastq] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 custom_prefix - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'mysample', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } } diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap index 86f7c311..d5db3092 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -1,88 +1,392 @@ { - "fastqc_versions_interleaved": { + "sarscov2 custom_prefix": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:40:07.293713" + "timestamp": "2024-07-22T11:02:16.374038" }, - "fastqc_stub": { + "sarscov2 single-end [fastq] - stub": { "content": [ - [ - "test.html", - "test.zip", - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:24.993809" + }, + "sarscov2 custom_prefix - stub": { + "content": [ + { + "0": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:31:01.425198" + "timestamp": "2024-07-22T11:03:10.93942" }, - "fastqc_versions_multiple": { + "sarscov2 interleaved [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:40:55.797907" + "timestamp": "2024-07-22T11:01:42.355718" }, - "fastqc_versions_bam": { + "sarscov2 paired-end [bam]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:40:26.795862" + "timestamp": "2024-07-22T11:01:53.276274" }, - "fastqc_versions_single": { + "sarscov2 multiple [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:39:27.043675" + "timestamp": "2024-07-22T11:02:05.527626" }, - "fastqc_versions_paired": { + "sarscov2 paired-end [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:31.188871" + }, + "sarscov2 paired-end [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:34.273566" + }, + "sarscov2 multiple [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:39:47.584191" + "timestamp": "2024-07-22T11:03:02.304411" }, - "fastqc_versions_custom_prefix": { + "sarscov2 single-end [fastq]": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:19.095607" + }, + "sarscov2 interleaved [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:44.640184" + }, + "sarscov2 paired-end [bam] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-01-31T17:41:14.576531" + "timestamp": "2024-07-22T11:02:53.550742" } } \ No newline at end of file diff --git a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test index a124bff5..18d35f49 100644 --- a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test +++ b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test @@ -17,14 +17,14 @@ nextflow_process { """ input[0] = [ [ id:'test_bam' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), [], [] ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] input[4] = [ [], [] ] input[5] = [ [], [] ] @@ -35,9 +35,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_bam_input") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_bam_input") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } @@ -50,14 +53,14 @@ nextflow_process { """ input[0] = [ [ id:'test_cram' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), [], [] ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] input[4] = [ [], [] ] input[5] = [ [], [] ] """ @@ -67,9 +70,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_input") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_input") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } @@ -82,16 +88,16 @@ nextflow_process { """ input[0] = [ [ id:'test_cram_sites' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), [], [] ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] - input[4] = [ [ id:'test_sites' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) ] - input[5] = [ [ id:'test_sites_tbi' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] + input[4] = [ [ id:'test_sites' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists: true) ] + input[5] = [ [ id:'test_sites_tbi' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists: true) ] """ } } @@ -99,9 +105,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_input_with_sites") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_input_with_sites") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } @@ -114,16 +123,16 @@ nextflow_process { """ input[0] = [ [ id:'test_cram_sites_dragstr' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), [], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_dragstrmodel'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/test_paired_end_sorted_dragstrmodel.txt', checkIfExists: true) ] - input[1] = [ [ id:'test_fa' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'test_fai' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'test_dict' ], file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) ] - input[4] = [ [ id:'test_sites' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) ] - input[5] = [ [ id:'test_sites_tbi' ], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) ] + input[1] = [ [ id:'test_fa' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'test_dict' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) ] + input[4] = [ [ id:'test_sites' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz', checkIfExists: true) ] + input[5] = [ [ id:'test_sites_tbi' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi', checkIfExists: true) ] """ } } @@ -131,9 +140,12 @@ nextflow_process { then { assertAll( { assert process.success }, - // { assert snapshot(process.out).match() }, // Unstable hashes - { assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_dragstr_input_with_sites") }, - { assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_dragstr_input_with_sites") }, + { assert snapshot( + file(process.out.vcf[0][1]).name, + file(process.out.tbi[0][1]).name, + process.out.versions + ).match() + } ) } diff --git a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap index 375025ee..0203fcfc 100644 --- a/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap +++ b/modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap @@ -1,82 +1,58 @@ { - "gatk_hc_vcf_cram_dragstr_input_with_sites": { + "homo_sapiens - [cram, crai] - fasta - fai - dict": { "content": [ - "test_cram_sites_dragstr.vcf.gz" + "test_cram.vcf.gz", + "test_cram.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:24:45.142682" + "timestamp": "2024-08-14T09:36:54.158605" }, - "gatk_hc_vcf_bam_input": { + "homo_sapiens - [cram, crai] - fasta - fai - dict - sites - sites_tbi": { "content": [ - "test_bam.vcf.gz" + "test_cram_sites.vcf.gz", + "test_cram_sites.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:23:19.203837" + "timestamp": "2024-08-14T09:37:13.77024" }, - "gatk_hc_vcf_cram_input": { + "homo_sapiens - [bam, bai] - fasta - fai - dict": { "content": [ - "test_cram.vcf.gz" + "test_bam.vcf.gz", + "test_bam.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:23:48.434615" + "timestamp": "2024-08-14T09:36:34.77631" }, - "gatk_hc_vcf_cram_input_with_sites": { + "homo_sapiens - [cram, crai, dragstr_model] - fasta - fai - dict - sites - sites_tbi": { "content": [ - "test_cram_sites.vcf.gz" + "test_cram_sites_dragstr.vcf.gz", + "test_cram_sites_dragstr.vcf.gz.tbi", + [ + "versions.yml:md5,05431a0ab28c85412c8b3582e863a7ab" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-20T13:24:17.147745" - }, - "gatk_hc_vcf_tbi_bam_input": { - "content": [ - "test_bam.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:23:19.23048" - }, - "gatk_hc_vcf_tbi_cram_input": { - "content": [ - "test_cram.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:23:48.45958" - }, - "gatk_hc_vcf_tbi_cram_dragstr_input_with_sites": { - "content": [ - "test_cram_sites_dragstr.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:24:45.154818" - }, - "gatk_hc_vcf_tbi_cram_input_with_sites": { - "content": [ - "test_cram_sites.vcf.gz.tbi" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-20T13:24:17.158138" + "timestamp": "2024-08-14T09:37:32.967085" } } \ No newline at end of file diff --git a/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test b/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test index b4910126..7a5eee09 100644 --- a/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test +++ b/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test @@ -14,10 +14,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test' ], file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists:true), []] - input[1] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) ] + input[0] = [ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), []] + input[1] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) ] """ } } @@ -25,7 +25,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam.get(0).get(1)).name).match("test_gatk4_splitncigarreads") } + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() + } ) } @@ -36,10 +40,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test' ], file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists:true), file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] - input[1] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) ] + input[0] = [ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)] + input[1] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) ] """ } } @@ -47,7 +51,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam.get(0).get(1)).name).match("test_gatk4_splitncigarreads_intervals") } + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() + } ) } @@ -60,10 +68,10 @@ nextflow_process { when { process { """ - input[0] = [ [ id:'test' ], file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), [], []] - input[1] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - input[2] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) ] - input[3] = [ [ id:'reference' ], file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) ] + input[0] = [ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true), [], []] + input[1] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + input[2] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ] + input[3] = [ [ id:'reference' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true) ] """ } } @@ -71,7 +79,11 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.bam.get(0).get(1)).name).match("test_gatk4_splitncigarreads_stub") } + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() + } ) } diff --git a/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test.snap b/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test.snap index 3e581ceb..5a348453 100644 --- a/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test.snap +++ b/modules/nf-core/gatk4/splitncigarreads/tests/main.nf.test.snap @@ -1,32 +1,41 @@ { "test_gatk4_splitncigarreads_intervals": { "content": [ - "test.bam" + "test.bam", + [ + "versions.yml:md5,52030c97dd7da1d3e0df9475cc3f67cb" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-15T08:26:10.91960579" + "timestamp": "2024-08-16T12:29:41.948726" }, "test_gatk4_splitncigarreads_stub": { "content": [ - "test.bam" + "test.bam", + [ + "versions.yml:md5,52030c97dd7da1d3e0df9475cc3f67cb" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-15T08:26:32.322712467" + "timestamp": "2024-08-16T12:29:53.2252" }, "test_gatk4_splitncigarreads": { "content": [ - "test.bam" + "test.bam", + [ + "versions.yml:md5,52030c97dd7da1d3e0df9475cc3f67cb" + ] ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-02-15T08:25:53.532205456" + "timestamp": "2024-08-16T12:29:30.774423" } } \ No newline at end of file diff --git a/modules/nf-core/gunzip/environment.yml b/modules/nf-core/gunzip/environment.yml index 25910b34..dfc02a7b 100644 --- a/modules/nf-core/gunzip/environment.yml +++ b/modules/nf-core/gunzip/environment.yml @@ -4,4 +4,6 @@ channels: - bioconda - defaults dependencies: - - conda-forge::sed=4.7 + - conda-forge::grep=3.11 + - conda-forge::sed=4.8 + - conda-forge::tar=1.34 diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf index 468a6f28..5e67e3b9 100644 --- a/modules/nf-core/gunzip/main.nf +++ b/modules/nf-core/gunzip/main.nf @@ -4,8 +4,8 @@ process GUNZIP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:22.04' : + 'nf-core/ubuntu:22.04' }" input: tuple val(meta), path(archive) @@ -18,8 +18,11 @@ process GUNZIP { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - gunzip = archive.toString() - '.gz' + def args = task.ext.args ?: '' + def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1] + def name = archive.toString() - '.gz' - ".$extension" + def prefix = task.ext.prefix ?: name + gunzip = prefix + ".$extension" """ # Not calling gunzip itself because it creates files # with the original group ownership rather than the @@ -37,7 +40,11 @@ process GUNZIP { """ stub: - gunzip = archive.toString() - '.gz' + def args = task.ext.args ?: '' + def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1] + def name = archive.toString() - '.gz' - ".$extension" + def prefix = task.ext.prefix ?: name + gunzip = prefix + ".$extension" """ touch $gunzip cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml index 231034f2..f32973a0 100644 --- a/modules/nf-core/gunzip/meta.yml +++ b/modules/nf-core/gunzip/meta.yml @@ -37,3 +37,4 @@ maintainers: - "@joseespinosa" - "@drpatelh" - "@jfy133" + - "@gallvp" diff --git a/modules/nf-core/gunzip/tests/main.nf.test b/modules/nf-core/gunzip/tests/main.nf.test index 6406008e..776211ad 100644 --- a/modules/nf-core/gunzip/tests/main.nf.test +++ b/modules/nf-core/gunzip/tests/main.nf.test @@ -33,4 +33,89 @@ nextflow_process { } + test("Should run without failures - prefix") { + + config './nextflow.config' + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = Channel.of([ + [ id: 'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("Should run without failures - stub") { + + options '-stub' + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = Channel.of([ + [], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("Should run without failures - prefix - stub") { + + options '-stub' + config './nextflow.config' + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = Channel.of([ + [ id: 'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + ) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + } diff --git a/modules/nf-core/gunzip/tests/main.nf.test.snap b/modules/nf-core/gunzip/tests/main.nf.test.snap index 720fd9ff..069967e7 100644 --- a/modules/nf-core/gunzip/tests/main.nf.test.snap +++ b/modules/nf-core/gunzip/tests/main.nf.test.snap @@ -1,4 +1,70 @@ { + "Should run without failures - prefix - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + ], + "gunzip": [ + [ + { + "id": "test" + }, + "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-25T11:35:10.861293" + }, + "Should run without failures - stub": { + "content": [ + { + "0": [ + [ + [ + + ], + "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + ], + "gunzip": [ + [ + [ + + ], + "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-25T11:35:05.857145" + }, "Should run without failures": { "content": [ { @@ -26,6 +92,43 @@ ] } ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2023-10-17T15:35:37.690477896" + }, + "Should run without failures - prefix": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "1": [ + "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + ], + "gunzip": [ + [ + { + "id": "test" + }, + "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "versions": [ + "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-25T11:33:32.921739" } } \ No newline at end of file diff --git a/modules/nf-core/gunzip/tests/nextflow.config b/modules/nf-core/gunzip/tests/nextflow.config new file mode 100644 index 00000000..dec77642 --- /dev/null +++ b/modules/nf-core/gunzip/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: GUNZIP { + ext.prefix = { "${meta.id}.xyz" } + } +} diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index ecb7dd7b..a31464c9 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::multiqc=1.22.3 + - bioconda::multiqc=1.24.1 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 2581a496..d5365800 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,14 +3,16 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.22.3--pyhdfd78af_0' : - 'biocontainers/multiqc:1.22.3--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.24.1--pyhdfd78af_0' : + 'biocontainers/multiqc:1.24.1--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) + path(replace_names) + path(sample_names) output: path "*multiqc_report.html", emit: report @@ -23,16 +25,22 @@ process MULTIQC { script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' def config = multiqc_config ? "--config $multiqc_config" : '' def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' def logo = multiqc_logo ? /--cl-config 'custom_logo: "${multiqc_logo}"'/ : '' + def replace = replace_names ? "--replace-names ${replace_names}" : '' + def samples = sample_names ? "--sample-names ${sample_names}" : '' """ multiqc \\ --force \\ $args \\ $config \\ + $prefix \\ $extra_config \\ $logo \\ + $replace \\ + $samples \\ . cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index 45a9bc35..382c08cb 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -29,6 +29,19 @@ input: type: file description: Optional logo file for MultiQC pattern: "*.{png}" + - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" output: - report: type: file diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index f1c4242e..33316a7d 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -8,6 +8,8 @@ nextflow_process { tag "modules_nfcore" tag "multiqc" + config "./nextflow.config" + test("sarscov2 single-end [fastqc]") { when { @@ -17,6 +19,8 @@ nextflow_process { input[1] = [] input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } @@ -41,6 +45,8 @@ nextflow_process { input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true)) input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } @@ -66,6 +72,8 @@ nextflow_process { input[1] = [] input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index 0a4760e4..83fa080c 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,14 +2,14 @@ "multiqc_versions_single": { "content": [ [ - "versions.yml:md5,bf3b209659477254bb8fa5a9405f9984" + "versions.yml:md5,6eb13f3b11bbcbfc98ad3166420ff760" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-25T12:31:21.878452033" + "timestamp": "2024-07-10T12:41:34.562023" }, "multiqc_stub": { "content": [ @@ -17,25 +17,25 @@ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,bf3b209659477254bb8fa5a9405f9984" + "versions.yml:md5,6eb13f3b11bbcbfc98ad3166420ff760" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-25T12:32:02.322196503" + "timestamp": "2024-07-10T11:27:11.933869532" }, "multiqc_versions_config": { "content": [ [ - "versions.yml:md5,bf3b209659477254bb8fa5a9405f9984" + "versions.yml:md5,6eb13f3b11bbcbfc98ad3166420ff760" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-25T12:31:50.064227638" + "timestamp": "2024-07-10T11:26:56.709849369" } -} \ No newline at end of file +} diff --git a/modules/nf-core/multiqc/tests/nextflow.config b/modules/nf-core/multiqc/tests/nextflow.config new file mode 100644 index 00000000..c537a6a3 --- /dev/null +++ b/modules/nf-core/multiqc/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = null + } +} diff --git a/modules/nf-core/picard/collectinsertsizemetrics/environment.yml b/modules/nf-core/picard/collectinsertsizemetrics/environment.yml index 73ba7dc6..87a8c7d8 100644 --- a/modules/nf-core/picard/collectinsertsizemetrics/environment.yml +++ b/modules/nf-core/picard/collectinsertsizemetrics/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/collectinsertsizemetrics/main.nf b/modules/nf-core/picard/collectinsertsizemetrics/main.nf index 06c4bc17..99153992 100644 --- a/modules/nf-core/picard/collectinsertsizemetrics/main.nf +++ b/modules/nf-core/picard/collectinsertsizemetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTINSERTSIZEMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/picard/collectrnaseqmetrics/environment.yml b/modules/nf-core/picard/collectrnaseqmetrics/environment.yml index 542b2e82..1dfb9654 100644 --- a/modules/nf-core/picard/collectrnaseqmetrics/environment.yml +++ b/modules/nf-core/picard/collectrnaseqmetrics/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::picard=3.1.1 + - bioconda::picard=3.2.0 diff --git a/modules/nf-core/picard/collectrnaseqmetrics/main.nf b/modules/nf-core/picard/collectrnaseqmetrics/main.nf index f833a105..0c8f2cfa 100644 --- a/modules/nf-core/picard/collectrnaseqmetrics/main.nf +++ b/modules/nf-core/picard/collectrnaseqmetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTRNASEQMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : - 'biocontainers/picard:3.1.1--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.2.0--hdfd78af_0' : + 'biocontainers/picard:3.2.0--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index b523c21b..e002585b 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -35,10 +35,11 @@ process SAMTOOLS_INDEX { """ stub: + def args = task.ext.args ?: '' + def extension = file(input).getExtension() == 'cram' ? + "crai" : args.contains("-c") ? "csi" : "bai" """ - touch ${input}.bai - touch ${input}.crai - touch ${input}.csi + touch ${input}.${extension} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test index bb7756d1..ca34fb5c 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -9,11 +9,7 @@ nextflow_process { tag "samtools/index" test("bai") { - when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -27,18 +23,13 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.bai).match("bai") }, - { assert snapshot(process.out.versions).match("bai_versions") } + { assert snapshot(process.out).match() } ) } } test("crai") { - when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -52,20 +43,83 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.crai).match("crai") }, - { assert snapshot(process.out.versions).match("crai_versions") } + { assert snapshot(process.out).match() } ) } } test("csi") { - config "./csi.nextflow.config" when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + file(process.out.csi[0][1]).name, + process.out.versions + ).match() } + ) + } + } + + test("bai - stub") { + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("crai - stub") { + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram', checkIfExists: true) + ]) + """ } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("csi - stub") { + options "-stub" + config "./csi.nextflow.config" + + when { process { """ input[0] = Channel.of([ @@ -79,8 +133,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert path(process.out.csi.get(0).get(1)).exists() }, - { assert snapshot(process.out.versions).match("csi_versions") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/samtools/index/tests/main.nf.test.snap b/modules/nf-core/samtools/index/tests/main.nf.test.snap index 52756e85..799d199c 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/index/tests/main.nf.test.snap @@ -1,74 +1,250 @@ { - "crai_versions": { + "csi - stub": { "content": [ - [ - "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" - ] + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + + ], + "crai": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-05-28T15:42:04.203740976" + "timestamp": "2024-07-22T16:51:53.9057" }, - "csi_versions": { + "crai - stub": { "content": [ - [ - "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" - ] + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-05-28T15:42:09.57475878" + "timestamp": "2024-07-22T16:51:45.931558" }, - "crai": { + "bai - stub": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" ] - ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-12T18:41:38.446424" + "timestamp": "2024-07-22T16:51:34.807525" }, - "bai": { + "csi": { "content": [ + "test.paired_end.sorted.bam.csi", [ - [ - { - "id": "test", - "single_end": false - }, - "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" - ] + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-12T18:40:46.579747" + "timestamp": "2024-07-22T16:52:55.688799" }, - "bai_versions": { + "crai": { "content": [ - [ - "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" - ] + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T16:51:17.609533" + }, + "bai": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ], + "crai": [ + + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,802c9776d9c5e95314e888cf18e96d77" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-05-28T15:41:57.929287369" + "timestamp": "2024-07-22T16:51:04.16585" } } \ No newline at end of file diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf index 8e9c48b1..ae67e004 100644 --- a/modules/nf-core/star/align/main.nf +++ b/modules/nf-core/star/align/main.nf @@ -81,6 +81,8 @@ process STAR_ALIGN { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ + echo "" | gzip > ${prefix}.unmapped_1.fastq.gz + echo "" | gzip > ${prefix}.unmapped_2.fastq.gz touch ${prefix}Xd.out.bam touch ${prefix}.Log.final.out touch ${prefix}.Log.out @@ -89,8 +91,6 @@ process STAR_ALIGN { touch ${prefix}.toTranscriptome.out.bam touch ${prefix}.Aligned.unsort.out.bam touch ${prefix}.Aligned.sortedByCoord.out.bam - touch ${prefix}.unmapped_1.fastq.gz - touch ${prefix}.unmapped_2.fastq.gz touch ${prefix}.tab touch ${prefix}.SJ.out.tab touch ${prefix}.ReadsPerGene.out.tab diff --git a/modules/nf-core/star/align/tests/main.nf.test b/modules/nf-core/star/align/tests/main.nf.test index 6ecd7786..2d9f72dd 100644 --- a/modules/nf-core/star/align/tests/main.nf.test +++ b/modules/nf-core/star/align/tests/main.nf.test @@ -9,27 +9,367 @@ nextflow_process { tag "star/align" tag "star/genomegenerate" - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" + test("homo_sapiens - single_end") { + config "./nextflow.config" + + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + + when { process { """ input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true) ] ]) - input[1] = Channel.of([ + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ [ id:'test_gtf' ], [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] ]) + input[3] = false + input[4] = 'illumina' + input[5] = false """ } } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log_final[0][1]).name, + file(process.out.log_out[0][1]).name, + file(process.out.log_progress[0][1]).name, + process.out.bam, + process.out.bam_sorted, + process.out.bam_transcript, + process.out.bam_unsorted, + process.out.bedgraph, + process.out.fastq, + process.out.junction, + process.out.read_per_gene_tab, + process.out.sam, + process.out.spl_junc_tab, + process.out.tab, + process.out.wig, + process.out.versions + ).match() } + ) + } } - test("homo_sapiens - single_end") { + test("homo_sapiens - paired_end") { + config "./nextflow.config" + + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + input[3] = false + input[4] = 'illumina' + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log_final[0][1]).name, + file(process.out.log_out[0][1]).name, + file(process.out.log_progress[0][1]).name, + process.out.bam, + process.out.bam_sorted, + process.out.bam_transcript, + process.out.bam_unsorted, + process.out.bedgraph, + process.out.fastq, + process.out.junction, + process.out.read_per_gene_tab, + process.out.sam, + process.out.spl_junc_tab, + process.out.tab, + process.out.wig, + process.out.versions + ).match() } + ) + } + } + + test("homo_sapiens - paired_end - arriba") { + config "./nextflow.arriba.config" + + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + input[3] = false + input[4] = 'illumina' + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log_final[0][1]).name, + file(process.out.log_out[0][1]).name, + file(process.out.log_progress[0][1]).name, + process.out.bam, + process.out.bam_sorted, + process.out.bam_transcript, + process.out.bam_unsorted, + process.out.bedgraph, + process.out.fastq, + process.out.junction, + process.out.read_per_gene_tab, + process.out.sam, + process.out.spl_junc_tab, + process.out.tab, + process.out.wig, + process.out.versions + ).match() } + ) + } + } + + test("homo_sapiens - paired_end - starfusion") { + config "./nextflow.starfusion.config" + + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + input[3] = false + input[4] = 'illumina' + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log_final[0][1]).name, + file(process.out.log_out[0][1]).name, + file(process.out.log_progress[0][1]).name, + process.out.bam, + process.out.bam_sorted, + process.out.bam_transcript, + process.out.bam_unsorted, + process.out.bedgraph, + process.out.fastq, + process.out.junction, + process.out.read_per_gene_tab, + process.out.sam, + process.out.spl_junc_tab, + process.out.tab, + process.out.wig, + process.out.versions + ).match() } + ) + } + } + + test("homo_sapiens - paired_end - multiple") { config "./nextflow.config" + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + input[3] = false + input[4] = 'illumina' + input[5] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.log_final[0][1]).name, + file(process.out.log_out[0][1]).name, + file(process.out.log_progress[0][1]).name, + process.out.bam, + process.out.bam_sorted, + process.out.bam_transcript, + process.out.bam_unsorted, + process.out.bedgraph, + process.out.fastq, + process.out.junction, + process.out.read_per_gene_tab, + process.out.sam, + process.out.spl_junc_tab, + process.out.tab, + process.out.wig, + process.out.versions + ).match() } + ) + } + } + + test("homo_sapiens - single_end - stub") { + options "-stub" + config "./nextflow.config" + + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + when { process { """ @@ -52,29 +392,33 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.log_final[0][1]).name).match("homo_sapiens - single_end - log_final") }, - { assert snapshot(file(process.out.log_out[0][1]).name).match("homo_sapiens - single_end - log_out") }, - { assert snapshot(process.out.bam).match("homo_sapiens - single_end - bam") }, - { assert snapshot(process.out.bam_sorted).match("homo_sapiens - single_end - bam_sorted") }, - { assert snapshot(process.out.bam_transcript).match("homo_sapiens - single_end - bam_transcript") }, - { assert snapshot(process.out.bam_unsorted).match("homo_sapiens - single_end - bam_unsorted") }, - { assert snapshot(process.out.bedgraph).match("homo_sapiens - single_end - bedgraph") }, - { assert snapshot(process.out.fastq).match("homo_sapiens - single_end - fastq") }, - { assert snapshot(process.out.junction).match("homo_sapiens - single_end - junction") }, - { assert snapshot(process.out.log_progress).match("homo_sapiens - single_end - log_progress") }, - { assert snapshot(process.out.read_per_gene_tab).match("homo_sapiens - single_end - read_per_gene_tab") }, - { assert snapshot(process.out.sam).match("homo_sapiens - single_end - sam") }, - { assert snapshot(process.out.spl_junc_tab).match("homo_sapiens - single_end - spl_junc_tab") }, - { assert snapshot(process.out.tab).match("homo_sapiens - single_end - tab") }, - { assert snapshot(process.out.wig).match("homo_sapiens - single_end - wig") }, - { assert snapshot(process.out.versions).match("homo_sapiens - single_end - versions") } + { assert snapshot(process.out).match() } ) } } - test("homo_sapiens - paired_end") { + test("homo_sapiens - paired_end - stub") { + options "-stub" config "./nextflow.config" + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + when { process { """ @@ -100,29 +444,33 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.log_final[0][1]).name).match("homo_sapiens - paired_end - log_final") }, - { assert snapshot(file(process.out.log_out[0][1]).name).match("homo_sapiens - paired_end - log_out") }, - { assert snapshot(process.out.bam).match("homo_sapiens - paired_end - bam") }, - { assert snapshot(process.out.bam_sorted).match("homo_sapiens - paired_end - bam_sorted") }, - { assert snapshot(process.out.bam_transcript).match("homo_sapiens - paired_end - bam_transcript") }, - { assert snapshot(process.out.bam_unsorted).match("homo_sapiens - paired_end - bam_unsorted") }, - { assert snapshot(process.out.bedgraph).match("homo_sapiens - paired_end - bedgraph") }, - { assert snapshot(process.out.fastq).match("homo_sapiens - paired_end - fastq") }, - { assert snapshot(process.out.junction).match("homo_sapiens - paired_end - junction") }, - { assert snapshot(process.out.log_progress).match("homo_sapiens - paired_end - log_progress") }, - { assert snapshot(process.out.read_per_gene_tab).match("homo_sapiens - paired_end - read_per_gene_tab") }, - { assert snapshot(process.out.sam).match("homo_sapiens - paired_end - sam") }, - { assert snapshot(process.out.spl_junc_tab).match("homo_sapiens - paired_end - spl_junc_tab") }, - { assert snapshot(process.out.tab).match("homo_sapiens - paired_end - tab") }, - { assert snapshot(process.out.wig).match("homo_sapiens - paired_end - wig") }, - { assert snapshot(process.out.versions).match("homo_sapiens - paired_end - versions") } + { assert snapshot(process.out).match() } ) } } - test("homo_sapiens - paired_end - arriba") { + test("homo_sapiens - paired_end - arriba - stub") { + options "-stub" config "./nextflow.arriba.config" + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + when { process { """ @@ -148,29 +496,33 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.log_final[0][1]).name).match("homo_sapiens - paired_end - arriba - log_final") }, - { assert snapshot(file(process.out.log_out[0][1]).name).match("homo_sapiens - paired_end - arriba - log_out") }, - { assert snapshot(file(process.out.log_progress[0][1]).name).match("homo_sapiens - paired_end - arriba - log_progress") }, - { assert snapshot(process.out.bam).match("homo_sapiens - paired_end - arriba - bam") }, - { assert snapshot(process.out.bam_sorted).match("homo_sapiens - paired_end - arriba - bam_sorted") }, - { assert snapshot(process.out.bam_transcript).match("homo_sapiens - paired_end - arriba - bam_transcript") }, - { assert snapshot(process.out.bam_unsorted).match("homo_sapiens - paired_end - arriba - bam_unsorted") }, - { assert snapshot(process.out.bedgraph).match("homo_sapiens - paired_end - arriba - bedgraph") }, - { assert snapshot(process.out.fastq).match("homo_sapiens - paired_end - arriba - fastq") }, - { assert snapshot(process.out.junction).match("homo_sapiens - paired_end - arriba - junction") }, - { assert snapshot(process.out.read_per_gene_tab).match("homo_sapiens - paired_end - arriba - read_per_gene_tab") }, - { assert snapshot(process.out.sam).match("homo_sapiens - paired_end - arriba - sam") }, - { assert snapshot(process.out.spl_junc_tab).match("homo_sapiens - paired_end - arriba - spl_junc_tab") }, - { assert snapshot(process.out.tab).match("homo_sapiens - paired_end - arriba - tab") }, - { assert snapshot(process.out.wig).match("homo_sapiens - paired_end - arriba - wig") }, - { assert snapshot(process.out.versions).match("homo_sapiens - paired_end - arriba - versions") } + { assert snapshot(process.out).match() } ) } } - test("homo_sapiens - paired_end - starfusion") { + test("homo_sapiens - paired_end - starfusion - stub") { + options "-stub" config "./nextflow.starfusion.config" + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + when { process { """ @@ -196,29 +548,33 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.log_final[0][1]).name).match("homo_sapiens - paired_end - starfusion - log_final") }, - { assert snapshot(file(process.out.log_out[0][1]).name).match("homo_sapiens - paired_end - starfusion - log_out") }, - { assert snapshot(file(process.out.log_progress[0][1]).name).match("homo_sapiens - paired_end - starfusion - log_progress") }, - { assert snapshot(process.out.bam).match("homo_sapiens - paired_end - starfusion - bam") }, - { assert snapshot(process.out.bam_sorted).match("homo_sapiens - paired_end - starfusion - bam_sorted") }, - { assert snapshot(process.out.bam_transcript).match("homo_sapiens - paired_end - starfusion - bam_transcript") }, - { assert snapshot(process.out.bam_unsorted).match("homo_sapiens - paired_end - starfusion - bam_unsorted") }, - { assert snapshot(process.out.bedgraph).match("homo_sapiens - paired_end - starfusion - bedgraph") }, - { assert snapshot(process.out.fastq).match("homo_sapiens - paired_end - starfusion - fastq") }, - { assert snapshot(process.out.junction).match("homo_sapiens - paired_end - starfusion - junction") }, - { assert snapshot(process.out.read_per_gene_tab).match("homo_sapiens - paired_end - starfusion - read_per_gene_tab") }, - { assert snapshot(process.out.sam).match("homo_sapiens - paired_end - starfusion - sam") }, - { assert snapshot(process.out.spl_junc_tab).match("homo_sapiens - paired_end - starfusion - spl_junc_tab") }, - { assert snapshot(process.out.tab).match("homo_sapiens - paired_end - starfusion - tab") }, - { assert snapshot(process.out.wig).match("homo_sapiens - paired_end - starfusion - wig") }, - { assert snapshot(process.out.versions).match("homo_sapiens - paired_end - starfusion - versions") } + { assert snapshot(process.out).match() } ) } } - test("homo_sapiens - paired_end - multiple") { + test("homo_sapiens - paired_end - multiple - stub") { + options "-stub" config "./nextflow.config" + setup { + run("STAR_GENOMEGENERATE") { + script "../../../star/genomegenerate/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) + """ + } + } + } + when { process { """ @@ -246,22 +602,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.log_final[0][1]).name).match("homo_sapiens - paired_end - multiple - log_final") }, - { assert snapshot(file(process.out.log_out[0][1]).name).match("homo_sapiens - paired_end - multiple - log_out") }, - { assert snapshot(file(process.out.log_progress[0][1]).name).match("homo_sapiens - paired_end - multiple - log_progress") }, - { assert snapshot(process.out.bam).match("homo_sapiens - paired_end - multiple - bam") }, - { assert snapshot(process.out.bam_sorted).match("homo_sapiens - paired_end - multiple - bam_sorted") }, - { assert snapshot(process.out.bam_transcript).match("homo_sapiens - paired_end - multiple - bam_transcript") }, - { assert snapshot(process.out.bam_unsorted).match("homo_sapiens - paired_end - multiple - bam_unsorted") }, - { assert snapshot(process.out.bedgraph).match("homo_sapiens - paired_end - multiple - bedgraph") }, - { assert snapshot(process.out.fastq).match("homo_sapiens - paired_end - multiple - fastq") }, - { assert snapshot(process.out.junction).match("homo_sapiens - paired_end - multiple - junction") }, - { assert snapshot(process.out.read_per_gene_tab).match("homo_sapiens - paired_end - multiple - read_per_gene_tab") }, - { assert snapshot(process.out.sam).match("homo_sapiens - paired_end - multiple - sam") }, - { assert snapshot(process.out.spl_junc_tab).match("homo_sapiens - paired_end - multiple - spl_junc_tab") }, - { assert snapshot(process.out.tab).match("homo_sapiens - paired_end - multiple - tab") }, - { assert snapshot(process.out.wig).match("homo_sapiens - paired_end - multiple - wig") }, - { assert snapshot(process.out.versions).match("homo_sapiens - paired_end - multiple - versions") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/star/align/tests/main.nf.test.snap b/modules/nf-core/star/align/tests/main.nf.test.snap index 08edb914..c814eb56 100644 --- a/modules/nf-core/star/align/tests/main.nf.test.snap +++ b/modules/nf-core/star/align/tests/main.nf.test.snap @@ -1,382 +1,1170 @@ { - "homo_sapiens - paired_end - multiple - bam_sorted": { + "homo_sapiens - single_end - stub": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": true + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": true + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "13": [ + [ + { + "id": "test", + "single_end": true + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "14": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "15": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "4": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": true + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_sorted": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_transcript": [ + [ + { + "id": "test", + "single_end": true + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam_unsorted": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "junction": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_final": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_out": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_progress": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "read_per_gene_tab": [ + [ + { + "id": "test", + "single_end": true + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "spl_junc_tab": [ + [ + { + "id": "test", + "single_end": true + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tab": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "wig": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] - ] + } ], - "timestamp": "2023-12-04T18:01:19.968225733" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T15:16:04.712114" }, - "homo_sapiens - paired_end - multiple - wig": { + "homo_sapiens - paired_end - arriba - stub": { "content": [ - [ - - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "13": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "14": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "15": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_sorted": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_transcript": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam_unsorted": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "junction": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_final": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_out": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_progress": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "read_per_gene_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "spl_junc_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tab": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "wig": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } ], - "timestamp": "2023-11-23T13:29:01.857804" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T15:16:28.874293" }, - "homo_sapiens - paired_end - arriba - tab": { + "homo_sapiens - single_end": { "content": [ + "test.Log.final.out", + "test.Log.out", + "test.Log.progress.out", [ [ { "id": "test", - "single_end": false + "single_end": true }, - "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" + "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" ] - ] - ], - "timestamp": "2023-12-04T17:56:12.347549723" - }, - "homo_sapiens - single_end - wig": { - "content": [ + ], [ - - ] - ], - "timestamp": "2023-11-23T13:22:55.24701" - }, - "homo_sapiens - paired_end - sam": { - "content": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" + ] + ], [ - ] - ], - "timestamp": "2023-11-23T13:23:33.383818" - }, - "homo_sapiens - paired_end - arriba - versions": { - "content": [ + ], [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "timestamp": "2023-12-04T17:56:12.431212643" - }, - "homo_sapiens - paired_end - multiple - bedgraph": { - "content": [ + + ], [ [ { "id": "test", - "single_end": false + "single_end": true }, [ - "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", - "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" + "test.Signal.Unique.str1.out.bg:md5,c56fc1472776fb927eaf62d973da5f9a", + "test.Signal.UniqueMultiple.str1.out.bg:md5,e93373cf6f2a2a9506e2efdb260cdd4f" ] ] - ] - ], - "timestamp": "2023-12-04T18:01:20.07119229" - }, - "homo_sapiens - paired_end - read_per_gene_tab": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:23:33.368841" - }, - "homo_sapiens - paired_end - arriba - bedgraph": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:25:07.102537" - }, - "homo_sapiens - single_end - junction": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:22:55.185369" - }, - "homo_sapiens - paired_end - arriba - spl_junc_tab": { - "content": [ + ], + [ + + ], [ [ { "id": "test", - "single_end": false + "single_end": true }, - "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" + "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" ] - ] - ], - "timestamp": "2023-12-04T17:56:12.268388251" - }, - "homo_sapiens - single_end - sam": { - "content": [ + ], [ - - ] - ], - "timestamp": "2023-11-23T13:22:55.216183" - }, - "homo_sapiens - paired_end - fastq": { - "content": [ + [ + { + "id": "test", + "single_end": true + }, + "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" + ] + ], [ - ] - ], - "timestamp": "2023-11-23T13:23:33.327236" - }, - "homo_sapiens - single_end - versions": { - "content": [ + ], [ "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" ] ], - "timestamp": "2023-12-04T17:53:26.664210196" - }, - "homo_sapiens - paired_end - multiple - log_out": { - "content": [ - "test.Log.out" - ], - "timestamp": "2023-11-23T13:29:01.022176" - }, - "homo_sapiens - paired_end - arriba - fastq": { - "content": [ - [ - - ] - ], - "timestamp": "2023-11-23T13:25:07.15277" - }, - "homo_sapiens - paired_end - multiple - junction": { - "content": [ - [ - - ] - ], - "timestamp": "2023-11-23T13:29:01.52923" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T18:02:34.35338" }, - "homo_sapiens - paired_end - multiple - spl_junc_tab": { + "homo_sapiens - paired_end": { "content": [ + "test.Log.final.out", + "test.Log.out", + "test.Log.progress.out", [ [ { "id": "test", "single_end": false }, - "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" + "test.Aligned.sortedByCoord.out.bam:md5,b9ee1c607e07323bc1652ef3babb543f" ] - ] - ], - "timestamp": "2023-12-04T18:01:20.189486201" - }, - "homo_sapiens - paired_end - starfusion - log_final": { - "content": [ - "test.Log.final.out" - ], - "timestamp": "2023-11-23T13:27:55.905883" - }, - "homo_sapiens - paired_end - starfusion - fastq": { - "content": [ - [ - - ] - ], - "timestamp": "2023-11-23T13:27:56.192302" - }, - "homo_sapiens - paired_end - multiple - sam": { - "content": [ - [ - - ] - ], - "timestamp": "2023-11-23T13:29:01.661837" - }, - "homo_sapiens - paired_end - multiple - log_final": { - "content": [ - "test.Log.final.out" - ], - "timestamp": "2023-11-23T13:29:00.966417" - }, - "homo_sapiens - paired_end - starfusion - bam": { - "content": [ + ], [ [ { "id": "test", "single_end": false }, - "test.Aligned.out.bam:md5,bcad07b838f6762fc01eea52b5cd3f84" + "test.Aligned.sortedByCoord.out.bam:md5,b9ee1c607e07323bc1652ef3babb543f" ] - ] - ], - "timestamp": "2023-12-04T17:59:58.53235164" - }, - "homo_sapiens - paired_end - arriba - junction": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:25:07.202776" - }, - "homo_sapiens - single_end - bedgraph": { - "content": [ + ], + [ + + ], [ [ { "id": "test", - "single_end": true + "single_end": false }, [ - "test.Signal.Unique.str1.out.bg:md5,c56fc1472776fb927eaf62d973da5f9a", - "test.Signal.UniqueMultiple.str1.out.bg:md5,e93373cf6f2a2a9506e2efdb260cdd4f" + "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", + "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" ] ] - ] - ], - "timestamp": "2023-12-04T17:53:26.394863748" - }, - "homo_sapiens - paired_end - arriba - read_per_gene_tab": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:25:07.251962" - }, - "homo_sapiens - paired_end - starfusion - bam_sorted": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:27:56.040843" - }, - "homo_sapiens - single_end - bam_unsorted": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:22:55.154172" - }, - "homo_sapiens - paired_end - bam": { - "content": [ + ], + [ + + ], [ [ { "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,b9ee1c607e07323bc1652ef3babb543f" + "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" ] - ] - ], - "timestamp": "2023-12-04T17:54:11.934832258" - }, - "homo_sapiens - paired_end - arriba - bam_transcript": { - "content": [ + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" + ] + ], [ - ] - ], - "timestamp": "2023-11-23T13:25:06.998817" - }, - "homo_sapiens - paired_end - log_out": { - "content": [ - "test.Log.out" - ], - "timestamp": "2023-11-23T13:23:33.259699" - }, - "homo_sapiens - paired_end - arriba - log_out": { - "content": [ - "test.Log.out" - ], - "timestamp": "2023-11-23T13:25:06.849451" - }, - "homo_sapiens - paired_end - multiple - versions": { - "content": [ + ], [ "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" ] ], - "timestamp": "2023-12-04T18:01:20.393705142" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T18:03:16.701923" }, - "homo_sapiens - paired_end - starfusion - bam_transcript": { + "homo_sapiens - paired_end - multiple - stub": { "content": [ - [ - - ] + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "13": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "14": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "15": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_sorted": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_transcript": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam_unsorted": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "junction": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_final": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_out": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_progress": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "read_per_gene_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "spl_junc_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tab": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "wig": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } ], - "timestamp": "2023-11-23T13:27:56.082408" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T15:16:51.360287" }, - "homo_sapiens - paired_end - starfusion - tab": { + "homo_sapiens - paired_end - multiple": { "content": [ + "test.Log.final.out", + "test.Log.out", + "test.Log.progress.out", [ [ { "id": "test", "single_end": false }, - "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" + "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" ] - ] - ], - "timestamp": "2023-12-04T17:59:58.818041322" - }, - "homo_sapiens - single_end - fastq": { - "content": [ + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" + ] + ], [ - ] - ], - "timestamp": "2023-11-23T13:22:55.175307" - }, - "homo_sapiens - paired_end - tab": { - "content": [ + ], + [ + + ], [ [ { "id": "test", "single_end": false }, - "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" + [ + "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", + "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" + ] ] - ] - ], - "timestamp": "2023-12-04T17:54:12.255481058" - }, - "homo_sapiens - paired_end - starfusion - bedgraph": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:27:56.155413" - }, - "homo_sapiens - single_end - bam_transcript": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:22:55.144852" - }, - "homo_sapiens - paired_end - versions": { - "content": [ + ], [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "timestamp": "2023-12-04T17:54:12.343840482" - }, - "homo_sapiens - paired_end - multiple - tab": { - "content": [ + + ], + [ + + ], [ [ { @@ -385,385 +1173,801 @@ }, "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" ] - ] - ], - "timestamp": "2023-12-04T18:01:20.291692062" - }, - "homo_sapiens - single_end - bam": { - "content": [ + ], [ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" + "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" ] - ] - ], - "timestamp": "2023-12-04T17:53:26.265642675" - }, - "homo_sapiens - paired_end - arriba - wig": { - "content": [ + ], [ + ], + [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" ] ], - "timestamp": "2023-11-23T13:25:07.444214" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T13:13:28.987438" }, - "homo_sapiens - paired_end - log_progress": { + "homo_sapiens - paired_end - stub": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,b2bd061d6cbaaf3d6d3b1fed547f69b8" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "13": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "14": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "15": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_sorted": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_transcript": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam_unsorted": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "junction": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_final": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_out": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_progress": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "read_per_gene_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "spl_junc_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tab": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "wig": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] - ] - ], - "timestamp": "2023-12-04T17:54:12.126063825" - }, - "homo_sapiens - paired_end - arriba - log_final": { - "content": [ - "test.Log.final.out" - ], - "timestamp": "2023-11-23T13:25:06.829799" - }, - "homo_sapiens - paired_end - bam_unsorted": { - "content": [ - [ - - ] - ], - "timestamp": "2023-11-23T13:23:33.300509" - }, - "homo_sapiens - paired_end - arriba - sam": { - "content": [ - [ - - ] + } ], - "timestamp": "2023-11-23T13:25:07.300383" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T15:16:16.798018" }, - "homo_sapiens - paired_end - multiple - bam": { + "homo_sapiens - paired_end - starfusion": { "content": [ + "test.Log.final.out", + "test.Log.out", + "test.Log.progress.out", [ [ { "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" + "test.Aligned.out.bam:md5,bcad07b838f6762fc01eea52b5cd3f84" ] - ] - ], - "timestamp": "2023-12-04T18:01:19.851247126" - }, - "homo_sapiens - paired_end - multiple - fastq": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:29:01.462257" - }, - "homo_sapiens - single_end - bam_sorted": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" - ] - ] - ], - "timestamp": "2023-12-04T17:53:26.335457371" - }, - "homo_sapiens - paired_end - arriba - bam_sorted": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:25:06.94699" - }, - "homo_sapiens - paired_end - starfusion - junction": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,c10ef219f4a30e83711b995bc5e40dba" - ] - ] - ], - "timestamp": "2023-12-04T17:59:58.641115828" - }, - "homo_sapiens - single_end - tab": { - "content": [ + ], [ - [ - { - "id": "test", - "single_end": true - }, - "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" - ] - ] - ], - "timestamp": "2023-12-04T17:53:26.580593434" - }, - "homo_sapiens - paired_end - starfusion - versions": { - "content": [ + + ], [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "timestamp": "2023-12-04T17:59:58.907317103" - }, - "homo_sapiens - paired_end - multiple - bam_unsorted": { - "content": [ + + ], [ - ] - ], - "timestamp": "2023-11-23T13:29:01.330463" - }, - "homo_sapiens - paired_end - arriba - log_progress": { - "content": [ - "test.Log.progress.out" - ], - "timestamp": "2023-11-23T13:25:06.86866" - }, - "homo_sapiens - paired_end - bedgraph": { - "content": [ + ], [ [ { "id": "test", "single_end": false }, - [ - "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", - "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" - ] + "test.Chimeric.out.junction:md5,c10ef219f4a30e83711b995bc5e40dba" ] - ] - ], - "timestamp": "2023-12-04T17:54:12.064121304" - }, - "homo_sapiens - paired_end - starfusion - bam_unsorted": { - "content": [ - [ - - ] - ], - "timestamp": "2023-11-23T13:27:56.118974" - }, - "homo_sapiens - paired_end - starfusion - read_per_gene_tab": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:27:56.264699" - }, - "homo_sapiens - paired_end - multiple - log_progress": { - "content": [ - "test.Log.progress.out" - ], - "timestamp": "2023-11-23T13:29:01.076947" - }, - "homo_sapiens - paired_end - arriba - bam_unsorted": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:25:07.050409" - }, - "homo_sapiens - paired_end - bam_sorted": { - "content": [ + ], [ [ { "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,b9ee1c607e07323bc1652ef3babb543f" + "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" ] - ] - ], - "timestamp": "2023-12-04T17:54:12.002180537" - }, - "homo_sapiens - single_end - spl_junc_tab": { - "content": [ + ], [ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" + "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" ] + ], + [ + + ], + [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" ] ], - "timestamp": "2023-12-04T17:53:26.50932751" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T13:10:55.371956" }, - "homo_sapiens - paired_end - starfusion - spl_junc_tab": { + "homo_sapiens - paired_end - arriba": { "content": [ + "test.Log.final.out", + "test.Log.out", + "test.Log.progress.out", [ [ { "id": "test", "single_end": false }, - "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" + "test.Aligned.out.bam:md5,c1b1747f5873f2d17762725636e891d5" ] - ] - ], - "timestamp": "2023-12-04T17:59:58.731699486" - }, - "homo_sapiens - single_end - log_out": { - "content": [ - "test.Log.out" - ], - "timestamp": "2023-11-23T13:22:55.126286" - }, - "homo_sapiens - paired_end - log_final": { - "content": [ - "test.Log.final.out" - ], - "timestamp": "2023-11-23T13:23:33.253884" - }, - "homo_sapiens - single_end - log_final": { - "content": [ - "test.Log.final.out" - ], - "timestamp": "2023-11-23T13:22:55.11799" - }, - "homo_sapiens - paired_end - bam_transcript": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:23:33.287684" - }, - "homo_sapiens - paired_end - starfusion - log_progress": { - "content": [ - "test.Log.progress.out" - ], - "timestamp": "2023-11-23T13:27:55.971484" - }, - "homo_sapiens - paired_end - multiple - bam_transcript": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:29:01.264176" - }, - "homo_sapiens - paired_end - multiple - read_per_gene_tab": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:29:01.596406" - }, - "homo_sapiens - single_end - read_per_gene_tab": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:22:55.205936" - }, - "homo_sapiens - paired_end - junction": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:23:33.340653" - }, - "homo_sapiens - paired_end - spl_junc_tab": { - "content": [ + ], [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" - ] - ] - ], - "timestamp": "2023-12-04T17:54:12.185730856" - }, - "homo_sapiens - paired_end - starfusion - sam": { - "content": [ + + ], [ - ] - ], - "timestamp": "2023-11-23T13:27:56.300637" - }, - "homo_sapiens - paired_end - arriba - bam": { - "content": [ + ], + [ + + ], [ [ { "id": "test", "single_end": false }, - "test.Aligned.out.bam:md5,c1b1747f5873f2d17762725636e891d5" + "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" ] - ] - ], - "timestamp": "2023-12-04T17:56:12.190560178" - }, - "homo_sapiens - single_end - log_progress": { - "content": [ + ], [ [ { "id": "test", - "single_end": true + "single_end": false }, - "test.Log.progress.out:md5,b2bd061d6cbaaf3d6d3b1fed547f69b8" + "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" ] - ] - ], - "timestamp": "2023-12-04T17:53:26.450352138" - }, - "homo_sapiens - paired_end - starfusion - wig": { - "content": [ + ], [ - ] - ], - "timestamp": "2023-11-23T13:27:56.422018" - }, - "homo_sapiens - paired_end - wig": { - "content": [ + ], [ - + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" ] ], - "timestamp": "2023-11-23T13:23:33.429457" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T13:05:10.7534" }, - "homo_sapiens - paired_end - starfusion - log_out": { + "homo_sapiens - paired_end - starfusion - stub": { "content": [ - "test.Log.out" + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "12": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "13": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "14": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "15": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_sorted": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "bam_transcript": [ + [ + { + "id": "test", + "single_end": false + }, + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bam_unsorted": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "junction": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_final": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_out": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log_progress": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "read_per_gene_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "spl_junc_tab": [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tab": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" + ], + "wig": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } ], - "timestamp": "2023-11-23T13:27:55.93945" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T15:16:40.64399" } } \ No newline at end of file diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test b/modules/nf-core/star/genomegenerate/tests/main.nf.test index c17c8ba4..4d619c47 100644 --- a/modules/nf-core/star/genomegenerate/tests/main.nf.test +++ b/modules/nf-core/star/genomegenerate/tests/main.nf.test @@ -28,15 +28,15 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_gtf_index") }, - { assert snapshot(process.out.versions).match("fasta_gtf_versions") } + { assert snapshot( + file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString(), + process.out.versions) + .match() } ) } } - test("fasta_gtf_stub") { - - options '-stub' + test("fasta") { when { process { @@ -45,10 +45,7 @@ nextflow_process { [ id:'test_fasta' ], [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) + input[1] = Channel.of([ [], [] ]) """ } } @@ -56,13 +53,17 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_gtf_stub_index") }, - { assert snapshot(process.out.versions).match("fasta_gtf_stub_versions") } + { assert snapshot( + file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString(), + process.out.versions + ).match() } ) } } - test("fasta") { + test("fasta_gtf_stub") { + + options '-stub' when { process { @@ -71,7 +72,10 @@ nextflow_process { [ id:'test_fasta' ], [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] ]) - input[1] = Channel.of([ [], [] ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] + ]) """ } } @@ -79,11 +83,9 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_index") }, - { assert snapshot(process.out.versions).match("fasta_versions") } + { assert snapshot(process.out).match() } ) } - } test("fasta_stub") { @@ -105,11 +107,8 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString()).match("fasta_stub_index") }, - { assert snapshot(process.out.versions).match("fasta_stub_versions") } + { assert snapshot(process.out).match() } ) } - } - } diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap b/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap index 5653d6e6..207f4b4f 100644 --- a/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap +++ b/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap @@ -1,90 +1,148 @@ { - "fasta_gtf_versions": { + "fasta_gtf": { "content": [ + "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, exonGeTrInfo.tab, exonInfo.tab, geneInfo.tab, genomeParameters.txt, sjdbInfo.txt, sjdbList.fromGTF.out.tab, sjdbList.out.tab, transcriptInfo.tab]", [ "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-01T15:54:31.798555" + "timestamp": "2024-07-22T14:55:35.478401" }, - "fasta_stub_versions": { + "fasta_gtf_stub": { "content": [ - [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-01T15:55:07.521209" - }, - "fasta_gtf_stub_index": { - "content": [ - "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, exonGeTrInfo.tab, exonInfo.tab, geneInfo.tab, genomeParameters.txt, sjdbInfo.txt, sjdbList.fromGTF.out.tab, sjdbList.out.tab, transcriptInfo.tab]" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-01T15:54:46.478098" - }, - "fasta_gtf_stub_versions": { - "content": [ - [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ] + { + "0": [ + [ + { + "id": "test_fasta" + }, + [ + "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", + "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", + "SA:md5,d41d8cd98f00b204e9800998ecf8427e", + "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "exonGeTrInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "exonInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "geneInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sjdbInfo.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sjdbList.fromGTF.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "sjdbList.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "transcriptInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" + ], + "index": [ + [ + { + "id": "test_fasta" + }, + [ + "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", + "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", + "SA:md5,d41d8cd98f00b204e9800998ecf8427e", + "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "exonGeTrInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "exonInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "geneInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sjdbInfo.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "sjdbList.fromGTF.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "sjdbList.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", + "transcriptInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-01T15:54:46.491657" + "timestamp": "2024-07-22T14:55:57.247585" }, - "fasta_index": { + "fasta_stub": { "content": [ - "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, genomeParameters.txt]" + { + "0": [ + [ + { + "id": "test_fasta" + }, + [ + "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", + "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", + "SA:md5,d41d8cd98f00b204e9800998ecf8427e", + "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" + ], + "index": [ + [ + { + "id": "test_fasta" + }, + [ + "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", + "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", + "SA:md5,d41d8cd98f00b204e9800998ecf8427e", + "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-01T15:54:57.552329" + "timestamp": "2024-07-22T14:56:07.01742" }, - "fasta_versions": { + "fasta": { "content": [ + "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, genomeParameters.txt]", [ "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-01T15:54:57.560541" - }, - "fasta_gtf_index": { - "content": [ - "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, exonGeTrInfo.tab, exonInfo.tab, geneInfo.tab, genomeParameters.txt, sjdbInfo.txt, sjdbList.fromGTF.out.tab, sjdbList.out.tab, transcriptInfo.tab]" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-01T15:54:31.786814" - }, - "fasta_stub_index": { - "content": [ - "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, genomeParameters.txt]" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" + "nf-test": "0.9.0", + "nextflow": "24.04.3" }, - "timestamp": "2024-02-01T15:55:07.517472" + "timestamp": "2024-07-22T14:55:45.48784" } } \ No newline at end of file diff --git a/modules/nf-core/stringtie/stringtie/tests/main.nf.test b/modules/nf-core/stringtie/stringtie/tests/main.nf.test index 00efe8f1..2204e849 100644 --- a/modules/nf-core/stringtie/stringtie/tests/main.nf.test +++ b/modules/nf-core/stringtie/stringtie/tests/main.nf.test @@ -3,6 +3,7 @@ nextflow_process { name "Test Process STRINGTIE_STRINGTIE" script "../main.nf" process "STRINGTIE_STRINGTIE" + config "./nextflow.config" tag "modules" tag "modules_nfcore" tag "stringtie" @@ -10,8 +11,6 @@ nextflow_process { test("sarscov2 [bam] - forward strandedness") { - config "./nextflow.config" - when { process { """ @@ -27,17 +26,17 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.transcript_gtf).match("fs_transcript_gtf") }, - { assert snapshot(process.out.abundance).match("fs_abundance") }, - { assert snapshot(process.out.versions).match("fs_versions") } + { assert snapshot( + process.out.abundance, + process.out.transcript_gtf, + process.out.versions + ).match() } ) } } test("sarscov2 [bam] - forward strandedness + reference annotation") { - config "./nextflow.config" - when { process { """ @@ -53,18 +52,18 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.transcript_gtf).match("fs_gtf_transcript_gtf") }, - { assert snapshot(process.out.abundance).match("fs_gtf_abundance") }, - { assert snapshot(process.out.ballgown).match("fs_gtf_ballgown") }, - { assert snapshot(process.out.versions).match("fs_gtf_versions") } + { assert snapshot( + process.out.abundance, + process.out.ballgown, + process.out.transcript_gtf, + process.out.versions + ).match() } ) } } test("sarscov2 [bam] - reverse strandedness") { - config "./nextflow.config" - when { process { """ @@ -80,16 +79,117 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.transcript_gtf).match("rs_transcript_gtf") }, - { assert snapshot(process.out.abundance).match("rs_abundance") }, - { assert snapshot(process.out.versions).match("rs_versions") } + { assert snapshot( + process.out.abundance, + process.out.transcript_gtf, + process.out.versions + ).match() } ) } } test("sarscov2 [bam] - reverse strandedness + reference annotation") { - config "./nextflow.config" + when { + process { + """ + input[0] = [ + [ id:'test', strandedness:'reverse' ], // meta map + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam", checkIfExists: true) ] + ] + input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.abundance, + process.out.ballgown, + process.out.transcript_gtf, + process.out.versions + ).match() } + ) + } + } + + test("sarscov2 [bam] - forward strandedness - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', strandedness:'forward' ], // meta map + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam", checkIfExists: true) ] + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 [bam] - forward strandedness + reference annotation - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', strandedness:'forward' ], // meta map + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam", checkIfExists: true) ] + ] + input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gtf", checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 [bam] - reverse strandedness - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', strandedness:'reverse' ], // meta map + [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam", checkIfExists: true) ] + ] + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 [bam] - reverse strandedness + reference annotation - stub") { + + options "-stub" when { process { @@ -106,10 +206,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.transcript_gtf).match("rs_gtf_transcript_gtf") }, - { assert snapshot(process.out.abundance).match("rs_gtf_abundance") }, - { assert snapshot(process.out.ballgown).match("rs_gtf_ballgown") }, - { assert snapshot(process.out.versions).match("rs_gtf_versions") } + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/stringtie/stringtie/tests/main.nf.test.snap b/modules/nf-core/stringtie/stringtie/tests/main.nf.test.snap index bf751636..124dd4cb 100644 --- a/modules/nf-core/stringtie/stringtie/tests/main.nf.test.snap +++ b/modules/nf-core/stringtie/stringtie/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "fs_abundance": { + "sarscov2 [bam] - forward strandedness + reference annotation": { "content": [ [ [ @@ -7,49 +7,44 @@ "id": "test", "strandedness": "forward" }, - "test.gene.abundance.txt:md5,d6f5c8cadb8458f1df0427cf790246e3" + "test.gene.abundance.txt:md5,7d8bce7f2a922e367cedccae7267c22e" ] - ] - ], - "timestamp": "2023-11-23T13:55:41.032044613" - }, - "fs_transcript_gtf": { - "content": [ + ], [ [ { "id": "test", "strandedness": "forward" }, - "test.transcripts.gtf:md5,569137af5be452413086b50653a97203" + [ + "e2t.ctab:md5,e981c0038295ae54b63cedb1083f1540", + "e_data.ctab:md5,6b4cf69bc03f3f69890f972a0e8b7471", + "i2t.ctab:md5,8a117c8aa4334b4c2d4711932b006fb4", + "i_data.ctab:md5,be3abe09740603213f83d50dcf81427f", + "t_data.ctab:md5,3b66c065da73ae0dd41cc332eff6a818" + ] ] - ] - ], - "timestamp": "2023-11-23T13:55:41.017978904" - }, - "rs_abundance": { - "content": [ + ], [ [ { "id": "test", - "strandedness": "reverse" + "strandedness": "forward" }, - "test.gene.abundance.txt:md5,d6f5c8cadb8458f1df0427cf790246e3" + "test.transcripts.gtf:md5,f56cf8aba2c4a5673bc7963ba5f12d04" ] - ] - ], - "timestamp": "2023-11-23T13:56:13.601112933" - }, - "fs_gtf_versions": { - "content": [ + ], [ "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" ] ], - "timestamp": "2023-11-23T13:56:00.523797974" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:33:44.299962" }, - "fs_gtf_transcript_gtf": { + "sarscov2 [bam] - forward strandedness": { "content": [ [ [ @@ -57,50 +52,395 @@ "id": "test", "strandedness": "forward" }, - "test.transcripts.gtf:md5,f56cf8aba2c4a5673bc7963ba5f12d04" + "test.gene.abundance.txt:md5,d6f5c8cadb8458f1df0427cf790246e3" + ] + ], + [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.transcripts.gtf:md5,569137af5be452413086b50653a97203" ] + ], + [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" ] ], - "timestamp": "2023-11-23T13:56:00.475164879" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:33:35.177738" }, - "rs_versions": { + "sarscov2 [bam] - forward strandedness - stub": { "content": [ - [ - "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" - ] + { + "0": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ], + "abundance": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ballgown": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "coverage_gtf": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "transcript_gtf": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ] + } ], - "timestamp": "2023-11-23T13:56:13.623892691" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:36:32.885078" }, - "rs_gtf_transcript_gtf": { + "sarscov2 [bam] - forward strandedness + reference annotation - stub": { "content": [ - [ - [ - { - "id": "test", - "strandedness": "reverse" - }, - "test.transcripts.gtf:md5,bb346053a8c156b803b055133376c7fa" + { + "0": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ], + "abundance": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ballgown": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "coverage_gtf": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "transcript_gtf": [ + [ + { + "id": "test", + "strandedness": "forward" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" ] - ] + } ], - "timestamp": "2023-11-23T13:56:22.693599559" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:36:43.325777" }, - "fs_gtf_abundance": { + "sarscov2 [bam] - reverse strandedness + reference annotation - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ], + "abundance": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ballgown": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "coverage_gtf": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "transcript_gtf": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:37:06.085936" + }, + "sarscov2 [bam] - reverse strandedness - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ], + "abundance": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.gene.abundance.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ballgown": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.ballgown:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "coverage_gtf": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.coverage.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "transcript_gtf": [ + [ + { + "id": "test", + "strandedness": "reverse" + }, + "test.transcripts.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:36:53.837578" + }, + "sarscov2 [bam] - reverse strandedness + reference annotation": { "content": [ [ [ { "id": "test", - "strandedness": "forward" + "strandedness": "reverse" }, - "test.gene.abundance.txt:md5,7d8bce7f2a922e367cedccae7267c22e" + "test.gene.abundance.txt:md5,7385b870b955dae2c2ab78a70cf05cce" ] - ] - ], - "timestamp": "2023-11-23T13:56:00.482135418" - }, - "rs_gtf_ballgown": { - "content": [ + ], [ [ { @@ -115,72 +455,54 @@ "t_data.ctab:md5,3b66c065da73ae0dd41cc332eff6a818" ] ] - ] - ], - "timestamp": "2023-11-23T13:56:22.715698347" - }, - "rs_transcript_gtf": { - "content": [ + ], [ [ { "id": "test", "strandedness": "reverse" }, - "test.transcripts.gtf:md5,31c34aec2bf36bb0ea3c16c2afeeeb1f" + "test.transcripts.gtf:md5,bb346053a8c156b803b055133376c7fa" ] - ] - ], - "timestamp": "2023-11-23T13:56:13.590054035" - }, - "rs_gtf_versions": { - "content": [ + ], [ "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" ] ], - "timestamp": "2023-11-23T13:56:22.725513476" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:34:03.114695" }, - "fs_gtf_ballgown": { + "sarscov2 [bam] - reverse strandedness": { "content": [ [ [ { "id": "test", - "strandedness": "forward" + "strandedness": "reverse" }, - [ - "e2t.ctab:md5,e981c0038295ae54b63cedb1083f1540", - "e_data.ctab:md5,6b4cf69bc03f3f69890f972a0e8b7471", - "i2t.ctab:md5,8a117c8aa4334b4c2d4711932b006fb4", - "i_data.ctab:md5,be3abe09740603213f83d50dcf81427f", - "t_data.ctab:md5,3b66c065da73ae0dd41cc332eff6a818" - ] + "test.gene.abundance.txt:md5,d6f5c8cadb8458f1df0427cf790246e3" ] - ] - ], - "timestamp": "2023-11-23T13:56:00.494299817" - }, - "fs_versions": { - "content": [ - [ - "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" - ] - ], - "timestamp": "2023-11-23T13:55:41.049417582" - }, - "rs_gtf_abundance": { - "content": [ + ], [ [ { "id": "test", "strandedness": "reverse" }, - "test.gene.abundance.txt:md5,7385b870b955dae2c2ab78a70cf05cce" + "test.transcripts.gtf:md5,31c34aec2bf36bb0ea3c16c2afeeeb1f" ] + ], + [ + "versions.yml:md5,3410e8ac349d18c85ddee89337851d38" ] ], - "timestamp": "2023-11-23T13:56:22.701059059" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T12:33:52.874479" } -} +} \ No newline at end of file diff --git a/modules/nf-core/tabix/bgziptabix/environment.yml b/modules/nf-core/tabix/bgziptabix/environment.yml index c4235872..b9644de9 100644 --- a/modules/nf-core/tabix/bgziptabix/environment.yml +++ b/modules/nf-core/tabix/bgziptabix/environment.yml @@ -5,4 +5,4 @@ channels: - defaults dependencies: - bioconda::tabix=1.11 - - bioconda::htslib=1.19.1 + - bioconda::htslib=1.20 diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf index bcdcf2a6..05041f49 100644 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -4,8 +4,8 @@ process TABIX_BGZIPTABIX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/htslib:1.19.1--h81da01d_1' : - 'biocontainers/htslib:1.19.1--h81da01d_1' }" + 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : + 'biocontainers/htslib:1.20--h5efdd21_2' }" input: tuple val(meta), path(input) @@ -24,7 +24,7 @@ process TABIX_BGZIPTABIX { def prefix = task.ext.prefix ?: "${meta.id}" """ bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz - tabix $args2 ${prefix}.${input.getExtension()}.gz + tabix --threads ${task.cpus} $args2 ${prefix}.${input.getExtension()}.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test index 87ea2c84..1a84d74f 100644 --- a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test @@ -17,7 +17,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_test' ], - [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] ] """ } @@ -43,7 +43,7 @@ nextflow_process { """ input[0] = [ [ id:'csi_test' ], - [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] ] """ } @@ -72,7 +72,7 @@ nextflow_process { """ input[0] = [ [ id:'test' ], - [ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true) ] ] """ } diff --git a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap index fcecb2e4..c166ea72 100644 --- a/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/bgziptabix/tests/main.nf.test.snap @@ -8,14 +8,14 @@ "id": "tbi_test" }, "tbi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", - "tbi_test.bed.gz.tbi:md5,24908545311cf2b7c803c41d716872c4" + "tbi_test.bed.gz.tbi:md5,ca06caf88b1e3c67d5fcba0a1460b52c" ] ], "1": [ ], "2": [ - "versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc" + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" ], "gz_csi": [ @@ -26,15 +26,19 @@ "id": "tbi_test" }, "tbi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", - "tbi_test.bed.gz.tbi:md5,24908545311cf2b7c803c41d716872c4" + "tbi_test.bed.gz.tbi:md5,ca06caf88b1e3c67d5fcba0a1460b52c" ] ], "versions": [ - "versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc" + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" ] } ], - "timestamp": "2024-02-19T14:50:51.513838" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:29:16.053817543" }, "sarscov2_bed_csi": { "content": [ @@ -48,11 +52,11 @@ "id": "csi_test" }, "csi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", - "csi_test.bed.gz.csi:md5,e06165ddd34640783728cb07f2558b43" + "csi_test.bed.gz.csi:md5,c9c0377de58fdc89672bb3005a0d69f5" ] ], "2": [ - "versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc" + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" ], "gz_csi": [ [ @@ -60,35 +64,51 @@ "id": "csi_test" }, "csi_test.bed.gz:md5,fe4053cf4de3aebbdfc3be2efb125a74", - "csi_test.bed.gz.csi:md5,e06165ddd34640783728cb07f2558b43" + "csi_test.bed.gz.csi:md5,c9c0377de58fdc89672bb3005a0d69f5" ] ], "gz_tbi": [ ], "versions": [ - "versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc" + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" ] } ], - "timestamp": "2024-02-19T14:51:00.513777" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:29:27.667745444" }, "csi_test": { "content": [ "csi_test.bed.gz" ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-02-19T14:51:00.548801" }, "csi_stub": { "content": [ "test.bed.gz" ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-02-19T14:51:09.218454" }, "tbi_test": { "content": [ "tbi_test.bed.gz" ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, "timestamp": "2024-02-19T14:50:51.579654" }, "sarscov2_bed_csi_stub": { @@ -113,7 +133,7 @@ ] ], "2": [ - "versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc" + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" ], "gz_csi": [ [ @@ -134,10 +154,14 @@ ] ], "versions": [ - "versions.yml:md5,b4765e4d896ce4a4cdd6c896d12555fc" + "versions.yml:md5,736e7c3b16a3ac525253e5b5f5d8fdfa" ] } ], - "timestamp": "2024-02-19T14:51:09.164254" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T11:29:45.105209991" } } \ No newline at end of file diff --git a/modules/nf-core/tabix/tabix/environment.yml b/modules/nf-core/tabix/tabix/environment.yml index 76b45e16..4d1f9dd4 100644 --- a/modules/nf-core/tabix/tabix/environment.yml +++ b/modules/nf-core/tabix/tabix/environment.yml @@ -1,8 +1,10 @@ name: tabix_tabix + channels: - conda-forge - bioconda - defaults + dependencies: + - bioconda::htslib=1.20 - bioconda::tabix=1.11 - - bioconda::htslib=1.19.1 diff --git a/modules/nf-core/tabix/tabix/main.nf b/modules/nf-core/tabix/tabix/main.nf index 1737141d..13acd670 100644 --- a/modules/nf-core/tabix/tabix/main.nf +++ b/modules/nf-core/tabix/tabix/main.nf @@ -4,8 +4,8 @@ process TABIX_TABIX { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/htslib:1.19.1--h81da01d_1' : - 'biocontainers/htslib:1.19.1--h81da01d_1' }" + 'https://depot.galaxyproject.org/singularity/htslib:1.20--h5efdd21_2' : + 'biocontainers/htslib:1.20--h5efdd21_2' }" input: tuple val(meta), path(tab) @@ -21,7 +21,10 @@ process TABIX_TABIX { script: def args = task.ext.args ?: '' """ - tabix $args $tab + tabix \\ + --threads $task.cpus \\ + $args \\ + $tab cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -33,8 +36,8 @@ process TABIX_TABIX { """ touch ${tab}.tbi touch ${tab}.csi - cat <<-END_VERSIONS > versions.yml + cat <<-END_VERSIONS > versions.yml "${task.process}": tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test b/modules/nf-core/tabix/tabix/tests/main.nf.test index 3a150c70..102b0d7b 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test @@ -16,7 +16,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_bed' ], - [ file(params.test_data['sarscov2']['genome']['test_bed_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed.gz', checkIfExists: true) ] ] """ } @@ -25,11 +25,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.tbi[0][1]).name - ).match("tbi_bed") - } + process.out, + file(process.out.tbi[0][1]).name + ).match() } ) } } @@ -41,7 +40,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_gff' ], - [ file(params.test_data['sarscov2']['genome']['genome_gff3_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true) ] ] """ } @@ -50,11 +49,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.tbi[0][1]).name - ).match("tbi_gff") - } + process.out, + file(process.out.tbi[0][1]).name).match() } ) } @@ -67,7 +64,7 @@ nextflow_process { """ input[0] = [ [ id:'tbi_vcf' ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] ] """ } @@ -76,11 +73,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.tbi[0][1]).name - ).match("tbi_vcf") - } + process.out, + file(process.out.tbi[0][1]).name + ).match() } ) } @@ -93,7 +89,7 @@ nextflow_process { """ input[0] = [ [ id:'vcf_csi' ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] ] """ } @@ -102,11 +98,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.csi[0][1]).name - ).match("vcf_csi") - } + process.out, + file(process.out.csi[0][1]).name + ).match() } ) } @@ -120,7 +115,7 @@ nextflow_process { """ input[0] = [ [ id:'vcf_csi_stub' ], - [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ] ] """ } @@ -129,11 +124,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, { assert snapshot( - file(process.out.csi[0][1]).name - ).match("vcf_csi_stub") - } + process.out, + file(process.out.csi[0][1]).name + ).match() } ) } diff --git a/modules/nf-core/tabix/tabix/tests/main.nf.test.snap b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap index 034e38b6..c2b9ed0b 100644 --- a/modules/nf-core/tabix/tabix/tests/main.nf.test.snap +++ b/modules/nf-core/tabix/tabix/tests/main.nf.test.snap @@ -1,16 +1,4 @@ { - "vcf_csi_stub": { - "content": [ - "test.vcf.gz.csi" - ], - "timestamp": "2024-03-04T14:51:59.788002" - }, - "tbi_gff": { - "content": [ - "genome.gff3.gz.tbi" - ], - "timestamp": "2024-02-19T14:53:37.420216" - }, "sarscov2_gff_tbi": { "content": [ { @@ -19,14 +7,14 @@ { "id": "tbi_gff" }, - "genome.gff3.gz.tbi:md5,53fc683fd217aae47ef10d23c52a9178" + "genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926" ] ], "1": [ ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ @@ -36,15 +24,20 @@ { "id": "tbi_gff" }, - "genome.gff3.gz.tbi:md5,53fc683fd217aae47ef10d23c52a9178" + "genome.gff3.gz.tbi:md5,f79a67d95a98076e04fbe0455d825926" ] ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } + }, + "genome.gff3.gz.tbi" ], - "timestamp": "2024-02-19T14:53:37.388157" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:25.653807564" }, "sarscov2_bedgz_tbi": { "content": [ @@ -54,14 +47,14 @@ { "id": "tbi_bed" }, - "test.bed.gz.tbi:md5,0f17d85e7f0a042b2aa367b70df224f8" + "test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d" ] ], "1": [ ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ @@ -71,27 +64,20 @@ { "id": "tbi_bed" }, - "test.bed.gz.tbi:md5,0f17d85e7f0a042b2aa367b70df224f8" + "test.bed.gz.tbi:md5,9a761d51cc81835fd1199201fdbcdd5d" ] ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } - ], - "timestamp": "2024-02-19T14:53:28.879408" - }, - "tbi_vcf": { - "content": [ - "test.vcf.gz.tbi" - ], - "timestamp": "2024-02-19T14:53:46.402522" - }, - "vcf_csi": { - "content": [ - "test.vcf.gz.csi" + }, + "test.bed.gz.tbi" ], - "timestamp": "2024-02-19T14:53:54.921189" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:09.754082161" }, "sarscov2_vcf_tbi": { "content": [ @@ -101,14 +87,14 @@ { "id": "tbi_vcf" }, - "test.vcf.gz.tbi:md5,897f3f378a811b90e6dee56ce08d2bcf" + "test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" ] ], "1": [ ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ @@ -118,15 +104,20 @@ { "id": "tbi_vcf" }, - "test.vcf.gz.tbi:md5,897f3f378a811b90e6dee56ce08d2bcf" + "test.vcf.gz.tbi:md5,d22e5b84e4fcd18792179f72e6da702e" ] ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } + }, + "test.vcf.gz.tbi" ], - "timestamp": "2024-02-19T14:53:46.370358" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:40.042648294" }, "sarscov2_vcf_csi_stub": { "content": [ @@ -148,7 +139,7 @@ ] ], "2": [ - "versions.yml:md5,3d45df6d80883bad358631069a2940fd" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ [ @@ -167,11 +158,16 @@ ] ], "versions": [ - "versions.yml:md5,3d45df6d80883bad358631069a2940fd" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } + }, + "test.vcf.gz.csi" ], - "timestamp": "2024-03-04T14:51:59.766184" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:07:08.700367261" }, "sarscov2_vcf_csi": { "content": [ @@ -184,34 +180,33 @@ { "id": "vcf_csi" }, - "test.vcf.gz.csi:md5,0731ad6f40104d2bbb1a2cc478ef8f03" + "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" ] ], "2": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ], "csi": [ [ { "id": "vcf_csi" }, - "test.vcf.gz.csi:md5,0731ad6f40104d2bbb1a2cc478ef8f03" + "test.vcf.gz.csi:md5,04b41c1efd9ab3c6b1e008a286e27d2b" ] ], "tbi": [ ], "versions": [ - "versions.yml:md5,f4feeda7fdd4b567102f7f8e5d7037a3" + "versions.yml:md5,07064637fb8a217174052be8e40234e2" ] - } - ], - "timestamp": "2024-02-19T14:53:54.886876" - }, - "tbi_bed": { - "content": [ - "test.bed.gz.tbi" + }, + "test.vcf.gz.csi" ], - "timestamp": "2024-02-19T14:53:28.947628" + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-07-19T12:06:55.362067748" } } \ No newline at end of file diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml index 0c9cbb10..4f498244 100644 --- a/modules/nf-core/untar/environment.yml +++ b/modules/nf-core/untar/environment.yml @@ -1,11 +1,9 @@ name: untar - channels: - conda-forge - bioconda - defaults - dependencies: - conda-forge::grep=3.11 - - conda-forge::sed=4.7 + - conda-forge::sed=4.8 - conda-forge::tar=1.34 diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index 8a75bb95..9bd8f554 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -4,8 +4,8 @@ process UNTAR { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:22.04' : + 'nf-core/ubuntu:22.04' }" input: tuple val(meta), path(archive) @@ -52,8 +52,29 @@ process UNTAR { stub: prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.toString().replaceFirst(/\.[^\.]+(.gz)?$/, "")) """ - mkdir $prefix - touch ${prefix}/file.txt + mkdir ${prefix} + ## Dry-run untaring the archive to get the files and place all in prefix + if [[ \$(tar -taf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + for i in `tar -tf ${archive}`; + do + if [[ \$(echo "\${i}" | grep -E "/\$") == "" ]]; + then + touch \${i} + else + mkdir -p \${i} + fi + done + else + for i in `tar -tf ${archive}`; + do + if [[ \$(echo "\${i}" | grep -E "/\$") == "" ]]; + then + touch ${prefix}/\${i} + else + mkdir -p ${prefix}/\${i} + fi + done + fi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/untar/tests/main.nf.test b/modules/nf-core/untar/tests/main.nf.test index 2a7c97bf..c957517a 100644 --- a/modules/nf-core/untar/tests/main.nf.test +++ b/modules/nf-core/untar/tests/main.nf.test @@ -6,6 +6,7 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "untar" + test("test_untar") { when { @@ -19,10 +20,9 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.untar).match("test_untar") }, + { assert snapshot(process.out).match() }, ) } - } test("test_untar_onlyfiles") { @@ -38,10 +38,48 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out.untar).match("test_untar_onlyfiles") }, + { assert snapshot(process.out).match() }, ) } + } + + test("test_untar - stub") { + + options "-stub" + when { + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } } + test("test_untar_onlyfiles - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [], file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + } } diff --git a/modules/nf-core/untar/tests/main.nf.test.snap b/modules/nf-core/untar/tests/main.nf.test.snap index 64550292..ceb91b79 100644 --- a/modules/nf-core/untar/tests/main.nf.test.snap +++ b/modules/nf-core/untar/tests/main.nf.test.snap @@ -1,42 +1,158 @@ { "test_untar_onlyfiles": { "content": [ - [ - [ + { + "0": [ [ - - ], + [ + + ], + [ + "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ + [ + [ + + ], + [ + "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + ] + ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-10T12:04:28.231047" + }, + "test_untar_onlyfiles - stub": { + "content": [ + { + "0": [ + [ + [ + + ], + [ + "hello.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ [ - "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + [ + + ], + [ + "hello.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" ] - ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-02-28T11:49:41.320643" + "timestamp": "2024-07-10T12:04:45.773103" + }, + "test_untar - stub": { + "content": [ + { + "0": [ + [ + [ + + ], + [ + "hash.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "opts.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "taxo.k2d:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ + [ + [ + + ], + [ + "hash.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "opts.k2d:md5,d41d8cd98f00b204e9800998ecf8427e", + "taxo.k2d:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-10T12:04:36.777441" }, "test_untar": { "content": [ - [ - [ + { + "0": [ [ - - ], + [ + + ], + [ + "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", + "opts.k2d:md5,a033d00cf6759407010b21700938f543", + "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + ] + ] + ], + "1": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" + ], + "untar": [ [ - "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", - "opts.k2d:md5,a033d00cf6759407010b21700938f543", - "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + [ + + ], + [ + "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", + "opts.k2d:md5,a033d00cf6759407010b21700938f543", + "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + ] ] + ], + "versions": [ + "versions.yml:md5,6063247258c56fd271d076bb04dd7536" ] - ] + } ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.3" }, - "timestamp": "2024-02-28T11:49:33.795172" + "timestamp": "2024-07-10T12:04:19.377674" } } \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index 5c334c80..e1bedd5f 100644 --- a/nextflow.config +++ b/nextflow.config @@ -14,15 +14,20 @@ params { // References genome = 'GRCh38' + gencode_annotation_version = 37 igenomes_base = 's3://ngi-igenomes/igenomes' igenomes_ignore = false save_reference = true fasta = null fai = null + gtf = null star_index = null transcript_fasta = null salmon_index = null sequence_dict = null + skip_download_vep = true + skip_download_gnomad = true + vep_refs_download = null // Main options platform = 'illumina' @@ -54,6 +59,8 @@ params { // Variant annotation vep_cache_version = 110 + vep_cache = null + vep_plugin_files = null // MultiQC options multiqc_config = null @@ -277,7 +284,7 @@ manifest { description = """Pipeline to analyse RNAseq from raredisease patients""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '2.1.0' + version = '2.2.0' doi = '10.5281/zenodo.10828946' } @@ -288,6 +295,7 @@ includeConfig 'conf/modules/analyse_transcripts.config' includeConfig 'conf/modules/annotate_snv.config' includeConfig 'conf/modules/bam_qc.config' includeConfig 'conf/modules/call_variants.config' +includeConfig 'conf/modules/download_references.config' includeConfig 'conf/modules/igv_tracks.config' includeConfig 'conf/modules/general_tomte.config' includeConfig 'conf/modules/prepare_references.config' diff --git a/nextflow_schema.json b/nextflow_schema.json index bd08defe..aa6f52f6 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -27,7 +27,8 @@ "type": "string", "format": "directory-path", "description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.", - "fa_icon": "fas fa-folder-open" + "fa_icon": "fas fa-folder-open", + "default": "results" }, "email": { "type": "string", @@ -44,7 +45,8 @@ "save_mapped_as_cram": { "type": "boolean", "description": "Do you want to save bam as cram", - "fa_icon": "far fa-file-archive" + "fa_icon": "far fa-file-archive", + "default": true } } }, @@ -56,10 +58,11 @@ "properties": { "genome": { "type": "string", - "description": "Name of iGenomes reference, etiher hg19/GRCh37 or hg38/GRCh38, it is case sensitive.", + "description": "Name of genome reference, etiher hg19/GRCh37 or hg38/GRCh38, it is case sensitive.", "fa_icon": "fas fa-book", "enum": ["hg19", "GRCh37", "hg38", "GRCh38"], - "help_text": "If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. \n\nSee the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details." + "help_text": "If using a reference genome configured in the pipeline using iGenomes, use `--igenomes_base` to provide a path, or you want to automatically download all required files, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. \n\nSee the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details.", + "default": "GRCh38" }, "fasta": { "type": "string", @@ -68,7 +71,7 @@ "mimetype": "text/plain", "pattern": "^\\S+\\.fn?a(sta)?(\\.gz)?$", "description": "Path to FASTA genome file.", - "help_text": "This parameter is *mandatory* if `--genome` is not specified. If you don't have a STAR index available this will be generated for you automatically. Combine with `--save_reference` to save STAR index for future runs.", + "help_text": "If none provided, will be downloaded from gencode according to `--genome` and `--gencode_annotation_version`.", "fa_icon": "far fa-file-code" }, "fai": { @@ -87,7 +90,14 @@ "pattern": "^\\S+\\.gtf(\\.gz)?$", "description": "Path to GTF annotation file.", "fa_icon": "fas fa-code-branch", - "help_text": "This parameter is *mandatory* if `--genome` is not specified." + "help_text": "If none provided, will be downloaded from gencode according to `--genome` and `--gencode_annotation_version`." + }, + "gencode_annotation_version": { + "type": "integer", + "default": 37, + "description": "Name of Genomes gencode reference version to download if fasta or gtf is not provided.", + "fa_icon": "fas fa-book", + "help_text": "If fasta or gtf is not provided the gencode version specified will be downloaded. Combine with `--save_reference` to save gtf and/or fasta for future runs." }, "igenomes_ignore": { "type": "boolean", @@ -107,7 +117,8 @@ "type": "boolean", "description": "If generated by the pipeline save the required indices/references in the results directory.", "help_text": "The saved references can be used for future pipeline runs, reducing processing times.", - "fa_icon": "fas fa-save" + "fa_icon": "fas fa-save", + "default": true }, "sequence_dict": { "type": "string", @@ -163,9 +174,26 @@ "pattern": "^\\S+\\.csv$", "mimetype": "text/csv", "schema": "assets/vep_plugin_files_schema.json" + }, + "skip_download_vep": { + "type": "boolean", + "default": true, + "fa_icon": "fas fa-toggle-on", + "description": "Skip vep cache download." + }, + "skip_download_gnomad": { + "type": "boolean", + "default": true, + "description": "Skip gnomad reference download for vep.", + "fa_icon": "fas fa-toggle-on" + }, + "vep_refs_download": { + "type": "string", + "description": "Path to comma separated csv with paths to vep references to download, see example in test_data/vep_to_download.csv", + "fa_icon": "fas fa-file-csv", + "format": "file-path" } - }, - "required": ["fasta", "gtf"] + } }, "trimming_options": { "title": "Trimming options", diff --git a/subworkflows/local/allele_specific_calling.nf b/subworkflows/local/allele_specific_calling.nf index 296da783..b4a6aade 100644 --- a/subworkflows/local/allele_specific_calling.nf +++ b/subworkflows/local/allele_specific_calling.nf @@ -50,8 +50,7 @@ workflow ALLELE_SPECIFIC_CALLING { ) BOOTSTRAPANN( - ch_ind_vcf_tbi, - GATK4_ASEREADCOUNTER.out.csv + ch_ind_vcf_tbi.join(GATK4_ASEREADCOUNTER.out.csv), ) TABIX_BGZIPTABIX(BOOTSTRAPANN.out.vcf) diff --git a/subworkflows/local/download_references.nf b/subworkflows/local/download_references.nf new file mode 100644 index 00000000..29728066 --- /dev/null +++ b/subworkflows/local/download_references.nf @@ -0,0 +1,50 @@ +// +// Download reference files +// + +include { GENCODE_DOWNLOAD as FASTA_DOWNLOAD } from '../../modules/local/gencode_download' +include { GENCODE_DOWNLOAD as GTF_DOWNLOAD } from '../../modules/local/gencode_download' +include { WGET_DOWNLOAD as WGET_DOWNLOAD } from '../../modules/local/wget_download' +include { VEP_GNOMAD_DOWNLOAD } from '../../modules/local/vep_gnomad_download' +include { BUILD_VEP_CACHE } from '../../modules/local/build_vep_cache' + +workflow DOWNLOAD_REFERENCES { + take: + ch_genome // channel: [mandatory] val(genome) + ch_gencode_annotation_version // channel: [mandatory] val(gencode_annotation_version) + ch_vep_refs_download_unprocessed // channel: [optional] val(path_to_csv) + ch_vep_cache_version // channel: [optional] val(vep_cache_version) + + main: + ch_versions = Channel.empty() + + // Download fasta if not provided + FASTA_DOWNLOAD(ch_genome, ch_gencode_annotation_version, "fasta") + + // Download gtf if not provided + GTF_DOWNLOAD(ch_genome, ch_gencode_annotation_version, "gtf") + + // Read and store paths in vep_refs_download_unprocessed + ch_vep_refs_download_unprocessed.splitCsv(header: true) + .map { row -> return tuple(row.name, row.path_for_wget) } + .set { ch_vep_refs_download } + + // Download files + WGET_DOWNLOAD(ch_vep_refs_download.filter{ it != null }) + VEP_GNOMAD_DOWNLOAD(ch_genome, ch_vep_cache_version) + + BUILD_VEP_CACHE(WGET_DOWNLOAD.out.downloaded_file.collect(), VEP_GNOMAD_DOWNLOAD.out.gnomad_vcf_tbi.flatten().collect()) + + ch_versions = ch_versions.mix(FASTA_DOWNLOAD.out.versions) + ch_versions = ch_versions.mix(GTF_DOWNLOAD.out.versions) + ch_versions = ch_versions.mix(WGET_DOWNLOAD.out.versions) + ch_versions = ch_versions.mix(VEP_GNOMAD_DOWNLOAD.out.versions) + + + emit: + fasta = FASTA_DOWNLOAD.out.fasta // channel: [ path(fasta) ] + gtf = GTF_DOWNLOAD.out.gtf // channel: [ path(gtf) ] + vep_cache = BUILD_VEP_CACHE.out.vep_cache // channel: [ path(vep_cache) ] + vep_plugin = BUILD_VEP_CACHE.out.vep_plugin_file // channel: [ path(vep_plugin) ] + versions = ch_versions // channel: [ path(versions.yml) ] +} diff --git a/test_data/vep_to_download.csv b/test_data/vep_to_download.csv new file mode 100644 index 00000000..1819a0d8 --- /dev/null +++ b/test_data/vep_to_download.csv @@ -0,0 +1,4 @@ +name,path_for_wget +clinvar_20240806.vcf.gz,ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/weekly/clinvar.vcf.gz +clinvar_20240806.vcf.gz.tbi,ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/weekly/clinvar.vcf.gz.tbi +homo_sapiens_merged,https://ftp.ensembl.org/pub/release-110/variation/indexed_vep_cache/homo_sapiens_merged_vep_110_GRCh38.tar.gz diff --git a/workflows/tomte.nf b/workflows/tomte.nf index 9d00ea20..d16a1bef 100644 --- a/workflows/tomte.nf +++ b/workflows/tomte.nf @@ -13,6 +13,7 @@ include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pi // // SUBWORKFLOW: local // +include { DOWNLOAD_REFERENCES } from '../subworkflows/local/download_references' include { PREPARE_REFERENCES } from '../subworkflows/local/prepare_references' include { ALIGNMENT } from '../subworkflows/local/alignment' include { BAM_QC } from '../subworkflows/local/bam_qc' @@ -53,12 +54,30 @@ workflow TOMTE { // Mandatory ch_samples = ch_samplesheet.map { meta, fastqs -> meta } ch_case_info = ch_samples.toList().map { create_case_channel(it) } - ch_fasta = Channel.fromPath(params.fasta).map {it -> [[id:it[0].simpleName], it]}.collect() - ch_gtf = Channel.fromPath(params.gtf).map {it -> [[id:it[0].simpleName], it]}.collect() ch_platform = Channel.from(params.platform).collect() ch_foundin_header = Channel.fromPath("$projectDir/assets/foundin.hdr", checkIfExists: true).collect() // Optional + ch_vep_refs_download_unprocessed = params.vep_refs_download ? Channel.fromPath(params.vep_refs_download) + : Channel.empty() + + DOWNLOAD_REFERENCES( + params.genome, + params.gencode_annotation_version, + ch_vep_refs_download_unprocessed, + params.vep_cache_version + ).set { downloads } + ch_versions = ch_versions.mix(DOWNLOAD_REFERENCES.out.versions) + + // Optional + ch_fasta = params.fasta ? Channel.fromPath(params.fasta).map {it -> [[id:it[0].simpleName], it]}.collect() + : downloads.fasta.map {it -> [[id:it[0].simpleName], it]}.collect() + ch_gtf = params.gtf ? Channel.fromPath(params.gtf).map {it -> [[id:it[0].simpleName], it]}.collect() + : downloads.gtf.map {it -> [[id:it[0].simpleName], it]}.collect() + ch_vep_cache_unprocessed = params.vep_cache ? Channel.fromPath(params.vep_cache) + : Channel.empty().mix(downloads.vep_cache) + ch_vep_extra_files_unsplit = params.vep_plugin_files ? Channel.fromPath(params.vep_plugin_files) + : Channel.empty().mix(downloads.vep_plugin) ch_fai = params.fai ? Channel.fromPath(params.fai).map {it -> [[id:it[0].simpleName], it]}.collect() : Channel.empty() ch_gene_panel_clinical_filter = params.gene_panel_clinical_filter ? Channel.fromPath(params.gene_panel_clinical_filter).collect() @@ -79,24 +98,25 @@ workflow TOMTE { : Channel.empty() ch_subsample_bed = params.subsample_bed ? Channel.fromPath(params.subsample_bed).collect() : Channel.empty() - ch_vep_cache_unprocessed = params.vep_cache ? Channel.fromPath(params.vep_cache) - : Channel.empty() - ch_vep_extra_files_unsplit = params.vep_plugin_files ? Channel.fromPath(params.vep_plugin_files).collect() - : Channel.value([]) - // Read and store paths in the vep_plugin_files file - ch_vep_extra_files_unsplit.splitCsv ( header:true ) - .map { row -> - f = file(row.vep_files[0]) - if(f.isFile() || f.isDirectory()){ - return [f] + ch_vep_extra_files_unsplit.splitCsv(header: true) + .flatMap { row -> + row.vep_files.split(',').collect { file(it.trim()) } + } + .map { path -> + if (params.skip_download_vep) { + if(path.isFile() || path.isDirectory()) { + return path } else { - error("\nVep database file ${f} does not exist.") + error("\nVep database file ${path} does not exist.") } + } else { + return path } - .collect() - .set {ch_vep_extra_files} + } + .collect() + .set { ch_vep_extra_files } PREPARE_REFERENCES( ch_fasta, @@ -108,6 +128,7 @@ workflow TOMTE { ch_salmon_index, ch_sequence_dict ).set { ch_references } + ch_versions = ch_versions.mix(PREPARE_REFERENCES.out.versions.first()) FASTQC ( ch_samplesheet @@ -234,7 +255,9 @@ workflow TOMTE { ch_multiqc_files.collect(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), - ch_multiqc_logo.toList() + ch_multiqc_logo.toList(), + [], + [] ) emit: