From 1d668eefa246e93ffdf2ef169d01b5d11cd8b436 Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Mon, 26 Sep 2022 18:01:21 +0200 Subject: [PATCH] Bump `seqwish/induce` to v0.7.6 (#2083) * Update seqwish to version 0.7.2 * seqwish can work with a comma-separated list of PAFs * level with nf-core/modules master branch * update seqwish/induce to v0.7.6 * add pangenome test data * test seqwish/induce v0.7.6 with pangenomics test data * we already have pointed to the pangenomics test data sets * update paths to test data * add path to bgzipped fa, gzi, fai * remove one tab * remove one tab * actually execute the 2nd test * try to fix versions.yml * pangenomic tests can be run in their own subworkflow * maybe the csv input is the problem * remove space as suggested by Rike * csv input was not the problem * update test.yml * typo * enable pangenome tests * add md5sum for pangenomic test * Update tests/modules/seqwish/induce/test.yml Co-authored-by: Gisela Gabernet * PAF input is a list of files * beautify comment Co-authored-by: Michael L Heuer Co-authored-by: Gisela Gabernet Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/seqwish/induce/main.nf | 19 ++++++++++++------- modules/seqwish/induce/meta.yml | 6 +++--- tests/config/test_data.config | 4 +++- tests/modules/seqwish/induce/main.nf | 11 ++++++++++- tests/modules/seqwish/induce/test.yml | 13 +++++++++++-- 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/modules/seqwish/induce/main.nf b/modules/seqwish/induce/main.nf index 88c4a9dc..405bfd33 100644 --- a/modules/seqwish/induce/main.nf +++ b/modules/seqwish/induce/main.nf @@ -2,11 +2,11 @@ process SEQWISH_INDUCE { tag "$meta.id" label 'process_medium' - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda (params.enable_conda ? 'bioconda::seqwish=0.7.2' : null) + conda (params.enable_conda ? 'bioconda::seqwish=0.7.6' : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqwish:0.7.2--h2e03b76_0' : - 'quay.io/biocontainers/seqwish:0.7.2--h2e03b76_0' }" + 'https://depot.galaxyproject.org/singularity/seqwish:0.7.6--h5b5514e_1' : + 'quay.io/biocontainers/seqwish:0.7.6--h5b5514e_1' }" input: tuple val(meta), path(paf), path(fasta) @@ -21,18 +21,23 @@ process SEQWISH_INDUCE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '0.7.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def input = paf.join(',') // this ensures that we can actually input a + // comma-separated list of PAF files as required by + // https://github.com/nf-core/pangenome. If one wants to use this, + // ensure that you put a ".collect()" behind your channel. + // See https://github.com/nf-core/pangenome/blob/34149c6cdc19bce3a7b99f97c769d8986a8d429b/main.nf#L543 + // for an example. """ seqwish \\ --threads $task.cpus \\ - --paf-alns=$paf \\ + --paf-alns=$input \\ --seqs=$fasta \\ --gfa=${prefix}.gfa \\ $args cat <<-END_VERSIONS > versions.yml "${task.process}": - seqwish: $VERSION + seqwish: \$(echo \$(seqwish --version 2>&1) | cut -f 1 -d '-' | cut -f 2 -d 'v') END_VERSIONS """ } diff --git a/modules/seqwish/induce/meta.yml b/modules/seqwish/induce/meta.yml index b40360c6..f6b92236 100644 --- a/modules/seqwish/induce/meta.yml +++ b/modules/seqwish/induce/meta.yml @@ -21,9 +21,9 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - paf: - type: file - description: PAF file of alignments - pattern: "*.{paf,paf.gz}" + type: list + description: comma-separated PAF file(s) of alignments, single entry allowed + pattern: "[*.{paf,paf.gz},*.{paf,paf.gz},...]" - fasta: type: file description: FASTA file used to generate alignments diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 9487bc1c..68c2e56d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -194,7 +194,9 @@ params { } 'pangenome' { pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" - pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_fa_bgzip = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_fa_bgzip_fai = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz.fai" + pangenome_fa_bgzip_gzi = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz.gzi" pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" diff --git a/tests/modules/seqwish/induce/main.nf b/tests/modules/seqwish/induce/main.nf index 6388fea2..b83a904f 100644 --- a/tests/modules/seqwish/induce/main.nf +++ b/tests/modules/seqwish/induce/main.nf @@ -4,7 +4,7 @@ nextflow.enable.dsl = 2 include { SEQWISH_INDUCE } from '../../../../modules/seqwish/induce/main.nf' -workflow test_seqwish_induce { +workflow test_seqwish_induce_transcriptome { input = [ [ id:'test' ], // meta map [ file(params.test_data['sarscov2']['genome']['transcriptome_paf'], checkIfExists: true)], [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] @@ -12,3 +12,12 @@ workflow test_seqwish_induce { SEQWISH_INDUCE ( input ) } + +workflow test_seqwish_induce_pangenome { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_paf'], checkIfExists: true)], + [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa'], checkIfExists: true) ] + ] + + SEQWISH_INDUCE ( input ) +} diff --git a/tests/modules/seqwish/induce/test.yml b/tests/modules/seqwish/induce/test.yml index d5a8a7cd..8a700f3e 100644 --- a/tests/modules/seqwish/induce/test.yml +++ b/tests/modules/seqwish/induce/test.yml @@ -1,8 +1,17 @@ -- name: seqwish induce - command: nextflow run ./tests/modules/seqwish/induce -entry test_seqwish_induce -c ./tests/config/nextflow.config -c ./tests/modules/seqwish/induce/nextflow.config +- name: seqwish induce transcriptome + command: nextflow run ./tests/modules/seqwish/induce -entry test_seqwish_induce_transcriptome -c ./tests/config/nextflow.config -c ./tests/modules/seqwish/induce/nextflow.config tags: - seqwish - seqwish/induce files: - path: output/seqwish/test.gfa md5sum: 216a02d3aca322a457c31a62c628548e + +- name: seqwish induce pangenome + command: nextflow run ./tests/modules/seqwish/induce -entry test_seqwish_induce_pangenome -c ./tests/config/nextflow.config -c ./tests/modules/seqwish/induce/nextflow.config + tags: + - seqwish + - seqwish/induce + files: + - path: output/seqwish/test.gfa + md5sum: a73e998dc13a75d86d4685b12625d784