From 46a4dcca8e49581e61b4c3029577900cb1ececfb Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Mon, 13 Mar 2023 15:38:46 -0500 Subject: [PATCH 01/42] Build: HOST_STAR Subworkflow Co-authored-by: Mariana Dias Guilardi --- subworkflows/local/host_star.nf | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 subworkflows/local/host_star.nf diff --git a/subworkflows/local/host_star.nf b/subworkflows/local/host_star.nf new file mode 100644 index 0000000..2784846 --- /dev/null +++ b/subworkflows/local/host_star.nf @@ -0,0 +1,42 @@ +// +// Align input reads against host genome. +// + +include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' +include { STAR_GENOMEGENERATE_GENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' + +workflow HOST_STAR { + take: + reads // channel: [ val(meta), [ reads ] ] + fasta // file: /path/to/fasta/ + gtf // file: /path/to/gtf/ + + main: + STAR_GENOMEGENEREATE ( + fasta, + gtf + ) + ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first()) + ch_star_index = STAR_GENOMEGENERATE.out.index + + STAR_ALIGN ( + reads, + ch_star_index, + gtf, + false, + "illumina", + false + ) + ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + + + emit: + reads // channel: [ val(meta), [ reads ] ] + index = ch_star_index + bam = STAR_ALIGN.out.bam + log_final = STAR_ALIGN.out.log_final + log_out = STAR_ALIGN.out.log_out + log_progress = STAR_ALIGN.out.log_progress + fastq = STAR_ALIGN.out.fastq + versions = ch_versions // channel: [ versions.yml ] +} From 74b253c4490165896af19851d6b7fe7a86bd392e Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Mon, 13 Mar 2023 15:38:46 -0500 Subject: [PATCH 02/42] Build: HOST_STAR Subworkflow Co-authored-by: Mariana Dias Guilardi --- subworkflows/local/host_star.nf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subworkflows/local/host_star.nf b/subworkflows/local/host_star.nf index 2784846..a45326d 100644 --- a/subworkflows/local/host_star.nf +++ b/subworkflows/local/host_star.nf @@ -3,7 +3,7 @@ // include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' -include { STAR_GENOMEGENERATE_GENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' +include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' workflow HOST_STAR { take: @@ -12,7 +12,9 @@ workflow HOST_STAR { gtf // file: /path/to/gtf/ main: - STAR_GENOMEGENEREATE ( + ch_versions = Channel.empty() + + STAR_GENOMEGENERATE ( fasta, gtf ) From eb0947093e2193e9a9f1a7fba36b9b85ee537874 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 15 Mar 2023 16:49:55 -0500 Subject: [PATCH 03/42] host: add trimmers --- subworkflows/local/{host_star.nf => host.nf} | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) rename subworkflows/local/{host_star.nf => host.nf} (67%) diff --git a/subworkflows/local/host_star.nf b/subworkflows/local/host.nf similarity index 67% rename from subworkflows/local/host_star.nf rename to subworkflows/local/host.nf index a45326d..3b24bc7 100644 --- a/subworkflows/local/host_star.nf +++ b/subworkflows/local/host.nf @@ -4,8 +4,10 @@ include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' +include { TRIMMOMATIC } from "../../modules/nf-core/trimmomatic/main.nf" +include { POLYA_STRIPPER } from '../../modules/local/polyA_stripper.nf' -workflow HOST_STAR { +workflow HOST { take: reads // channel: [ val(meta), [ reads ] ] fasta // file: /path/to/fasta/ @@ -31,14 +33,31 @@ workflow HOST_STAR { ) ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + TRIMMOMATIC ( + STAR_ALIGN.out.fastq + ) + ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first()) + + POLYA_STRIPPER ( + TRIMMOMATIC.out.trimmed_reads + ) + ch_versions = ch_versions.mix(POLYA_STRIPPER.out.versions.first()) + emit: reads // channel: [ val(meta), [ reads ] ] + index = ch_star_index + bam = STAR_ALIGN.out.bam log_final = STAR_ALIGN.out.log_final log_out = STAR_ALIGN.out.log_out log_progress = STAR_ALIGN.out.log_progress fastq = STAR_ALIGN.out.fastq + + trimmed_reads = TRIMMOMATIC.out.trimmed_reads + + polya_trimmed = POLYA_STRIPPER.out.polya_trimmed + versions = ch_versions // channel: [ versions.yml ] } From c66345c516886e91ec0fd3181d14f41a03eed112 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 15 Mar 2023 17:09:29 -0500 Subject: [PATCH 04/42] Build: PLUS subworkflow Co-authored-by: Mariana Guilardi --- subworkflows/local/plus.nf | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 subworkflows/local/plus.nf diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf new file mode 100644 index 0000000..de1643b --- /dev/null +++ b/subworkflows/local/plus.nf @@ -0,0 +1,45 @@ +// +// Align filtered reads against combined host and viral reference. +// + +include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' +include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' + +workflow PLUS { + take: + reads // channel: [ val(meta), [ reads ] ] + fasta // file: /path/to/fasta/ + gtf // file: /path/to/gtf/ + + main: + ch_versions = Channel.empty() + + STAR_GENOMEGENERATE ( + fasta, + gtf + ) + ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first()) + ch_star_index = STAR_GENOMEGENERATE.out.index + + STAR_ALIGN ( + reads, + ch_star_index, + gtf, + false, + "illumina", + false + ) + ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + + emit: + reads // channel: [ val(meta), [ reads ] ] + + index = ch_star_index + + bam = STAR_ALIGN.out.bam + log_final = STAR_ALIGN.out.log_final + log_out = STAR_ALIGN.out.log_out + log_progress = STAR_ALIGN.out.log_progress + + versions = ch_versions // channel: [ versions.yml ] +} From 6016ea8f7ca539d959a8b6c9d8ba41b62a0e0727 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 15 Mar 2023 18:32:48 -0500 Subject: [PATCH 05/42] HOST: remove unneeded emissions --- subworkflows/local/host.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/host.nf b/subworkflows/local/host.nf index 3b24bc7..e34de02 100644 --- a/subworkflows/local/host.nf +++ b/subworkflows/local/host.nf @@ -49,13 +49,13 @@ workflow HOST { index = ch_star_index - bam = STAR_ALIGN.out.bam log_final = STAR_ALIGN.out.log_final log_out = STAR_ALIGN.out.log_out log_progress = STAR_ALIGN.out.log_progress fastq = STAR_ALIGN.out.fastq trimmed_reads = TRIMMOMATIC.out.trimmed_reads + //mqc_log = TRIMMOMATIC.out.mqc_log polya_trimmed = POLYA_STRIPPER.out.polya_trimmed From 6afdead038e6f28b37de3c61f63cfd43a0f5ee00 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 15 Mar 2023 18:33:29 -0500 Subject: [PATCH 06/42] PLUS: add junction emission --- subworkflows/local/plus.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf index de1643b..ea6fe9e 100644 --- a/subworkflows/local/plus.nf +++ b/subworkflows/local/plus.nf @@ -37,6 +37,7 @@ workflow PLUS { index = ch_star_index bam = STAR_ALIGN.out.bam + junction = STAR_ALIGN.out.junction log_final = STAR_ALIGN.out.log_final log_out = STAR_ALIGN.out.log_out log_progress = STAR_ALIGN.out.log_progress From f7144299766abab06e93b0ba08645847bf88f089 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 15 Mar 2023 18:33:53 -0500 Subject: [PATCH 07/42] PLUS: Add samtools --- subworkflows/local/plus.nf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf index ea6fe9e..47b4744 100644 --- a/subworkflows/local/plus.nf +++ b/subworkflows/local/plus.nf @@ -4,6 +4,8 @@ include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' +include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main.nf' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main.nf' workflow PLUS { take: @@ -31,6 +33,17 @@ workflow PLUS { ) ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + SAMTOOLS_SORT ( + STAR_ALIGN.out.bam + ) + ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) + + SAMTOOLS_INDEX ( + SAMTOOLS_SORT.out.bam + ) + ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first()) + + emit: reads // channel: [ val(meta), [ reads ] ] @@ -42,5 +55,9 @@ workflow PLUS { log_out = STAR_ALIGN.out.log_out log_progress = STAR_ALIGN.out.log_progress + sambam = SAMTOOLS_SORT.out.bam + + bai = SAMTOOLS_INDEX.out.bai + versions = ch_versions // channel: [ versions.yml ] } From dd510eef954bd476b2ac33ba7ec1e6f0435a6bbd Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Mon, 20 Mar 2023 14:05:53 -0500 Subject: [PATCH 08/42] plus: add join bam_bai_junction Co-authored-by: Mariana Dias Guilardi --- subworkflows/local/plus.nf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf index 47b4744..c4ae1ab 100644 --- a/subworkflows/local/plus.nf +++ b/subworkflows/local/plus.nf @@ -43,6 +43,11 @@ workflow PLUS { ) ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first()) + SAMTOOLS_SORT.out.bam + .join(SAMTOOLS_INDEX.out.bai, by: [0], remainder: true) + .join(STAR_ALIGN.out.junction) + .set { ch_bam_bai_junction } + emit: reads // channel: [ val(meta), [ reads ] ] @@ -55,9 +60,11 @@ workflow PLUS { log_out = STAR_ALIGN.out.log_out log_progress = STAR_ALIGN.out.log_progress - sambam = SAMTOOLS_SORT.out.bam + sam_bam = SAMTOOLS_SORT.out.bam bai = SAMTOOLS_INDEX.out.bai + bam_bai_junction = ch_bam_bai_junction + versions = ch_versions // channel: [ versions.yml ] } From bf3680d08b643bc0ecc6279e04923204df9d35e0 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Mon, 20 Mar 2023 15:27:36 -0500 Subject: [PATCH 09/42] reorganize workflow with subworkflows Co-authored-by: Mariana Guilardi --- workflows/viralintegration.nf | 85 +++++++++++------------------------ 1 file changed, 27 insertions(+), 58 deletions(-) diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index 7e5d785..32f7e52 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -47,6 +47,11 @@ include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates' // // SUBWORKFLOW: Consisting of a mix of local and nf-core/modules // +include { INPUT_CHECK } from '../subworkflows/local/input_check' +include { HOST } from '../subworkflows/local/host' +include { PLUS } from '../subworkflows/local/plus' + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT NF-CORE MODULES/SUBWORKFLOWS @@ -115,32 +120,16 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(FASTQC.out.versions.first()) - STAR_GENOMEGENERATE_HOST ( + // + // SUBWORKFLOW: Align input reads against host genome. + // + + HOST ( + INPUT_CHECK.out.reads, params.fasta, params.gtf ) - ch_versions = ch_versions.mix(STAR_GENOMEGENERATE_HOST.out.versions) - - // TODO Use igenomes - STAR_ALIGN_HOST ( - ch_fastq, - STAR_GENOMEGENERATE_HOST.out.index, - params.gtf, - false, - "illumina", - false - ) - ch_versions = ch_versions.mix(STAR_ALIGN_HOST.out.versions.first()) - - TRIMMOMATIC ( - STAR_ALIGN_HOST.out.fastq - ) - ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first()) - - POLYA_STRIPPER ( - TRIMMOMATIC.out.trimmed_reads - ) - ch_versions = ch_versions.mix(POLYA_STRIPPER.out.versions.first()) + ch_versions = ch_versions.mix(HOST.out.versions) CAT_FASTA ( params.fasta, @@ -148,39 +137,19 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(CAT_FASTA.out.versions) - STAR_GENOMEGENERATE_PLUS ( + // + // SUBWORKFLOW: Align filtered reads against combined host and viral reference. + // + + PLUS ( + HOST.out.polya_trimmed, CAT_FASTA.out.plus_fasta, params.gtf ) - ch_versions = ch_versions.mix(STAR_GENOMEGENERATE_PLUS.out.versions) - - STAR_ALIGN_PLUS ( - POLYA_STRIPPER.out.polya_trimmed, - STAR_GENOMEGENERATE_PLUS.out.index, - params.gtf, - false, - "illumina", - false - ) - ch_versions = ch_versions.mix(STAR_ALIGN_PLUS.out.versions.first()) - - SAMTOOLS_SORT_PLUS ( - STAR_ALIGN_PLUS.out.bam - ) - ch_versions = ch_versions.mix(SAMTOOLS_SORT_PLUS.out.versions.first()) - - SAMTOOLS_INDEX_PLUS ( - SAMTOOLS_SORT_PLUS.out.bam - ) - ch_versions = ch_versions.mix(SAMTOOLS_INDEX_PLUS.out.versions.first()) - - SAMTOOLS_SORT_PLUS.out.bam - .join(SAMTOOLS_INDEX_PLUS.out.bai, by: [0], remainder: true) - .join(STAR_ALIGN_PLUS.out.junction) - .set { ch_bam_bai_junction } + ch_versions = ch_versions.mix(PLUS.out.versions) INSERTION_SITE_CANDIDATES ( - ch_bam_bai_junction, + PLUS.out.bam_bai_junction, params.fasta, params.viral_fasta ) @@ -191,8 +160,8 @@ workflow VIRALINTEGRATION { ) // TODO ch_versions = ch_versions.mix(ABRIDGED_TSV.out.versions.first()) - SAMTOOLS_SORT_PLUS.out.bam - .join(SAMTOOLS_INDEX_PLUS.out.bai, by: [0], remainder: true) + PLUS.out.sam_bam + .join(PLUS.out.bai, by: [0], remainder: true) .join(ABRIDGED_TSV.out.filtered_abridged) .set { ch_bam_bai_filtered } @@ -213,12 +182,12 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.versions.first()) - STAR_ALIGN_HOST.out.fastq + HOST.out.fastq .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract) .set { ch_unaligned_fastq_fasta } STAR_ALIGN_VALIDATE ( ch_unaligned_fastq_fasta, - STAR_GENOMEGENERATE_PLUS.out.index, + PLUS.out.index, "illumina", false ) @@ -290,9 +259,9 @@ workflow VIRALINTEGRATION { .mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml')) .mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect()) .mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([])) - .mix(STAR_ALIGN_HOST.out.log_final.collect{it[1]}.ifEmpty([])) - .mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([])) - .mix(STAR_ALIGN_PLUS.out.log_final.collect{it[1]}.ifEmpty([])) + .mix(HOST.out.log_final.collect{it[1]}.ifEmpty([])) + //.mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([])) + .mix(PLUS.out.log_final.collect{it[1]}.ifEmpty([])) .mix(STAR_ALIGN_VALIDATE.out.log_final.collect{it[1]}.ifEmpty([])) From a3344a41afab72b68d0c05e4c1533d6b12f494d8 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Mon, 20 Mar 2023 16:08:21 -0500 Subject: [PATCH 10/42] subworkflows: rename STAR to match args Co-authored-by: Mariana Guilardi --- subworkflows/local/host.nf | 16 ++++++++-------- subworkflows/local/plus.nf | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/subworkflows/local/host.nf b/subworkflows/local/host.nf index e34de02..ef2200c 100644 --- a/subworkflows/local/host.nf +++ b/subworkflows/local/host.nf @@ -2,7 +2,7 @@ // Align input reads against host genome. // -include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' +include { STAR_ALIGN as STAR_ALIGN_HOST } from '../../modules/nf-core/star/align/main.nf' include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' include { TRIMMOMATIC } from "../../modules/nf-core/trimmomatic/main.nf" include { POLYA_STRIPPER } from '../../modules/local/polyA_stripper.nf' @@ -23,7 +23,7 @@ workflow HOST { ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first()) ch_star_index = STAR_GENOMEGENERATE.out.index - STAR_ALIGN ( + STAR_ALIGN_HOST ( reads, ch_star_index, gtf, @@ -31,10 +31,10 @@ workflow HOST { "illumina", false ) - ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + ch_versions = ch_versions.mix(STAR_ALIGN_HOST.out.versions.first()) TRIMMOMATIC ( - STAR_ALIGN.out.fastq + STAR_ALIGN_HOST.out.fastq ) ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first()) @@ -49,10 +49,10 @@ workflow HOST { index = ch_star_index - log_final = STAR_ALIGN.out.log_final - log_out = STAR_ALIGN.out.log_out - log_progress = STAR_ALIGN.out.log_progress - fastq = STAR_ALIGN.out.fastq + log_final = STAR_ALIGN_HOST.out.log_final + log_out = STAR_ALIGN_HOST.out.log_out + log_progress = STAR_ALIGN_HOST.out.log_progress + fastq = STAR_ALIGN_HOST.out.fastq trimmed_reads = TRIMMOMATIC.out.trimmed_reads //mqc_log = TRIMMOMATIC.out.mqc_log diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf index c4ae1ab..9cfc171 100644 --- a/subworkflows/local/plus.nf +++ b/subworkflows/local/plus.nf @@ -2,7 +2,7 @@ // Align filtered reads against combined host and viral reference. // -include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf' +include { STAR_ALIGN as STAR_ALIGN_PLUS } from '../../modules/nf-core/star/align/main.nf' include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf' include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main.nf' include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main.nf' @@ -23,7 +23,7 @@ workflow PLUS { ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first()) ch_star_index = STAR_GENOMEGENERATE.out.index - STAR_ALIGN ( + STAR_ALIGN_PLUS ( reads, ch_star_index, gtf, @@ -31,10 +31,10 @@ workflow PLUS { "illumina", false ) - ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + ch_versions = ch_versions.mix(STAR_ALIGN_PLUS.out.versions.first()) SAMTOOLS_SORT ( - STAR_ALIGN.out.bam + STAR_ALIGN_PLUS.out.bam ) ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) @@ -45,7 +45,7 @@ workflow PLUS { SAMTOOLS_SORT.out.bam .join(SAMTOOLS_INDEX.out.bai, by: [0], remainder: true) - .join(STAR_ALIGN.out.junction) + .join(STAR_ALIGN_PLUS.out.junction) .set { ch_bam_bai_junction } @@ -54,11 +54,11 @@ workflow PLUS { index = ch_star_index - bam = STAR_ALIGN.out.bam - junction = STAR_ALIGN.out.junction - log_final = STAR_ALIGN.out.log_final - log_out = STAR_ALIGN.out.log_out - log_progress = STAR_ALIGN.out.log_progress + bam = STAR_ALIGN_PLUS.out.bam + junction = STAR_ALIGN_PLUS.out.junction + log_final = STAR_ALIGN_PLUS.out.log_final + log_out = STAR_ALIGN_PLUS.out.log_out + log_progress = STAR_ALIGN_PLUS.out.log_progress sam_bam = SAMTOOLS_SORT.out.bam From de860aaea99cb10714d99a213574c388c6849dd6 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Mon, 20 Mar 2023 16:11:59 -0500 Subject: [PATCH 11/42] clean up main workflow --- workflows/viralintegration.nf | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index 32f7e52..b2600e0 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -62,16 +62,9 @@ include { PLUS } from '../subworkflows/local/plus' // MODULE: Installed directly from nf-core/modules // include { FASTQC } from '../modules/nf-core/fastqc/main' -include { TRIMMOMATIC } from '../modules/nf-core/trimmomatic/main' -include { STAR_GENOMEGENERATE as STAR_GENOMEGENERATE_HOST - STAR_GENOMEGENERATE as STAR_GENOMEGENERATE_PLUS } from '../modules/nf-core/star/genomegenerate/main' -include { STAR_ALIGN as STAR_ALIGN_HOST - STAR_ALIGN as STAR_ALIGN_PLUS } from '../modules/nf-core/star/align/main' -include { SAMTOOLS_SORT as SAMTOOLS_SORT_PLUS - SAMTOOLS_SORT as SAMTOOLS_SORT_VALIDATE +include { SAMTOOLS_SORT as SAMTOOLS_SORT_VALIDATE SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main' -include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_PLUS - SAMTOOLS_INDEX as SAMTOOLS_INDEX_VALIDATE +include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_VALIDATE SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main' include { MULTIQC } from '../modules/nf-core/multiqc/main' include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' From 4185391f4616bab602dbb56b32e0735a0357e7b4 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 22 Mar 2023 11:41:15 -0500 Subject: [PATCH 12/42] build INSERTION_SITES subworkflow --- subworkflows/local/insertion_sites.nf | 76 +++++++++++++++++++++++++++ workflows/viralintegration.nf | 53 ++++++------------- 2 files changed, 93 insertions(+), 36 deletions(-) create mode 100644 subworkflows/local/insertion_sites.nf diff --git a/subworkflows/local/insertion_sites.nf b/subworkflows/local/insertion_sites.nf new file mode 100644 index 0000000..22629ed --- /dev/null +++ b/subworkflows/local/insertion_sites.nf @@ -0,0 +1,76 @@ +// +// Map potential virus insertion sites and create virus infection evidence viewer. +// + +include { INSERTION_SITE_CANDIDATES } from '../../modules/local/insertion_site_candidates.nf' +include { ABRIDGED_TSV } from '../../modules/local/abridged_tsv.nf' +include { VIRUS_REPORT } from '../../modules/local/virus_report.nf' +include { EXTRACT_CHIMERIC_GENOMIC_TARGETS } from '../../modules/local/extract_chimeric_genomic_targets.nf' + +workflow INSERTION_SITES { + take: + junction // file: /path/to/junction/ + fasta // file: /path/to/fasta/ + viral_fasta // file: /path/to/viral_fasta/ + bam // file: /path/to/bam/ + bai // file: /path/to/bai/ + igvjs_VIF + + + main: + ch_versions = Channel.empty() + + INSERTION_SITE_CANDIDATES ( + junction, + fasta, + viral_fasta + ) + ch_versions = ch_versions.mix(INSERTION_SITE_CANDIDATES.out.versions.first()) + + ABRIDGED_TSV ( + INSERTION_SITE_CANDIDATES.out.full + ) + // TODO ch_versions = ch_versions.mix(ABRIDGED_TSV.out.versions.first()) + + bam + .join(bai, by: [0], remainder: true) + .join(ABRIDGED_TSV.out.filtered_abridged) + .set { ch_bam_bai_filtered } + + VIRUS_REPORT ( + ch_bam_bai_filtered, + viral_fasta, + igvjs_VIF + ) + ch_versions = ch_versions.mix(VIRUS_REPORT.out.versions.first()) + + // TODO Handle insertion_site_candidates + // File insertion_site_candidates_use = select_first([insertion_site_candidates, InsertionSiteCandidates.filtered_abridged]) + + EXTRACT_CHIMERIC_GENOMIC_TARGETS ( + ABRIDGED_TSV.out.filtered_abridged, + fasta, + viral_fasta + ) + ch_versions = ch_versions.mix(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.versions.first()) + + emit: + full = INSERTION_SITE_CANDIDATES.out.full + genome_chimeric_evidence_reads_bam = INSERTION_SITE_CANDIDATES.out.genome_chimeric_evidence_reads_bam + genome_chimeric_evidence_reads_bai = INSERTION_SITE_CANDIDATES.out.genome_chimeric_evidence_reads_bai + + filtered_abridged = ABRIDGED_TSV.out.filtered_abridged + + html = VIRUS_REPORT.out.html + genome_abundance_plot = VIRUS_REPORT.out.genome_abundance_plot + virus_alignments_bam = VIRUS_REPORT.out.virus_alignments_bam + virus_alignments_bai = VIRUS_REPORT.out.virus_alignments_bai + read_counts_summary = VIRUS_REPORT.out.read_counts_summary + read_counts_image = VIRUS_REPORT.out.read_counts_image + read_counts_log_image = VIRUS_REPORT.out.read_counts_log_image + + fasta_extract = EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract + gtf_extract = EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.gtf_extract + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index b2600e0..67ee0a0 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -50,6 +50,7 @@ include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates' include { INPUT_CHECK } from '../subworkflows/local/input_check' include { HOST } from '../subworkflows/local/host' include { PLUS } from '../subworkflows/local/plus' +include { INSERTION_SITES } from '../subworkflows/local/insertion_sites' /* @@ -141,42 +142,22 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(PLUS.out.versions) - INSERTION_SITE_CANDIDATES ( + // + // SUBWORKFLOW: Map potential virus insertion sites and create virus infection evidence viewer. + // + + INSERTION_SITES ( PLUS.out.bam_bai_junction, params.fasta, - params.viral_fasta - ) - ch_versions = ch_versions.mix(INSERTION_SITE_CANDIDATES.out.versions.first()) - - ABRIDGED_TSV ( - INSERTION_SITE_CANDIDATES.out.full - ) - // TODO ch_versions = ch_versions.mix(ABRIDGED_TSV.out.versions.first()) - - PLUS.out.sam_bam - .join(PLUS.out.bai, by: [0], remainder: true) - .join(ABRIDGED_TSV.out.filtered_abridged) - .set { ch_bam_bai_filtered } - - VIRUS_REPORT ( - ch_bam_bai_filtered, params.viral_fasta, + PLUS.out.sam_bam, + PLUS.out.bai, ch_igvjs_VIF ) - ch_versions = ch_versions.mix(VIRUS_REPORT.out.versions.first()) - - // TODO Handle insertion_site_candidates - // File insertion_site_candidates_use = select_first([insertion_site_candidates, InsertionSiteCandidates.filtered_abridged]) - - EXTRACT_CHIMERIC_GENOMIC_TARGETS ( - ABRIDGED_TSV.out.filtered_abridged, - params.fasta, - params.viral_fasta - ) - ch_versions = ch_versions.mix(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.versions.first()) + ch_versions = ch_versions.mix(INSERTION_SITES.out.versions) HOST.out.fastq - .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract) + .join(INSERTION_SITES.out.fasta_extract) .set { ch_unaligned_fastq_fasta } STAR_ALIGN_VALIDATE ( ch_unaligned_fastq_fasta, @@ -208,7 +189,7 @@ workflow VIRALINTEGRATION { } ch_to_dupe_or_not - .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.gtf_extract, by: [0]) + .join(INSERTION_SITES.out.gtf_extract, by: [0]) .set { ch_validate_bam_bai_gtf } CHIMERIC_CONTIG_EVIDENCE_ANALYZER ( @@ -218,13 +199,13 @@ workflow VIRALINTEGRATION { CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bam .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bai, by: [0]) - .join(ABRIDGED_TSV.out.filtered_abridged, by: [0]) + .join(INSERTION_SITES.out.filtered_abridged, by: [0]) .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts, by: [0]) - .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.gtf_extract, by: [0]) - .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract, by: [0]) - .join(VIRUS_REPORT.out.genome_abundance_plot, by: [0]) - .join(VIRUS_REPORT.out.read_counts_image, by: [0]) - .join(VIRUS_REPORT.out.read_counts_log_image, by: [0]) + .join(INSERTION_SITES.out.gtf_extract, by: [0]) + .join(INSERTION_SITES.out.fasta_extract, by: [0]) + .join(INSERTION_SITES.out.genome_abundance_plot, by: [0]) + .join(INSERTION_SITES.out.read_counts_image, by: [0]) + .join(INSERTION_SITES.out.read_counts_log_image, by: [0]) .set { ch_summary_report } SUMMARY_REPORT( From 77fc465c0bd0cbebe843a81464506c1f064771c7 Mon Sep 17 00:00:00 2001 From: alyssa-ab Date: Mon, 27 Mar 2023 12:05:01 -0500 Subject: [PATCH 13/42] build: validate subworkflow --- subworkflows/local/validate.nf | 46 ++++++++++++++++++++++++++++++++++ workflows/viralintegration.nf | 40 +++++++++++------------------ 2 files changed, 60 insertions(+), 26 deletions(-) create mode 100644 subworkflows/local/validate.nf diff --git a/subworkflows/local/validate.nf b/subworkflows/local/validate.nf new file mode 100644 index 0000000..cf4030a --- /dev/null +++ b/subworkflows/local/validate.nf @@ -0,0 +1,46 @@ +// +// Validate potential chimeric reads. +// + +include { STAR_ALIGN_VALIDATE } from '../../modules/local/star_align_validate.nf' +include { SAMTOOLS_SORT} from '../../modules/nf-core/samtools/sort/main.nf' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main.nf' + +workflow VALIDATE { + take: + reads // channel: [ val(meta), [ reads ] ] + fasta_extract + index + + main: + ch_versions = Channel.empty() + + reads + .join(fasta_extract) + .set { ch_unaligned_fastq_fasta } + + STAR_ALIGN_VALIDATE ( + ch_unaligned_fastq_fasta, + index, + "illumina", + false + ) + ch_versions = ch_versions.mix(STAR_ALIGN_VALIDATE.out.versions.first()) + + SAMTOOLS_SORT ( + STAR_ALIGN_VALIDATE.out.bam + ) + ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) + + SAMTOOLS_SORT.out.bam.join( + SAMTOOLS_INDEX ( SAMTOOLS_SORT.out.bam ).bai, + by: [0], remainder: true) + .set { ch_validate_bam_bai } + + + emit: + + bam_bai = ch_validate_bam_bai + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index 67ee0a0..bffbb2c 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -39,7 +39,6 @@ include { INSERTION_SITE_CANDIDATES } from '../modules/local/insertion_site_cand include { ABRIDGED_TSV } from '../modules/local/abridged_tsv' include { VIRUS_REPORT } from '../modules/local/virus_report' include { EXTRACT_CHIMERIC_GENOMIC_TARGETS } from '../modules/local/extract_chimeric_genomic_targets' -include { STAR_ALIGN_VALIDATE } from '../modules/local/star_align_validate' include { CHIMERIC_CONTIG_EVIDENCE_ANALYZER } from '../modules/local/chimeric_contig_evidence_analyzer' include { SUMMARY_REPORT } from '../modules/local/summary_report' include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates' @@ -51,6 +50,7 @@ include { INPUT_CHECK } from '../subworkflows/local/input_check' include { HOST } from '../subworkflows/local/host' include { PLUS } from '../subworkflows/local/plus' include { INSERTION_SITES } from '../subworkflows/local/insertion_sites' +include { VALIDATE } from '../subworkflows/local/validate' /* @@ -63,10 +63,8 @@ include { INSERTION_SITES } from '../subworkflows/local/insertion_sites' // MODULE: Installed directly from nf-core/modules // include { FASTQC } from '../modules/nf-core/fastqc/main' -include { SAMTOOLS_SORT as SAMTOOLS_SORT_VALIDATE - SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main' -include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_VALIDATE - SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main' +include { SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main' +include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main' include { MULTIQC } from '../modules/nf-core/multiqc/main' include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' @@ -156,36 +154,26 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(INSERTION_SITES.out.versions) - HOST.out.fastq - .join(INSERTION_SITES.out.fasta_extract) - .set { ch_unaligned_fastq_fasta } - STAR_ALIGN_VALIDATE ( - ch_unaligned_fastq_fasta, - PLUS.out.index, - "illumina", - false - ) - ch_versions = ch_versions.mix(STAR_ALIGN_VALIDATE.out.versions.first()) + // + // SUBWORKFLOW: Validate potential chimeric reads. + // - SAMTOOLS_SORT_VALIDATE ( - STAR_ALIGN_VALIDATE.out.bam + VALIDATE ( + HOST.out.fastq, + INSERTION_SITES.out.fasta_extract, + PLUS.out.index ) - ch_versions = ch_versions.mix(SAMTOOLS_SORT_VALIDATE.out.versions.first()) - - SAMTOOLS_SORT_VALIDATE.out.bam.join( - SAMTOOLS_INDEX_VALIDATE ( SAMTOOLS_SORT_VALIDATE.out.bam ).bai, - by: [0], remainder: true) - .set { ch_validate_bam_bai } + ch_versions = ch_versions.mix(VALIDATE.out.versions) ch_to_dupe_or_not = Channel.empty() // Check if REMOVE_DUPLICATES.out.bam exists. if (params.remove_duplicates) { - REMOVE_DUPLICATES ( ch_validate_bam_bai ) + REMOVE_DUPLICATES ( VALIDATE.out.bam_bai ) ch_versions = ch_versions.mix(REMOVE_DUPLICATES.out.versions.first()) ch_to_dupe_or_not = REMOVE_DUPLICATES.out.bam_bai } else { - ch_to_dupe_or_not = ch_validate_bam_bai + ch_to_dupe_or_not = VALIDATE.out.bam_bai } ch_to_dupe_or_not @@ -236,7 +224,7 @@ workflow VIRALINTEGRATION { .mix(HOST.out.log_final.collect{it[1]}.ifEmpty([])) //.mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([])) .mix(PLUS.out.log_final.collect{it[1]}.ifEmpty([])) - .mix(STAR_ALIGN_VALIDATE.out.log_final.collect{it[1]}.ifEmpty([])) + .mix(VALIDATE.out.log_final.collect{it[1]}.ifEmpty([])) MULTIQC ( From 9f35672f1d47bc4f3fe7c7677a74a2b12e6ff8a2 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 27 Mar 2023 12:32:04 -0500 Subject: [PATCH 14/42] fix(validate): Add log_final to make Multiqc happy --- subworkflows/local/validate.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/subworkflows/local/validate.nf b/subworkflows/local/validate.nf index cf4030a..9d92c00 100644 --- a/subworkflows/local/validate.nf +++ b/subworkflows/local/validate.nf @@ -41,6 +41,7 @@ workflow VALIDATE { emit: bam_bai = ch_validate_bam_bai + log_final = STAR_ALIGN_VALIDATE.out.log_final versions = ch_versions // channel: [ versions.yml ] } From 136c021148f134c1cad82385c7d670ed024e9305 Mon Sep 17 00:00:00 2001 From: Alyssa Ann Briggs Date: Tue, 28 Mar 2023 15:04:37 -0500 Subject: [PATCH 15/42] fix(host): add mqc_log for TRIMMOMATIC in MultiQC --- subworkflows/local/host.nf | 2 +- workflows/viralintegration.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/local/host.nf b/subworkflows/local/host.nf index ef2200c..a9a7d0e 100644 --- a/subworkflows/local/host.nf +++ b/subworkflows/local/host.nf @@ -55,7 +55,7 @@ workflow HOST { fastq = STAR_ALIGN_HOST.out.fastq trimmed_reads = TRIMMOMATIC.out.trimmed_reads - //mqc_log = TRIMMOMATIC.out.mqc_log + mqc_log = TRIMMOMATIC.out.mqc_log polya_trimmed = POLYA_STRIPPER.out.polya_trimmed diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index bffbb2c..f65e3c7 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -222,7 +222,7 @@ workflow VIRALINTEGRATION { .mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect()) .mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([])) .mix(HOST.out.log_final.collect{it[1]}.ifEmpty([])) - //.mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([])) + .mix(HOST.out.mqc_log.collect{it[1]}.ifEmpty([])) .mix(PLUS.out.log_final.collect{it[1]}.ifEmpty([])) .mix(VALIDATE.out.log_final.collect{it[1]}.ifEmpty([])) From 88ee4e3b6c368f4c508e258739cc54ea2974f6ef Mon Sep 17 00:00:00 2001 From: Alyssa Ann Briggs Date: Tue, 28 Mar 2023 15:05:48 -0500 Subject: [PATCH 16/42] build chimeric reads subworkflow --- subworkflows/local/chimeric_reads.nf | 72 ++++++++++++++++++++++++++++ workflows/viralintegration.nf | 61 +++++++---------------- 2 files changed, 89 insertions(+), 44 deletions(-) create mode 100644 subworkflows/local/chimeric_reads.nf diff --git a/subworkflows/local/chimeric_reads.nf b/subworkflows/local/chimeric_reads.nf new file mode 100644 index 0000000..9bda209 --- /dev/null +++ b/subworkflows/local/chimeric_reads.nf @@ -0,0 +1,72 @@ +// +// Refine chimeric read counts and create final summary report. +// + +include { REMOVE_DUPLICATES } from '../../modules/local/remove_duplicates.nf' +include { CHIMERIC_CONTIG_EVIDENCE_ANALYZER } from '../../modules/local/chimeric_contig_evidence_analyzer.nf' +include { SUMMARY_REPORT } from '../../modules/local/summary_report.nf' + +workflow CHIMERIC_READS { + take: + bam_bai + gtf_extract + fasta_extract + filtered_abridged + genome_abundance_plot + read_counts_image + read_counts_log_image + gtf + igvjs_VIF + + main: + ch_versions = Channel.empty() + + ch_to_dupe_or_not = Channel.empty() + // Check if REMOVE_DUPLICATES.out.bam exists. + if (params.remove_duplicates) { + REMOVE_DUPLICATES ( bam_bai ) + ch_versions = ch_versions.mix(REMOVE_DUPLICATES.out.versions.first()) + ch_to_dupe_or_not = REMOVE_DUPLICATES.out.bam_bai + } else { + ch_to_dupe_or_not = bam_bai + } + + ch_to_dupe_or_not + .join(gtf_extract, by: [0]) + .set { ch_validate_bam_bai_gtf } + + CHIMERIC_CONTIG_EVIDENCE_ANALYZER ( + ch_validate_bam_bai_gtf + ) + ch_versions = ch_versions.mix(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.versions.first()) + + CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bam + .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bai, by: [0]) + .join(filtered_abridged, by: [0]) + .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts, by: [0]) + .join(gtf_extract, by: [0]) + .join(fasta_extract, by: [0]) + .join(genome_abundance_plot, by: [0]) + .join(read_counts_image, by: [0]) + .join(read_counts_log_image, by: [0]) + .set { ch_summary_report } + + SUMMARY_REPORT( + ch_summary_report, + gtf, + igvjs_VIF + ) + ch_versions = ch_versions.mix(SUMMARY_REPORT.out.versions.first()) + + + emit: + + evidence_counts = CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts + + html = SUMMARY_REPORT.out.html + refined_counts = SUMMARY_REPORT.out.refined_counts + refined_counts_w_genes = SUMMARY_REPORT.out.refined_counts_w_genes + genome_abundance_plot = SUMMARY_REPORT.out.genome_abundance_plot + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index f65e3c7..c8fe1f3 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -33,15 +33,7 @@ ch_igvjs_VIF = file("$projectDir/assets/igvjs_VIF.html", checkIfExis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { POLYA_STRIPPER } from '../modules/local/polyA_stripper' include { CAT_FASTA } from '../modules/local/cat_fasta' -include { INSERTION_SITE_CANDIDATES } from '../modules/local/insertion_site_candidates' -include { ABRIDGED_TSV } from '../modules/local/abridged_tsv' -include { VIRUS_REPORT } from '../modules/local/virus_report' -include { EXTRACT_CHIMERIC_GENOMIC_TARGETS } from '../modules/local/extract_chimeric_genomic_targets' -include { CHIMERIC_CONTIG_EVIDENCE_ANALYZER } from '../modules/local/chimeric_contig_evidence_analyzer' -include { SUMMARY_REPORT } from '../modules/local/summary_report' -include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates' // // SUBWORKFLOW: Consisting of a mix of local and nf-core/modules @@ -51,7 +43,7 @@ include { HOST } from '../subworkflows/local/host' include { PLUS } from '../subworkflows/local/plus' include { INSERTION_SITES } from '../subworkflows/local/insertion_sites' include { VALIDATE } from '../subworkflows/local/validate' - +include { CHIMERIC_READS } from '../subworkflows/local/chimeric_reads' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -63,8 +55,6 @@ include { VALIDATE } from '../subworkflows/local/validate' // MODULE: Installed directly from nf-core/modules // include { FASTQC } from '../modules/nf-core/fastqc/main' -include { SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main' -include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main' include { MULTIQC } from '../modules/nf-core/multiqc/main' include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' @@ -123,6 +113,10 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(HOST.out.versions) + // + // MODULE: CAT viral and host reference fastas. + // + CAT_FASTA ( params.fasta, params.viral_fasta @@ -165,43 +159,22 @@ workflow VIRALINTEGRATION { ) ch_versions = ch_versions.mix(VALIDATE.out.versions) + // + // SUBWORKFLOW: Refine chimeric read counts and create final summary report. + // - ch_to_dupe_or_not = Channel.empty() - // Check if REMOVE_DUPLICATES.out.bam exists. - if (params.remove_duplicates) { - REMOVE_DUPLICATES ( VALIDATE.out.bam_bai ) - ch_versions = ch_versions.mix(REMOVE_DUPLICATES.out.versions.first()) - ch_to_dupe_or_not = REMOVE_DUPLICATES.out.bam_bai - } else { - ch_to_dupe_or_not = VALIDATE.out.bam_bai - } - - ch_to_dupe_or_not - .join(INSERTION_SITES.out.gtf_extract, by: [0]) - .set { ch_validate_bam_bai_gtf } - - CHIMERIC_CONTIG_EVIDENCE_ANALYZER ( - ch_validate_bam_bai_gtf - ) - ch_versions = ch_versions.mix(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.versions.first()) - - CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bam - .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bai, by: [0]) - .join(INSERTION_SITES.out.filtered_abridged, by: [0]) - .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts, by: [0]) - .join(INSERTION_SITES.out.gtf_extract, by: [0]) - .join(INSERTION_SITES.out.fasta_extract, by: [0]) - .join(INSERTION_SITES.out.genome_abundance_plot, by: [0]) - .join(INSERTION_SITES.out.read_counts_image, by: [0]) - .join(INSERTION_SITES.out.read_counts_log_image, by: [0]) - .set { ch_summary_report } - - SUMMARY_REPORT( - ch_summary_report, + CHIMERIC_READS ( + VALIDATE.out.bam_bai, + INSERTION_SITES.out.gtf_extract, + INSERTION_SITES.out.fasta_extract, + INSERTION_SITES.out.filtered_abridged, + INSERTION_SITES.out.genome_abundance_plot, + INSERTION_SITES.out.read_counts_image, + INSERTION_SITES.out.read_counts_log_image, params.gtf, ch_igvjs_VIF ) - ch_versions = ch_versions.mix(SUMMARY_REPORT.out.versions.first()) + ch_versions = ch_versions.mix(CHIMERIC_READS.out.versions) CUSTOM_DUMPSOFTWAREVERSIONS ( ch_versions.unique().collectFile(name: 'collated_versions.yml') From 818c0fb09afb06c5517f38a40fa559a4e01b0847 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 28 Apr 2023 14:27:00 +0000 Subject: [PATCH 17/42] Template update for nf-core/tools version 2.8 --- README.md | 2 ++ conf/test_full.config | 2 ++ lib/WorkflowMain.groovy | 2 ++ nextflow.config | 5 +++-- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13005bb..d19dd3e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # ![nf-core/viralintegration](docs/images/nf-core-viralintegration_logo_light.png#gh-light-mode-only) ![nf-core/viralintegration](docs/images/nf-core-viralintegration_logo_dark.png#gh-dark-mode-only) +[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/viralintegration/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7783480-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7783480) [![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/viralintegration/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7783480-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7783480) +[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) [![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) diff --git a/conf/test_full.config b/conf/test_full.config index 97d0ff6..f0bf84b 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -10,6 +10,8 @@ ---------------------------------------------------------------------------------------- */ +cleanup = true + params { config_profile_name = 'Full test profile' config_profile_description = 'Full test dataset to check pipeline function' diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index ab84a4a..811a4eb 100755 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -4,6 +4,8 @@ import nextflow.Nextflow +import nextflow.Nextflow + class WorkflowMain { // diff --git a/nextflow.config b/nextflow.config index 8a8e195..fc69473 100644 --- a/nextflow.config +++ b/nextflow.config @@ -27,7 +27,7 @@ params { genome = null igenomes_base = 's3://ngi-igenomes/igenomes' igenomes_ignore = false - + // MultiQC options multiqc_config = null @@ -54,7 +54,7 @@ params { custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" config_profile_contact = null config_profile_url = null - + // Max resource options // Defaults only, expecting to be overwritten @@ -115,6 +115,7 @@ profiles { } docker { docker.enabled = true + docker.registry = 'quay.io' docker.userEmulation = true conda.enabled = false singularity.enabled = false From aac112c5f71e00392996b4123b2bd4a02210b039 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 30 Jun 2023 16:16:34 +0000 Subject: [PATCH 18/42] Template update for nf-core/tools version 2.9 --- conf/test_full.config | 2 -- nextflow.config | 1 - 2 files changed, 3 deletions(-) diff --git a/conf/test_full.config b/conf/test_full.config index f0bf84b..97d0ff6 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -10,8 +10,6 @@ ---------------------------------------------------------------------------------------- */ -cleanup = true - params { config_profile_name = 'Full test profile' config_profile_description = 'Full test dataset to check pipeline function' diff --git a/nextflow.config b/nextflow.config index fc69473..f8f72f2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -115,7 +115,6 @@ profiles { } docker { docker.enabled = true - docker.registry = 'quay.io' docker.userEmulation = true conda.enabled = false singularity.enabled = false From 487a09af449e6e82e50e96b2b8e492820556eca6 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Sat, 18 Feb 2023 17:56:25 -0600 Subject: [PATCH 19/42] bug fix: rollback star and samtools version --- modules.json | 6 ++- modules/nf-core/samtools/index/main.nf | 10 ++--- .../samtools/index/samtools-index.diff | 38 +++++++++++++++++++ modules/nf-core/samtools/sort/main.nf | 10 ++--- .../nf-core/samtools/sort/samtools-sort.diff | 37 ++++++++++++++++++ 5 files changed, 87 insertions(+), 14 deletions(-) create mode 100644 modules/nf-core/samtools/index/samtools-index.diff create mode 100644 modules/nf-core/samtools/sort/samtools-sort.diff diff --git a/modules.json b/modules.json index 1266e31..4d8f8ca 100644 --- a/modules.json +++ b/modules.json @@ -23,12 +23,14 @@ "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/samtools/index/samtools-index.diff" }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "star/align": { "branch": "master", diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 8b95687..c63797a 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(input) @@ -27,7 +27,6 @@ process SAMTOOLS_INDEX { -@ ${task.cpus-1} \\ $args \\ $input - cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') @@ -39,10 +38,9 @@ process SAMTOOLS_INDEX { touch ${input}.bai touch ${input}.crai touch ${input}.csi - cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} +} \ No newline at end of file diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff new file mode 100644 index 0000000..88f1250 --- /dev/null +++ b/modules/nf-core/samtools/index/samtools-index.diff @@ -0,0 +1,38 @@ +Changes in module 'nf-core/samtools/index' +--- modules/nf-core/samtools/index/main.nf ++++ modules/nf-core/samtools/index/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_low' + +- conda "bioconda::samtools=1.16.1" ++ conda "bioconda::samtools=1.15.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : +- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" ++ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : ++ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(input) +@@ -27,7 +27,6 @@ + -@ ${task.cpus-1} \\ + $args \\ + $input +- + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') +@@ -39,10 +38,9 @@ + touch ${input}.bai + touch ${input}.crai + touch ${input}.csi +- + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +-} ++} +************************************************************ diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 84c167c..c6a9a27 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,17 +2,16 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) output: tuple val(meta), path("*.bam"), emit: bam - tuple val(meta), path("*.csi"), emit: csi, optional: true path "versions.yml" , emit: versions when: @@ -34,10 +33,9 @@ process SAMTOOLS_SORT { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam - cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} +} \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff new file mode 100644 index 0000000..a026f97 --- /dev/null +++ b/modules/nf-core/samtools/sort/samtools-sort.diff @@ -0,0 +1,37 @@ +Changes in module 'nf-core/samtools/sort' +--- modules/nf-core/samtools/sort/main.nf ++++ modules/nf-core/samtools/sort/main.nf +@@ -2,17 +2,16 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::samtools=1.16.1" ++ conda "bioconda::samtools=1.15.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : +- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" ++ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : ++ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam"), emit: bam +- tuple val(meta), path("*.csi"), emit: csi, optional: true + path "versions.yml" , emit: versions + + when: +@@ -34,10 +33,9 @@ + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam +- + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +-} ++} +************************************************************ From fd28f0cb2e85232c18dbeace6a141165d4a69d67 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 22 Feb 2023 20:41:40 -0600 Subject: [PATCH 20/42] star/samtools: use matching mulled containers --- modules/nf-core/samtools/index/main.nf | 4 ++-- modules/nf-core/samtools/index/samtools-index.diff | 4 ++-- modules/nf-core/samtools/sort/main.nf | 4 ++-- modules/nf-core/samtools/sort/samtools-sort.diff | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index c63797a..7d3d4b0 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_INDEX { conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff index 88f1250..897fde1 100644 --- a/modules/nf-core/samtools/index/samtools-index.diff +++ b/modules/nf-core/samtools/index/samtools-index.diff @@ -10,8 +10,8 @@ Changes in module 'nf-core/samtools/index' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : -+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" ++ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : ++ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index c6a9a27..a3421d9 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_SORT { conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff index a026f97..ab7c513 100644 --- a/modules/nf-core/samtools/sort/samtools-sort.diff +++ b/modules/nf-core/samtools/sort/samtools-sort.diff @@ -10,8 +10,8 @@ Changes in module 'nf-core/samtools/sort' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : -+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" ++ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : ++ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(bam) From 09b7b5cb0665bd2e23eb4aa77ae68ee0274c31a2 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 24 Feb 2023 09:13:15 -0600 Subject: [PATCH 21/42] fix: Remove samtools diffs No reason to diverge from upstream on these, it's just a STAR problem. --- modules.json | 6 +-- modules/nf-core/samtools/index/main.nf | 10 +++-- .../samtools/index/samtools-index.diff | 38 ------------------- modules/nf-core/samtools/sort/main.nf | 10 +++-- .../nf-core/samtools/sort/samtools-sort.diff | 37 ------------------ 5 files changed, 14 insertions(+), 87 deletions(-) delete mode 100644 modules/nf-core/samtools/index/samtools-index.diff delete mode 100644 modules/nf-core/samtools/sort/samtools-sort.diff diff --git a/modules.json b/modules.json index 4d8f8ca..1266e31 100644 --- a/modules.json +++ b/modules.json @@ -23,14 +23,12 @@ "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/index/samtools-index.diff" + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" + "installed_by": ["modules"] }, "star/align": { "branch": "master", diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 7d3d4b0..8b95687 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.15.1" + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : - 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(input) @@ -27,6 +27,7 @@ process SAMTOOLS_INDEX { -@ ${task.cpus-1} \\ $args \\ $input + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') @@ -38,9 +39,10 @@ process SAMTOOLS_INDEX { touch ${input}.bai touch ${input}.crai touch ${input}.csi + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff deleted file mode 100644 index 897fde1..0000000 --- a/modules/nf-core/samtools/index/samtools-index.diff +++ /dev/null @@ -1,38 +0,0 @@ -Changes in module 'nf-core/samtools/index' ---- modules/nf-core/samtools/index/main.nf -+++ modules/nf-core/samtools/index/main.nf -@@ -2,10 +2,10 @@ - tag "$meta.id" - label 'process_low' - -- conda "bioconda::samtools=1.16.1" -+ conda "bioconda::samtools=1.15.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : -- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : -+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" - - input: - tuple val(meta), path(input) -@@ -27,7 +27,6 @@ - -@ ${task.cpus-1} \\ - $args \\ - $input -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -@@ -39,10 +38,9 @@ - touch ${input}.bai - touch ${input}.crai - touch ${input}.csi -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ --} -+} -************************************************************ diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index a3421d9..84c167c 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,16 +2,17 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.15.1" + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : - 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(bam) output: tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.csi"), emit: csi, optional: true path "versions.yml" , emit: versions when: @@ -33,9 +34,10 @@ process SAMTOOLS_SORT { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff deleted file mode 100644 index ab7c513..0000000 --- a/modules/nf-core/samtools/sort/samtools-sort.diff +++ /dev/null @@ -1,37 +0,0 @@ -Changes in module 'nf-core/samtools/sort' ---- modules/nf-core/samtools/sort/main.nf -+++ modules/nf-core/samtools/sort/main.nf -@@ -2,17 +2,16 @@ - tag "$meta.id" - label 'process_medium' - -- conda "bioconda::samtools=1.16.1" -+ conda "bioconda::samtools=1.15.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : -- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : -+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" - - input: - tuple val(meta), path(bam) - - output: - tuple val(meta), path("*.bam"), emit: bam -- tuple val(meta), path("*.csi"), emit: csi, optional: true - path "versions.yml" , emit: versions - - when: -@@ -34,10 +33,9 @@ - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.bam -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ --} -+} -************************************************************ From f1eb5cce790007350180b414a58551053e9ff126 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 18 Jul 2023 17:55:04 -0500 Subject: [PATCH 22/42] fix prettier --- assets/igvjs_VIF.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/igvjs_VIF.html b/assets/igvjs_VIF.html index be54347..f5de86c 100644 --- a/assets/igvjs_VIF.html +++ b/assets/igvjs_VIF.html @@ -43,7 +43,7 @@

