diff --git a/modules/nf-core/pairix/main.nf b/modules/nf-core/pairix/main.nf index f0c20174c45a..45efe94bf028 100644 --- a/modules/nf-core/pairix/main.nf +++ b/modules/nf-core/pairix/main.nf @@ -12,7 +12,7 @@ process PAIRIX { output: tuple val(meta), path(pair), path("*.px2"), emit: index - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('pairix'), eval('echo "$(pairix --help 2>&1)" | sed "s/^.*Version: //; s/Usage.*$//"'), topic: versions, emit: versions_pairix when: task.ext.when == null || task.ext.when @@ -23,10 +23,12 @@ process PAIRIX { pairix \\ $args \\ $pair + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pairix: \$(echo \$(pairix --help 2>&1) | sed 's/^.*Version: //; s/Usage.*\$//') - END_VERSIONS + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${pair}.px2 """ } diff --git a/modules/nf-core/pairix/meta.yml b/modules/nf-core/pairix/meta.yml index 1117e0a5e06c..bf2ecf2169b4 100644 --- a/modules/nf-core/pairix/meta.yml +++ b/modules/nf-core/pairix/meta.yml @@ -8,11 +8,13 @@ keywords: - pairs tools: - pairix: - description: 2D indexing on bgzipped text files of paired genomic coordinates + description: 2D indexing on bgzipped text files of paired genomic + coordinates homepage: "https://github.com/4dn-dcic/pairix" documentation: "https://github.com/4dn-dcic/pairix" tool_dev_url: "https://github.com/4dn-dcic/pairix" - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:pairix input: - - meta: @@ -41,13 +43,27 @@ output: description: pair index file pattern: "*.px2" ontologies: [] + versions_pairix: + - - ${task.process}: + type: string + description: The name of the process + - pairix: + type: string + description: The name of the tool + - 'echo "$(pairix --help 2>&1)" | sed "s/^.*Version: //; s/Usage.*$//"': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - pairix: + type: string + description: The name of the tool + - 'echo "$(pairix --help 2>&1)" | sed "s/^.*Version: //; s/Usage.*$//"': + type: eval + description: The expression to obtain the version of the tool authors: - "@jianhong" maintainers: diff --git a/modules/nf-core/pairix/tests/main.nf.test b/modules/nf-core/pairix/tests/main.nf.test index 69bf77590db7..e3c383ff0ead 100644 --- a/modules/nf-core/pairix/tests/main.nf.test +++ b/modules/nf-core/pairix/tests/main.nf.test @@ -29,4 +29,25 @@ nextflow_process { } } + test("test-pairix-stub") { + options "-stub" + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file("https://raw.githubusercontent.com/4dn-dcic/pairix/master/samples/4dn.bsorted.chr21_22_only.nontriangle.pairs.gz", checkIfExists: true) ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + } diff --git a/modules/nf-core/pairix/tests/main.nf.test.snap b/modules/nf-core/pairix/tests/main.nf.test.snap index d11b4bb4cbc6..760c23f333be 100644 --- a/modules/nf-core/pairix/tests/main.nf.test.snap +++ b/modules/nf-core/pairix/tests/main.nf.test.snap @@ -13,7 +13,11 @@ ] ], "1": [ - "versions.yml:md5,848c8be602ec36645d30010ea30f0684" + [ + "PAIRIX", + "pairix", + "Program: pairix (PAIRs file InderXer)\n0.3.7\n\n\n\nOptions: -p STR preset: pairs, merged_nodups, old_merged_nodups, gff, bed, sam, vcf, psltbl [gff]\n -s INT sequence name column [1]\n -d INT second sequence name column [null]\n -b INT start1 column [4]\n -e INT end1 column; can be identical to '-b' [5]\n -u INT start2 column [null]\n -v INT end2 column; can be identical to '-u' [null or identical to the start2 specified by -u]\n -T delimiter is space instead of tab.\n -L query region is not a string but a file listing query regions\n -S INT skip first INT lines [0]\n -c CHAR symbol for comment/meta lines [#]\n -w CHAR symbol for query region separator [|]\n -r FILE replace the header with the content of FILE [null]\n -0 zero-based coordinate\n -h print also the header lines\n -H print only the header lines\n -B print only the number of bgzf blocks for existing chromosome (pairs)\n -W print only the region split character\n -Y Only check if the file is a triangle (i.e. a chromosome pair occurs only in one direction (e.g. if chr1|chr2 exists, chr2|chr1 doesn't))\n -l list chromosome names\n -n print only the total line count (same as gunzip -c | wc -l but much faster)\n -f force to overwrite the index\n -a autoflip query when the matching chromosome pair doesn't exist\n --help print usage with exit 0" + ] ], "index": [ [ @@ -25,15 +29,64 @@ "4dn.bsorted.chr21_22_only.nontriangle.pairs.gz.px2:md5,a6e41cc7cff16fd15b5ee505549ec99a" ] ], - "versions": [ - "versions.yml:md5,848c8be602ec36645d30010ea30f0684" + "versions_pairix": [ + [ + "PAIRIX", + "pairix", + "Program: pairix (PAIRs file InderXer)\n0.3.7\n\n\n\nOptions: -p STR preset: pairs, merged_nodups, old_merged_nodups, gff, bed, sam, vcf, psltbl [gff]\n -s INT sequence name column [1]\n -d INT second sequence name column [null]\n -b INT start1 column [4]\n -e INT end1 column; can be identical to '-b' [5]\n -u INT start2 column [null]\n -v INT end2 column; can be identical to '-u' [null or identical to the start2 specified by -u]\n -T delimiter is space instead of tab.\n -L query region is not a string but a file listing query regions\n -S INT skip first INT lines [0]\n -c CHAR symbol for comment/meta lines [#]\n -w CHAR symbol for query region separator [|]\n -r FILE replace the header with the content of FILE [null]\n -0 zero-based coordinate\n -h print also the header lines\n -H print only the header lines\n -B print only the number of bgzf blocks for existing chromosome (pairs)\n -W print only the region split character\n -Y Only check if the file is a triangle (i.e. a chromosome pair occurs only in one direction (e.g. if chr1|chr2 exists, chr2|chr1 doesn't))\n -l list chromosome names\n -n print only the total line count (same as gunzip -c | wc -l but much faster)\n -f force to overwrite the index\n -a autoflip query when the matching chromosome pair doesn't exist\n --help print usage with exit 0" + ] + ] + } + ], + "timestamp": "2026-04-30T12:47:18.779231", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "test-pairix-stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "4dn.bsorted.chr21_22_only.nontriangle.pairs.gz:md5,ee90dc99987ece492d598ed939d54561", + "4dn.bsorted.chr21_22_only.nontriangle.pairs.gz.px2:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + "PAIRIX", + "pairix", + "Program: pairix (PAIRs file InderXer)\n0.3.7\n\n\n\nOptions: -p STR preset: pairs, merged_nodups, old_merged_nodups, gff, bed, sam, vcf, psltbl [gff]\n -s INT sequence name column [1]\n -d INT second sequence name column [null]\n -b INT start1 column [4]\n -e INT end1 column; can be identical to '-b' [5]\n -u INT start2 column [null]\n -v INT end2 column; can be identical to '-u' [null or identical to the start2 specified by -u]\n -T delimiter is space instead of tab.\n -L query region is not a string but a file listing query regions\n -S INT skip first INT lines [0]\n -c CHAR symbol for comment/meta lines [#]\n -w CHAR symbol for query region separator [|]\n -r FILE replace the header with the content of FILE [null]\n -0 zero-based coordinate\n -h print also the header lines\n -H print only the header lines\n -B print only the number of bgzf blocks for existing chromosome (pairs)\n -W print only the region split character\n -Y Only check if the file is a triangle (i.e. a chromosome pair occurs only in one direction (e.g. if chr1|chr2 exists, chr2|chr1 doesn't))\n -l list chromosome names\n -n print only the total line count (same as gunzip -c | wc -l but much faster)\n -f force to overwrite the index\n -a autoflip query when the matching chromosome pair doesn't exist\n --help print usage with exit 0" + ] + ], + "index": [ + [ + { + "id": "test", + "single_end": false + }, + "4dn.bsorted.chr21_22_only.nontriangle.pairs.gz:md5,ee90dc99987ece492d598ed939d54561", + "4dn.bsorted.chr21_22_only.nontriangle.pairs.gz.px2:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_pairix": [ + [ + "PAIRIX", + "pairix", + "Program: pairix (PAIRs file InderXer)\n0.3.7\n\n\n\nOptions: -p STR preset: pairs, merged_nodups, old_merged_nodups, gff, bed, sam, vcf, psltbl [gff]\n -s INT sequence name column [1]\n -d INT second sequence name column [null]\n -b INT start1 column [4]\n -e INT end1 column; can be identical to '-b' [5]\n -u INT start2 column [null]\n -v INT end2 column; can be identical to '-u' [null or identical to the start2 specified by -u]\n -T delimiter is space instead of tab.\n -L query region is not a string but a file listing query regions\n -S INT skip first INT lines [0]\n -c CHAR symbol for comment/meta lines [#]\n -w CHAR symbol for query region separator [|]\n -r FILE replace the header with the content of FILE [null]\n -0 zero-based coordinate\n -h print also the header lines\n -H print only the header lines\n -B print only the number of bgzf blocks for existing chromosome (pairs)\n -W print only the region split character\n -Y Only check if the file is a triangle (i.e. a chromosome pair occurs only in one direction (e.g. if chr1|chr2 exists, chr2|chr1 doesn't))\n -l list chromosome names\n -n print only the total line count (same as gunzip -c | wc -l but much faster)\n -f force to overwrite the index\n -a autoflip query when the matching chromosome pair doesn't exist\n --help print usage with exit 0" + ] ] } ], + "timestamp": "2026-04-30T12:47:22.756575", "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-08-23T11:25:18.874503" + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } } } \ No newline at end of file