From 5bd54ef151f3678f493826d15de71bbfc6cdce0a Mon Sep 17 00:00:00 2001 From: Sateesh Date: Sun, 17 Nov 2024 08:41:59 +0000 Subject: [PATCH 1/4] init fasta_create_index_bismark_bwameth subworkflow --- .../main.nf | 102 +++++++++++++ .../meta.yml | 70 +++++++++ .../tests/main.nf.test | 133 ++++++++++++++++ .../tests/main.nf.test.snap | 142 ++++++++++++++++++ .../tests/nextflow.config | 5 + 5 files changed, 452 insertions(+) create mode 100644 subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf create mode 100644 subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml create mode 100644 subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test create mode 100644 subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap create mode 100644 subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/nextflow.config diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf new file mode 100644 index 00000000000..2e5eba0a95b --- /dev/null +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf @@ -0,0 +1,102 @@ +include { UNTAR } from '../../../modules/nf-core/untar/main' +include { GUNZIP } from '../../../modules/nf-core/gunzip/main' +include { BISMARK_GENOMEPREPARATION } from '../../../modules/nf-core/bismark/genomepreparation/main' +include { BWAMETH_INDEX } from '../../../modules/nf-core/bwameth/index/main' +include { SAMTOOLS_FAIDX } from '../../../modules/nf-core/samtools/faidx/main' + +workflow FASTA_CREATE_INDEX_BISMARK_BWAMETH { + + take: + fasta // channel: [ val(meta), [ fasta ] ] + fasta_index // channel: [ val(meta), [ fasta index ] ] + bismark_index // channel: [ val(meta), [ bismark index ] ] + bwameth_index // channel: [ val(meta), [ bwameth index ] ] + + main: + + ch_fasta = Channel.empty() + ch_fasta_index = Channel.empty() + ch_bismark_index = Channel.empty() + ch_bwameth_index = Channel.empty() + ch_versions = Channel.empty() + + if (fasta.endsWith('.gz')) { + GUNZIP ( + [ [:], file(fasta, checkIfExists: true) ] + ) + ch_fasta = GUNZIP.out.gunzip + ch_versions = ch_versions.mix(GUNZIP.out.versions) + } else { + ch_fasta = Channel.value([[:], file(fasta, checkIfExists: true)]) + } + + // Aligner: bismark or bismark_hisat + if( params.aligner =~ /bismark/ ){ + /* + * Generate bismark index if not supplied + */ + if (bismark_index) { + if (bismark_index.endsWith('.gz')) { + UNTAR ( + [ [:], file(bismark_index, checkIfExists: true) ] + ) + ch_bismark_index = UNTAR.out.untar + ch_versions = ch_versions.mix(UNTAR.out.versions) + } else { + ch_bismark_index = Channel.value([[:], file(bismark_index, checkIfExists: true)]) + } + } else { + BISMARK_GENOMEPREPARATION ( + ch_fasta + ) + ch_bismark_index = BISMARK_GENOMEPREPARATION.out.index + ch_versions = ch_versions.mix(BISMARK_GENOMEPREPARATION.out.versions) + } + } + + // Aligner: bwameth + else if ( params.aligner == 'bwameth' ){ + /* + * Generate bwameth index if not supplied + */ + if (bwameth_index) { + if (bwameth_index.endsWith('.gz')) { + UNTAR ( + [ [:], file(bwameth_index, checkIfExists: true) ] + ) + ch_bwameth_index = UNTAR.out.untar + ch_versions = ch_versions.mix(UNTAR.out.versions) + } else { + ch_bwameth_index = Channel.value([[:], file(bwameth_index, checkIfExists: true)]) + } + } else { + BWAMETH_INDEX ( + ch_fasta + ) + ch_bwameth_index = BWAMETH_INDEX.out.index + ch_versions = ch_versions.mix(BWAMETH_INDEX.out.versions) + } + + /* + * Generate fasta index if not supplied + */ + if (fasta_index) { + ch_fasta_index = Channel.value(file(fasta_index, checkIfExists: true)) + } else { + SAMTOOLS_FAIDX( + ch_fasta, + [[:], []] + ) + ch_fasta_index = SAMTOOLS_FAIDX.out.fai + ch_versions = ch_versions.mix(SAMTOOLS_FAIDX.out.versions) + } + } + + emit: + fasta = ch_fasta // channel: [ val(meta), [ fasta ] ] + fasta_index = ch_fasta_index // channel: [ val(meta), [ fasta index ] ] + bismark_index = ch_bismark_index // channel: [ val(meta), [ bismark index ] ] + bwameth_index = ch_bwameth_index // channel: [ val(meta), [ bwameth index ] ] + versions = ch_versions // channel: [ versions.yml ] +} + diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml new file mode 100644 index 00000000000..c86e72a1547 --- /dev/null +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml @@ -0,0 +1,70 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "fasta_create_index_bismark_bwameth" +description: Generate index files from reference fasta for bismark and bwameth +keywords: + - bismark + - bwameth + - prepare genome + - index +components: + - untar + - gunzip + - bismark/genomepreparation + - bwameth/index + - samtools/faidx +input: + - fasta: + type: file + description: | + Reference genome + Structure: [ val(meta), path(fasta) ] + pattern: "*.{fa/fa.gz}" + - fasta_index: + type: file + description: | + Reference genome index file + Structure: [ val(meta), path(fasta) ] + pattern: "*.fai" + - bismark_index: + type: file + description: | + Bismark genome index files + Structure: [ val(meta), path(bismark_index) ] + - bwameth_index: + type: file + description: | + Bwameth genome index files + Structure: [ val(meta), path(bwameth_index) ] +output: + - fasta: + type: file + description: | + Reference genome + Structure: [ val(meta), path(fasta) ] + pattern: "*.fa" + - fasta_index: + type: file + description: | + Reference genome index file + Structure: [ val(meta), path(fasta) ] + pattern: "*.fai" + - bismark_index: + type: file + description: | + Bismark genome index files + Structure: [ val(meta), path(bismark_index) ] + - bwameth_index: + type: file + description: | + Bwameth genome index files + Structure: [ val(meta), path(bwameth_index) ] + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@sateeshperi" +maintainers: + - "@sateeshperi" diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test new file mode 100644 index 00000000000..ef96e2cfcdc --- /dev/null +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test @@ -0,0 +1,133 @@ +nextflow_workflow { + + name "Test Subworkflow FASTA_CREATE_INDEX_BISMARK_BWAMETH" + script "../main.nf" + workflow "FASTA_CREATE_INDEX_BISMARK_BWAMETH" + config "./nextflow.config" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fasta_create_index_bismark_bwameth" + tag "untar" + tag "gunzip" + tag "bismark/genomepreparation" + tag "bwameth/index" + tag "samtools/faidx" + + test("Params: bismark | download bismark index") { + + when { + params { + aligner = "bismark" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = [] // fasta_index + input[2] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bowtie2_Index.tar.gz', checkIfExists: true) + input[3] = [] // bwameth_index + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bismark | generate bowtie2 index") { + + when { + params { + aligner = "bismark" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = [] // fasta_index + input[2] = [] // bismark_index + input[3] = [] // bwameth_index + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bismark_hisat | generate hisat2 index") { + + when { + params { + aligner = "bismark_hisat" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = [] // fasta_index + input[2] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/Hisat2_Index.tar.gz', checkIfExists: true) + input[3] = [] // bwameth_index + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bwameth | generate bwameth index") { + + when { + params { + aligner = "bwameth" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = [] // fasta_index + input[2] = [] // bismark index + input[3] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bwameth_Index.tar.gz', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.versions + ).match() } + ) + } + } + +} diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap new file mode 100644 index 00000000000..fdc79eada50 --- /dev/null +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap @@ -0,0 +1,142 @@ +{ + "Params: bwameth | generate bwameth index": { + "content": [ + [ + [ + { + + }, + "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + ] + ], + [ + + ], + [ + + ], + [ + + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T08:33:00.026096635" + }, + "Params: bismark | download bismark index": { + "content": [ + [ + [ + { + + }, + "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + ] + ], + [ + + ], + [ + [ + { + + }, + "/nf-core/test-datasets/raw/methylseq/reference/Bowtie2_Index.tar.gz" + ] + ], + [ + + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T08:32:13.501644103" + }, + "Params: bismark_hisat | generate hisat2 index": { + "content": [ + [ + [ + { + + }, + "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + ] + ], + [ + + ], + [ + [ + { + + }, + "/nf-core/test-datasets/raw/methylseq/reference/Hisat2_Index.tar.gz" + ] + ], + [ + + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T08:32:44.801415051" + }, + "Params: bismark | generate bowtie2 index": { + "content": [ + [ + [ + { + + }, + "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + ] + ], + [ + + ], + [ + [ + { + + }, + [ + [ + [ + "BS_CT.1.bt2:md5,d53bef7d951c7d08e327944581c911eb", + "BS_CT.2.bt2:md5,752a03fc364115fc910e5a28ae154382", + "BS_CT.3.bt2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_CT.4.bt2:md5,02b3d1855a67fd9cbb4c411406a22fde", + "BS_CT.rev.1.bt2:md5,52ae603fff473b3b25eecd36c533edb9", + "BS_CT.rev.2.bt2:md5,0e290e05f7dae065cae54e29ed97afe5", + "genome_mfa.CT_conversion.fa:md5,4dd181b65f1f3549f4132c9a3759eee8" + ], + [ + "BS_GA.1.bt2:md5,9aff51b1712758b891b0c427a988977f", + "BS_GA.2.bt2:md5,579241d95941538b2e75bbdb6cfaa73d", + "BS_GA.3.bt2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_GA.4.bt2:md5,6b64fa496ffa2af2af235e1c87f06a25", + "BS_GA.rev.1.bt2:md5,dabf2d6f80ba7e8fc96dfdc203f6bbfd", + "BS_GA.rev.2.bt2:md5,fac2f8b39b0e15dec7aa79a0ecf12b49", + "genome_mfa.GA_conversion.fa:md5,3dee732bc344fd620c3a7322f52c6a5f" + ] + ] + ] + ] + ], + [ + "versions.yml:md5,cd47c68d8d859fadd5e30f38fec92259" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T08:32:34.41027436" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/nextflow.config b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/nextflow.config new file mode 100644 index 00000000000..ba4fa6f6b8d --- /dev/null +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: BISMARK_GENOMEPREPARATION { + ext.args = { params.aligner == 'bismark_hisat' ? ' --hisat2' : ' --bowtie2' } + } +} From 7a76e6225992a78c02cea5b653e51939425f8f8f Mon Sep 17 00:00:00 2001 From: Sateesh Date: Sun, 17 Nov 2024 09:07:32 +0000 Subject: [PATCH 2/4] add tests + snap --- .../main.nf | 6 +- .../meta.yml | 2 + .../tests/main.nf.test | 104 ++++++- .../tests/main.nf.test.snap | 263 +++++++++++++++++- 4 files changed, 353 insertions(+), 22 deletions(-) diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf index 2e5eba0a95b..c743d722b49 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf @@ -20,7 +20,7 @@ workflow FASTA_CREATE_INDEX_BISMARK_BWAMETH { ch_bwameth_index = Channel.empty() ch_versions = Channel.empty() - if (fasta.endsWith('.gz')) { + if (fasta.toString().endsWith('.gz')) { GUNZIP ( [ [:], file(fasta, checkIfExists: true) ] ) @@ -36,7 +36,7 @@ workflow FASTA_CREATE_INDEX_BISMARK_BWAMETH { * Generate bismark index if not supplied */ if (bismark_index) { - if (bismark_index.endsWith('.gz')) { + if (bismark_index.toString().endsWith('.gz')) { UNTAR ( [ [:], file(bismark_index, checkIfExists: true) ] ) @@ -60,7 +60,7 @@ workflow FASTA_CREATE_INDEX_BISMARK_BWAMETH { * Generate bwameth index if not supplied */ if (bwameth_index) { - if (bwameth_index.endsWith('.gz')) { + if (bwameth_index.toString().endsWith('.gz')) { UNTAR ( [ [:], file(bwameth_index, checkIfExists: true) ] ) diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml index c86e72a1547..01cf8a19df1 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml @@ -53,11 +53,13 @@ output: description: | Bismark genome index files Structure: [ val(meta), path(bismark_index) ] + pattern: "BismarkIndex" - bwameth_index: type: file description: | Bwameth genome index files Structure: [ val(meta), path(bwameth_index) ] + pattern: "index" - versions: type: file description: | diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test index ef96e2cfcdc..87619fe8c20 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test @@ -14,7 +14,7 @@ nextflow_workflow { tag "bwameth/index" tag "samtools/faidx" - test("Params: bismark | download bismark index") { + test("Params: bismark | download bismark index (bowtie2)") { when { params { @@ -37,13 +37,14 @@ nextflow_workflow { workflow.out.fasta, workflow.out.fasta_index, workflow.out.bismark_index, + workflow.out.bwameth_index, workflow.out.versions ).match() } ) } } - test("Params: bismark | generate bowtie2 index") { + test("Params: bismark | generate bismark index (bowtie2)") { when { params { @@ -66,13 +67,14 @@ nextflow_workflow { workflow.out.fasta, workflow.out.fasta_index, workflow.out.bismark_index, + workflow.out.bwameth_index, workflow.out.versions ).match() } ) } } - test("Params: bismark_hisat | generate hisat2 index") { + test("Params: bismark_hisat | download bismark index (hisat2)") { when { params { @@ -95,22 +97,53 @@ nextflow_workflow { workflow.out.fasta, workflow.out.fasta_index, workflow.out.bismark_index, + workflow.out.bwameth_index, workflow.out.versions ).match() } ) } } - test("Params: bwameth | generate bwameth index") { + test("Params: bismark_hisat | generate bismark index (hisat2)") { when { params { - aligner = "bwameth" + aligner = "bismark_hisat" } workflow { """ input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) input[1] = [] // fasta_index + input[2] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/Hisat2_Index.tar.gz', checkIfExists: true) + input[3] = [] // bwameth_index + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.bwameth_index, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bwameth | download fasta index | download bwameth index") { + + when { + params { + aligner = "bwameth" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai', checkIfExists: true) input[2] = [] // bismark index input[3] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bwameth_Index.tar.gz', checkIfExists: true) """ @@ -124,6 +157,67 @@ nextflow_workflow { workflow.out.fasta, workflow.out.fasta_index, workflow.out.bismark_index, + workflow.out.bwameth_index, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bwameth | generate fasta index | download bwameth index") { + + when { + params { + aligner = "bwameth" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = [] //fasta index + input[2] = [] // bismark index + input[3] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/Bwameth_Index.tar.gz', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.bwameth_index, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bwameth | generate fasta index | generate bwameth index") { + + when { + params { + aligner = "bwameth" + } + workflow { + """ + input[0] = file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz', checkIfExists: true) + input[1] = [] // fasta_index + input[2] = [] // bismark index + input[3] = [] // bwameth index + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.fasta, + workflow.out.fasta_index, + workflow.out.bismark_index, + workflow.out.bwameth_index, workflow.out.versions ).match() } ) diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap index fdc79eada50..03887dbecc8 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap @@ -1,38 +1,166 @@ { - "Params: bwameth | generate bwameth index": { + "Params: bismark | download bismark index (bowtie2)": { "content": [ [ [ { }, - "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" ] ], [ + ], + [ + [ + { + + }, + [ + [ + [ + "BS_CT.1.bt2:md5,d53bef7d951c7d08e327944581c911eb", + "BS_CT.2.bt2:md5,752a03fc364115fc910e5a28ae154382", + "BS_CT.3.bt2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_CT.4.bt2:md5,02b3d1855a67fd9cbb4c411406a22fde", + "BS_CT.rev.1.bt2:md5,52ae603fff473b3b25eecd36c533edb9", + "BS_CT.rev.2.bt2:md5,0e290e05f7dae065cae54e29ed97afe5", + "genome_mfa.CT_conversion.fa:md5,4dd181b65f1f3549f4132c9a3759eee8" + ], + [ + "BS_GA.1.bt2:md5,9aff51b1712758b891b0c427a988977f", + "BS_GA.2.bt2:md5,579241d95941538b2e75bbdb6cfaa73d", + "BS_GA.3.bt2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_GA.4.bt2:md5,6b64fa496ffa2af2af235e1c87f06a25", + "BS_GA.rev.1.bt2:md5,dabf2d6f80ba7e8fc96dfdc203f6bbfd", + "BS_GA.rev.2.bt2:md5,fac2f8b39b0e15dec7aa79a0ecf12b49", + "genome_mfa.GA_conversion.fa:md5,3dee732bc344fd620c3a7322f52c6a5f" + ] + ], + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" + ] + ] + ], + [ + + ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", + "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T09:02:18.724485795" + }, + "Params: bwameth | generate fasta index | download bwameth index": { + "content": [ + [ + [ + { + + }, + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" + ] + ], + [ + [ + { + + }, + "genome.fa.fai:md5,84f5b44c25877ac58b154706cc8bc451" + ] ], [ + ], + [ + [ + { + + }, + [ + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de", + "genome.fa.bwameth.c2t:md5,e51d48ed28fa0c26e2f9c9f13d09403b", + "genome.fa.bwameth.c2t.amb:md5,010a242c6764efb30141868a45d698b3", + "genome.fa.bwameth.c2t.ann:md5,09b4db3d87a2d4dac9e10e807f377110", + "genome.fa.bwameth.c2t.bwt:md5,4646f8ae6bd523b7f4106bbd32eff95e", + "genome.fa.bwameth.c2t.pac:md5,a662d7add09698e25c8152fd2306ec66", + "genome.fa.bwameth.c2t.sa:md5,4a1e905b828396a1909669bc9c573d8d" + ] + ] + ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", + "versions.yml:md5,33ca84561f66366561b4db54666696f0", + "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T09:03:22.550905517" + }, + "Params: bwameth | generate fasta index | generate bwameth index": { + "content": [ + [ + [ + { + + }, + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" + ] + ], + [ + [ + { + + }, + "genome.fa.fai:md5,84f5b44c25877ac58b154706cc8bc451" + ] ], [ + ], + [ + [ + { + + }, + [ + "genome.fa.bwameth.c2t:md5,e51d48ed28fa0c26e2f9c9f13d09403b", + "genome.fa.bwameth.c2t.amb:md5,010a242c6764efb30141868a45d698b3", + "genome.fa.bwameth.c2t.ann:md5,09b4db3d87a2d4dac9e10e807f377110", + "genome.fa.bwameth.c2t.bwt:md5,4646f8ae6bd523b7f4106bbd32eff95e", + "genome.fa.bwameth.c2t.pac:md5,a662d7add09698e25c8152fd2306ec66", + "genome.fa.bwameth.c2t.sa:md5,4a1e905b828396a1909669bc9c573d8d" + ] + ] + ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", + "versions.yml:md5,33ca84561f66366561b4db54666696f0", + "versions.yml:md5,b4bd6cfa95ecf6300c0367f05550b3bd" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-17T08:33:00.026096635" + "timestamp": "2024-11-17T09:03:34.353652571" }, - "Params: bismark | download bismark index": { + "Params: bismark_hisat | generate bismark index (hisat2)": { "content": [ [ [ { }, - "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" ] ], [ @@ -43,58 +171,161 @@ { }, - "/nf-core/test-datasets/raw/methylseq/reference/Bowtie2_Index.tar.gz" + [ + [ + [ + "BS_CT.1.ht2:md5,273c7686fc1dc7d93e36433592367f81", + "BS_CT.2.ht2:md5,752a03fc364115fc910e5a28ae154382", + "BS_CT.3.ht2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_CT.4.ht2:md5,02b3d1855a67fd9cbb4c411406a22fde", + "BS_CT.5.ht2:md5,d117de4c2c910a1ae7f0459c11ba6018", + "BS_CT.6.ht2:md5,4097a785a8d1ca92489d83b4c613a50b", + "BS_CT.7.ht2:md5,9013eccd91ad614d7893c739275a394f", + "BS_CT.8.ht2:md5,33cdeccccebe80329f1fdbee7f5874cb", + "genome_mfa.CT_conversion.fa:md5,4dd181b65f1f3549f4132c9a3759eee8" + ], + [ + "BS_GA.1.ht2:md5,c2b02b7987f4ac0578332204678674cd", + "BS_GA.2.ht2:md5,579241d95941538b2e75bbdb6cfaa73d", + "BS_GA.3.ht2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_GA.4.ht2:md5,6b64fa496ffa2af2af235e1c87f06a25", + "BS_GA.5.ht2:md5,43aa1c78c6ec18c4165cf25159578fee", + "BS_GA.6.ht2:md5,2dc0f049d7d0f2a51822df8b195dce41", + "BS_GA.7.ht2:md5,9013eccd91ad614d7893c739275a394f", + "BS_GA.8.ht2:md5,33cdeccccebe80329f1fdbee7f5874cb", + "genome_mfa.GA_conversion.fa:md5,3dee732bc344fd620c3a7322f52c6a5f" + ] + ], + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" + ] ] ], [ + ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", + "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-17T08:32:13.501644103" + "timestamp": "2024-11-17T09:02:59.522133788" }, - "Params: bismark_hisat | generate hisat2 index": { + "Params: bismark_hisat | download bismark index (hisat2)": { "content": [ [ [ { }, - "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" + ] + ], + [ + + ], + [ + [ + { + + }, + [ + [ + [ + "BS_CT.1.ht2:md5,273c7686fc1dc7d93e36433592367f81", + "BS_CT.2.ht2:md5,752a03fc364115fc910e5a28ae154382", + "BS_CT.3.ht2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_CT.4.ht2:md5,02b3d1855a67fd9cbb4c411406a22fde", + "BS_CT.5.ht2:md5,d117de4c2c910a1ae7f0459c11ba6018", + "BS_CT.6.ht2:md5,4097a785a8d1ca92489d83b4c613a50b", + "BS_CT.7.ht2:md5,9013eccd91ad614d7893c739275a394f", + "BS_CT.8.ht2:md5,33cdeccccebe80329f1fdbee7f5874cb", + "genome_mfa.CT_conversion.fa:md5,4dd181b65f1f3549f4132c9a3759eee8" + ], + [ + "BS_GA.1.ht2:md5,c2b02b7987f4ac0578332204678674cd", + "BS_GA.2.ht2:md5,579241d95941538b2e75bbdb6cfaa73d", + "BS_GA.3.ht2:md5,b41e72eefad74e8ede411c78a5bd5dee", + "BS_GA.4.ht2:md5,6b64fa496ffa2af2af235e1c87f06a25", + "BS_GA.5.ht2:md5,43aa1c78c6ec18c4165cf25159578fee", + "BS_GA.6.ht2:md5,2dc0f049d7d0f2a51822df8b195dce41", + "BS_GA.7.ht2:md5,9013eccd91ad614d7893c739275a394f", + "BS_GA.8.ht2:md5,33cdeccccebe80329f1fdbee7f5874cb", + "genome_mfa.GA_conversion.fa:md5,3dee732bc344fd620c3a7322f52c6a5f" + ] + ], + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" + ] ] ], [ ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", + "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T09:02:47.707055525" + }, + "Params: bwameth | download fasta index | download bwameth index": { + "content": [ [ [ { }, - "/nf-core/test-datasets/raw/methylseq/reference/Hisat2_Index.tar.gz" + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" ] ], + [ + "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.fai" + ], [ + ], + [ + [ + { + + }, + [ + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de", + "genome.fa.bwameth.c2t:md5,e51d48ed28fa0c26e2f9c9f13d09403b", + "genome.fa.bwameth.c2t.amb:md5,010a242c6764efb30141868a45d698b3", + "genome.fa.bwameth.c2t.ann:md5,09b4db3d87a2d4dac9e10e807f377110", + "genome.fa.bwameth.c2t.bwt:md5,4646f8ae6bd523b7f4106bbd32eff95e", + "genome.fa.bwameth.c2t.pac:md5,a662d7add09698e25c8152fd2306ec66", + "genome.fa.bwameth.c2t.sa:md5,4a1e905b828396a1909669bc9c573d8d" + ] + ] + ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", + "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-17T08:32:44.801415051" + "timestamp": "2024-11-17T09:03:10.634128446" }, - "Params: bismark | generate bowtie2 index": { + "Params: bismark | generate bismark index (bowtie2)": { "content": [ [ [ { }, - "/nf-core/test-datasets/raw/methylseq/reference/genome.fa.gz" + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" ] ], [ @@ -130,6 +361,10 @@ ] ], [ + + ], + [ + "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", "versions.yml:md5,cd47c68d8d859fadd5e30f38fec92259" ] ], @@ -137,6 +372,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-17T08:32:34.41027436" + "timestamp": "2024-11-17T09:02:35.874064225" } } \ No newline at end of file From 3fbf58c6c211b9a61d91adde8d7e92c3d8637626 Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:13:06 +0000 Subject: [PATCH 3/4] Change name --- .../main.nf | 2 +- .../meta.yml | 2 +- .../tests/main.nf.test | 6 +++--- .../tests/main.nf.test.snap | 0 .../tests/nextflow.config | 0 5 files changed, 5 insertions(+), 5 deletions(-) rename subworkflows/nf-core/{fasta_create_index_bismark_bwameth => fasta_index_bismark_bwameth}/main.nf (98%) rename subworkflows/nf-core/{fasta_create_index_bismark_bwameth => fasta_index_bismark_bwameth}/meta.yml (97%) rename subworkflows/nf-core/{fasta_create_index_bismark_bwameth => fasta_index_bismark_bwameth}/tests/main.nf.test (97%) rename subworkflows/nf-core/{fasta_create_index_bismark_bwameth => fasta_index_bismark_bwameth}/tests/main.nf.test.snap (100%) rename subworkflows/nf-core/{fasta_create_index_bismark_bwameth => fasta_index_bismark_bwameth}/tests/nextflow.config (100%) diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf b/subworkflows/nf-core/fasta_index_bismark_bwameth/main.nf similarity index 98% rename from subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf rename to subworkflows/nf-core/fasta_index_bismark_bwameth/main.nf index c743d722b49..4dd21888b70 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/main.nf +++ b/subworkflows/nf-core/fasta_index_bismark_bwameth/main.nf @@ -4,7 +4,7 @@ include { BISMARK_GENOMEPREPARATION } from '../../../modules/nf-core/bismark/gen include { BWAMETH_INDEX } from '../../../modules/nf-core/bwameth/index/main' include { SAMTOOLS_FAIDX } from '../../../modules/nf-core/samtools/faidx/main' -workflow FASTA_CREATE_INDEX_BISMARK_BWAMETH { +workflow FASTA_INDEX_BISMARK_BWAMETH { take: fasta // channel: [ val(meta), [ fasta ] ] diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml b/subworkflows/nf-core/fasta_index_bismark_bwameth/meta.yml similarity index 97% rename from subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml rename to subworkflows/nf-core/fasta_index_bismark_bwameth/meta.yml index 01cf8a19df1..558544295e2 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/meta.yml +++ b/subworkflows/nf-core/fasta_index_bismark_bwameth/meta.yml @@ -1,5 +1,5 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json -name: "fasta_create_index_bismark_bwameth" +name: "fasta_index_bismark_bwameth" description: Generate index files from reference fasta for bismark and bwameth keywords: - bismark diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test b/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test similarity index 97% rename from subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test rename to subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test index 87619fe8c20..3219ea6d945 100644 --- a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test +++ b/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test @@ -1,13 +1,13 @@ nextflow_workflow { - name "Test Subworkflow FASTA_CREATE_INDEX_BISMARK_BWAMETH" + name "Test Subworkflow FASTA_INDEX_BISMARK_BWAMETH" script "../main.nf" - workflow "FASTA_CREATE_INDEX_BISMARK_BWAMETH" + workflow "FASTA_INDEX_BISMARK_BWAMETH" config "./nextflow.config" tag "subworkflows" tag "subworkflows_nfcore" - tag "subworkflows/fasta_create_index_bismark_bwameth" + tag "subworkflows/fasta_index_bismark_bwameth" tag "untar" tag "gunzip" tag "bismark/genomepreparation" diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test.snap similarity index 100% rename from subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/main.nf.test.snap rename to subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test.snap diff --git a/subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/nextflow.config b/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/nextflow.config similarity index 100% rename from subworkflows/nf-core/fasta_create_index_bismark_bwameth/tests/nextflow.config rename to subworkflows/nf-core/fasta_index_bismark_bwameth/tests/nextflow.config From c4a8890b286b620f99b5e86b10a5de41dbc119f7 Mon Sep 17 00:00:00 2001 From: Sateesh Date: Tue, 26 Nov 2024 16:34:50 +0000 Subject: [PATCH 4/4] update snap --- .../tests/main.nf.test.snap | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test.snap index 03887dbecc8..2bb64c16111 100644 --- a/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fasta_index_bismark_bwameth/tests/main.nf.test.snap @@ -46,15 +46,15 @@ ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,b0160273bd1b3b049a2748c02496c6d1" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:02:18.724485795" + "timestamp": "2024-11-26T16:24:46.519054694" }, "Params: bwameth | generate fasta index | download bwameth index": { "content": [ @@ -94,16 +94,16 @@ ] ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,33ca84561f66366561b4db54666696f0", - "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,b0160273bd1b3b049a2748c02496c6d1", + "versions.yml:md5,ee0146f5d2942f9ff466bf275567515e" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:03:22.550905517" + "timestamp": "2024-11-26T16:26:40.995024346" }, "Params: bwameth | generate fasta index | generate bwameth index": { "content": [ @@ -142,16 +142,16 @@ ] ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,33ca84561f66366561b4db54666696f0", - "versions.yml:md5,b4bd6cfa95ecf6300c0367f05550b3bd" + "versions.yml:md5,3a92f9ed1831ae3a68bc15886e7a95a1", + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,ee0146f5d2942f9ff466bf275567515e" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:03:34.353652571" + "timestamp": "2024-11-26T16:27:06.257485123" }, "Params: bismark_hisat | generate bismark index (hisat2)": { "content": [ @@ -204,15 +204,15 @@ ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,b0160273bd1b3b049a2748c02496c6d1" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:02:59.522133788" + "timestamp": "2024-11-26T16:26:00.163900219" }, "Params: bismark_hisat | download bismark index (hisat2)": { "content": [ @@ -265,15 +265,15 @@ ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,b0160273bd1b3b049a2748c02496c6d1" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:02:47.707055525" + "timestamp": "2024-11-26T16:25:35.90378279" }, "Params: bwameth | download fasta index | download bwameth index": { "content": [ @@ -308,15 +308,15 @@ ] ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,37c4a7354ca1758d63f1e542d8326fe7" + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,b0160273bd1b3b049a2748c02496c6d1" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:03:10.634128446" + "timestamp": "2024-11-26T16:26:14.893224201" }, "Params: bismark | generate bismark index (bowtie2)": { "content": [ @@ -356,7 +356,8 @@ "BS_GA.rev.2.bt2:md5,fac2f8b39b0e15dec7aa79a0ecf12b49", "genome_mfa.GA_conversion.fa:md5,3dee732bc344fd620c3a7322f52c6a5f" ] - ] + ], + "genome.fa:md5,923a0a268ad29fee3c3437d00f9970de" ] ] ], @@ -364,14 +365,14 @@ ], [ - "versions.yml:md5,15fabd84cfa42d1684ceb90837ef71f4", - "versions.yml:md5,cd47c68d8d859fadd5e30f38fec92259" + "versions.yml:md5,90950cf3155e6a77273de11ebb93a541", + "versions.yml:md5,dc24c245324a3b8a8328f1ed6abd3f7c" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.0" + "nextflow": "24.10.1" }, - "timestamp": "2024-11-17T09:02:35.874064225" + "timestamp": "2024-11-26T16:25:20.094964567" } } \ No newline at end of file