- --> + --> From 818e7020e66e9324c810b749c840a1de40a66630 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 18 Jul 2023 17:55:04 -0500 Subject: [PATCH 23/42] fix prettier --- assets/igvjs_VIF.html | 379 ++++++++++++++++++++---------------------- 1 file changed, 182 insertions(+), 197 deletions(-) diff --git a/assets/igvjs_VIF.html b/assets/igvjs_VIF.html index f5de86c..28901f8 100644 --- a/assets/igvjs_VIF.html +++ b/assets/igvjs_VIF.html @@ -78,215 +78,200 @@ From 427cb74957482a25cb73e6bdc6b3787dfa71433d Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 18 Jul 2023 17:55:04 -0500 Subject: [PATCH 24/42] fix prettier + html functionality --- assets/igvjs_VIF.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/igvjs_VIF.html b/assets/igvjs_VIF.html index 28901f8..7e6486c 100644 --- a/assets/igvjs_VIF.html +++ b/assets/igvjs_VIF.html @@ -43,7 +43,7 @@

- --> + --> From f9e7b8e363fc87fd64c0b64ff047a09fca3f4c41 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 19 Jul 2023 11:51:14 -0500 Subject: [PATCH 25/42] chore: bump date --- assets/igvjs_VIF.html | 379 ++++++++++++++++++++++-------------------- 1 file changed, 197 insertions(+), 182 deletions(-) diff --git a/assets/igvjs_VIF.html b/assets/igvjs_VIF.html index 7e6486c..be54347 100644 --- a/assets/igvjs_VIF.html +++ b/assets/igvjs_VIF.html @@ -78,200 +78,215 @@ From bef7644a52daaffa806dd4fa9f01fe58c4e70974 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 28 Nov 2023 10:31:09 -0600 Subject: [PATCH 26/42] update README and modules.json --- README.md | 1 - modules.json | 34 +++++++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d19dd3e..10c8b8c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # ![nf-core/viralintegration](docs/images/nf-core-viralintegration_logo_light.png#gh-light-mode-only) ![nf-core/viralintegration](docs/images/nf-core-viralintegration_logo_dark.png#gh-dark-mode-only) -[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/viralintegration/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7783480-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7783480) [![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/viralintegration/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7783480-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7783480) [![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) diff --git a/modules.json b/modules.json index 1266e31..9536706 100644 --- a/modules.json +++ b/modules.json @@ -8,48 +8,64 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "multiqc": { "branch": "master", "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "star/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/align/star-align.diff" }, "star/genomegenerate": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/genomegenerate/star-genomegenerate.diff" }, "trimmomatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/trimmomatic/trimmomatic.diff" } } } } } -} +} \ No newline at end of file From 613c3069e9e2decfc69bcd258cc3ccda00da7eb5 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 28 Nov 2023 10:44:50 -0600 Subject: [PATCH 27/42] run prettier --- modules.json | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/modules.json b/modules.json index 9536706..1266e31 100644 --- a/modules.json +++ b/modules.json @@ -8,64 +8,48 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "star/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" }, "star/genomegenerate": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/genomegenerate/star-genomegenerate.diff" }, "trimmomatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/trimmomatic/trimmomatic.diff" } } } } } -} \ No newline at end of file +} From 93473418f495748d2b40464f9a2582f208010a4b Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 14 Nov 2023 15:16:47 -0600 Subject: [PATCH 28/42] add nf-validaiton for input --- workflows/viralintegration.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf index c8fe1f3..7323d90 100644 --- a/workflows/viralintegration.nf +++ b/workflows/viralintegration.nf @@ -38,7 +38,6 @@ include { CAT_FASTA } from '../modules/local/cat_fasta' // // SUBWORKFLOW: Consisting of a mix of local and nf-core/modules // -include { INPUT_CHECK } from '../subworkflows/local/input_check' include { HOST } from '../subworkflows/local/host' include { PLUS } from '../subworkflows/local/plus' include { INSERTION_SITES } from '../subworkflows/local/insertion_sites' @@ -107,7 +106,7 @@ workflow VIRALINTEGRATION { // HOST ( - INPUT_CHECK.out.reads, + ch_fastq, params.fasta, params.gtf ) From 43b7211df028c972aadeab9884da5c79098881b5 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 14 Nov 2023 15:35:43 -0600 Subject: [PATCH 29/42] clean up README + CHANGELOG --- modules.json | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/modules.json b/modules.json index 1266e31..9536706 100644 --- a/modules.json +++ b/modules.json @@ -8,48 +8,64 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "multiqc": { "branch": "master", "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "star/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/align/star-align.diff" }, "star/genomegenerate": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/genomegenerate/star-genomegenerate.diff" }, "trimmomatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/trimmomatic/trimmomatic.diff" } } } } } -} +} \ No newline at end of file From d51216e4c36c4f43cbfcfa51c1912e6b570a251e Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 14 Nov 2023 15:36:56 -0600 Subject: [PATCH 30/42] update gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bc35d72..630c103 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .nextflow* work/ data/ -results/ +results* .DS_Store testing/ testing* From 82ba61476984e83b4b2fa4fe74b47dc75c09c5f5 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 14 Nov 2023 15:56:23 -0600 Subject: [PATCH 31/42] fix linting --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 630c103..bc35d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .nextflow* work/ data/ -results* +results/ .DS_Store testing/ testing* From bf9a9bfe8c2967d6161b6fe39dc60ab05e7466a9 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 14 Nov 2023 16:19:28 -0600 Subject: [PATCH 32/42] fix linting --- modules.json | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/modules.json b/modules.json index 9536706..1266e31 100644 --- a/modules.json +++ b/modules.json @@ -8,64 +8,48 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "star/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" }, "star/genomegenerate": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/genomegenerate/star-genomegenerate.diff" }, "trimmomatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/trimmomatic/trimmomatic.diff" } } } } } -} \ No newline at end of file +} From 30772834688e8acba25343b4c35c0d7e253e180f Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 28 Nov 2023 14:55:24 -0600 Subject: [PATCH 33/42] fix nf-test config/names/snapshot --- nf-test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf-test.config b/nf-test.config index ab4e35d..cb9d1aa 100644 --- a/nf-test.config +++ b/nf-test.config @@ -13,4 +13,4 @@ config { // run all test with the defined docker profile from the main nextflow.config profile "" -} +} \ No newline at end of file From 6364077ac4680d1c59de4318f3ead8466605d79c Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 28 Nov 2023 15:08:15 -0600 Subject: [PATCH 34/42] fix linting --- nf-test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf-test.config b/nf-test.config index cb9d1aa..ab4e35d 100644 --- a/nf-test.config +++ b/nf-test.config @@ -13,4 +13,4 @@ config { // run all test with the defined docker profile from the main nextflow.config profile "" -} \ No newline at end of file +} From cf3305ba594dc379b82fb66c035a1ae1f2a3da1e Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 28 Apr 2023 14:27:00 +0000 Subject: [PATCH 35/42] Template update for nf-core/tools version 2.8 --- conf/test_full.config | 2 ++ docs/usage.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/test_full.config b/conf/test_full.config index 97d0ff6..f0bf84b 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -10,6 +10,8 @@ ---------------------------------------------------------------------------------------- */ +cleanup = true + params { config_profile_name = 'Full test profile' config_profile_description = 'Full test dataset to check pipeline function' diff --git a/docs/usage.md b/docs/usage.md index 0714edf..7b29547 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -92,7 +92,7 @@ with `params.yaml` containing: ```yaml input: './samplesheet.csv' outdir: './results/' -genome: 'GRCh37' +genome: 'GRCh38' <...> ``` From d00e2f0cf6f9e7d4b3f4554d6e1d0b0756cab702 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 30 Jun 2023 16:16:34 +0000 Subject: [PATCH 36/42] Template update for nf-core/tools version 2.9 --- conf/test_full.config | 2 -- docs/usage.md | 3 ++- lib/WorkflowViralintegration.groovy | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/test_full.config b/conf/test_full.config index f0bf84b..97d0ff6 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -10,8 +10,6 @@ ---------------------------------------------------------------------------------------- */ -cleanup = true - params { config_profile_name = 'Full test profile' config_profile_description = 'Full test dataset to check pipeline function' diff --git a/docs/usage.md b/docs/usage.md index 7b29547..aaa89d7 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -61,7 +61,7 @@ By default, the pipeline uses the [CTAT-VIF human virus database](https://github The typical command for running the pipeline is as follows: ```bash -nextflow run nf-core/viralintegration --input ./samplesheet.csv --outdir ./results --genome GRCh37 -profile docker +nextflow run nf-core/viralintegration --input ./samplesheet.csv --outdir ./results --genome GRCh38 -profile docker ``` This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles. @@ -93,6 +93,7 @@ with `params.yaml` containing: input: './samplesheet.csv' outdir: './results/' genome: 'GRCh38' +input: 'data' <...> ``` diff --git a/lib/WorkflowViralintegration.groovy b/lib/WorkflowViralintegration.groovy index eef1368..5847c49 100755 --- a/lib/WorkflowViralintegration.groovy +++ b/lib/WorkflowViralintegration.groovy @@ -12,6 +12,7 @@ class WorkflowViralintegration { // public static void initialise(params, log) { + genomeExistsError(params, log) From 8021014d82242a65aeee5b6fce445e41f1dc5f1c Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Sat, 18 Feb 2023 17:56:25 -0600 Subject: [PATCH 37/42] bug fix: rollback star and samtools version --- modules.json | 6 ++- modules/nf-core/samtools/index/main.nf | 10 ++--- .../samtools/index/samtools-index.diff | 38 +++++++++++++++++++ modules/nf-core/samtools/sort/main.nf | 10 ++--- .../nf-core/samtools/sort/samtools-sort.diff | 37 ++++++++++++++++++ 5 files changed, 87 insertions(+), 14 deletions(-) create mode 100644 modules/nf-core/samtools/index/samtools-index.diff create mode 100644 modules/nf-core/samtools/sort/samtools-sort.diff diff --git a/modules.json b/modules.json index 1266e31..4d8f8ca 100644 --- a/modules.json +++ b/modules.json @@ -23,12 +23,14 @@ "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/samtools/index/samtools-index.diff" }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "star/align": { "branch": "master", diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 8b95687..c63797a 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(input) @@ -27,7 +27,6 @@ process SAMTOOLS_INDEX { -@ ${task.cpus-1} \\ $args \\ $input - cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') @@ -39,10 +38,9 @@ process SAMTOOLS_INDEX { touch ${input}.bai touch ${input}.crai touch ${input}.csi - cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} +} \ No newline at end of file diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff new file mode 100644 index 0000000..88f1250 --- /dev/null +++ b/modules/nf-core/samtools/index/samtools-index.diff @@ -0,0 +1,38 @@ +Changes in module 'nf-core/samtools/index' +--- modules/nf-core/samtools/index/main.nf ++++ modules/nf-core/samtools/index/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_low' + +- conda "bioconda::samtools=1.16.1" ++ conda "bioconda::samtools=1.15.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : +- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" ++ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : ++ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(input) +@@ -27,7 +27,6 @@ + -@ ${task.cpus-1} \\ + $args \\ + $input +- + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') +@@ -39,10 +38,9 @@ + touch ${input}.bai + touch ${input}.crai + touch ${input}.csi +- + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +-} ++} +************************************************************ diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 84c167c..c6a9a27 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,17 +2,16 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: tuple val(meta), path(bam) output: tuple val(meta), path("*.bam"), emit: bam - tuple val(meta), path("*.csi"), emit: csi, optional: true path "versions.yml" , emit: versions when: @@ -34,10 +33,9 @@ process SAMTOOLS_SORT { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam - cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} +} \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff new file mode 100644 index 0000000..a026f97 --- /dev/null +++ b/modules/nf-core/samtools/sort/samtools-sort.diff @@ -0,0 +1,37 @@ +Changes in module 'nf-core/samtools/sort' +--- modules/nf-core/samtools/sort/main.nf ++++ modules/nf-core/samtools/sort/main.nf +@@ -2,17 +2,16 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::samtools=1.16.1" ++ conda "bioconda::samtools=1.15.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : +- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" ++ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : ++ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam"), emit: bam +- tuple val(meta), path("*.csi"), emit: csi, optional: true + path "versions.yml" , emit: versions + + when: +@@ -34,10 +33,9 @@ + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam +- + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +-} ++} +************************************************************ From f922b2f55012a4bbc61325471d47fa08899b6dc7 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 22 Feb 2023 20:41:40 -0600 Subject: [PATCH 38/42] star/samtools: use matching mulled containers --- modules/nf-core/samtools/index/main.nf | 4 ++-- modules/nf-core/samtools/index/samtools-index.diff | 4 ++-- modules/nf-core/samtools/sort/main.nf | 4 ++-- modules/nf-core/samtools/sort/samtools-sort.diff | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index c63797a..7d3d4b0 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_INDEX { conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff index 88f1250..897fde1 100644 --- a/modules/nf-core/samtools/index/samtools-index.diff +++ b/modules/nf-core/samtools/index/samtools-index.diff @@ -10,8 +10,8 @@ Changes in module 'nf-core/samtools/index' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : -+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" ++ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : ++ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index c6a9a27..a3421d9 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_SORT { conda "bioconda::samtools=1.15.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff index a026f97..ab7c513 100644 --- a/modules/nf-core/samtools/sort/samtools-sort.diff +++ b/modules/nf-core/samtools/sort/samtools-sort.diff @@ -10,8 +10,8 @@ Changes in module 'nf-core/samtools/sort' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : -+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" ++ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : ++ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" input: tuple val(meta), path(bam) From 6ff6146572a1612fb68bfb6f15e85dd1919dd1a0 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Tue, 28 Nov 2023 10:31:09 -0600 Subject: [PATCH 39/42] update README and modules.json --- modules.json | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/modules.json b/modules.json index 4d8f8ca..93a2573 100644 --- a/modules.json +++ b/modules.json @@ -8,46 +8,60 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "multiqc": { "branch": "master", "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/index/samtools-index.diff" + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" + "installed_by": [ + "modules" + ] }, "star/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/align/star-align.diff" }, "star/genomegenerate": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/genomegenerate/star-genomegenerate.diff" }, "trimmomatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/trimmomatic/trimmomatic.diff" } } From b5bb0efeb16167091e6bcd9907a79bf726c3cd0c Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 29 Nov 2023 10:53:52 -0600 Subject: [PATCH 40/42] update modules --- modules.json | 18 +- .../dumpsoftwareversions/environment.yml | 7 + .../custom/dumpsoftwareversions/main.nf | 6 +- .../custom/dumpsoftwareversions/meta.yml | 7 +- .../templates/dumpsoftwareversions.py | 3 +- .../dumpsoftwareversions/tests/main.nf.test | 38 + .../tests/main.nf.test.snap | 27 + .../dumpsoftwareversions/tests/tags.yml | 2 + modules/nf-core/fastqc/environment.yml | 7 + modules/nf-core/fastqc/main.nf | 12 +- modules/nf-core/fastqc/meta.yml | 5 + modules/nf-core/fastqc/tests/main.nf.test | 41 + .../nf-core/fastqc/tests/main.nf.test.snap | 10 + modules/nf-core/fastqc/tests/tags.yml | 2 + modules/nf-core/multiqc/environment.yml | 7 + modules/nf-core/multiqc/main.nf | 8 +- modules/nf-core/multiqc/meta.yml | 11 +- modules/nf-core/multiqc/tests/main.nf.test | 91 +++ modules/nf-core/multiqc/tests/tags.yml | 2 + .../nf-core/samtools/index/environment.yml | 7 + modules/nf-core/samtools/index/main.nf | 10 +- modules/nf-core/samtools/index/meta.yml | 6 +- .../samtools/index/samtools-index.diff | 38 - .../samtools/index/tests/csi.nextflow.config | 7 + .../nf-core/samtools/index/tests/main.nf.test | 87 ++ .../samtools/index/tests/main.nf.test.snap | 28 + modules/nf-core/samtools/index/tests/tags.yml | 2 + modules/nf-core/samtools/sort/environment.yml | 7 + modules/nf-core/samtools/sort/main.nf | 18 +- modules/nf-core/samtools/sort/meta.yml | 5 +- .../nf-core/samtools/sort/samtools-sort.diff | 37 - .../nf-core/samtools/sort/tests/main.nf.test | 70 ++ .../samtools/sort/tests/main.nf.test.snap | 39 + .../samtools/sort/tests/nextflow.config | 7 + modules/nf-core/samtools/sort/tests/tags.yml | 3 + modules/nf-core/star/align/environment.yml | 9 + modules/nf-core/star/align/star-align.diff | 128 ++- modules/nf-core/star/align/tests/main.nf.test | 339 ++++++++ .../star/align/tests/main.nf.test.snap | 769 ++++++++++++++++++ .../star/align/tests/nextflow.arriba.config | 14 + .../nf-core/star/align/tests/nextflow.config | 14 + .../align/tests/nextflow.starfusion.config | 14 + modules/nf-core/star/align/tests/tags.yml | 2 + .../star/genomegenerate/environment.yml | 9 + .../genomegenerate/star-genomegenerate.diff | 60 +- .../star/genomegenerate/tests/main.nf.test | 38 + .../genomegenerate/tests/main.nf.test.snap | 16 + .../star/genomegenerate/tests/tags.yml | 2 + modules/nf-core/trimmomatic/environment.yml | 7 + .../nf-core/trimmomatic/tests/main.nf.test | 95 +++ .../trimmomatic/tests/main.nf.test.snap | 180 ++++ .../trimmomatic/tests/nextflow_PE.config | 6 + .../trimmomatic/tests/nextflow_SE.config | 6 + modules/nf-core/trimmomatic/tests/tags.yml | 2 + modules/nf-core/trimmomatic/trimmomatic.diff | 64 +- 55 files changed, 2316 insertions(+), 133 deletions(-) create mode 100644 modules/nf-core/custom/dumpsoftwareversions/environment.yml create mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test create mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap create mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml create mode 100644 modules/nf-core/fastqc/environment.yml create mode 100644 modules/nf-core/fastqc/tests/main.nf.test create mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap create mode 100644 modules/nf-core/fastqc/tests/tags.yml create mode 100644 modules/nf-core/multiqc/environment.yml create mode 100644 modules/nf-core/multiqc/tests/main.nf.test create mode 100644 modules/nf-core/multiqc/tests/tags.yml create mode 100644 modules/nf-core/samtools/index/environment.yml delete mode 100644 modules/nf-core/samtools/index/samtools-index.diff create mode 100644 modules/nf-core/samtools/index/tests/csi.nextflow.config create mode 100644 modules/nf-core/samtools/index/tests/main.nf.test create mode 100644 modules/nf-core/samtools/index/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/index/tests/tags.yml create mode 100644 modules/nf-core/samtools/sort/environment.yml delete mode 100644 modules/nf-core/samtools/sort/samtools-sort.diff create mode 100644 modules/nf-core/samtools/sort/tests/main.nf.test create mode 100644 modules/nf-core/samtools/sort/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/sort/tests/nextflow.config create mode 100644 modules/nf-core/samtools/sort/tests/tags.yml create mode 100644 modules/nf-core/star/align/environment.yml create mode 100644 modules/nf-core/star/align/tests/main.nf.test create mode 100644 modules/nf-core/star/align/tests/main.nf.test.snap create mode 100644 modules/nf-core/star/align/tests/nextflow.arriba.config create mode 100644 modules/nf-core/star/align/tests/nextflow.config create mode 100644 modules/nf-core/star/align/tests/nextflow.starfusion.config create mode 100644 modules/nf-core/star/align/tests/tags.yml create mode 100644 modules/nf-core/star/genomegenerate/environment.yml create mode 100644 modules/nf-core/star/genomegenerate/tests/main.nf.test create mode 100644 modules/nf-core/star/genomegenerate/tests/main.nf.test.snap create mode 100644 modules/nf-core/star/genomegenerate/tests/tags.yml create mode 100644 modules/nf-core/trimmomatic/environment.yml create mode 100644 modules/nf-core/trimmomatic/tests/main.nf.test create mode 100644 modules/nf-core/trimmomatic/tests/main.nf.test.snap create mode 100644 modules/nf-core/trimmomatic/tests/nextflow_PE.config create mode 100644 modules/nf-core/trimmomatic/tests/nextflow_SE.config create mode 100644 modules/nf-core/trimmomatic/tests/tags.yml diff --git a/modules.json b/modules.json index 93a2573..7fcbddd 100644 --- a/modules.json +++ b/modules.json @@ -7,42 +7,42 @@ "nf-core": { "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543", + "git_sha": "bba7e362e4afead70653f84d8700588ea28d0f9e", "installed_by": [ "modules" ] }, "fastqc": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", "installed_by": [ "modules" ] }, "multiqc": { "branch": "master", - "git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7", + "git_sha": "1537442a7be4a78efa3d1ff700a923c627bbda5d", "installed_by": [ "modules" ] }, "samtools/index": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "5394565c5fe4c760e5b35977ec7607c62e81d1f8", "installed_by": [ "modules" ] }, "samtools/sort": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", "installed_by": [ "modules" ] }, "star/align": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "9f6b233518f7d9ecdcf24b798b7e491db5424273", "installed_by": [ "modules" ], @@ -50,7 +50,7 @@ }, "star/genomegenerate": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "0e98289b5bec6e3f8f588a8a9d05e8aacc1179a0", "installed_by": [ "modules" ], @@ -58,7 +58,7 @@ }, "trimmomatic": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", "installed_by": [ "modules" ], @@ -68,4 +68,4 @@ } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml new file mode 100644 index 0000000..f0c63f6 --- /dev/null +++ b/modules/nf-core/custom/dumpsoftwareversions/environment.yml @@ -0,0 +1,7 @@ +name: custom_dumpsoftwareversions +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::multiqc=1.17 diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 800a609..7685b33 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "bioconda::multiqc=1.14" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.17--pyhdfd78af_0' : + 'biocontainers/multiqc:1.17--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index c32657d..5f15a5f 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: custom_dumpsoftwareversions description: Custom module used to dump software versions within the nf-core pipeline template keywords: @@ -16,7 +16,6 @@ input: type: file description: YML file containing software versions pattern: "*.yml" - output: - yml: type: file @@ -30,7 +29,9 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@drpatelh" - "@grst" +maintainers: + - "@drpatelh" + - "@grst" diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py index e55b8d4..da03340 100755 --- a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py @@ -4,11 +4,10 @@ """Provide functions to merge multiple versions.yml files.""" +import yaml import platform from textwrap import dedent -import yaml - def _make_versions_html(versions): """Generate a tabular HTML output of all versions for MultiQC.""" diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test new file mode 100644 index 0000000..eec1db1 --- /dev/null +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test @@ -0,0 +1,38 @@ +nextflow_process { + + name "Test Process CUSTOM_DUMPSOFTWAREVERSIONS" + script "../main.nf" + process "CUSTOM_DUMPSOFTWAREVERSIONS" + tag "modules" + tag "modules_nfcore" + tag "custom" + tag "dumpsoftwareversions" + tag "custom/dumpsoftwareversions" + + test("Should run without failures") { + when { + process { + """ + def tool1_version = ''' + TOOL1: + tool1: 0.11.9 + '''.stripIndent() + + def tool2_version = ''' + TOOL2: + tool2: 1.9 + '''.stripIndent() + + input[0] = Channel.of(tool1_version, tool2_version).collectFile() + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap new file mode 100644 index 0000000..4274ed5 --- /dev/null +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap @@ -0,0 +1,27 @@ +{ + "Should run without failures": { + "content": [ + { + "0": [ + "software_versions.yml:md5,1c851188476409cda5752ce971b20b58" + ], + "1": [ + "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d" + ], + "2": [ + "versions.yml:md5,3843ac526e762117eedf8825b40683df" + ], + "mqc_yml": [ + "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d" + ], + "versions": [ + "versions.yml:md5,3843ac526e762117eedf8825b40683df" + ], + "yml": [ + "software_versions.yml:md5,1c851188476409cda5752ce971b20b58" + ] + } + ], + "timestamp": "2023-11-03T14:43:22.157011" + } +} diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml b/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml new file mode 100644 index 0000000..405aa24 --- /dev/null +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml @@ -0,0 +1,2 @@ +custom/dumpsoftwareversions: + - modules/nf-core/custom/dumpsoftwareversions/** diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml new file mode 100644 index 0000000..1787b38 --- /dev/null +++ b/modules/nf-core/fastqc/environment.yml @@ -0,0 +1,7 @@ +name: fastqc +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 9ae5838..50e59f2 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -2,10 +2,10 @@ process FASTQC { tag "$meta.id" label 'process_medium' - conda "bioconda::fastqc=0.11.9" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' : - 'quay.io/biocontainers/fastqc:0.11.9--0' }" + 'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' : + 'biocontainers/fastqc:0.12.1--hdfd78af_0' }" input: tuple val(meta), path(reads) @@ -29,7 +29,11 @@ process FASTQC { printf "%s %s\\n" $rename_to | while read old_name new_name; do [ -f "\${new_name}" ] || ln -s \$old_name \$new_name done - fastqc $args --threads $task.cpus $renamed_files + + fastqc \\ + $args \\ + --threads $task.cpus \\ + $renamed_files cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml index 4da5bb5..ee5507e 100644 --- a/modules/nf-core/fastqc/meta.yml +++ b/modules/nf-core/fastqc/meta.yml @@ -50,3 +50,8 @@ authors: - "@grst" - "@ewels" - "@FelixKrueger" +maintainers: + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test new file mode 100644 index 0000000..6437a14 --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -0,0 +1,41 @@ +nextflow_process { + + name "Test Process FASTQC" + script "../main.nf" + process "FASTQC" + tag "modules" + tag "modules_nfcore" + tag "fastqc" + + test("Single-Read") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + 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.get(0).get(1) ==~ ".*/test_fastqc.html" }, + { assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match("versions") }, + { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" } + ) + } + } +} diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap new file mode 100644 index 0000000..636a32c --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "timestamp": "2023-10-09T23:40:54+0000" + } +} \ No newline at end of file diff --git a/modules/nf-core/fastqc/tests/tags.yml b/modules/nf-core/fastqc/tests/tags.yml new file mode 100644 index 0000000..7834294 --- /dev/null +++ b/modules/nf-core/fastqc/tests/tags.yml @@ -0,0 +1,2 @@ +fastqc: + - modules/nf-core/fastqc/** diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml new file mode 100644 index 0000000..bc0bdb5 --- /dev/null +++ b/modules/nf-core/multiqc/environment.yml @@ -0,0 +1,7 @@ +name: multiqc +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::multiqc=1.18 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 4b60474..00cc48d 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_single' - conda "bioconda::multiqc=1.14" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.18--pyhdfd78af_0' : + 'biocontainers/multiqc:1.18--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" @@ -25,12 +25,14 @@ process MULTIQC { def args = task.ext.args ?: '' 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}"'/ : '' """ multiqc \\ --force \\ $args \\ $config \\ $extra_config \\ + $logo \\ . cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index f93b5ee..f1aa660 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,5 +1,5 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: MultiQC +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: multiqc description: Aggregate results from bioinformatics analyses across many samples into a single report keywords: - QC @@ -13,7 +13,6 @@ tools: homepage: https://multiqc.info/ documentation: https://multiqc.info/docs/ licence: ["GPL-3.0-or-later"] - input: - multiqc_files: type: file @@ -31,7 +30,6 @@ input: type: file description: Optional logo file for MultiQC pattern: "*.{png}" - output: - report: type: file @@ -54,3 +52,8 @@ authors: - "@bunop" - "@drpatelh" - "@jfy133" +maintainers: + - "@abhi18av" + - "@bunop" + - "@drpatelh" + - "@jfy133" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test new file mode 100644 index 0000000..68fffa9 --- /dev/null +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -0,0 +1,91 @@ +nextflow_process { + + name "Test Process MULTIQC" + script "../main.nf" + process "MULTIQC" + tag "modules" + tag "modules_nfcore" + tag "multiqc" + + test("MULTIQC: FASTQC") { + + setup { + run("FASTQC") { + script "../../fastqc/main.nf" + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end: false ], + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = FASTQC.out.zip.collect { it[1] } + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.report.get(0)).exists() }, + { assert path(process.out.data.get(0)).exists() }, + { assert path(process.out.versions.get(0)).getText().contains("multiqc") } + ) + } + + } + + test("MULTIQC: FASTQC and a config file") { + + setup { + run("FASTQC") { + script "../../fastqc/main.nf" + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end: false ], + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = FASTQC.out.zip.collect { it[1] } + 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] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.report.get(0)).exists() }, + { assert path(process.out.data.get(0)).exists() }, + { assert path(process.out.versions.get(0)).getText().contains("multiqc") } + ) + } + + } +} diff --git a/modules/nf-core/multiqc/tests/tags.yml b/modules/nf-core/multiqc/tests/tags.yml new file mode 100644 index 0000000..bea6c0d --- /dev/null +++ b/modules/nf-core/multiqc/tests/tags.yml @@ -0,0 +1,2 @@ +multiqc: + - modules/nf-core/multiqc/** diff --git a/modules/nf-core/samtools/index/environment.yml b/modules/nf-core/samtools/index/environment.yml new file mode 100644 index 0000000..3c6f95b --- /dev/null +++ b/modules/nf-core/samtools/index/environment.yml @@ -0,0 +1,7 @@ +name: samtools_index +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.17 diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 7d3d4b0..256bd7c 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.15.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : - 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) @@ -27,6 +27,7 @@ process SAMTOOLS_INDEX { -@ ${task.cpus-1} \\ $args \\ $input + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') @@ -38,9 +39,10 @@ process SAMTOOLS_INDEX { touch ${input}.bai touch ${input}.crai touch ${input}.csi + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml index e5cadbc..01a4ee0 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -12,7 +12,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: @@ -51,3 +51,7 @@ authors: - "@drpatelh" - "@ewels" - "@maxulysse" +maintainers: + - "@drpatelh" + - "@ewels" + - "@maxulysse" diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff deleted file mode 100644 index 897fde1..0000000 --- a/modules/nf-core/samtools/index/samtools-index.diff +++ /dev/null @@ -1,38 +0,0 @@ -Changes in module 'nf-core/samtools/index' ---- modules/nf-core/samtools/index/main.nf -+++ modules/nf-core/samtools/index/main.nf -@@ -2,10 +2,10 @@ - tag "$meta.id" - label 'process_low' - -- conda "bioconda::samtools=1.16.1" -+ conda "bioconda::samtools=1.15.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : -- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : -+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" - - input: - tuple val(meta), path(input) -@@ -27,7 +27,6 @@ - -@ ${task.cpus-1} \\ - $args \\ - $input -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -@@ -39,10 +38,9 @@ - touch ${input}.bai - touch ${input}.crai - touch ${input}.csi -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ --} -+} -************************************************************ diff --git a/modules/nf-core/samtools/index/tests/csi.nextflow.config b/modules/nf-core/samtools/index/tests/csi.nextflow.config new file mode 100644 index 0000000..0ed260e --- /dev/null +++ b/modules/nf-core/samtools/index/tests/csi.nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: SAMTOOLS_INDEX { + ext.args = '-c' + } + +} diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test new file mode 100644 index 0000000..c76a916 --- /dev/null +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -0,0 +1,87 @@ +nextflow_process { + + name "Test Process SAMTOOLS_INDEX" + script "../main.nf" + process "SAMTOOLS_INDEX" + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/index" + + test("sarscov2 [BAI]") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.bai).match("bai") }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } + + test("homo_sapiens [CRAI]") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.crai).match("crai") }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } + + test("homo_sapiens [CSI]") { + + config "./csi.nextflow.config" + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.csi.get(0).get(1)).exists() }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } +} diff --git a/modules/nf-core/samtools/index/tests/main.nf.test.snap b/modules/nf-core/samtools/index/tests/main.nf.test.snap new file mode 100644 index 0000000..b3baee7 --- /dev/null +++ b/modules/nf-core/samtools/index/tests/main.nf.test.snap @@ -0,0 +1,28 @@ +{ + "crai": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ] + ], + "timestamp": "2023-11-15T15:17:37.30801" + }, + "bai": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ] + ], + "timestamp": "2023-11-15T15:17:30.869234" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/index/tests/tags.yml b/modules/nf-core/samtools/index/tests/tags.yml new file mode 100644 index 0000000..e0f58a7 --- /dev/null +++ b/modules/nf-core/samtools/index/tests/tags.yml @@ -0,0 +1,2 @@ +samtools/index: + - modules/nf-core/samtools/index/** diff --git a/modules/nf-core/samtools/sort/environment.yml b/modules/nf-core/samtools/sort/environment.yml new file mode 100644 index 0000000..508659f --- /dev/null +++ b/modules/nf-core/samtools/sort/environment.yml @@ -0,0 +1,7 @@ +name: samtools_sort +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.17 diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index a3421d9..60f0c63 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,16 +2,17 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.15.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : - 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) output: tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.csi"), emit: csi, optional: true path "versions.yml" , emit: versions when: @@ -22,7 +23,13 @@ process SAMTOOLS_SORT { def prefix = task.ext.prefix ?: "${meta.id}" if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ - samtools sort $args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam + samtools sort \\ + $args \\ + -@ $task.cpus \\ + -o ${prefix}.bam \\ + -T $prefix \\ + $bam + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') @@ -33,9 +40,10 @@ process SAMTOOLS_SORT { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ -} \ No newline at end of file +} diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index 0928975..2200de7 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -12,7 +12,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: @@ -46,3 +46,6 @@ output: authors: - "@drpatelh" - "@ewels" +maintainers: + - "@drpatelh" + - "@ewels" diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff deleted file mode 100644 index ab7c513..0000000 --- a/modules/nf-core/samtools/sort/samtools-sort.diff +++ /dev/null @@ -1,37 +0,0 @@ -Changes in module 'nf-core/samtools/sort' ---- modules/nf-core/samtools/sort/main.nf -+++ modules/nf-core/samtools/sort/main.nf -@@ -2,17 +2,16 @@ - tag "$meta.id" - label 'process_medium' - -- conda "bioconda::samtools=1.16.1" -+ conda "bioconda::samtools=1.15.1" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : -- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" -+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : -+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" - - input: - tuple val(meta), path(bam) - - output: - tuple val(meta), path("*.bam"), emit: bam -- tuple val(meta), path("*.csi"), emit: csi, optional: true - path "versions.yml" , emit: versions - - when: -@@ -34,10 +33,9 @@ - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.bam -- - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ --} -+} -************************************************************ diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test b/modules/nf-core/samtools/sort/tests/main.nf.test new file mode 100644 index 0000000..1f72f3b --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/main.nf.test @@ -0,0 +1,70 @@ +nextflow_process { + + name "Test Process SAMTOOLS_SORT" + script "../main.nf" + process "SAMTOOLS_SORT" + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/sort" + + test("test_samtools_sort") { + + config "./nextflow.config" + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("test_samtools_sort_stub") { + + config "./nextflow.config" + options "-stub-run" + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test.snap b/modules/nf-core/samtools/sort/tests/main.nf.test.snap new file mode 100644 index 0000000..a43566d --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap @@ -0,0 +1,39 @@ +{ + "test_samtools_sort": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,a29570e7607d217c2fa4d75829e09cd7" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,46f7a36082fa1f68285fe30d689244e8" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,a29570e7607d217c2fa4d75829e09cd7" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,46f7a36082fa1f68285fe30d689244e8" + ] + } + ], + "timestamp": "2023-10-17T17:21:46.5427968" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/tests/nextflow.config b/modules/nf-core/samtools/sort/tests/nextflow.config new file mode 100644 index 0000000..d0f3508 --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: SAMTOOLS_SORT { + ext.prefix = { "${meta.id}.sorted" } + } + +} diff --git a/modules/nf-core/samtools/sort/tests/tags.yml b/modules/nf-core/samtools/sort/tests/tags.yml new file mode 100644 index 0000000..cd63ea2 --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/tags.yml @@ -0,0 +1,3 @@ +samtools/sort: + - modules/nf-core/samtools/sort/** + - tests/modules/nf-core/samtools/sort/** diff --git a/modules/nf-core/star/align/environment.yml b/modules/nf-core/star/align/environment.yml new file mode 100644 index 0000000..6db2098 --- /dev/null +++ b/modules/nf-core/star/align/environment.yml @@ -0,0 +1,9 @@ +name: star_align +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::star=2.7.10a + - bioconda::samtools=1.16.1 + - conda-forge::gawk=5.1.0 diff --git a/modules/nf-core/star/align/star-align.diff b/modules/nf-core/star/align/star-align.diff index 9e56c72..6ba86af 100644 --- a/modules/nf-core/star/align/star-align.diff +++ b/modules/nf-core/star/align/star-align.diff @@ -1,31 +1,134 @@ Changes in module 'nf-core/star/align' +--- modules/nf-core/star/align/meta.yml ++++ modules/nf-core/star/align/meta.yml +@@ -25,33 +25,10 @@ + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. +- - meta2: +- type: map +- description: | +- Groovy Map containing reference information +- e.g. [ id:'test' ] + - index: + type: directory + description: STAR genome index + pattern: "star" +- - meta3: +- type: map +- description: | +- Groovy Map containing reference information +- e.g. [ id:'test' ] +- - gtf: +- type: file +- description: Annotation GTF file +- pattern: "*.{gtf}" +- - star_ignore_sjdbgtf: +- type: boolean +- description: Ignore annotation GTF file +- - seq_platform: +- type: string +- description: Sequencing platform +- - seq_center: +- type: string +- description: Sequencing center + output: + - bam: + type: file +@@ -97,19 +74,8 @@ + type: file + description: STAR chimeric junction output file (optional) + pattern: "*.out.junction" +- - wig: +- type: file +- description: STAR output wiggle format file(s) (optional) +- pattern: "*.wig" +- - bedgraph: +- type: file +- description: STAR output bedGraph format file(s) (optional) +- pattern: "*.bg" ++ + authors: + - "@kevinmenden" + - "@drpatelh" + - "@praveenraj2018" +-maintainers: +- - "@kevinmenden" +- - "@drpatelh" +- - "@praveenraj2018" + --- modules/nf-core/star/align/main.nf +++ modules/nf-core/star/align/main.nf -@@ -2,15 +2,16 @@ +@@ -2,37 +2,34 @@ tag "$meta.id" label 'process_high' -- conda "bioconda::star=2.7.10a bioconda::samtools=1.16.1 conda-forge::gawk=5.1.0" +- conda "${moduleDir}/environment.yml" + // Note: 2.7X indices incompatible with AWS iGenomes. + conda "bioconda::star=2.7.9a" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : -- 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" +- 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:019f262d90511939dce2dca4b7c868fc108f73db-0' : +- 'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:019f262d90511939dce2dca4b7c868fc108f73db-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1c4c32d87798d425c970ececfbadd155e7560277-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1c4c32d87798d425c970ececfbadd155e7560277-0' }" input: - tuple val(meta), path(reads) -- path index -- path gtf +- tuple val(meta), path(reads, stageAs: "input*/*") +- tuple val(meta2), path(index) +- tuple val(meta3), path(gtf) ++ tuple val(meta), path(reads) + path index + path gtf val star_ignore_sjdbgtf val seq_platform val seq_center -@@ -51,9 +52,7 @@ + + output: ++ tuple val(meta), path('*d.out.bam') , emit: bam + tuple val(meta), path('*Log.final.out') , emit: log_final + tuple val(meta), path('*Log.out') , emit: log_out + tuple val(meta), path('*Log.progress.out'), emit: log_progress + path "versions.yml" , emit: versions + +- tuple val(meta), path('*d.out.bam') , optional:true, emit: bam + tuple val(meta), path('*sortedByCoord.out.bam') , optional:true, emit: bam_sorted + tuple val(meta), path('*toTranscriptome.out.bam'), optional:true, emit: bam_transcript + tuple val(meta), path('*Aligned.unsort.out.bam') , optional:true, emit: bam_unsorted + tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq + tuple val(meta), path('*.tab') , optional:true, emit: tab +- tuple val(meta), path('*.SJ.out.tab') , optional:true, emit: spl_junc_tab +- tuple val(meta), path('*.ReadsPerGene.out.tab') , optional:true, emit: read_per_gene_tab + tuple val(meta), path('*.out.junction') , optional:true, emit: junction + tuple val(meta), path('*.out.sam') , optional:true, emit: sam +- tuple val(meta), path('*.wig') , optional:true, emit: wig +- tuple val(meta), path('*.bg') , optional:true, emit: bedgraph + + when: + task.ext.when == null || task.ext.when +@@ -40,27 +37,22 @@ + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" +- def reads1 = [], reads2 = [] +- meta.single_end ? [reads].flatten().each{reads1 << it} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } + def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" + def seq_platform = seq_platform ? "'PL:$seq_platform'" : "" +- def seq_center = seq_center ? "'CN:$seq_center'" : "" +- def attrRG = args.contains("--outSAMattrRGline") ? "" : "--outSAMattrRGline 'ID:$prefix' $seq_center 'SM:$prefix' $seq_platform" ++ def seq_center = seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$seq_center' 'SM:$prefix' $seq_platform " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform " + def out_sam_type = (args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted' + def mv_unsorted_bam = (args.contains('--outSAMtype BAM Unsorted SortedByCoordinate')) ? "mv ${prefix}.Aligned.out.bam ${prefix}.Aligned.unsort.out.bam" : '' + """ + STAR \\ + --genomeDir $index \\ +- --readFilesIn ${reads1.join(",")} ${reads2.join(",")} \\ ++ --readFilesIn $reads \\ + --runThreadN $task.cpus \\ + --outFileNamePrefix $prefix. \\ + $out_sam_type \\ $ignore_gtf \\ - $seq_center \\ +- $attrRG \\ ++ $seq_center \\ $args - $mv_unsorted_bam @@ -33,7 +136,7 @@ Changes in module 'nf-core/star/align' if [ -f ${prefix}.Unmapped.out.mate1 ]; then mv ${prefix}.Unmapped.out.mate1 ${prefix}.unmapped_1.fastq gzip ${prefix}.unmapped_1.fastq -@@ -62,36 +61,9 @@ +@@ -69,41 +61,9 @@ mv ${prefix}.Unmapped.out.mate2 ${prefix}.unmapped_2.fastq gzip ${prefix}.unmapped_2.fastq fi @@ -56,11 +159,16 @@ Changes in module 'nf-core/star/align' - touch ${prefix}.sortedByCoord.out.bam - 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 - touch ${prefix}.Chimeric.out.junction - touch ${prefix}.out.sam +- touch ${prefix}.Signal.UniqueMultiple.str1.out.wig +- touch ${prefix}.Signal.UniqueMultiple.str1.out.bg - - cat <<-END_VERSIONS > versions.yml - "${task.process}": diff --git a/modules/nf-core/star/align/tests/main.nf.test b/modules/nf-core/star/align/tests/main.nf.test new file mode 100644 index 0000000..4c87847 --- /dev/null +++ b/modules/nf-core/star/align/tests/main.nf.test @@ -0,0 +1,339 @@ +nextflow_process { + + name "Test Process STAR_ALIGN" + script "../main.nf" + process "STAR_ALIGN" + tag "modules" + tag "modules_nfcore" + tag "star" + tag "star/align" + + 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.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true) ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['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).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") } + ) + } + } + + 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.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['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).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") } + ) + } + } + + 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.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['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).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") } + ) + } + } + + 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.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['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).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") } + ) + } + } + + 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.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + ]) + """ + } + } + } + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) + ] + ]) + input[1] = STAR_GENOMEGENERATE.out.index + input[2] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['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).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") } + ) + } + } +} \ No newline at end of file diff --git a/modules/nf-core/star/align/tests/main.nf.test.snap b/modules/nf-core/star/align/tests/main.nf.test.snap new file mode 100644 index 0000000..59b735d --- /dev/null +++ b/modules/nf-core/star/align/tests/main.nf.test.snap @@ -0,0 +1,769 @@ +{ + "homo_sapiens - paired_end - multiple - bam_sorted": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" + ] + ] + ], + "timestamp": "2023-11-23T13:29:01.19639" + }, + "homo_sapiens - paired_end - multiple - wig": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:29:01.857804" + }, + "homo_sapiens - paired_end - arriba - tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" + ] + ] + ], + "timestamp": "2023-11-23T13:25:07.396223" + }, + "homo_sapiens - single_end - wig": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:22:55.24701" + }, + "homo_sapiens - paired_end - sam": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:23:33.383818" + }, + "homo_sapiens - paired_end - arriba - versions": { + "content": [ + [ + "versions.yml:md5,452ef035aacbc68d47041e86279a9333" + ] + ], + "timestamp": "2023-11-23T13:25:07.494015" + }, + "homo_sapiens - paired_end - multiple - bedgraph": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", + "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" + ] + ] + ] + ], + "timestamp": "2023-11-23T13:29:01.396383" + }, + "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 + }, + "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" + ] + ] + ], + "timestamp": "2023-11-23T13:25:07.348239" + }, + "homo_sapiens - single_end - sam": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:22:55.216183" + }, + "homo_sapiens - paired_end - fastq": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:23:33.327236" + }, + "homo_sapiens - single_end - versions": { + "content": [ + [ + "versions.yml:md5,452ef035aacbc68d47041e86279a9333" + ] + ], + "timestamp": "2023-11-23T13:22:55.259282" + }, + "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" + }, + "homo_sapiens - paired_end - multiple - spl_junc_tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" + ] + ] + ], + "timestamp": "2023-11-23T13:29:01.729175" + }, + "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" + ] + ] + ], + "timestamp": "2023-11-23T13:27:56.003675" + }, + "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 + }, + [ + "test.Signal.Unique.str1.out.bg:md5,c56fc1472776fb927eaf62d973da5f9a", + "test.Signal.UniqueMultiple.str1.out.bg:md5,e93373cf6f2a2a9506e2efdb260cdd4f" + ] + ] + ] + ], + "timestamp": "2023-11-23T13:22:55.163495" + }, + "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" + ] + ] + ], + "timestamp": "2023-11-23T13:23:33.265265" + }, + "homo_sapiens - paired_end - arriba - bam_transcript": { + "content": [ + [ + + ] + ], + "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,452ef035aacbc68d47041e86279a9333" + ] + ], + "timestamp": "2023-11-23T13:29:01.937182" + }, + "homo_sapiens - paired_end - starfusion - bam_transcript": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:27:56.082408" + }, + "homo_sapiens - paired_end - starfusion - tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" + ] + ] + ], + "timestamp": "2023-11-23T13:27:56.379367" + }, + "homo_sapiens - single_end - fastq": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:22:55.175307" + }, + "homo_sapiens - paired_end - tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" + ] + ] + ], + "timestamp": "2023-11-23T13:23:33.413683" + }, + "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,452ef035aacbc68d47041e86279a9333" + ] + ], + "timestamp": "2023-11-23T13:23:33.445323" + }, + "homo_sapiens - paired_end - multiple - tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" + ] + ] + ], + "timestamp": "2023-11-23T13:29:01.793129" + }, + "homo_sapiens - single_end - bam": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" + ] + ] + ], + "timestamp": "2023-11-23T13:22:55.128568" + }, + "homo_sapiens - paired_end - arriba - wig": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:25:07.444214" + }, + "homo_sapiens - paired_end - log_progress": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.Log.progress.out:md5,b2bd061d6cbaaf3d6d3b1fed547f69b8" + ] + ] + ], + "timestamp": "2023-11-23T13:23:33.354416" + }, + "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" + }, + "homo_sapiens - paired_end - multiple - bam": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" + ] + ] + ], + "timestamp": "2023-11-23T13:29:01.13168" + }, + "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-11-23T13:22:55.134799" + }, + "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-11-23T13:27:56.228327" + }, + "homo_sapiens - single_end - tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" + ] + ] + ], + "timestamp": "2023-11-23T13:22:55.236346" + }, + "homo_sapiens - paired_end - starfusion - versions": { + "content": [ + [ + "versions.yml:md5,452ef035aacbc68d47041e86279a9333" + ] + ], + "timestamp": "2023-11-23T13:27:56.460903" + }, + "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" + ] + ] + ] + ], + "timestamp": "2023-11-23T13:23:33.313258" + }, + "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" + ] + ] + ], + "timestamp": "2023-11-23T13:23:33.274809" + }, + "homo_sapiens - single_end - spl_junc_tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" + ] + ] + ], + "timestamp": "2023-11-23T13:22:55.226143" + }, + "homo_sapiens - paired_end - starfusion - spl_junc_tab": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" + ] + ] + ], + "timestamp": "2023-11-23T13:27:56.337072" + }, + "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-11-23T13:23:33.398603" + }, + "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" + ] + ] + ], + "timestamp": "2023-11-23T13:25:06.887604" + }, + "homo_sapiens - single_end - log_progress": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.Log.progress.out:md5,b2bd061d6cbaaf3d6d3b1fed547f69b8" + ] + ] + ], + "timestamp": "2023-11-23T13:22:55.195544" + }, + "homo_sapiens - paired_end - starfusion - wig": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:27:56.422018" + }, + "homo_sapiens - paired_end - wig": { + "content": [ + [ + + ] + ], + "timestamp": "2023-11-23T13:23:33.429457" + }, + "homo_sapiens - paired_end - starfusion - log_out": { + "content": [ + "test.Log.out" + ], + "timestamp": "2023-11-23T13:27:55.93945" + } +} \ No newline at end of file diff --git a/modules/nf-core/star/align/tests/nextflow.arriba.config b/modules/nf-core/star/align/tests/nextflow.arriba.config new file mode 100644 index 0000000..2324b9e --- /dev/null +++ b/modules/nf-core/star/align/tests/nextflow.arriba.config @@ -0,0 +1,14 @@ +process { + + withName: STAR_GENOMEGENERATE { + ext.args = '--genomeSAindexNbases 9' + } + + withName: STAR_ALIGN { + ext.args = '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50' + } + +} + +// Fix chown issue for the output star folder +docker.runOptions = '--platform=linux/amd64 -u $(id -u):$(id -g)' diff --git a/modules/nf-core/star/align/tests/nextflow.config b/modules/nf-core/star/align/tests/nextflow.config new file mode 100644 index 0000000..c4ac580 --- /dev/null +++ b/modules/nf-core/star/align/tests/nextflow.config @@ -0,0 +1,14 @@ +process { + + withName: STAR_GENOMEGENERATE { + ext.args = '--genomeSAindexNbases 9' + } + + withName: STAR_ALIGN { + ext.args = '--readFilesCommand zcat --outSAMtype BAM SortedByCoordinate --outWigType bedGraph --outWigStrand Unstranded' + } + +} + +// Fix chown issue for the output star folder +docker.runOptions = '--platform=linux/amd64 -u $(id -u):$(id -g)' diff --git a/modules/nf-core/star/align/tests/nextflow.starfusion.config b/modules/nf-core/star/align/tests/nextflow.starfusion.config new file mode 100644 index 0000000..467b649 --- /dev/null +++ b/modules/nf-core/star/align/tests/nextflow.starfusion.config @@ -0,0 +1,14 @@ +process { + + withName: STAR_GENOMEGENERATE { + ext.args = '--genomeSAindexNbases 9' + } + + withName: STAR_ALIGN { + ext.args = '--readFilesCommand zcat --outSAMtype BAM Unsorted --outReadsUnmapped None --twopassMode Basic --outSAMstrandField intronMotif --outSAMunmapped Within --chimSegmentMin 12 --chimJunctionOverhangMin 8 --chimOutJunctionFormat 1 --alignSJDBoverhangMin 10 --alignMatesGapMax 100000 --alignIntronMax 100000 --alignSJstitchMismatchNmax 5 -1 5 5 --chimMultimapScoreRange 3 --chimScoreJunctionNonGTAG -4 --chimMultimapNmax 20 --chimNonchimScoreDropMin 10 --peOverlapNbasesMin 12 --peOverlapMMp 0.1 --alignInsertionFlush Right --alignSplicedMateMapLminOverLmate 0 --alignSplicedMateMapLmin 30' + } + +} + +// Fix chown issue for the output star folder +docker.runOptions = '--platform=linux/amd64 -u $(id -u):$(id -g)' diff --git a/modules/nf-core/star/align/tests/tags.yml b/modules/nf-core/star/align/tests/tags.yml new file mode 100644 index 0000000..8beace1 --- /dev/null +++ b/modules/nf-core/star/align/tests/tags.yml @@ -0,0 +1,2 @@ +star/align: + - modules/nf-core/star/align/** diff --git a/modules/nf-core/star/genomegenerate/environment.yml b/modules/nf-core/star/genomegenerate/environment.yml new file mode 100644 index 0000000..0b35ff5 --- /dev/null +++ b/modules/nf-core/star/genomegenerate/environment.yml @@ -0,0 +1,9 @@ +name: star_genomegenerate +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::star=2.7.10a + - bioconda::samtools=1.16.1 + - conda-forge::gawk=5.1.0 diff --git a/modules/nf-core/star/genomegenerate/star-genomegenerate.diff b/modules/nf-core/star/genomegenerate/star-genomegenerate.diff index 329cdc1..6099098 100644 --- a/modules/nf-core/star/genomegenerate/star-genomegenerate.diff +++ b/modules/nf-core/star/genomegenerate/star-genomegenerate.diff @@ -1,26 +1,72 @@ Changes in module 'nf-core/star/genomegenerate' +--- modules/nf-core/star/genomegenerate/meta.yml ++++ modules/nf-core/star/genomegenerate/meta.yml +@@ -15,28 +15,14 @@ + doi: 10.1093/bioinformatics/bts635 + licence: ["MIT"] + input: +- - meta: +- type: map +- description: | +- Groovy Map containing sample information +- e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Fasta file of the reference genome +- - meta2: +- type: map +- description: | +- Groovy Map containing reference information +- e.g. [ id:'test' ] + - gtf: + type: file + description: GTF file of the reference genome ++ + output: +- - meta: +- type: map +- description: | +- Groovy Map containing sample information +- e.g. [ id:'test', single_end:false ] + - index: + type: directory + description: Folder containing the star index files +@@ -45,9 +31,7 @@ + type: file + description: File containing software versions + pattern: "versions.yml" ++ + authors: + - "@kevinmenden" + - "@drpatelh" +-maintainers: +- - "@kevinmenden" +- - "@drpatelh" + --- modules/nf-core/star/genomegenerate/main.nf +++ modules/nf-core/star/genomegenerate/main.nf @@ -2,18 +2,19 @@ tag "$fasta" label 'process_high' -- conda "bioconda::star=2.7.10a bioconda::samtools=1.16.1 conda-forge::gawk=5.1.0" +- conda "${moduleDir}/environment.yml" + // Note: 2.7X indices incompatible with AWS iGenomes. + conda "bioconda::star=2.7.9a bioconda::samtools=1.15.1 conda-forge::gawk=5.1.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? -- 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' : -- 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }" +- 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:019f262d90511939dce2dca4b7c868fc108f73db-0' : +- 'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:019f262d90511939dce2dca4b7c868fc108f73db-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1c4c32d87798d425c970ececfbadd155e7560277-0' : + 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1c4c32d87798d425c970ececfbadd155e7560277-0' }" input: - path fasta - path gtf +- tuple val(meta), path(fasta) +- tuple val(meta2), path(gtf) ++ path fasta ++ path gtf output: -- path "star" , emit: index -- path "versions.yml", emit: versions +- tuple val(meta), path("star") , emit: index +- path "versions.yml" , emit: versions + path "star" , emit: index + path "versions.yml" , emit: versions diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test b/modules/nf-core/star/genomegenerate/tests/main.nf.test new file mode 100644 index 0000000..eed8292 --- /dev/null +++ b/modules/nf-core/star/genomegenerate/tests/main.nf.test @@ -0,0 +1,38 @@ +nextflow_process { + + name "Test Process STAR_GENOMEGENERATE" + script "../main.nf" + process "STAR_GENOMEGENERATE" + tag "modules" + tag "modules_nfcore" + tag "star" + tag "star/genomegenerate" + + test("homo_sapiens") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test_fasta' ], + [file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + ]) + input[1] = Channel.of([ + [ id:'test_gtf' ], + [file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.index[0][1]).name).match("index") }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap b/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap new file mode 100644 index 0000000..bd4e0ca --- /dev/null +++ b/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap @@ -0,0 +1,16 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,9c11319b80fdedc90dadce4e0fb42ded" + ] + ], + "timestamp": "2023-11-23T11:18:14.835118" + }, + "index": { + "content": [ + "star" + ], + "timestamp": "2023-11-23T11:31:47.560528" + } +} \ No newline at end of file diff --git a/modules/nf-core/star/genomegenerate/tests/tags.yml b/modules/nf-core/star/genomegenerate/tests/tags.yml new file mode 100644 index 0000000..79f619b --- /dev/null +++ b/modules/nf-core/star/genomegenerate/tests/tags.yml @@ -0,0 +1,2 @@ +star/genomegenerate: + - modules/nf-core/star/genomegenerate/** diff --git a/modules/nf-core/trimmomatic/environment.yml b/modules/nf-core/trimmomatic/environment.yml new file mode 100644 index 0000000..91145bb --- /dev/null +++ b/modules/nf-core/trimmomatic/environment.yml @@ -0,0 +1,7 @@ +name: trimmomatic +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::trimmomatic=0.39 diff --git a/modules/nf-core/trimmomatic/tests/main.nf.test b/modules/nf-core/trimmomatic/tests/main.nf.test new file mode 100644 index 0000000..fd855f2 --- /dev/null +++ b/modules/nf-core/trimmomatic/tests/main.nf.test @@ -0,0 +1,95 @@ +nextflow_process { + + name "Test Process TRIMMOMATIC" + script "../main.nf" + process "TRIMMOMATIC" + tag "modules" + tag "modules_nfcore" + tag "trimmomatic" + + test("Single-Read") { + config "./nextflow_SE.config" + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.trimmed_reads != null }, + { assert process.out.trimmed_reads.get(0).get(1) ==~ ".*.SE.paired.trim.fastq.gz" }, + { assert snapshot(process.out.versions).match("versions") }, + { assert snapshot(process.out).match() } + ) + } + } + + test("Paired-Reads") { + config "./nextflow_PE.config" + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id: 'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.trimmed_reads != null }, + { assert process.out.trimmed_reads.get(0).get(1).get(0) ==~ ".*.paired.trim_1.fastq.gz" }, + { assert process.out.trimmed_reads.get(0).get(1).get(1) ==~ ".*.paired.trim_2.fastq.gz" }, + { assert snapshot(process.out).match() }, + { assert snapshot(process.out.versions).match("versions") }, + ) + } + } + + test("No Adaptors") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id: 'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.failed } + ) + } + } +} \ No newline at end of file diff --git a/modules/nf-core/trimmomatic/tests/main.nf.test.snap b/modules/nf-core/trimmomatic/tests/main.nf.test.snap new file mode 100644 index 0000000..f1519f0 --- /dev/null +++ b/modules/nf-core/trimmomatic/tests/main.nf.test.snap @@ -0,0 +1,180 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,14413a048f088a147fb04f3d59c6c604" + ] + ], + "timestamp": "2023-10-18T12:15:39.464478" + }, + "Single-Read": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.SE.paired.trim.fastq.gz:md5,089a57f61d7197566b8a3ce71df79113" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.log:md5,e4c3f619e9b0e26847f8f3e3d9af319b" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.summary:md5,24c973237557a1439c775ca19a5deaa5" + ] + ], + "4": [ + "versions.yml:md5,14413a048f088a147fb04f3d59c6c604" + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.log:md5,e4c3f619e9b0e26847f8f3e3d9af319b" + ] + ], + "summary": [ + [ + { + "id": "test", + "single_end": true + }, + "test.summary:md5,24c973237557a1439c775ca19a5deaa5" + ] + ], + "trimmed_reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.SE.paired.trim.fastq.gz:md5,089a57f61d7197566b8a3ce71df79113" + ] + ], + "unpaired_reads": [ + + ], + "versions": [ + "versions.yml:md5,14413a048f088a147fb04f3d59c6c604" + ] + } + ], + "timestamp": "2023-10-18T12:15:39.471788" + }, + "Paired-Reads": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.trim_1.fastq.gz:md5,575355b98cb5ef9071fad8014c702f4a", + "test.paired.trim_2.fastq.gz:md5,73fb54874d01b2854640266d12cc534a" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unpaired.trim_1.fastq.gz:md5,2f7b5a15cc4e73a6fb4af1fa01f575cd", + "test.unpaired.trim_2.fastq.gz:md5,096ad7f876b6b704ef7f9f2c5af3cf74" + ] + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.log:md5,9629761761a34576b3484bf4174f681f" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.summary:md5,9698e5e5c060bbe64588998fe35f8d71" + ] + ], + "4": [ + "versions.yml:md5,14413a048f088a147fb04f3d59c6c604" + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.log:md5,9629761761a34576b3484bf4174f681f" + ] + ], + "summary": [ + [ + { + "id": "test", + "single_end": false + }, + "test.summary:md5,9698e5e5c060bbe64588998fe35f8d71" + ] + ], + "trimmed_reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.trim_1.fastq.gz:md5,575355b98cb5ef9071fad8014c702f4a", + "test.paired.trim_2.fastq.gz:md5,73fb54874d01b2854640266d12cc534a" + ] + ] + ], + "unpaired_reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unpaired.trim_1.fastq.gz:md5,2f7b5a15cc4e73a6fb4af1fa01f575cd", + "test.unpaired.trim_2.fastq.gz:md5,096ad7f876b6b704ef7f9f2c5af3cf74" + ] + ] + ], + "versions": [ + "versions.yml:md5,14413a048f088a147fb04f3d59c6c604" + ] + } + ], + "timestamp": "2023-10-18T12:15:44.677305" + } +} \ No newline at end of file diff --git a/modules/nf-core/trimmomatic/tests/nextflow_PE.config b/modules/nf-core/trimmomatic/tests/nextflow_PE.config new file mode 100644 index 0000000..3f8fdfe --- /dev/null +++ b/modules/nf-core/trimmomatic/tests/nextflow_PE.config @@ -0,0 +1,6 @@ +process { + + withName: TRIMMOMATIC { + ext.args = 'ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36' + } +} diff --git a/modules/nf-core/trimmomatic/tests/nextflow_SE.config b/modules/nf-core/trimmomatic/tests/nextflow_SE.config new file mode 100644 index 0000000..af777fd --- /dev/null +++ b/modules/nf-core/trimmomatic/tests/nextflow_SE.config @@ -0,0 +1,6 @@ +process { + + withName: TRIMMOMATIC { + ext.args = 'ILLUMINACLIP:TruSeq3-SE:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36' + } +} diff --git a/modules/nf-core/trimmomatic/tests/tags.yml b/modules/nf-core/trimmomatic/tests/tags.yml new file mode 100644 index 0000000..68c5af6 --- /dev/null +++ b/modules/nf-core/trimmomatic/tests/tags.yml @@ -0,0 +1,2 @@ +trimmomatic: + - modules/nf-core/trimmomatic/** diff --git a/modules/nf-core/trimmomatic/trimmomatic.diff b/modules/nf-core/trimmomatic/trimmomatic.diff index c128d21..543c257 100644 --- a/modules/nf-core/trimmomatic/trimmomatic.diff +++ b/modules/nf-core/trimmomatic/trimmomatic.diff @@ -1,21 +1,81 @@ Changes in module 'nf-core/trimmomatic' +--- modules/nf-core/trimmomatic/meta.yml ++++ modules/nf-core/trimmomatic/meta.yml +@@ -4,13 +4,16 @@ + - trimming + - adapter trimming + - quality trimming ++ + tools: + - "trimmomatic": + description: "A flexible read trimming tool for Illumina NGS data" + homepage: "http://www.usadellab.org/cms/?page=trimmomatic" + documentation: "https://github.com/usadellab/Trimmomatic" ++ tool_dev_url: "None" + doi: "10.1093/bioinformatics/btu170" + licence: "['GPL v3']" ++ + input: + - meta: + type: map +@@ -22,6 +25,7 @@ + description: | + Input FastQ files of size 1 or 2 for single-end and paired-end data, respectively. + pattern: "*.fastq.gz" ++ + output: + - meta: + type: map +@@ -40,15 +44,10 @@ + type: file + description: trimmomatic log file + pattern: "*.log" +- - summary: +- type: file +- description: trimmomatic summary file of surviving and dropped reads +- pattern: "*.summary" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" ++ + authors: + - "@alyssa-ab" +-maintainers: +- - "@alyssa-ab" + --- modules/nf-core/trimmomatic/main.nf +++ modules/nf-core/trimmomatic/main.nf -@@ -13,7 +13,8 @@ +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "${moduleDir}/environment.yml" ++ conda "bioconda::trimmomatic=0.39" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/trimmomatic:0.39--hdfd78af_2': +- 'biocontainers/trimmomatic:0.39--hdfd78af_2' }" ++ 'quay.io/biocontainers/trimmomatic:0.39--hdfd78af_2' }" + + input: + tuple val(meta), path(reads) +@@ -13,8 +13,8 @@ output: tuple val(meta), path("*.paired.trim*.fastq.gz") , emit: trimmed_reads tuple val(meta), path("*.unpaired.trim_*.fastq.gz"), optional:true, emit: unpaired_reads - tuple val(meta), path("*.log") , emit: log +- tuple val(meta), path("*.summary") , emit: summary + tuple val(meta), path("*.trimmomatic.log") , emit: trimlog + tuple val(meta), path("*.trim_out.log") , emit: mqc_log path "versions.yml" , emit: versions when: -@@ -32,11 +33,12 @@ +@@ -33,12 +33,12 @@ trimmomatic \\ $trimmed \\ -threads $task.cpus \\ - -trimlog ${prefix}.log \\ +- -summary ${prefix}.summary \\ + -trimlog ${prefix}.trimmomatic.log \\ $reads \\ $output \\ From 630060ee3643a75db832f710de26978225445faf Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 29 Nov 2023 11:35:41 -0600 Subject: [PATCH 41/42] update snapshots of passing tests + script paths --- .../custom/dumpsoftwareversions/tests/main.nf.test | 2 +- .../dumpsoftwareversions/tests/main.nf.test.snap | 12 ++++++------ modules/nf-core/fastqc/tests/main.nf.test | 2 +- modules/nf-core/multiqc/tests/main.nf.test | 2 +- modules/nf-core/samtools/index/tests/main.nf.test | 2 +- modules/nf-core/samtools/sort/tests/main.nf.test | 2 +- modules/nf-core/star/align/tests/main.nf.test | 2 +- .../nf-core/star/genomegenerate/tests/main.nf.test | 2 +- modules/nf-core/trimmomatic/tests/main.nf.test | 2 +- tests/pipeline/default/main.nf.test.snap | 10 +++++----- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test index eec1db1..64c11f4 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process CUSTOM_DUMPSOFTWAREVERSIONS" - script "../main.nf" + script "modules/nf-core/custom/dumpsoftwareversions/main.nf" process "CUSTOM_DUMPSOFTWAREVERSIONS" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap index 4274ed5..9692ae4 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap @@ -3,25 +3,25 @@ "content": [ { "0": [ - "software_versions.yml:md5,1c851188476409cda5752ce971b20b58" + "software_versions.yml:md5,0fa1d12894759924e39ab0d596bdb520" ], "1": [ - "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d" + "software_versions_mqc.yml:md5,f30be68a8e770ae315c5d9b0353d9810" ], "2": [ "versions.yml:md5,3843ac526e762117eedf8825b40683df" ], "mqc_yml": [ - "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d" + "software_versions_mqc.yml:md5,f30be68a8e770ae315c5d9b0353d9810" ], "versions": [ "versions.yml:md5,3843ac526e762117eedf8825b40683df" ], "yml": [ - "software_versions.yml:md5,1c851188476409cda5752ce971b20b58" + "software_versions.yml:md5,0fa1d12894759924e39ab0d596bdb520" ] } ], - "timestamp": "2023-11-03T14:43:22.157011" + "timestamp": "2023-11-29T17:13:55+0000" } -} +} \ No newline at end of file diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index 6437a14..08f5f53 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process FASTQC" - script "../main.nf" + script "modules/nf-core/fastqc/main.nf" process "FASTQC" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index 68fffa9..dd6bad5 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process MULTIQC" - script "../main.nf" + script "modules/nf-core/multiqc/main.nf" process "MULTIQC" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test index c76a916..2d3d9e5 100644 --- a/modules/nf-core/samtools/index/tests/main.nf.test +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process SAMTOOLS_INDEX" - script "../main.nf" + script "modules/nf-core/samtools/index/main.nf" process "SAMTOOLS_INDEX" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test b/modules/nf-core/samtools/sort/tests/main.nf.test index 1f72f3b..c690581 100644 --- a/modules/nf-core/samtools/sort/tests/main.nf.test +++ b/modules/nf-core/samtools/sort/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process SAMTOOLS_SORT" - script "../main.nf" + script "modules/nf-core/samtools/sort/main.nf" process "SAMTOOLS_SORT" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/star/align/tests/main.nf.test b/modules/nf-core/star/align/tests/main.nf.test index 4c87847..a4687d3 100644 --- a/modules/nf-core/star/align/tests/main.nf.test +++ b/modules/nf-core/star/align/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process STAR_ALIGN" - script "../main.nf" + script "modules/nf-core/star/align/main.nf" process "STAR_ALIGN" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test b/modules/nf-core/star/genomegenerate/tests/main.nf.test index eed8292..64450a3 100644 --- a/modules/nf-core/star/genomegenerate/tests/main.nf.test +++ b/modules/nf-core/star/genomegenerate/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process STAR_GENOMEGENERATE" - script "../main.nf" + script "modules/nf-core/star/genomegenerate/main.nf" process "STAR_GENOMEGENERATE" tag "modules" tag "modules_nfcore" diff --git a/modules/nf-core/trimmomatic/tests/main.nf.test b/modules/nf-core/trimmomatic/tests/main.nf.test index fd855f2..99a7653 100644 --- a/modules/nf-core/trimmomatic/tests/main.nf.test +++ b/modules/nf-core/trimmomatic/tests/main.nf.test @@ -1,7 +1,7 @@ nextflow_process { name "Test Process TRIMMOMATIC" - script "../main.nf" + script "modules/nf-core/trimmomatic/main.nf" process "TRIMMOMATIC" tag "modules" tag "modules_nfcore" diff --git a/tests/pipeline/default/main.nf.test.snap b/tests/pipeline/default/main.nf.test.snap index ef24e75..603d364 100644 --- a/tests/pipeline/default/main.nf.test.snap +++ b/tests/pipeline/default/main.nf.test.snap @@ -3,12 +3,12 @@ "content": [ 33, "test.vif.prelim.refined.tsv:md5,17b26b7a86d61206154ca3e2df02fc48", - "novirus.VirusDetect.igvjs.bam:md5,1ace945eb2ce9ec48b3de1988cf26ba4", - "novirus.VirusDetect.sorted.igvjs.bam:md5,ac314f2d8b013e136c829e166806a182", - "test.VirusDetect.igvjs.bam:md5,8462d7f485afea5cd33eff2bb1611cd2", - "test.VirusDetect.sorted.igvjs.bam:md5,56f176c542e02f88779737105a864150", + "novirus.VirusDetect.igvjs.bam:md5,6bdf644f606b6259de1bf650dbaf154c", + "novirus.VirusDetect.sorted.igvjs.bam:md5,58f2479e15189b9efa988457043b9751", + "test.VirusDetect.igvjs.bam:md5,774c15742e93b439ff8c31030d0982e7", + "test.VirusDetect.sorted.igvjs.bam:md5,57208f63678c6bb9cb50445021587f7d", "test.VirusDetect.virus_read_counts_summary.tsv:md5,c051eb1a25e4741c43274589f75b80b6" ], - "timestamp": "2023-11-28T20:39:55+0000" + "timestamp": "2023-11-29T17:23:30+0000" } } From c4603b56d5d5c49c75e94ba8547c082ccff12c37 Mon Sep 17 00:00:00 2001 From: Alyssa Briggs Date: Wed, 29 Nov 2023 11:40:10 -0600 Subject: [PATCH 42/42] fix prettier --- modules.json | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/modules.json b/modules.json index 7fcbddd..872f325 100644 --- a/modules.json +++ b/modules.json @@ -8,64 +8,48 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "bba7e362e4afead70653f84d8700588ea28d0f9e", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "1537442a7be4a78efa3d1ff700a923c627bbda5d", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "5394565c5fe4c760e5b35977ec7607c62e81d1f8", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "star/align": { "branch": "master", "git_sha": "9f6b233518f7d9ecdcf24b798b7e491db5424273", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" }, "star/genomegenerate": { "branch": "master", "git_sha": "0e98289b5bec6e3f8f588a8a9d05e8aacc1179a0", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/genomegenerate/star-genomegenerate.diff" }, "trimmomatic": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/trimmomatic/trimmomatic.diff" } } } } } -} \ No newline at end of file +}