mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 17:39:55 +00:00
Add centrigue kreports
This commit is contained in:
parent
c8dbf5be47
commit
05e9d92444
2 changed files with 35 additions and 5 deletions
|
@ -295,7 +295,7 @@ process {
|
||||||
}
|
}
|
||||||
|
|
||||||
withName: KRAKENTOOLS_COMBINEKREPORTS {
|
withName: KRAKENTOOLS_COMBINEKREPORTS {
|
||||||
ext.prefix = { "${meta.id}_combined_reports" }
|
ext.prefix = { "kraken2_${meta.id}_combined_reports" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
path: { "${params.outdir}/kraken2/" },
|
path: { "${params.outdir}/kraken2/" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
|
@ -367,6 +367,15 @@ process {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withName: KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE {
|
||||||
|
ext.prefix = { "centrifuge_${meta.id}_combined_reports" }
|
||||||
|
publishDir = [
|
||||||
|
path: { "${params.outdir}/centrifuge/" },
|
||||||
|
mode: params.publish_dir_mode,
|
||||||
|
pattern: '*.{txt}'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
withName: KAIJU_KAIJU {
|
withName: KAIJU_KAIJU {
|
||||||
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
|
@ -378,7 +387,7 @@ process {
|
||||||
}
|
}
|
||||||
|
|
||||||
withName: KAIJU_KAIJU2TABLE {
|
withName: KAIJU_KAIJU2TABLE {
|
||||||
ext.prefix = { "${meta.id}_combined_reports" }
|
ext.prefix = { "kaiju_${meta.id}_combined_reports" }
|
||||||
publishDir = [
|
publishDir = [
|
||||||
path: { "${params.outdir}/kaiju/" },
|
path: { "${params.outdir}/kaiju/" },
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
// Standardise output files e.g. aggregation
|
// Standardise output files e.g. aggregation
|
||||||
//
|
//
|
||||||
|
|
||||||
include { KAIJU_KAIJU2TABLE } from '../../modules/nf-core/modules/kaiju/kaiju2table/main'
|
include { KRAKENTOOLS_COMBINEKREPORTS as KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE } from '../../modules/nf-core/modules/krakentools/combinekreports/main'
|
||||||
include { KRAKENTOOLS_COMBINEKREPORTS } from '../../modules/nf-core/modules/krakentools/combinekreports/main'
|
include { KAIJU_KAIJU2TABLE } from '../../modules/nf-core/modules/kaiju/kaiju2table/main'
|
||||||
include { MOTUS_MERGE } from '../../modules/nf-core/modules/motus/merge/main'
|
include { KRAKENTOOLS_COMBINEKREPORTS } from '../../modules/nf-core/modules/krakentools/combinekreports/main'
|
||||||
|
include { MOTUS_MERGE } from '../../modules/nf-core/modules/motus/merge/main'
|
||||||
|
|
||||||
workflow STANDARDISATION_PROFILES {
|
workflow STANDARDISATION_PROFILES {
|
||||||
take:
|
take:
|
||||||
|
@ -25,6 +26,7 @@ workflow STANDARDISATION_PROFILES {
|
||||||
.branch {
|
.branch {
|
||||||
motus: it[0]['tool'] == 'motus'
|
motus: it[0]['tool'] == 'motus'
|
||||||
kraken2: it[0]['tool'] == 'kraken2'
|
kraken2: it[0]['tool'] == 'kraken2'
|
||||||
|
centrifuge: it[0]['tool'] == 'centrifuge'
|
||||||
unknown: true
|
unknown: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +47,23 @@ workflow STANDARDISATION_PROFILES {
|
||||||
Standardise and aggregate
|
Standardise and aggregate
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// CENTRIFUGE
|
||||||
|
|
||||||
|
// Collect and replace id for db_name for prefix
|
||||||
|
// Have to sort by size to ensure first file actually has hits otherwise
|
||||||
|
// the script fails
|
||||||
|
ch_profiles_for_centrifuge = ch_input_profiles.centrifuge
|
||||||
|
.map { [it[0]['db_name'], it[1]] }
|
||||||
|
.groupTuple(sort: {-it.size()} )
|
||||||
|
.map {
|
||||||
|
[[id:it[0]], it[1]]
|
||||||
|
}
|
||||||
|
|
||||||
|
KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE ( ch_profiles_for_centrifuge )
|
||||||
|
ch_standardised_tables = ch_standardised_tables.mix( KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE.out.txt )
|
||||||
|
ch_multiqc_files = ch_multiqc_files.mix( KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE.out.txt )
|
||||||
|
ch_versions = ch_versions.mix( KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE.out.versions )
|
||||||
|
|
||||||
// Kaiju
|
// Kaiju
|
||||||
|
|
||||||
// Collect and replace id for db_name for prefix
|
// Collect and replace id for db_name for prefix
|
||||||
|
@ -63,6 +82,8 @@ workflow STANDARDISATION_PROFILES {
|
||||||
// Kraken2
|
// Kraken2
|
||||||
|
|
||||||
// Collect and replace id for db_name for prefix
|
// Collect and replace id for db_name for prefix
|
||||||
|
// Have to sort by size to ensure first file actually has hits otherwise
|
||||||
|
// the script fails
|
||||||
ch_profiles_for_kraken2 = ch_input_profiles.kraken2
|
ch_profiles_for_kraken2 = ch_input_profiles.kraken2
|
||||||
.map { [it[0]['db_name'], it[1]] }
|
.map { [it[0]['db_name'], it[1]] }
|
||||||
.groupTuple(sort: {-it.size()} )
|
.groupTuple(sort: {-it.size()} )
|
||||||
|
|
Loading…
Reference in a new issue