From fb35a1d8d8b9e07988c526f1eff9bb56c20f4d0b Mon Sep 17 00:00:00 2001 From: chaudb1998 Date: Tue, 25 Mar 2025 15:37:00 +0700 Subject: [PATCH 01/10] splitting the reference multifasta into individual fasta files, processing each segment separately through ABACAS, merging the results back into a single multifasta output --- conf/modules_illumina.config | 89 ++++++++++++++++++- modules.json | 7 ++ modules/local/seqkit_split.nf | 46 ++++++++++ modules/nf-core/seqkit/concat/environment.yml | 7 ++ modules/nf-core/seqkit/concat/main.nf | 46 ++++++++++ modules/nf-core/seqkit/concat/meta.yml | 50 +++++++++++ .../nf-core/seqkit/concat/tests/main.nf.test | 66 ++++++++++++++ .../seqkit/concat/tests/main.nf.test.snap | 47 ++++++++++ .../seqkit/concat/tests/nextflow.config | 5 ++ modules/nf-core/seqkit/concat/tests/tags.yml | 2 + subworkflows/local/abacas_multifasta.nf | 62 +++++++++++++ subworkflows/local/assembly_qc.nf | 55 +++++++++--- 12 files changed, 467 insertions(+), 15 deletions(-) create mode 100644 modules/local/seqkit_split.nf create mode 100644 modules/nf-core/seqkit/concat/environment.yml create mode 100644 modules/nf-core/seqkit/concat/main.nf create mode 100644 modules/nf-core/seqkit/concat/meta.yml create mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test create mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test.snap create mode 100644 modules/nf-core/seqkit/concat/tests/nextflow.config create mode 100644 modules/nf-core/seqkit/concat/tests/tags.yml create mode 100644 subworkflows/local/abacas_multifasta.nf diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index 67f4a04b6..af1ab7158 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -872,7 +872,7 @@ if (!params.skip_assembly) { if (!params.skip_abacas) { process { - withName: '.*:.*:ASSEMBLY_SPADES:.*:ABACAS' { + withName: '.*:.*:ASSEMBLY_SPADES:.*:ABACAS_SINGLE' { ext.args = '-m -p nucmer' publishDir = [ path: { "${params.outdir}/assembly/spades/${params.spades_mode}/abacas" }, @@ -880,6 +880,34 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } + + withName: '.*:.*:ASSEMBLY_SPADES:.*:.*:ABACAS' { + ext.prefix = { "${meta.id}.${fasta.baseName}" } + ext.args = '-m -p nucmer' + publishDir = [ + path: { "${params.outdir}/assembly/spades/${params.spades_mode}/abacas" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:.*:ASSEMBLY_SPADES:.*:.*:SEQKIT_SPLIT' { + ext.args = '-i' + publishDir = [ + path: { "${params.outdir}/assembly/spades/${params.spades_mode}/seqkit/split" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:.*:ASSEMBLY_SPADES:.*:.*:SEQKIT_CONCAT' { + ext.args = '-f' + publishDir = [ + path: { "${params.outdir}/assembly/spades/${params.spades_mode}/seqkit/concat" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } } @@ -977,7 +1005,17 @@ if (!params.skip_assembly) { if (!params.skip_abacas) { process { - withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:ABACAS' { + withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:ABACAS_SINGLE' { + ext.args = '-m -p nucmer' + publishDir = [ + path: { "${params.outdir}/assembly/unicycler/abacas" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:.*:ABACAS' { + ext.prefix = { "${meta.id}.${fasta.baseName}" } ext.args = '-m -p nucmer' publishDir = [ path: { "${params.outdir}/assembly/unicycler/abacas" }, @@ -985,6 +1023,24 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } + + withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:.*:SEQKIT_SPLIT' { + ext.args = '-i' + publishDir = [ + path: { "${params.outdir}/assembly/unicycler/seqkit/split" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:.*:SEQKIT_CONCAT' { + ext.args = '-f' + publishDir = [ + path: { "${params.outdir}/assembly/unicycler/seqkit/concat" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } } @@ -1049,7 +1105,16 @@ if (!params.skip_assembly) { if (!params.skip_abacas) { process { - withName: '.*:.*:ASSEMBLY_MINIA:.*:ABACAS' { + withName: '.*:.*:ASSEMBLY_MINIA:.*:ABACAS_SINGLE' { + ext.args = '-m -p nucmer' + publishDir = [ + path: { "${params.outdir}/assembly/minia/abacas" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: '.*:.*:ASSEMBLY_MINIA:.*:.*:ABACAS' { + ext.prefix = { "${meta.id}.${fasta.baseName}" } ext.args = '-m -p nucmer' publishDir = [ path: { "${params.outdir}/assembly/minia/abacas" }, @@ -1057,6 +1122,24 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } + + withName: '.*:.*:ASSEMBLY_MINIA:.*:.*:SEQKIT_SPLIT' { + ext.args = '-i' + publishDir = [ + path: { "${params.outdir}/assembly/minia/seqkit/split" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:.*:ASSEMBLY_MINIA:.*:.*:SEQKIT_CONCAT' { + ext.args = '-f' + publishDir = [ + path: { "${params.outdir}/assembly/minia/seqkit/concat" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } } diff --git a/modules.json b/modules.json index 6c63430bf..3e3c62897 100644 --- a/modules.json +++ b/modules.json @@ -18,6 +18,7 @@ "artic/minion": { "branch": "master", "git_sha": "b44f728e80a1420b9f130061d91f7ff86673735a", + "installed_by": ["modules"], "patch": "modules/nf-core/artic/minion/artic-minion.diff" }, "bandage/image": { @@ -108,6 +109,7 @@ "cutadapt": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", + "installed_by": ["modules"], "patch": "modules/nf-core/cutadapt/cutadapt.diff" }, "fastp": { @@ -250,6 +252,11 @@ "git_sha": "e9bca09da225e5132d45a32bf830a434843bb5be", "installed_by": ["modules"] }, + "seqkit/concat": { + "branch": "master", + "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", + "installed_by": ["modules"] + }, "spades": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", diff --git a/modules/local/seqkit_split.nf b/modules/local/seqkit_split.nf new file mode 100644 index 000000000..506cfd384 --- /dev/null +++ b/modules/local/seqkit_split.nf @@ -0,0 +1,46 @@ +process SEQKIT_SPLIT { + tag "$fastx.baseName" + label 'process_low' + + conda "bioconda::seqkit=2.9.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0': + 'biocontainers/seqkit:2.9.0--h9ee0642_0' }" + + input: + tuple val(meta), path(fastx) + + output: + tuple val(meta), path("${prefix}*/*.fna") , emit: fastx + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + prefix = task.ext.prefix ?: "${fastx.baseName}" + def extension = "fastq" + if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz|.+\.fsa|.+\.fsa.gz/ ) { + extension = "fasta" + } + extension = fastx.toString().endsWith('.gz') ? "${extension}.gz" : extension + def call_gzip = extension.endsWith('.gz') ? "| gzip -c $args2" : '' + if("${prefix}.${extension}" == "$fastx") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + seqkit \\ + split \\ + --threads $task.cpus \\ + $args \\ + $fastx \\ + $call_gzip \\ + > ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$(seqkit version | cut -d' ' -f2) + END_VERSIONS + """ + +} \ No newline at end of file diff --git a/modules/nf-core/seqkit/concat/environment.yml b/modules/nf-core/seqkit/concat/environment.yml new file mode 100644 index 000000000..b26fb1eb8 --- /dev/null +++ b/modules/nf-core/seqkit/concat/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::seqkit=2.9.0 diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf new file mode 100644 index 000000000..d10d9780f --- /dev/null +++ b/modules/nf-core/seqkit/concat/main.nf @@ -0,0 +1,46 @@ +process SEQKIT_CONCAT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0': + 'biocontainers/seqkit:2.9.0--h9ee0642_0' }" + + input: + tuple val(meta), path(input, stageAs: 'in/*') + + output: + tuple val(meta), path("*.{fasta,fastq,fa,fq,fas,fna,faa}"), emit: fastx + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + def file_type = input instanceof List ? input[0].getExtension() : input.getExtension() + """ + seqkit \\ + concat \\ + $args \\ + in/* > ${prefix}.${file_type} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$(seqkit version | cut -d' ' -f2) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$(seqkit version | cut -d' ' -f2) + END_VERSIONS + """ +} diff --git a/modules/nf-core/seqkit/concat/meta.yml b/modules/nf-core/seqkit/concat/meta.yml new file mode 100644 index 000000000..c5315f255 --- /dev/null +++ b/modules/nf-core/seqkit/concat/meta.yml @@ -0,0 +1,50 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "seqkit_concat" +description: Concatenating multiple uncompressed sequence files together +keywords: + - concat + - fasta + - fastq + - merge +tools: + - seqkit: + description: | + Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. + homepage: https://github.com/shenwei356/seqkit + documentation: https://bioinf.shenwei.me/seqkit/ + tool_dev_url: https://github.com/shenwei356/seqkit + doi: 10.1371/journal.pone.0163962 + licence: ["MIT"] + identifier: biotools:seqkit + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - input: + type: file + description: Sequence file in fasta/q format + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" +output: + #Only when we have meta + - fastx: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "*.{fasta,fastq,fa,fq,fas,fna,faa}": + type: file + description: A concatenated sequence file + pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@DLBPointon" +maintainers: + - "@DLBPointon" diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test new file mode 100644 index 000000000..3ebae280c --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test @@ -0,0 +1,66 @@ +nextflow_process { + + name "Test Process SEQKIT_CONCAT" + script "../main.nf" + process "SEQKIT_CONCAT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "seqkit" + tag "seqkit/concat" + + test("sarscov2 and human primers - fasta") { + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/fasta/primers.fasta', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match()} + ) + with(process.out.fastx) { + // Including headers from both input files + assert path(get(0).get(1)).readLines().any { it.contains('>NEB_Clontech_3p') } + assert path(get(0).get(1)).readLines().any { it.contains('>MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome') } + } + } + } + + test("sarscov2 and human primers - fasta - stub") { + + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/fasta/primers.fasta', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match()} + ) + } + } +} diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap new file mode 100644 index 000000000..5f85418c6 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap @@ -0,0 +1,47 @@ +{ + "sarscov2 and human primers - fasta": { + "content": [ + [ + "versions.yml:md5,13b312c8ca94f9c6460ffc759a5c79c9" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T15:06:45.246143" + }, + "sarscov2 and human primers - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,13b312c8ca94f9c6460ffc759a5c79c9" + ], + "fastx": [ + [ + { + "id": "test" + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,13b312c8ca94f9c6460ffc759a5c79c9" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-15T15:06:49.428563" + } +} \ No newline at end of file diff --git a/modules/nf-core/seqkit/concat/tests/nextflow.config b/modules/nf-core/seqkit/concat/tests/nextflow.config new file mode 100644 index 000000000..89d4fe3a4 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: SEQKIT_CONCAT { + ext.args = "--full" + } +} diff --git a/modules/nf-core/seqkit/concat/tests/tags.yml b/modules/nf-core/seqkit/concat/tests/tags.yml new file mode 100644 index 000000000..cabcd5cf3 --- /dev/null +++ b/modules/nf-core/seqkit/concat/tests/tags.yml @@ -0,0 +1,2 @@ +seqkit/concat: + - "modules/nf-core/seqkit/concat/**" diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf new file mode 100644 index 000000000..553c907dc --- /dev/null +++ b/subworkflows/local/abacas_multifasta.nf @@ -0,0 +1,62 @@ +// +// Process multiple multifasta files with abacas +// +include { ABACAS } from '../../modules/nf-core/abacas/main' +include { SEQKIT_SPLIT } from '../../modules/local/seqkit_split' +include { SEQKIT_CONCAT } from '../../modules/nf-core/seqkit/concat/main' + +workflow ABACAS_MULTI { + take: + scaffold // channel: [ val(meta), path(scaffold) ] + multifasta // channel: /path/to/genome.fasta + + main: + + ch_versions = Channel.empty() + + // + // Split multifasta file into individual fasta files + // + SEQKIT_SPLIT ( + multifasta.map { [ [:], it ] } + ) + ch_fasta_list = SEQKIT_SPLIT.out.fastx + ch_versions = ch_versions.mix(SEQKIT_SPLIT.out.versions) + + // + // Run abacas on each fasta file + // + ch_abacas = Channel.empty() + ch_fasta_list + .transpose() + .map { meta, fasta -> fasta } + .set { ch_fasta} + + ABACAS ( + scaffold.first(), + ch_fasta + ) + ch_abacas = ABACAS.out.results + ch_versions = ch_versions.mix(ABACAS.out.versions) + + // + // Concatenate abacas results + // + + ch_abacas + .map { meta, files -> tuple(meta, files[3]) } + .groupTuple() + .map { meta, files -> tuple(meta, files.flatten()) } + .set{ ch_abacas } + + SEQKIT_CONCAT ( + ch_abacas + ) + + emit: + abacas_results = SEQKIT_CONCAT.out.fastx + versions = ch_versions // channel: [ versions.yml ] +} + + + diff --git a/subworkflows/local/assembly_qc.nf b/subworkflows/local/assembly_qc.nf index 315c8cef2..a90b11227 100644 --- a/subworkflows/local/assembly_qc.nf +++ b/subworkflows/local/assembly_qc.nf @@ -2,11 +2,12 @@ // Downstream analysis for assembly scaffolds // -include { FILTER_BLASTN } from '../../modules/local/filter_blastn' -include { ABACAS } from '../../modules/nf-core/abacas/main' -include { BLAST_BLASTN } from '../../modules/nf-core/blast/blastn/main' -include { PLASMIDID } from '../../modules/nf-core/plasmidid/main' -include { QUAST } from '../../modules/nf-core/quast/main' +include { FILTER_BLASTN } from '../../modules/local/filter_blastn' +include { ABACAS as ABACAS_SINGLE } from '../../modules/nf-core/abacas/main' +include { ABACAS_MULTI } from '../../subworkflows/local/abacas_multifasta' +include { BLAST_BLASTN } from '../../modules/nf-core/blast/blastn/main' +include { PLASMIDID } from '../../modules/nf-core/plasmidid/main' +include { QUAST } from '../../modules/nf-core/quast/main' workflow ASSEMBLY_QC { take: @@ -64,17 +65,47 @@ workflow ASSEMBLY_QC { ch_versions = ch_versions.mix(QUAST.out.versions) } - // - // Contiguate assembly with ABACAS - // +// +// Contiguate assembly with ABACAS +// ch_abacas_results = Channel.empty() if (!params.skip_abacas) { - ABACAS ( + fasta + .branch { fasta_file -> + def is_multi = false + def count = 0 + file(fasta_file).withReader { reader -> + String line + while ((line = reader.readLine()) != null) { + if (line.startsWith('>')) { + count++ + if (count > 1) { + is_multi = true + break + } + } + } + } + multi: is_multi + single: true + } + .set { fasta_type } + + ABACAS_SINGLE ( scaffolds, - fasta + fasta_type.single + ) + + ABACAS_MULTI ( + scaffolds, + fasta_type.multi + ) + + ch_abacas_results = ABACAS_SINGLE.out.results.mix(ABACAS_MULTI.out.abacas_results) + ch_versions = ch_versions.mix( + ABACAS_SINGLE.out.versions.first(), + ABACAS_MULTI.out.versions.first() ) - ch_abacas_results = ABACAS.out.results - ch_versions = ch_versions.mix(ABACAS.out.versions.first()) } // From 470aa21bd4a122491347fa2ea03080c850ab0041 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Tue, 25 Mar 2025 16:50:38 +0700 Subject: [PATCH 02/10] fix nf-core linting --- conf/modules_illumina.config | 6 +++--- modules/local/seqkit_split.nf | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index af1ab7158..5ce68f50e 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -899,7 +899,7 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - + withName: '.*:.*:ASSEMBLY_SPADES:.*:.*:SEQKIT_CONCAT' { ext.args = '-f' publishDir = [ @@ -1032,7 +1032,7 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - + withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:.*:SEQKIT_CONCAT' { ext.args = '-f' publishDir = [ @@ -1131,7 +1131,7 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - + withName: '.*:.*:ASSEMBLY_MINIA:.*:.*:SEQKIT_CONCAT' { ext.args = '-f' publishDir = [ diff --git a/modules/local/seqkit_split.nf b/modules/local/seqkit_split.nf index 506cfd384..878959ba9 100644 --- a/modules/local/seqkit_split.nf +++ b/modules/local/seqkit_split.nf @@ -42,5 +42,4 @@ process SEQKIT_SPLIT { seqkit: \$(seqkit version | cut -d' ' -f2) END_VERSIONS """ - -} \ No newline at end of file +} From cc3d138f9918c18812e1c5082d7d20e3bda1c1f0 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Wed, 26 Mar 2025 15:31:33 +0700 Subject: [PATCH 03/10] simplify seqtk split --- modules/local/seqkit_split.nf | 14 ++++---------- subworkflows/local/abacas_multifasta.nf | 11 ++++++----- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/modules/local/seqkit_split.nf b/modules/local/seqkit_split.nf index 878959ba9..f4b04c165 100644 --- a/modules/local/seqkit_split.nf +++ b/modules/local/seqkit_split.nf @@ -11,31 +11,25 @@ process SEQKIT_SPLIT { tuple val(meta), path(fastx) output: - tuple val(meta), path("${prefix}*/*.fna") , emit: fastx - path "versions.yml" , emit: versions + tuple val(meta), path("${fastx.baseName}*/*.{fasta,fastq,fa,fq,fas,fna,faa}") , emit: fastx + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - prefix = task.ext.prefix ?: "${fastx.baseName}" def extension = "fastq" if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz|.+\.fsa|.+\.fsa.gz/ ) { extension = "fasta" } - extension = fastx.toString().endsWith('.gz') ? "${extension}.gz" : extension - def call_gzip = extension.endsWith('.gz') ? "| gzip -c $args2" : '' - if("${prefix}.${extension}" == "$fastx") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ seqkit \\ split \\ --threads $task.cpus \\ $args \\ - $fastx \\ - $call_gzip \\ - > ${prefix}.${extension} + $fastx cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf index 553c907dc..66adc8f78 100644 --- a/subworkflows/local/abacas_multifasta.nf +++ b/subworkflows/local/abacas_multifasta.nf @@ -32,9 +32,13 @@ workflow ABACAS_MULTI { .map { meta, fasta -> fasta } .set { ch_fasta} + scaffold + .combine (ch_fasta) + .set { ch_scaffold_fasta } + ABACAS ( - scaffold.first(), - ch_fasta + ch_scaffold_fasta.map { meta, scaffold, fasta -> tuple( meta, scaffold ) }, + ch_scaffold_fasta.map { meta, scaffold, fasta -> fasta } ) ch_abacas = ABACAS.out.results ch_versions = ch_versions.mix(ABACAS.out.versions) @@ -57,6 +61,3 @@ workflow ABACAS_MULTI { abacas_results = SEQKIT_CONCAT.out.fastx versions = ch_versions // channel: [ versions.yml ] } - - - From cacb5db7d9bdb1cbc7f732958d06e5c8eecce4f7 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Wed, 26 Mar 2025 15:47:12 +0700 Subject: [PATCH 04/10] fix nf-core linting --- modules/local/seqkit_split.nf | 2 +- subworkflows/local/abacas_multifasta.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/seqkit_split.nf b/modules/local/seqkit_split.nf index f4b04c165..6a1f1adad 100644 --- a/modules/local/seqkit_split.nf +++ b/modules/local/seqkit_split.nf @@ -29,7 +29,7 @@ process SEQKIT_SPLIT { split \\ --threads $task.cpus \\ $args \\ - $fastx + $fastx cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf index 66adc8f78..a5d24fccb 100644 --- a/subworkflows/local/abacas_multifasta.nf +++ b/subworkflows/local/abacas_multifasta.nf @@ -34,7 +34,7 @@ workflow ABACAS_MULTI { scaffold .combine (ch_fasta) - .set { ch_scaffold_fasta } + .set { ch_scaffold_fasta } ABACAS ( ch_scaffold_fasta.map { meta, scaffold, fasta -> tuple( meta, scaffold ) }, From 407dd34e259f91169052fd3a8c1c7e66ce475987 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Thu, 27 Mar 2025 00:30:15 +0700 Subject: [PATCH 05/10] remove seqkit_concat and seqkit_split, add test_illumina_fragmented profile, add CI test --- .github/workflows/ci.yml | 75 +++++ conf/modules_illumina.config | 54 ---- conf/test_illumina_fragmented.config | 41 +++ modules.json | 261 +++++++++++++----- modules/local/seqkit_split.nf | 39 --- modules/nf-core/seqkit/concat/environment.yml | 7 - modules/nf-core/seqkit/concat/main.nf | 46 --- modules/nf-core/seqkit/concat/meta.yml | 50 ---- .../nf-core/seqkit/concat/tests/main.nf.test | 66 ----- .../seqkit/concat/tests/main.nf.test.snap | 47 ---- .../seqkit/concat/tests/nextflow.config | 5 - modules/nf-core/seqkit/concat/tests/tags.yml | 2 - nextflow.config | 15 +- subworkflows/local/abacas_multifasta.nf | 38 +-- subworkflows/local/assembly_minia.nf | 4 +- subworkflows/local/assembly_qc.nf | 22 +- subworkflows/local/assembly_spades.nf | 4 +- subworkflows/local/assembly_unicycler.nf | 4 +- workflows/illumina.nf | 9 +- 19 files changed, 355 insertions(+), 434 deletions(-) create mode 100644 conf/test_illumina_fragmented.config delete mode 100644 modules/local/seqkit_split.nf delete mode 100644 modules/nf-core/seqkit/concat/environment.yml delete mode 100644 modules/nf-core/seqkit/concat/main.nf delete mode 100644 modules/nf-core/seqkit/concat/meta.yml delete mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test delete mode 100644 modules/nf-core/seqkit/concat/tests/main.nf.test.snap delete mode 100644 modules/nf-core/seqkit/concat/tests/nextflow.config delete mode 100644 modules/nf-core/seqkit/concat/tests/tags.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2e970aba..569566a45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -319,3 +319,78 @@ jobs: - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.parameters }} | ${{ matrix.profile }}" run: | nextflow run ${GITHUB_WORKSPACE} -profile test_nanopore,${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results + +test_illumina_fragmented: + name: "Test using multifasta reference (${{ matrix.NXF_VER }} | ${{ matrix.parameters }} | ${{ matrix.profile }})" + # Only run on push if this is the nf-core dev branch (merged PRs) + if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/viralrecon') }}" + runs-on: ubuntu-latest + strategy: + matrix: + NXF_VER: + - "24.04.2" + - "latest-everything" + profile: + - "conda" + - "docker" + - "singularity" + parameters: + - "--skip_freyja --fasta ./crimea_congo.fasta.gz --gff ./crimea_congo.gff.gz" + isMaster: + - ${{ github.base_ref == 'master' }} + # Exclude conda and singularity on dev + exclude: + - isMaster: false + profile: "conda" + - isMaster: false + profile: "singularity" + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Set up Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ matrix.NXF_VER }}" + + - name: Set up Apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 + with: + miniconda-version: "latest" + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge,bioconda + + - name: Set up Conda + if: matrix.profile == 'conda' + run: | + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH + + - name: Clean up Disk space + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - name: Download crimea_congo.fasta.gz + if: contains(matrix.parameters, 'fasta') + run: | + wget 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.fasta.gz + + - name: Download crimea_congo.gff.gz + if: contains(matrix.parameters, 'gff') + run: | + wget 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.gff.gz + + - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.parameters }} | ${{ matrix.profile }}" + run: | + nextflow run ${GITHUB_WORKSPACE} -profile test_illumina_fragmented,${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index 5ce68f50e..2719b9f4e 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -890,24 +890,6 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - - withName: '.*:.*:ASSEMBLY_SPADES:.*:.*:SEQKIT_SPLIT' { - ext.args = '-i' - publishDir = [ - path: { "${params.outdir}/assembly/spades/${params.spades_mode}/seqkit/split" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:.*:ASSEMBLY_SPADES:.*:.*:SEQKIT_CONCAT' { - ext.args = '-f' - publishDir = [ - path: { "${params.outdir}/assembly/spades/${params.spades_mode}/seqkit/concat" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } } } @@ -1023,24 +1005,6 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - - withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:.*:SEQKIT_SPLIT' { - ext.args = '-i' - publishDir = [ - path: { "${params.outdir}/assembly/unicycler/seqkit/split" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:.*:ASSEMBLY_UNICYCLER:.*:.*:SEQKIT_CONCAT' { - ext.args = '-f' - publishDir = [ - path: { "${params.outdir}/assembly/unicycler/seqkit/concat" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } } } @@ -1122,24 +1086,6 @@ if (!params.skip_assembly) { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - - withName: '.*:.*:ASSEMBLY_MINIA:.*:.*:SEQKIT_SPLIT' { - ext.args = '-i' - publishDir = [ - path: { "${params.outdir}/assembly/minia/seqkit/split" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:.*:ASSEMBLY_MINIA:.*:.*:SEQKIT_CONCAT' { - ext.args = '-f' - publishDir = [ - path: { "${params.outdir}/assembly/minia/seqkit/concat" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } } } diff --git a/conf/test_illumina_fragmented.config b/conf/test_illumina_fragmented.config new file mode 100644 index 000000000..a84a91e13 --- /dev/null +++ b/conf/test_illumina_fragmented.config @@ -0,0 +1,41 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests with multifasta +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/viralrecon -profile test_illumina_fragmented, --outdir + +---------------------------------------------------------------------------------------- +*/ + +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '2.h' + ] +} + +params { + config_profile_name = 'Test profile' + config_profile_description = 'Minimal test dataset to check pipeline function with multifasta' + + // Input data to test SISPA/metagenomics analysis + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_full_illumina_fragmented.csv' + platform = 'illumina' + protocol = 'metagenomic' + + // Genome references + fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.fasta.gz' + gff = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.gff.gz' + kraken2_db = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/kraken2/kraken2_hs22.tar.gz' + + // Variant calling options + variant_caller = 'bcftools' + skip_freyja = true + + // Assembly options + assemblers = 'spades,unicycler,minia' +} diff --git a/modules.json b/modules.json index 3e3c62897..e5232a999 100644 --- a/modules.json +++ b/modules.json @@ -8,284 +8,390 @@ "abacas": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "artic/guppyplex": { "branch": "master", "git_sha": "546a295c13279c0e7db6240f4cf13cd1e2e30cb4", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "artic/minion": { "branch": "master", "git_sha": "b44f728e80a1420b9f130061d91f7ff86673735a", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/artic/minion/artic-minion.diff" }, "bandage/image": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/consensus": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/filter": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/mpileup": { "branch": "master", "git_sha": "ede1e20af42e2f736638efae1b79762293a6a98a", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/norm": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/query": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/sort": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/stats": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/getfasta": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/maskfasta": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bedtools/merge": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "blast/blastn": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "blast/makeblastdb": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bowtie2/align": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["fastq_align_bowtie2"] + "installed_by": [ + "fastq_align_bowtie2" + ] }, "bowtie2/build": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cat/fastq": { "branch": "master", "git_sha": "c03f4019225fce21c11f194ff32eca396963f305", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "custom/getchromsizes": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cutadapt": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/cutadapt/cutadapt.diff" }, "fastp": { "branch": "master", "git_sha": "df6f67c19f76671b42ffa395cd2fde8958111eba", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "freyja/boot": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["bam_variant_demix_boot_freyja"] + "installed_by": [ + "bam_variant_demix_boot_freyja" + ] }, "freyja/demix": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["bam_variant_demix_boot_freyja"] + "installed_by": [ + "bam_variant_demix_boot_freyja" + ] }, "freyja/update": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["bam_variant_demix_boot_freyja"] + "installed_by": [ + "bam_variant_demix_boot_freyja" + ] }, "freyja/variants": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["bam_variant_demix_boot_freyja"] + "installed_by": [ + "bam_variant_demix_boot_freyja" + ] }, "gunzip": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ivar/consensus": { "branch": "master", "git_sha": "fa30cb23a4ad91e509b0c91399ab3b0cc76e858f", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ivar/trim": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ivar/variants": { "branch": "master", "git_sha": "fa30cb23a4ad91e509b0c91399ab3b0cc76e858f", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "kraken2/kraken2": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "minia": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "mosdepth": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nanoplot": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nextclade/datasetget": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "nextclade/run": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "pangolin": { "branch": "master", "git_sha": "9530ba667bb6c809d998fb9bd567bb9514cb23e5", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "picard/markduplicates": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["bam_markduplicates_picard"] + "installed_by": [ + "bam_markduplicates_picard" + ] }, "plasmidid": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "pycoqc": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "quast": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/idxstats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/index": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": ["bam_markduplicates_picard", "bam_sort_stats_samtools"] + "installed_by": [ + "bam_markduplicates_picard", + "bam_sort_stats_samtools" + ] }, "samtools/sort": { "branch": "master", "git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b", - "installed_by": ["bam_sort_stats_samtools"] + "installed_by": [ + "bam_sort_stats_samtools" + ] }, "samtools/stats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["bam_stats_samtools"] + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/view": { "branch": "master", "git_sha": "e9bca09da225e5132d45a32bf830a434843bb5be", - "installed_by": ["modules"] - }, - "seqkit/concat": { - "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "spades": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/bgzip": { "branch": "master", "git_sha": "69fdb99a8affa55adfda16966aa4568e103dc1b6", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/tabix": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "unicycler": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "untar": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "vcflib/vcfuniq": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -294,45 +400,62 @@ "bam_markduplicates_picard": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "bam_sort_stats_samtools": { "branch": "master", "git_sha": "763d4b5c05ffda3ac1ac969dc67f7458cfb2eb1d", - "installed_by": ["fastq_align_bowtie2"] + "installed_by": [ + "fastq_align_bowtie2" + ] }, "bam_stats_samtools": { "branch": "master", "git_sha": "763d4b5c05ffda3ac1ac969dc67f7458cfb2eb1d", - "installed_by": ["bam_markduplicates_picard", "bam_sort_stats_samtools"] + "installed_by": [ + "bam_markduplicates_picard", + "bam_sort_stats_samtools" + ] }, "bam_variant_demix_boot_freyja": { "branch": "master", "git_sha": "0e9cb409c32d3ec4f0d3804588e4778971c09b7e", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "fastq_align_bowtie2": { "branch": "master", "git_sha": "0fa40bbf85955171ec197334ac70a1197fba600d", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/local/seqkit_split.nf b/modules/local/seqkit_split.nf deleted file mode 100644 index 6a1f1adad..000000000 --- a/modules/local/seqkit_split.nf +++ /dev/null @@ -1,39 +0,0 @@ -process SEQKIT_SPLIT { - tag "$fastx.baseName" - label 'process_low' - - conda "bioconda::seqkit=2.9.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0': - 'biocontainers/seqkit:2.9.0--h9ee0642_0' }" - - input: - tuple val(meta), path(fastx) - - output: - tuple val(meta), path("${fastx.baseName}*/*.{fasta,fastq,fa,fq,fas,fna,faa}") , emit: fastx - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def extension = "fastq" - if ("$fastx" ==~ /.+\.fasta|.+\.fasta.gz|.+\.fa|.+\.fa.gz|.+\.fas|.+\.fas.gz|.+\.fna|.+\.fna.gz|.+\.fsa|.+\.fsa.gz/ ) { - extension = "fasta" - } - - """ - seqkit \\ - split \\ - --threads $task.cpus \\ - $args \\ - $fastx - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - seqkit: \$(seqkit version | cut -d' ' -f2) - END_VERSIONS - """ -} diff --git a/modules/nf-core/seqkit/concat/environment.yml b/modules/nf-core/seqkit/concat/environment.yml deleted file mode 100644 index b26fb1eb8..000000000 --- a/modules/nf-core/seqkit/concat/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda -dependencies: - - bioconda::seqkit=2.9.0 diff --git a/modules/nf-core/seqkit/concat/main.nf b/modules/nf-core/seqkit/concat/main.nf deleted file mode 100644 index d10d9780f..000000000 --- a/modules/nf-core/seqkit/concat/main.nf +++ /dev/null @@ -1,46 +0,0 @@ -process SEQKIT_CONCAT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqkit:2.9.0--h9ee0642_0': - 'biocontainers/seqkit:2.9.0--h9ee0642_0' }" - - input: - tuple val(meta), path(input, stageAs: 'in/*') - - output: - tuple val(meta), path("*.{fasta,fastq,fa,fq,fas,fna,faa}"), emit: fastx - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: "" - def prefix = task.ext.prefix ?: "${meta.id}" - def file_type = input instanceof List ? input[0].getExtension() : input.getExtension() - """ - seqkit \\ - concat \\ - $args \\ - in/* > ${prefix}.${file_type} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - seqkit: \$(seqkit version | cut -d' ' -f2) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - seqkit: \$(seqkit version | cut -d' ' -f2) - END_VERSIONS - """ -} diff --git a/modules/nf-core/seqkit/concat/meta.yml b/modules/nf-core/seqkit/concat/meta.yml deleted file mode 100644 index c5315f255..000000000 --- a/modules/nf-core/seqkit/concat/meta.yml +++ /dev/null @@ -1,50 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "seqkit_concat" -description: Concatenating multiple uncompressed sequence files together -keywords: - - concat - - fasta - - fastq - - merge -tools: - - seqkit: - description: | - Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. - homepage: https://github.com/shenwei356/seqkit - documentation: https://bioinf.shenwei.me/seqkit/ - tool_dev_url: https://github.com/shenwei356/seqkit - doi: 10.1371/journal.pone.0163962 - licence: ["MIT"] - identifier: biotools:seqkit - -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - input: - type: file - description: Sequence file in fasta/q format - pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" -output: - #Only when we have meta - - fastx: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - "*.{fasta,fastq,fa,fq,fas,fna,faa}": - type: file - description: A concatenated sequence file - pattern: "*.{fasta,fastq,fa,fq,fas,fna,faa}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@DLBPointon" -maintainers: - - "@DLBPointon" diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test b/modules/nf-core/seqkit/concat/tests/main.nf.test deleted file mode 100644 index 3ebae280c..000000000 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test +++ /dev/null @@ -1,66 +0,0 @@ -nextflow_process { - - name "Test Process SEQKIT_CONCAT" - script "../main.nf" - process "SEQKIT_CONCAT" - config "./nextflow.config" - - tag "modules" - tag "modules_nfcore" - tag "seqkit" - tag "seqkit/concat" - - test("sarscov2 and human primers - fasta") { - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/fasta/primers.fasta', checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.versions).match()} - ) - with(process.out.fastx) { - // Including headers from both input files - assert path(get(0).get(1)).readLines().any { it.contains('>NEB_Clontech_3p') } - assert path(get(0).get(1)).readLines().any { it.contains('>MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome') } - } - } - } - - test("sarscov2 and human primers - fasta - stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/fasta/primers.fasta', checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match()} - ) - } - } -} diff --git a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap b/modules/nf-core/seqkit/concat/tests/main.nf.test.snap deleted file mode 100644 index 5f85418c6..000000000 --- a/modules/nf-core/seqkit/concat/tests/main.nf.test.snap +++ /dev/null @@ -1,47 +0,0 @@ -{ - "sarscov2 and human primers - fasta": { - "content": [ - [ - "versions.yml:md5,13b312c8ca94f9c6460ffc759a5c79c9" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.3" - }, - "timestamp": "2025-01-15T15:06:45.246143" - }, - "sarscov2 and human primers - fasta - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,13b312c8ca94f9c6460ffc759a5c79c9" - ], - "fastx": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,13b312c8ca94f9c6460ffc759a5c79c9" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.3" - }, - "timestamp": "2025-01-15T15:06:49.428563" - } -} \ No newline at end of file diff --git a/modules/nf-core/seqkit/concat/tests/nextflow.config b/modules/nf-core/seqkit/concat/tests/nextflow.config deleted file mode 100644 index 89d4fe3a4..000000000 --- a/modules/nf-core/seqkit/concat/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: SEQKIT_CONCAT { - ext.args = "--full" - } -} diff --git a/modules/nf-core/seqkit/concat/tests/tags.yml b/modules/nf-core/seqkit/concat/tests/tags.yml deleted file mode 100644 index cabcd5cf3..000000000 --- a/modules/nf-core/seqkit/concat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -seqkit/concat: - - "modules/nf-core/seqkit/concat/**" diff --git a/nextflow.config b/nextflow.config index 888807a19..47948a5c9 100644 --- a/nextflow.config +++ b/nextflow.config @@ -240,13 +240,14 @@ profiles { ] } } - test { includeConfig 'conf/test.config' } - test_sispa { includeConfig 'conf/test_sispa.config' } - test_nanopore { includeConfig 'conf/test_nanopore.config' } - test_full { includeConfig 'conf/test_full.config' } - test_full_illumina { includeConfig 'conf/test_full.config' } - test_full_nanopore { includeConfig 'conf/test_full_nanopore.config' } - test_full_sispa { includeConfig 'conf/test_full_sispa.config' } + test { includeConfig 'conf/test.config' } + test_sispa { includeConfig 'conf/test_sispa.config' } + test_nanopore { includeConfig 'conf/test_nanopore.config' } + test_full { includeConfig 'conf/test_full.config' } + test_full_illumina { includeConfig 'conf/test_full.config' } + test_full_nanopore { includeConfig 'conf/test_full_nanopore.config' } + test_full_sispa { includeConfig 'conf/test_full_sispa.config' } + test_illumina_fragmented { includeConfig 'conf/test_illumina_fragmented.config' } } // Load nf-core custom profiles from different Institutions diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf index a5d24fccb..642df2acb 100644 --- a/subworkflows/local/abacas_multifasta.nf +++ b/subworkflows/local/abacas_multifasta.nf @@ -2,13 +2,12 @@ // Process multiple multifasta files with abacas // include { ABACAS } from '../../modules/nf-core/abacas/main' -include { SEQKIT_SPLIT } from '../../modules/local/seqkit_split' -include { SEQKIT_CONCAT } from '../../modules/nf-core/seqkit/concat/main' workflow ABACAS_MULTI { take: scaffold // channel: [ val(meta), path(scaffold) ] multifasta // channel: /path/to/genome.fasta + assembler main: @@ -17,20 +16,14 @@ workflow ABACAS_MULTI { // // Split multifasta file into individual fasta files // - SEQKIT_SPLIT ( - multifasta.map { [ [:], it ] } - ) - ch_fasta_list = SEQKIT_SPLIT.out.fastx - ch_versions = ch_versions.mix(SEQKIT_SPLIT.out.versions) + multifasta + .splitFasta( by: 1, file: true ) + .set { ch_fasta } // // Run abacas on each fasta file // ch_abacas = Channel.empty() - ch_fasta_list - .transpose() - .map { meta, fasta -> fasta } - .set { ch_fasta} scaffold .combine (ch_fasta) @@ -49,15 +42,22 @@ workflow ABACAS_MULTI { ch_abacas .map { meta, files -> tuple(meta, files[3]) } - .groupTuple() - .map { meta, files -> tuple(meta, files.flatten()) } - .set{ ch_abacas } - - SEQKIT_CONCAT ( - ch_abacas - ) + .multiMap{ meta, fasta -> + metadata: [meta.id, meta.clone()] + fasta: [meta.id, fasta] + } + .set { ch_abacas_split } + + ch_abacas_split.fasta + .collectFile (storeDir: "${params.outdir}/assembly/${assembler}/abacas_multi") { id, fasta -> + ["${id}.fa",fasta] + } + .map { file -> [file.simpleName, file] } + .join(ch_abacas_split.metadata) + .map { id, fasta, meta -> tuple(meta, fasta) } + .set { ch_abacas_results } emit: - abacas_results = SEQKIT_CONCAT.out.fastx + abacas_results = ch_abacas_results // channel: [ val(meta), path('*.abacas*') ] versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/local/assembly_minia.nf b/subworkflows/local/assembly_minia.nf index 31f1179dd..f49beaf63 100644 --- a/subworkflows/local/assembly_minia.nf +++ b/subworkflows/local/assembly_minia.nf @@ -14,6 +14,7 @@ workflow ASSEMBLY_MINIA { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt + assembler main: @@ -45,7 +46,8 @@ workflow ASSEMBLY_MINIA { gff, blast_db, blast_header, - blast_filtered_header + blast_filtered_header, + assembler ) ch_versions = ch_versions.mix(ASSEMBLY_QC.out.versions) diff --git a/subworkflows/local/assembly_qc.nf b/subworkflows/local/assembly_qc.nf index a90b11227..db112488d 100644 --- a/subworkflows/local/assembly_qc.nf +++ b/subworkflows/local/assembly_qc.nf @@ -17,6 +17,7 @@ workflow ASSEMBLY_QC { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt + assembler main: @@ -71,22 +72,8 @@ workflow ASSEMBLY_QC { ch_abacas_results = Channel.empty() if (!params.skip_abacas) { fasta - .branch { fasta_file -> - def is_multi = false - def count = 0 - file(fasta_file).withReader { reader -> - String line - while ((line = reader.readLine()) != null) { - if (line.startsWith('>')) { - count++ - if (count > 1) { - is_multi = true - break - } - } - } - } - multi: is_multi + .branch { fasta -> + multi: fasta.countFasta() > 1 single: true } .set { fasta_type } @@ -98,7 +85,8 @@ workflow ASSEMBLY_QC { ABACAS_MULTI ( scaffolds, - fasta_type.multi + fasta_type.multi, + assembler ) ch_abacas_results = ABACAS_SINGLE.out.results.mix(ABACAS_MULTI.out.abacas_results) diff --git a/subworkflows/local/assembly_spades.nf b/subworkflows/local/assembly_spades.nf index ee11801da..89b8c9bb4 100644 --- a/subworkflows/local/assembly_spades.nf +++ b/subworkflows/local/assembly_spades.nf @@ -19,6 +19,7 @@ workflow ASSEMBLY_SPADES { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt + assembler main: @@ -97,7 +98,8 @@ workflow ASSEMBLY_SPADES { gff, blast_db, blast_header, - blast_filtered_header + blast_filtered_header, + assembler ) ch_versions = ch_versions.mix(ASSEMBLY_QC.out.versions) diff --git a/subworkflows/local/assembly_unicycler.nf b/subworkflows/local/assembly_unicycler.nf index d6b0574d0..afff8578d 100644 --- a/subworkflows/local/assembly_unicycler.nf +++ b/subworkflows/local/assembly_unicycler.nf @@ -17,6 +17,7 @@ workflow ASSEMBLY_UNICYCLER { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt + assembler main: @@ -83,7 +84,8 @@ workflow ASSEMBLY_UNICYCLER { gff, blast_db, blast_header, - blast_filtered_header + blast_filtered_header, + assembler ) ch_versions = ch_versions.mix(ASSEMBLY_QC.out.versions) diff --git a/workflows/illumina.nf b/workflows/illumina.nf index e93e02d01..86f33834e 100644 --- a/workflows/illumina.nf +++ b/workflows/illumina.nf @@ -612,7 +612,8 @@ workflow ILLUMINA { ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.blast_db, ch_blast_outfmt6_header, - ch_blast_filtered_outfmt6_header + ch_blast_filtered_outfmt6_header, + 'spades' ) ch_spades_quast_multiqc = ASSEMBLY_SPADES.out.quast_tsv ch_versions = ch_versions.mix(ASSEMBLY_SPADES.out.versions) @@ -629,7 +630,8 @@ workflow ILLUMINA { ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.blast_db, ch_blast_outfmt6_header, - ch_blast_filtered_outfmt6_header + ch_blast_filtered_outfmt6_header, + 'unicycler' ) ch_unicycler_quast_multiqc = ASSEMBLY_UNICYCLER.out.quast_tsv ch_versions = ch_versions.mix(ASSEMBLY_UNICYCLER.out.versions) @@ -646,7 +648,8 @@ workflow ILLUMINA { ch_genome_gff ? PREPARE_GENOME.out.gff.map { [ [:], it ] } : [ [:], [] ], PREPARE_GENOME.out.blast_db, ch_blast_outfmt6_header, - ch_blast_filtered_outfmt6_header + ch_blast_filtered_outfmt6_header, + 'minia' ) ch_minia_quast_multiqc = ASSEMBLY_MINIA.out.quast_tsv ch_versions = ch_versions.mix(ASSEMBLY_MINIA.out.versions) From 662682c6a19f211a59d96297230cf4dd49dbd9df Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Thu, 27 Mar 2025 15:35:27 +0700 Subject: [PATCH 06/10] update CI test --- .github/workflows/ci.yml | 150 ++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 74 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 569566a45..cdef612c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -320,77 +320,79 @@ jobs: run: | nextflow run ${GITHUB_WORKSPACE} -profile test_nanopore,${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results -test_illumina_fragmented: - name: "Test using multifasta reference (${{ matrix.NXF_VER }} | ${{ matrix.parameters }} | ${{ matrix.profile }})" - # Only run on push if this is the nf-core dev branch (merged PRs) - if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/viralrecon') }}" - runs-on: ubuntu-latest - strategy: - matrix: - NXF_VER: - - "24.04.2" - - "latest-everything" - profile: - - "conda" - - "docker" - - "singularity" - parameters: - - "--skip_freyja --fasta ./crimea_congo.fasta.gz --gff ./crimea_congo.gff.gz" - isMaster: - - ${{ github.base_ref == 'master' }} - # Exclude conda and singularity on dev - exclude: - - isMaster: false - profile: "conda" - - isMaster: false - profile: "singularity" - steps: - - name: Check out pipeline code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - - name: Set up Nextflow - uses: nf-core/setup-nextflow@v2 - with: - version: "${{ matrix.NXF_VER }}" - - - name: Set up Apptainer - if: matrix.profile == 'singularity' - uses: eWaterCycle/setup-apptainer@main - - - name: Set up Singularity - if: matrix.profile == 'singularity' - run: | - mkdir -p $NXF_SINGULARITY_CACHEDIR - mkdir -p $NXF_SINGULARITY_LIBRARYDIR - - - name: Set up Miniconda - if: matrix.profile == 'conda' - uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 - with: - miniconda-version: "latest" - auto-update-conda: true - conda-solver: libmamba - channels: conda-forge,bioconda - - - name: Set up Conda - if: matrix.profile == 'conda' - run: | - echo $(realpath $CONDA)/condabin >> $GITHUB_PATH - echo $(realpath python) >> $GITHUB_PATH - - - name: Clean up Disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - - name: Download crimea_congo.fasta.gz - if: contains(matrix.parameters, 'fasta') - run: | - wget 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.fasta.gz - - - name: Download crimea_congo.gff.gz - if: contains(matrix.parameters, 'gff') - run: | - wget 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.gff.gz - - - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.parameters }} | ${{ matrix.profile }}" - run: | - nextflow run ${GITHUB_WORKSPACE} -profile test_illumina_fragmented,${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results + test_illumina_fragmented: + name: "Test using multifasta reference (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})" + # Only run on push if this is the nf-core dev branch (merged PRs) + if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/viralrecon') }}" + runs-on: ubuntu-latest + strategy: + matrix: + NXF_VER: + - "24.04.2" + - "latest-everything" + profile: + - "conda" + - "docker" + - "singularity" + test_name: + - "test_illumina_fragmented" + # parameters: + # - "--skip_freyja" + # - "--fasta ./crimea_congo.fasta.gz --gff ./crimea_congo.gff.gz" + isMaster: + - ${{ github.base_ref == 'master' }} + # Exclude conda and singularity on dev + exclude: + - isMaster: false + profile: "conda" + - isMaster: false + profile: "singularity" + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Set up Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ matrix.NXF_VER }}" + + - name: Set up Apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 + with: + miniconda-version: "latest" + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge,bioconda + + - name: Set up Conda + if: matrix.profile == 'conda' + run: | + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH + + - name: Clean up Disk space + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + # - name: Download crimea_congo.fasta.gz + # if: contains(matrix.parameters, 'fasta') + # run: | + # wget https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.fasta.gz + + # - name: Download crimea_congo.gff.gz + # if: contains(matrix.parameters, 'gff') + # run: | + # wget https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.gff.gz + + - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" + run: | + nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results From 6243f3b09be11a730b62fc15ccbbf5e68c808145 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Thu, 27 Mar 2025 15:38:27 +0700 Subject: [PATCH 07/10] fix linting --- .github/workflows/ci.yml | 12 ------------ subworkflows/local/abacas_multifasta.nf | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdef612c2..639c63be9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -336,9 +336,6 @@ jobs: - "singularity" test_name: - "test_illumina_fragmented" - # parameters: - # - "--skip_freyja" - # - "--fasta ./crimea_congo.fasta.gz --gff ./crimea_congo.gff.gz" isMaster: - ${{ github.base_ref == 'master' }} # Exclude conda and singularity on dev @@ -383,15 +380,6 @@ jobs: - name: Clean up Disk space uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - # - name: Download crimea_congo.fasta.gz - # if: contains(matrix.parameters, 'fasta') - # run: | - # wget https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.fasta.gz - - # - name: Download crimea_congo.gff.gz - # if: contains(matrix.parameters, 'gff') - # run: | - # wget https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/genome/crimea_congo/crimea_congo.gff.gz - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" run: | diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf index 642df2acb..31e7f8c10 100644 --- a/subworkflows/local/abacas_multifasta.nf +++ b/subworkflows/local/abacas_multifasta.nf @@ -46,7 +46,7 @@ workflow ABACAS_MULTI { metadata: [meta.id, meta.clone()] fasta: [meta.id, fasta] } - .set { ch_abacas_split } + .set { ch_abacas_split } ch_abacas_split.fasta .collectFile (storeDir: "${params.outdir}/assembly/${assembler}/abacas_multi") { id, fasta -> From 78528a6d42a3406e7df9c1f23a6c739571ddb570 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Thu, 27 Mar 2025 15:41:59 +0700 Subject: [PATCH 08/10] fix linting again --- subworkflows/local/abacas_multifasta.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf index 31e7f8c10..d5df1327f 100644 --- a/subworkflows/local/abacas_multifasta.nf +++ b/subworkflows/local/abacas_multifasta.nf @@ -46,7 +46,7 @@ workflow ABACAS_MULTI { metadata: [meta.id, meta.clone()] fasta: [meta.id, fasta] } - .set { ch_abacas_split } + .set { ch_abacas_split } ch_abacas_split.fasta .collectFile (storeDir: "${params.outdir}/assembly/${assembler}/abacas_multi") { id, fasta -> From 03692eb92db40639c359745fc3316c20652eb479 Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Fri, 28 Mar 2025 08:39:04 +0700 Subject: [PATCH 09/10] Apply prettier formatting --- .github/workflows/ci.yml | 126 +++++++++---------- modules.json | 256 ++++++++++----------------------------- 2 files changed, 127 insertions(+), 255 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 639c63be9..0747245cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -321,66 +321,66 @@ jobs: nextflow run ${GITHUB_WORKSPACE} -profile test_nanopore,${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results test_illumina_fragmented: - name: "Test using multifasta reference (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})" - # Only run on push if this is the nf-core dev branch (merged PRs) - if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/viralrecon') }}" - runs-on: ubuntu-latest - strategy: - matrix: - NXF_VER: - - "24.04.2" - - "latest-everything" - profile: - - "conda" - - "docker" - - "singularity" - test_name: - - "test_illumina_fragmented" - isMaster: - - ${{ github.base_ref == 'master' }} - # Exclude conda and singularity on dev - exclude: - - isMaster: false - profile: "conda" - - isMaster: false - profile: "singularity" - steps: - - name: Check out pipeline code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - - name: Set up Nextflow - uses: nf-core/setup-nextflow@v2 - with: - version: "${{ matrix.NXF_VER }}" - - - name: Set up Apptainer - if: matrix.profile == 'singularity' - uses: eWaterCycle/setup-apptainer@main - - - name: Set up Singularity - if: matrix.profile == 'singularity' - run: | - mkdir -p $NXF_SINGULARITY_CACHEDIR - mkdir -p $NXF_SINGULARITY_LIBRARYDIR - - - name: Set up Miniconda - if: matrix.profile == 'conda' - uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 - with: - miniconda-version: "latest" - auto-update-conda: true - conda-solver: libmamba - channels: conda-forge,bioconda - - - name: Set up Conda - if: matrix.profile == 'conda' - run: | - echo $(realpath $CONDA)/condabin >> $GITHUB_PATH - echo $(realpath python) >> $GITHUB_PATH - - - name: Clean up Disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" - run: | - nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results + name: "Test using multifasta reference (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})" + # Only run on push if this is the nf-core dev branch (merged PRs) + if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/viralrecon') }}" + runs-on: ubuntu-latest + strategy: + matrix: + NXF_VER: + - "24.04.2" + - "latest-everything" + profile: + - "conda" + - "docker" + - "singularity" + test_name: + - "test_illumina_fragmented" + isMaster: + - ${{ github.base_ref == 'master' }} + # Exclude conda and singularity on dev + exclude: + - isMaster: false + profile: "conda" + - isMaster: false + profile: "singularity" + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Set up Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ matrix.NXF_VER }}" + + - name: Set up Apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 + with: + miniconda-version: "latest" + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge,bioconda + + - name: Set up Conda + if: matrix.profile == 'conda' + run: | + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH + + - name: Clean up Disk space + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" + run: | + nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results diff --git a/modules.json b/modules.json index e5232a999..67eb098bd 100644 --- a/modules.json +++ b/modules.json @@ -8,390 +8,279 @@ "abacas": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "artic/guppyplex": { "branch": "master", "git_sha": "546a295c13279c0e7db6240f4cf13cd1e2e30cb4", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "artic/minion": { "branch": "master", "git_sha": "b44f728e80a1420b9f130061d91f7ff86673735a", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/artic/minion/artic-minion.diff" }, "bandage/image": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/consensus": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/filter": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/mpileup": { "branch": "master", "git_sha": "ede1e20af42e2f736638efae1b79762293a6a98a", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/norm": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/query": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/sort": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/stats": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/getfasta": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/maskfasta": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bedtools/merge": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "blast/blastn": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "blast/makeblastdb": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bowtie2/align": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "fastq_align_bowtie2" - ] + "installed_by": ["fastq_align_bowtie2"] }, "bowtie2/build": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", "git_sha": "c03f4019225fce21c11f194ff32eca396963f305", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/getchromsizes": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cutadapt": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/cutadapt/cutadapt.diff" }, "fastp": { "branch": "master", "git_sha": "df6f67c19f76671b42ffa395cd2fde8958111eba", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "freyja/boot": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "bam_variant_demix_boot_freyja" - ] + "installed_by": ["bam_variant_demix_boot_freyja"] }, "freyja/demix": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "bam_variant_demix_boot_freyja" - ] + "installed_by": ["bam_variant_demix_boot_freyja"] }, "freyja/update": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "bam_variant_demix_boot_freyja" - ] + "installed_by": ["bam_variant_demix_boot_freyja"] }, "freyja/variants": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "bam_variant_demix_boot_freyja" - ] + "installed_by": ["bam_variant_demix_boot_freyja"] }, "gunzip": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ivar/consensus": { "branch": "master", "git_sha": "fa30cb23a4ad91e509b0c91399ab3b0cc76e858f", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ivar/trim": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ivar/variants": { "branch": "master", "git_sha": "fa30cb23a4ad91e509b0c91399ab3b0cc76e858f", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "kraken2/kraken2": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "minia": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "mosdepth": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nanoplot": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nextclade/datasetget": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "nextclade/run": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "pangolin": { "branch": "master", "git_sha": "9530ba667bb6c809d998fb9bd567bb9514cb23e5", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "picard/markduplicates": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "bam_markduplicates_picard" - ] + "installed_by": ["bam_markduplicates_picard"] }, "plasmidid": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "pycoqc": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "quast": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/idxstats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/index": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": [ - "bam_markduplicates_picard", - "bam_sort_stats_samtools" - ] + "installed_by": ["bam_markduplicates_picard", "bam_sort_stats_samtools"] }, "samtools/sort": { "branch": "master", "git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b", - "installed_by": [ - "bam_sort_stats_samtools" - ] + "installed_by": ["bam_sort_stats_samtools"] }, "samtools/stats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "bam_stats_samtools" - ] + "installed_by": ["bam_stats_samtools"] }, "samtools/view": { "branch": "master", "git_sha": "e9bca09da225e5132d45a32bf830a434843bb5be", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "spades": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgzip": { "branch": "master", "git_sha": "69fdb99a8affa55adfda16966aa4568e103dc1b6", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "unicycler": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "untar": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "vcflib/vcfuniq": { "branch": "master", "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -400,62 +289,45 @@ "bam_markduplicates_picard": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "bam_sort_stats_samtools": { "branch": "master", "git_sha": "763d4b5c05ffda3ac1ac969dc67f7458cfb2eb1d", - "installed_by": [ - "fastq_align_bowtie2" - ] + "installed_by": ["fastq_align_bowtie2"] }, "bam_stats_samtools": { "branch": "master", "git_sha": "763d4b5c05ffda3ac1ac969dc67f7458cfb2eb1d", - "installed_by": [ - "bam_markduplicates_picard", - "bam_sort_stats_samtools" - ] + "installed_by": ["bam_markduplicates_picard", "bam_sort_stats_samtools"] }, "bam_variant_demix_boot_freyja": { "branch": "master", "git_sha": "0e9cb409c32d3ec4f0d3804588e4778971c09b7e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "fastq_align_bowtie2": { "branch": "master", "git_sha": "0fa40bbf85955171ec197334ac70a1197fba600d", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From 203542c00acf1fa19ce048a2aa01fa177e3618ef Mon Sep 17 00:00:00 2001 From: reichan1998 Date: Fri, 28 Mar 2025 21:59:29 +0700 Subject: [PATCH 10/10] adjust for better clarity --- .github/workflows/ci.yml | 2 +- subworkflows/local/abacas_multifasta.nf | 4 ++-- subworkflows/local/assembly_minia.nf | 4 ++-- subworkflows/local/assembly_spades.nf | 4 ++-- subworkflows/local/assembly_unicycler.nf | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0747245cc..500ca1d47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -383,4 +383,4 @@ jobs: - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" run: | - nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} ${{ matrix.parameters }} --outdir ./results + nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results diff --git a/subworkflows/local/abacas_multifasta.nf b/subworkflows/local/abacas_multifasta.nf index d5df1327f..d6167f464 100644 --- a/subworkflows/local/abacas_multifasta.nf +++ b/subworkflows/local/abacas_multifasta.nf @@ -7,7 +7,7 @@ workflow ABACAS_MULTI { take: scaffold // channel: [ val(meta), path(scaffold) ] multifasta // channel: /path/to/genome.fasta - assembler + assembler // string: assembler name main: @@ -43,7 +43,7 @@ workflow ABACAS_MULTI { ch_abacas .map { meta, files -> tuple(meta, files[3]) } .multiMap{ meta, fasta -> - metadata: [meta.id, meta.clone()] + metadata: [meta.id, meta] fasta: [meta.id, fasta] } .set { ch_abacas_split } diff --git a/subworkflows/local/assembly_minia.nf b/subworkflows/local/assembly_minia.nf index f49beaf63..d8a910f57 100644 --- a/subworkflows/local/assembly_minia.nf +++ b/subworkflows/local/assembly_minia.nf @@ -14,7 +14,7 @@ workflow ASSEMBLY_MINIA { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt - assembler + minia // string : assembler used for assembly main: @@ -47,7 +47,7 @@ workflow ASSEMBLY_MINIA { blast_db, blast_header, blast_filtered_header, - assembler + minia ) ch_versions = ch_versions.mix(ASSEMBLY_QC.out.versions) diff --git a/subworkflows/local/assembly_spades.nf b/subworkflows/local/assembly_spades.nf index 89b8c9bb4..ff8daca2f 100644 --- a/subworkflows/local/assembly_spades.nf +++ b/subworkflows/local/assembly_spades.nf @@ -19,7 +19,7 @@ workflow ASSEMBLY_SPADES { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt - assembler + spades // string : assembler used for assembly main: @@ -99,7 +99,7 @@ workflow ASSEMBLY_SPADES { blast_db, blast_header, blast_filtered_header, - assembler + spades ) ch_versions = ch_versions.mix(ASSEMBLY_QC.out.versions) diff --git a/subworkflows/local/assembly_unicycler.nf b/subworkflows/local/assembly_unicycler.nf index afff8578d..5f1364f7e 100644 --- a/subworkflows/local/assembly_unicycler.nf +++ b/subworkflows/local/assembly_unicycler.nf @@ -17,7 +17,7 @@ workflow ASSEMBLY_UNICYCLER { blast_db // channel: /path/to/blast_db/ blast_header // channel: /path/to/blast_header.txt blast_filtered_header // channel: /path/to/blast_filtered_header.txt - assembler + unicycler // string : assembler used for assembly main: @@ -85,7 +85,7 @@ workflow ASSEMBLY_UNICYCLER { blast_db, blast_header, blast_filtered_header, - assembler + unicycler ) ch_versions = ch_versions.mix(ASSEMBLY_QC.out.versions)