From 8524e6b40f9337196ef3e6cafd61a141704a2c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Guizard?= Date: Sat, 23 Oct 2021 19:09:41 +0100 Subject: [PATCH] Update of `pbccs` (#835) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📦 NEW: First commit of pbccs module * 👌 IMPROVE: Remove option from command + rename output (ccs -> bam) * 👌 IMPROVE: Move .pbi output into report channel * 🐛FIX: Correct code after --rq option removal from command line module - module main.nf: Remove ramaining rq input channel - Test main.nf: Transfert rq into addParams - Test test.yml: Update md5sums * 🐛FIX: Repair additionnal option usage * 👌 IMPROVE: Add some pacbio test files * 🐛 FIX: Add Pacbio index to test_data.config * 👌 IMPROVE: CCS is run in parallel with --chunk option * 👌 IMPROVE: Add Pbindex in bam ouput channel * 👌 IMPROVE: Change label to process_low * 👌 IMPROVE: Define reports files names + add json version of txt report * 🐛 FIX: Add missing backslashes * 🐛 FIX: Add missing gz extension * 🐛 FIX: update ouput channel * 🐛 FIX: output file name * 👌 IMPROVE: .gitignore * 👌 IMPROVE: Update function.nf to last version * 👌 IMPROVE: Update saveAs in main.nf * 👌 IMPROVE: Add pbccs module * 🐛 FIX: Fix Broken test * 👌 IMPROVE: Update test_data.config * 🐛 FIX: Fix test * 👌 IMPROVE: Update path of test dataset files * 👌 IMPROVE: Remove useless index + Fix Typos * 📦 NEW: First commit of pbccs module * 👌 IMPROVE: Remove option from command + rename output (ccs -> bam) * 👌 IMPROVE: Move .pbi output into report channel * 🐛FIX: Correct code after --rq option removal from command line module - module main.nf: Remove ramaining rq input channel - Test main.nf: Transfert rq into addParams - Test test.yml: Update md5sums * 🐛FIX: Repair additionnal option usage * 👌 IMPROVE: Add some pacbio test files * 🐛 FIX: Add Pacbio index to test_data.config * 👌 IMPROVE: CCS is run in parallel with --chunk option * 👌 IMPROVE: Add Pbindex in bam ouput channel * 👌 IMPROVE: Change label to process_low * 👌 IMPROVE: Define reports files names + add json version of txt report * 🐛 FIX: Add missing backslashes * 🐛 FIX: Add missing gz extension * 🐛 FIX: update ouput channel * 🐛 FIX: output file name * 👌 IMPROVE: .gitignore * 👌 IMPROVE: Update function.nf to last version * 👌 IMPROVE: Update saveAs in main.nf * 👌 IMPROVE: Add pbccs module * 🐛 FIX: Fix Broken test * 👌 IMPROVE: Update test_data.config * 🐛 FIX: Fix test * 👌 IMPROVE: Update path of test dataset files * 👌 IMPROVE: Remove useless index + Fix Typos * 🐛 FIX: fill contains args * 👌 IMPROVE: One output => One Channel * 👌 IMPROVE: One input => One channel * 🐛 FIX: Update tests * 🐛 FIX: Remove TODOs from test.yaml * 👌 IMPROVE: Revert and keep bam and pbi together * 🐛 FIX: Remove old rq input from meta.yml * 👌 IMPROVE: Update test to match input channels * 👌 IMPROVE: use prefix for for output file name * 👌 IMPROVE: Update to new versions.yml * 👌 IMPROVE: Update pbccs from v6.0.0 to v6.0.2 * 👌 IMPROVE: Keep track of the former sample id in meta * Update modules/pbccs/main.nf Co-authored-by: Harshil Patel * 👌 IMPROVE: remove former_id from meta * 👌 IMPROVE: Use chunk number in output filename Co-authored-by: James A. Fellows Yates Co-authored-by: Harshil Patel --- modules/pbccs/main.nf | 31 ++++++++---------- modules/pbccs/meta.yml | 2 +- ...t_versions_yml.cpython-39-pytest-6.2.5.pyc | Bin 0 -> 3558 bytes tests/modules/pbccs/main.nf | 2 +- tests/modules/pbccs/test.yml | 20 +++++------ 5 files changed, 26 insertions(+), 29 deletions(-) create mode 100644 tests/__pycache__/test_versions_yml.cpython-39-pytest-6.2.5.pyc 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 0000000000000000000000000000000000000000..33acb8369a1bc62b5e66e1ed80e2247dd0e2759f GIT binary patch literal 3558 zcmaJ@TaVku73T0FQCdkWt=50fJ2%8xAU@;c_*j71tCg z&y04xD)|!Up)V=?+}g;h4+RSJp}(O&gXmj<0(mOXry?kto--7;v;&k9hjTgS%y%wx z=6LmbRfFfZUyVJ_*0jIjp!gUtco$v~KtnZ30msOtx zcHdT1m3~EitNki`jbLe9>(_wBq}G>Ozs~I4#_lq!Kh=Jt(Go3xsXZnACMEZ^j{Obn zsBLygYW~cVBlwmmqb!sIoX;N%I{4zG*n~!Ek~}55`k^t`5-rvaO-kk@Au+k9{qjxbpJ20feVU+IYv8?e?$%-E#Hn)VR1dVK5g8EOIwYxea|m~^}#a6)g)gcA+b zU_auIhC#G1oc)nM7&#+vk2#(rnULLsap3r&BS%b)g+qPL1~TFY-D=f==RxGq$Pv*c z2j-_-_K-ar?v6pkA zwLXeG%6Mub?#)hx>tLPKc3l+ex@ieSf{?V#nTUctmYO?3w4Is<-Z)6j0GQJXXC8GW zdm_{7d!AsK#EzAkBgR?(*yI5Bb8}lL$s#4g{*sypm_vUjwe$5qYPCkha|&Rsf(} z1YxX+8Z?^KAXQ@PtHdU}4dVg9*~N1VzDw}F53l&hz{rUq`Y>j8$)S!>L-jRH#SxjE zi6MGp@;iv!7shEV(IJLRh%n<*Equ#_SUUKeK->^bmSmY)u@01_7sgYF#V^P&v`}By zXc;3cHugwj#g<5=eORG(Yz+ym;QUaZn=n_6P1w0Amkw)lZBG-whq-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