1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 18:59:55 +00:00

Ensure merge metaphlan3 tables happens on per database basis

This commit is contained in:
James Fellows Yates 2022-09-15 12:29:54 +02:00
parent a764bc4807
commit 21ae9d85c3
7 changed files with 22 additions and 12 deletions

View file

@ -96,11 +96,11 @@
}, },
"metaphlan3/mergemetaphlantables": { "metaphlan3/mergemetaphlantables": {
"branch": "master", "branch": "master",
"git_sha": "940d7fe9d63962e0e2ba0987e2893fb0aff832e3" "git_sha": "36bcd675ae76a379a38165898a203f4915823f4f"
}, },
"metaphlan3/metaphlan3": { "metaphlan3/metaphlan3": {
"branch": "master", "branch": "master",
"git_sha": "940d7fe9d63962e0e2ba0987e2893fb0aff832e3" "git_sha": "978087354eb72ac1f6e18a3f790fad9bc4d05840"
}, },
"minimap2/align": { "minimap2/align": {
"branch": "master", "branch": "master",

View file

@ -7,10 +7,10 @@ process METAPHLAN3_MERGEMETAPHLANTABLES {
'quay.io/biocontainers/metaphlan:3.0.12--pyhb7b1952_0' }" 'quay.io/biocontainers/metaphlan:3.0.12--pyhb7b1952_0' }"
input: input:
path(profiles) tuple val(meta), path(profiles)
output: output:
tuple path("${prefix}.txt") , emit: txt tuple val(meta), path("${prefix}.txt") , emit: txt
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
@ -18,7 +18,7 @@ process METAPHLAN3_MERGEMETAPHLANTABLES {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "merged_abundance_table" prefix = task.ext.prefix ?: "${meta.id}"
""" """
merge_metaphlan_tables.py \\ merge_metaphlan_tables.py \\
$args \\ $args \\

View file

@ -15,12 +15,22 @@ tools:
licence: ["MIT License"] licence: ["MIT License"]
input: input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- profiles: - profiles:
type: file type: file
description: List of per-sample MetaPhlAn3 taxonomic abundance tables description: List of per-sample MetaPhlAn3 taxonomic abundance tables
pattern: "*" pattern: "*"
output: output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions

View file

@ -1,4 +1,4 @@
process METAPHLAN3 { process METAPHLAN3_METAPHLAN3 {
tag "$meta.id" tag "$meta.id"
label 'process_high' label 'process_high'

View file

@ -1,4 +1,4 @@
name: metaphlan3 name: metaphlan3_metaphlan3
description: MetaPhlAn is a tool for profiling the composition of microbial communities from metagenomic shotgun sequencing data. description: MetaPhlAn is a tool for profiling the composition of microbial communities from metagenomic shotgun sequencing data.
keywords: keywords:
- metagenomics - metagenomics

View file

@ -7,7 +7,7 @@ include { MEGAN_RMA2INFO as MEGAN_RMA2INFO_TSV } from '../../modules/nf-core/mo
include { KRAKEN2_KRAKEN2 } from '../../modules/nf-core/modules/kraken2/kraken2/main' include { KRAKEN2_KRAKEN2 } from '../../modules/nf-core/modules/kraken2/kraken2/main'
include { CENTRIFUGE_CENTRIFUGE } from '../../modules/nf-core/modules/centrifuge/centrifuge/main' include { CENTRIFUGE_CENTRIFUGE } from '../../modules/nf-core/modules/centrifuge/centrifuge/main'
include { CENTRIFUGE_KREPORT } from '../../modules/nf-core/modules/centrifuge/kreport/main' include { CENTRIFUGE_KREPORT } from '../../modules/nf-core/modules/centrifuge/kreport/main'
include { METAPHLAN3 } from '../../modules/nf-core/modules/metaphlan3/metaphlan3/main' include { METAPHLAN3_METAPHLAN3 } from '../../modules/nf-core/modules/metaphlan3/metaphlan3/main'
include { KAIJU_KAIJU } from '../../modules/nf-core/modules/kaiju/kaiju/main' include { KAIJU_KAIJU } from '../../modules/nf-core/modules/kaiju/kaiju/main'
include { DIAMOND_BLASTX } from '../../modules/nf-core/modules/diamond/blastx/main' include { DIAMOND_BLASTX } from '../../modules/nf-core/modules/diamond/blastx/main'
include { MOTUS_PROFILE } from '../../modules/nf-core/modules/motus/profile/main' include { MOTUS_PROFILE } from '../../modules/nf-core/modules/motus/profile/main'
@ -168,9 +168,9 @@ workflow PROFILING {
db: it[3] db: it[3]
} }
METAPHLAN3 ( ch_input_for_metaphlan3.reads, ch_input_for_metaphlan3.db ) METAPHLAN3_METAPHLAN3 ( ch_input_for_metaphlan3.reads, ch_input_for_metaphlan3.db )
ch_versions = ch_versions.mix( METAPHLAN3.out.versions.first() ) ch_versions = ch_versions.mix( METAPHLAN3_METAPHLAN3.out.versions.first() )
ch_raw_profiles = ch_raw_profiles.mix( METAPHLAN3.out.biom ) ch_raw_profiles = ch_raw_profiles.mix( METAPHLAN3_METAPHLAN3.out.profile )
} }

View file

@ -65,7 +65,7 @@ workflow STANDARDISATION_PROFILES {
.map { [it[0]['db_name'], it[1]] } .map { [it[0]['db_name'], it[1]] }
.groupTuple() .groupTuple()
.map { .map {
[it[1]] [[id:it[0]], it[1]]
} }
METAPHLAN3_MERGEMETAPHLANTABLES ( ch_profiles_for_metaphlan3 ) METAPHLAN3_MERGEMETAPHLANTABLES ( ch_profiles_for_metaphlan3 )