mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-11 01:23:08 +00:00
Separate conditions, remove some left-over dumps
This commit is contained in:
parent
0358489be0
commit
14826d5205
2 changed files with 6 additions and 5 deletions
|
@ -40,7 +40,7 @@ workflow DB_CHECK {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter the channel to run untar on DBs of tools actually using
|
//Filter the channel to run untar on DBs of tools actually using
|
||||||
ch_input_untar = ch_dbs_for_untar.untar.dump()
|
ch_input_untar = ch_dbs_for_untar.untar
|
||||||
.filter { params.run_kraken2 && it[0]['tool'] == 'kraken2' || params.run_centrifuge && it[0]['tool'] == 'centrifuge' || params.run_bracken && it[0]['tool'] == 'bracken' || params.run_kaiju && it[0]['tool'] == 'kaiju' || params.run_krakenuniq && it [0]['tool'] == 'krakenuniq' || params.run_malt && it[0]['tool'] == 'malt' || params.run_metaphlan3 && it[0]['tool'] == 'metaphlan3' }
|
.filter { params.run_kraken2 && it[0]['tool'] == 'kraken2' || params.run_centrifuge && it[0]['tool'] == 'centrifuge' || params.run_bracken && it[0]['tool'] == 'bracken' || params.run_kaiju && it[0]['tool'] == 'kaiju' || params.run_krakenuniq && it [0]['tool'] == 'krakenuniq' || params.run_malt && it[0]['tool'] == 'malt' || params.run_metaphlan3 && it[0]['tool'] == 'metaphlan3' }
|
||||||
UNTAR (ch_input_untar)
|
UNTAR (ch_input_untar)
|
||||||
ch_versions = ch_versions.mix(UNTAR.out.versions.first())
|
ch_versions = ch_versions.mix(UNTAR.out.versions.first())
|
||||||
|
|
|
@ -202,8 +202,10 @@ workflow PROFILING {
|
||||||
|
|
||||||
ch_input_for_metaphlan3 = ch_input_for_profiling.metaphlan3
|
ch_input_for_metaphlan3 = ch_input_for_profiling.metaphlan3
|
||||||
.filter{
|
.filter{
|
||||||
if (it[0].is_fasta || it[0].instrument_platform == 'OXFORD_NANOPORE' ) log.warn "[nf-core/taxprofiler] MetaPhlAn3 currently does not accept FASTA files as input and/or has not been evaluated for Nanopore data. Skipping MetaPhlAn3 for sample ${it[0].id}."
|
if (it[0].is_fasta) log.warn "[nf-core/taxprofiler] MetaPhlAn3 currently does not accept FASTA files as input. Skipping MetaPhlAn3 for sample ${it[0].id}."
|
||||||
!(it[0].is_fasta || it[0].instrument_platform == 'OXFORD_NANOPORE')
|
!it[0].is_fasta
|
||||||
|
if (it[0].instrument_platform == 'OXFORD_NANOPORE') log.warn "[nf-core/taxprofiler] MetaPhlAn3 has not been evaluated for Nanopore data. Skipping MetaPhlAn3 for sample ${it[0].id}."
|
||||||
|
!it[0].instrument_platform == 'OXFORD_NANOPORE'
|
||||||
}
|
}
|
||||||
.multiMap {
|
.multiMap {
|
||||||
it ->
|
it ->
|
||||||
|
@ -278,14 +280,13 @@ workflow PROFILING {
|
||||||
[[id: db_meta.db_name, single_end: meta.single_end], reads, db_meta, db]
|
[[id: db_meta.db_name, single_end: meta.single_end], reads, db_meta, db]
|
||||||
}
|
}
|
||||||
.groupTuple(by: [0,2,3])
|
.groupTuple(by: [0,2,3])
|
||||||
.dump(tag: "krakenuniq_premultimap")
|
|
||||||
.multiMap {
|
.multiMap {
|
||||||
single_meta, reads, db_meta, db ->
|
single_meta, reads, db_meta, db ->
|
||||||
reads: [ single_meta + db_meta, reads.flatten() ]
|
reads: [ single_meta + db_meta, reads.flatten() ]
|
||||||
db: db
|
db: db
|
||||||
}
|
}
|
||||||
// Hardcode to _always_ produce the report file (which is our basic otput, and goes into)
|
// Hardcode to _always_ produce the report file (which is our basic otput, and goes into)
|
||||||
KRAKENUNIQ_PRELOADEDKRAKENUNIQ ( ch_input_for_krakenuniq.reads.dump(tag: "krakenuniq_input"), ch_input_for_krakenuniq.db.dump(tag: "krakenuniq_db"), params.krakenuniq_ram_chunk_size, params.krakenuniq_save_reads, true, params.krakenuniq_save_readclassifications )
|
KRAKENUNIQ_PRELOADEDKRAKENUNIQ ( ch_input_for_krakenuniq.reads, ch_input_for_krakenuniq.db, params.krakenuniq_ram_chunk_size, params.krakenuniq_save_reads, true, params.krakenuniq_save_readclassifications )
|
||||||
ch_multiqc_files = ch_multiqc_files.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.report )
|
ch_multiqc_files = ch_multiqc_files.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.report )
|
||||||
ch_versions = ch_versions.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.versions.first() )
|
ch_versions = ch_versions.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.versions.first() )
|
||||||
ch_raw_classifications = ch_raw_classifications.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.classified_assignment )
|
ch_raw_classifications = ch_raw_classifications.mix( KRAKENUNIQ_PRELOADEDKRAKENUNIQ.out.classified_assignment )
|
||||||
|
|
Loading…
Reference in a new issue