mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 13:19:54 +00:00
Merge branch 'dev' into metaphlan3/mergemetaphlantables
This commit is contained in:
commit
016efcb807
5 changed files with 20 additions and 12 deletions
|
@ -427,6 +427,8 @@ process {
|
|||
}
|
||||
|
||||
withName: MOTUS_MERGE {
|
||||
ext.args = { params.generate_biom_output ? "-B" : "" }
|
||||
ext.prefix = { "motus_${meta.id}_combined_reports" }
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/motus/" },
|
||||
mode: params.publish_dir_mode
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
},
|
||||
"motus/merge": {
|
||||
"branch": "master",
|
||||
"git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49"
|
||||
"git_sha": "54ff289487244bf15543ecfa62bd4df49be72b73"
|
||||
},
|
||||
"motus/profile": {
|
||||
"branch": "master",
|
||||
|
|
14
modules/nf-core/modules/motus/merge/main.nf
generated
14
modules/nf-core/modules/motus/merge/main.nf
generated
|
@ -1,6 +1,7 @@
|
|||
VERSION = '3.0.1'
|
||||
|
||||
process MOTUS_MERGE {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::motus=3.0.1" : null)
|
||||
|
@ -9,14 +10,13 @@ process MOTUS_MERGE {
|
|||
'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }"
|
||||
|
||||
input:
|
||||
path input
|
||||
tuple val(meta), path(input)
|
||||
path db // to stop docker saying it can't find it... would have to have the module in upstream steps anyway
|
||||
path profile_version_yml, stageAs: 'profile_version.yml'
|
||||
val biom_format
|
||||
|
||||
output:
|
||||
path("*.txt") , optional: true, emit: txt
|
||||
path("*.biom"), optional: true, emit: biom
|
||||
tuple val(meta), path("*.txt") , optional: true, emit: txt
|
||||
tuple val(meta), path("*.biom"), optional: true, emit: biom
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
|
@ -24,16 +24,16 @@ process MOTUS_MERGE {
|
|||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = 'motus_merged'
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def cmd_input = input.size() > 1 ? "-i ${input.join(',')}" : input.isDirectory() ? "-d ${input}" : "-i ${input}"
|
||||
def output = biom_format ? "-B -o ${prefix}.biom" : "-o ${prefix}.txt"
|
||||
def suffix = task.ext.args?.contains("-B") ? "biom" : "txt"
|
||||
"""
|
||||
motus \\
|
||||
merge \\
|
||||
-db $db \\
|
||||
${cmd_input} \\
|
||||
$args \\
|
||||
${output}
|
||||
-o ${prefix}.${suffix}
|
||||
|
||||
## Take version from the mOTUs/profile module output, as cannot reconstruct
|
||||
## version without having database staged in this directory.
|
||||
|
|
3
modules/nf-core/modules/motus/merge/meta.yml
generated
3
modules/nf-core/modules/motus/merge/meta.yml
generated
|
@ -35,9 +35,6 @@ input:
|
|||
this itself without having the motus database present and configured with the tool
|
||||
so here we take it from what is already reported by the upstream module.
|
||||
pattern: "versions.yml"
|
||||
- biom_format:
|
||||
type: boolean
|
||||
description: Whether to save output OTU table in biom format
|
||||
|
||||
output:
|
||||
- versions:
|
||||
|
|
|
@ -117,7 +117,16 @@ workflow STANDARDISATION_PROFILES {
|
|||
// mOTUs has a 'single' database, and cannot create custom ones.
|
||||
// Therefore removing db info here, and publish merged at root mOTUs results
|
||||
// directory
|
||||
MOTUS_MERGE ( ch_input_profiles.motus.map{it[1]}.collect(), ch_input_databases.motus.map{it[1]}, motu_version, params.generate_biom_output )
|
||||
|
||||
ch_profiles_for_motus = ch_input_profiles.motus
|
||||
.map { [it[0]['db_name'], it[1]] }
|
||||
.groupTuple()
|
||||
.map {
|
||||
[[id:it[0]], it[1]]
|
||||
}
|
||||
|
||||
MOTUS_MERGE ( ch_profiles_for_motus, ch_input_databases.motus.map{it[1]}, motu_version )
|
||||
|
||||
if ( params.generate_biom_output ) {
|
||||
ch_standardised_tables = ch_standardised_tables.mix ( MOTUS_MERGE.out.biom )
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue