mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 12:09: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 {
|
||||
ext.prefix = { "${meta.id}_combined_reports" }
|
||||
ext.prefix = { "kraken2_${meta.id}_combined_reports" }
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/kraken2/" },
|
||||
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 {
|
||||
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
|
||||
publishDir = [
|
||||
|
@ -378,7 +387,7 @@ process {
|
|||
}
|
||||
|
||||
withName: KAIJU_KAIJU2TABLE {
|
||||
ext.prefix = { "${meta.id}_combined_reports" }
|
||||
ext.prefix = { "kaiju_${meta.id}_combined_reports" }
|
||||
publishDir = [
|
||||
path: { "${params.outdir}/kaiju/" },
|
||||
mode: params.publish_dir_mode,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Standardise output files e.g. aggregation
|
||||
//
|
||||
|
||||
include { KRAKENTOOLS_COMBINEKREPORTS as KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE } from '../../modules/nf-core/modules/krakentools/combinekreports/main'
|
||||
include { KAIJU_KAIJU2TABLE } from '../../modules/nf-core/modules/kaiju/kaiju2table/main'
|
||||
include { KRAKENTOOLS_COMBINEKREPORTS } from '../../modules/nf-core/modules/krakentools/combinekreports/main'
|
||||
include { MOTUS_MERGE } from '../../modules/nf-core/modules/motus/merge/main'
|
||||
|
@ -25,6 +26,7 @@ workflow STANDARDISATION_PROFILES {
|
|||
.branch {
|
||||
motus: it[0]['tool'] == 'motus'
|
||||
kraken2: it[0]['tool'] == 'kraken2'
|
||||
centrifuge: it[0]['tool'] == 'centrifuge'
|
||||
unknown: true
|
||||
}
|
||||
|
||||
|
@ -45,6 +47,23 @@ workflow STANDARDISATION_PROFILES {
|
|||
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
|
||||
|
||||
// Collect and replace id for db_name for prefix
|
||||
|
@ -63,6 +82,8 @@ workflow STANDARDISATION_PROFILES {
|
|||
// Kraken2
|
||||
|
||||
// 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
|
||||
.map { [it[0]['db_name'], it[1]] }
|
||||
.groupTuple(sort: {-it.size()} )
|
||||
|
|
Loading…
Reference in a new issue