mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Update metabat2 output channels and compression (#1111)
* feat: each output type has dedicated channel replace bgzip with gzip can only zip one at a time * Add condition moving of unbinned files * fix: solution for moving sometimes non-existant files * fix: update meta.yml to add the new channels * fix: remove most of the checksums due to variability * fix: tweaking of output * Update modules/metabat2/metabat2/main.nf Co-authored-by: Maxime Borry <maxibor@users.noreply.github.com> * Fix find commands * Fix find commands Co-authored-by: Maxime Borry <maxibor@users.noreply.github.com>
This commit is contained in:
parent
1f3f2b18bb
commit
be85289981
3 changed files with 31 additions and 12 deletions
|
@ -11,9 +11,12 @@ process METABAT2_METABAT2 {
|
||||||
tuple val(meta), path(fasta), path(depth)
|
tuple val(meta), path(fasta), path(depth)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("bins/*.fa.gz") , optional:true , emit: fasta
|
tuple val(meta), path("*.tooShort.fa.gz") , optional:true , emit: tooshort
|
||||||
tuple val(meta), path("*.tsv.gz"), optional:true , emit: membership
|
tuple val(meta), path("*.lowDepth.fa.gz") , optional:true , emit: lowdepth
|
||||||
path "versions.yml" , emit: versions
|
tuple val(meta), path("*.unbinned.fa.gz") , optional:true , emit: unbinned
|
||||||
|
tuple val(meta), path("*.tsv.gz") , optional:true , emit: membership
|
||||||
|
tuple val(meta), path("bins/*.fa.gz") , optional:true , emit: fasta
|
||||||
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
|
@ -33,8 +36,10 @@ process METABAT2_METABAT2 {
|
||||||
|
|
||||||
mv metabat2/${prefix} ${prefix}.tsv
|
mv metabat2/${prefix} ${prefix}.tsv
|
||||||
mv metabat2 bins
|
mv metabat2 bins
|
||||||
bgzip --threads $task.cpus ${prefix}.tsv
|
|
||||||
bgzip --threads $task.cpus bins/*.fa
|
gzip ${prefix}.tsv
|
||||||
|
find ./bins/ -name "*.fa" -type f | xargs -t -n 1 bgzip -@ ${task.cpus}
|
||||||
|
find ./bins/ -name "*[lowDepth,tooShort,unbinned].fa.gz" -type f -exec mv {} . \\;
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -46,6 +46,18 @@ output:
|
||||||
type: file
|
type: file
|
||||||
description: Bins created from assembled contigs in fasta file
|
description: Bins created from assembled contigs in fasta file
|
||||||
pattern: "*.fa.gz"
|
pattern: "*.fa.gz"
|
||||||
|
- tooshort:
|
||||||
|
type: file
|
||||||
|
description: Contigs that did not pass length filtering
|
||||||
|
pattern: "*.tooShort.fa.gz"
|
||||||
|
- lowdepth:
|
||||||
|
type: file
|
||||||
|
description: Contigs that did not have sufficient depth for binning
|
||||||
|
pattern: "*.lowDepth.fa.gz"
|
||||||
|
- unbinned:
|
||||||
|
type: file
|
||||||
|
description: Contigs that pass length and depth filtering but could not be binned
|
||||||
|
pattern: "*.unbinned.fa.gz"
|
||||||
- membership:
|
- membership:
|
||||||
type: file
|
type: file
|
||||||
description: cluster memberships as a matrix format.
|
description: cluster memberships as a matrix format.
|
||||||
|
@ -54,3 +66,4 @@ output:
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@maxibor"
|
- "@maxibor"
|
||||||
|
- "@jfy133"
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
- name: metabat2 metabat2 test_metabat2_no_depth
|
- name: metabat2 metabat2 test_metabat2_no_depth
|
||||||
command: nextflow run ./tests/modules/metabat2/metabat2 -entry test_metabat2_no_depth -c ./tests/config/nextflow.config -c ./tests/modules/metabat2/metabat2/nextflow.config
|
command: nextflow run tests/modules/metabat2/metabat2 -entry test_metabat2_no_depth -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- metabat2/metabat2
|
|
||||||
- metabat2
|
- metabat2
|
||||||
|
- metabat2/metabat2
|
||||||
files:
|
files:
|
||||||
- path: output/metabat2/bins/test.1.fa.gz
|
- path: output/metabat2/bins/test.1.fa.gz
|
||||||
md5sum: 0e9bce5b5a0033fd4411a21dec881170
|
md5sum: 0e9bce5b5a0033fd4411a21dec881170
|
||||||
- path: output/metabat2/test.tsv.gz
|
- path: output/metabat2/test.tsv.gz
|
||||||
md5sum: ea77e8c4426d2337419905b57f1ec335
|
- path: output/metabat2/versions.yml
|
||||||
|
md5sum: 5742a71af36c3a748fd5726d76924ba8
|
||||||
|
|
||||||
- name: metabat2 metabat2 test_metabat2_depth
|
- name: metabat2 metabat2 test_metabat2_depth
|
||||||
command: nextflow run ./tests/modules/metabat2/metabat2 -entry test_metabat2_depth -c ./tests/config/nextflow.config -c ./tests/modules/metabat2/metabat2/nextflow.config
|
command: nextflow run tests/modules/metabat2/metabat2 -entry test_metabat2_depth -c tests/config/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- metabat2/metabat2
|
|
||||||
- metabat2
|
- metabat2
|
||||||
|
- metabat2/metabat2
|
||||||
files:
|
files:
|
||||||
- path: output/metabat2/bins/test.1.fa.gz
|
- path: output/metabat2/bins/test.1.fa.gz
|
||||||
md5sum: 0e9bce5b5a0033fd4411a21dec881170
|
md5sum: 0e9bce5b5a0033fd4411a21dec881170
|
||||||
- path: output/metabat2/test.tsv.gz
|
- path: output/metabat2/test.tsv.gz
|
||||||
md5sum: ea77e8c4426d2337419905b57f1ec335
|
|
||||||
- path: output/metabat2/test.txt.gz
|
- path: output/metabat2/test.txt.gz
|
||||||
md5sum: 8f735aa408d6c90e5a0310e06ace7a9a
|
- path: output/metabat2/versions.yml
|
||||||
|
md5sum: 538c56b2df7d90580f05097218b5d5b1
|
||||||
|
|
Loading…
Reference in a new issue