diff --git a/modules/pbccs/main.nf b/modules/pbccs/main.nf index 49c47fda..7e70ac14 100644 --- a/modules/pbccs/main.nf +++ b/modules/pbccs/main.nf @@ -11,11 +11,11 @@ process PBCCS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::pbccs=6.0.0" : null) + conda (params.enable_conda ? "bioconda::pbccs=6.2.0" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/pbccs:6.0.0--h9ee0642_2" + container "https://depot.galaxyproject.org/singularity/pbccs:6.2.0--h9ee0642_0" } else { - container "quay.io/biocontainers/pbccs:6.0.0--h9ee0642_2" + container "quay.io/biocontainers/pbccs:6.2.0--h9ee0642_0" } input: @@ -24,25 +24,22 @@ process PBCCS { val chunk_on output: - tuple val(meta), path("*.ccs.bam") , emit: bam - tuple val(meta), path("*.ccs.bam.pbi") , emit: pbi - tuple val(meta), path("*.ccs_report.txt" ) , emit: ccs_report_txt - tuple val(meta), path("*.ccs_report.json" ) , emit: ccs_report_json - tuple val(meta), path("*.zmw_metrics.json.gz"), emit: zmw_metrics - path "versions.yml" , emit: versions + tuple val(meta), path("*.chunk*.bam") , emit: bam + tuple val(meta), path("*.chunk*.bam.pbi") , emit: pbi + tuple val(meta), path("*.report.txt" ) , emit: report_txt + tuple val(meta), path("*.report.json" ) , emit: report_json + tuple val(meta), path("*.metrics.json.gz"), emit: metrics + path "versions.yml" , emit: versions script: - def ccs = bam.toString().replaceAll(/bam$/, '') + chunk_num + '.ccs.bam' - def report_txt = bam.toString().replaceAll(/bam$/, '') + chunk_num + '.ccs_report.txt' - def report_json = bam.toString().replaceAll(/bam$/, '') + chunk_num + '.ccs_report.json' - def zmw_metrics = bam.toString().replaceAll(/bam$/, '') + chunk_num + '.zmw_metrics.json.gz' + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" """ ccs \\ $bam \\ - $ccs \\ - --report-file $report_txt \\ - --report-json $report_json \\ - --metrics-json $zmw_metrics \\ + ${prefix}.chunk${chunk_num}.bam \\ + --report-file ${prefix}.report.txt \\ + --report-json ${prefix}.report.json \\ + --metrics-json ${prefix}.metrics.json.gz \\ --chunk $chunk_num/$chunk_on \\ -j $task.cpus \\ $options.args diff --git a/modules/pbccs/meta.yml b/modules/pbccs/meta.yml index ef0899a1..38f31496 100644 --- a/modules/pbccs/meta.yml +++ b/modules/pbccs/meta.yml @@ -16,7 +16,7 @@ input: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + id: id of the split file - bam: type: file description: Raw subreads bam diff --git a/tests/__pycache__/test_versions_yml.cpython-39-pytest-6.2.5.pyc b/tests/__pycache__/test_versions_yml.cpython-39-pytest-6.2.5.pyc new file mode 100644 index 00000000..33acb836 Binary files /dev/null and b/tests/__pycache__/test_versions_yml.cpython-39-pytest-6.2.5.pyc differ diff --git a/tests/modules/pbccs/main.nf b/tests/modules/pbccs/main.nf index db7180e8..74c1b864 100644 --- a/tests/modules/pbccs/main.nf +++ b/tests/modules/pbccs/main.nf @@ -7,7 +7,7 @@ include { PBCCS } from '../../../modules/pbccs/main.nf' addParams( options: [arg workflow test_pbccs { input = [ - [ id:'test' ], // meta map + [ id:'alz' ], // meta map file(params.test_data['homo_sapiens']['pacbio']['alz'], checkIfExists: true), file(params.test_data['homo_sapiens']['pacbio']['alzpbi'], checkIfExists: true) ] diff --git a/tests/modules/pbccs/test.yml b/tests/modules/pbccs/test.yml index a90cb1ec..1d1651c4 100644 --- a/tests/modules/pbccs/test.yml +++ b/tests/modules/pbccs/test.yml @@ -3,13 +3,13 @@ tags: - pbccs files: - - path: output/pbccs/alz.2.ccs.bam - md5sum: b9c8093b362a07b575d52592b19fc909 - - path: output/pbccs/alz.2.ccs.bam.pbi - md5sum: 78d015230a8c957a24338581efda4e55 - - path: output/pbccs/alz.2.ccs_report.json - contains: ['Created by pbcopper v1.8.0'] - - path: output/pbccs/alz.2.ccs_report.txt - md5sum: db379e9299295679f4ca7eeb37011f08 - - path: output/pbccs/alz.2.zmw_metrics.json.gz - contains: ['zmws'] + - path: output/pbccs/alz.chunk2.bam + md5sum: d1a0266d5df64b74409a21981071a1c6 + - path: output/pbccs/alz.chunk2.bam.pbi + md5sum: 582a4500ddcb3f4a24a443192620d039 + - path: output/pbccs/alz.metrics.json.gz + contains: [ 'zmws' ] + - path: output/pbccs/alz.report.json + contains: [ 'Created by pbcopper' ] + - path: output/pbccs/alz.report.txt + md5sum: bbc5bd7a1269345cf7a7f3d4c746024b