From 9462032d00824f16c55fe4a313404282eddab91d Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 3 Jun 2022 22:29:04 +0200 Subject: [PATCH] Fix MALT save_alignemnts reads and some clean up --- conf/test.config | 3 +++ nextflow.config | 2 +- subworkflows/local/longread_preprocessing.nf | 2 +- subworkflows/local/profiling.nf | 10 ++++------ 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/conf/test.config b/conf/test.config index 996d5de..e9fa62e 100644 --- a/conf/test.config +++ b/conf/test.config @@ -47,4 +47,7 @@ process { withName: MALT_RUN { maxForks = 1 } + withName: MEGAN_RMA2INFO { + maxForks = 1 + } } diff --git a/nextflow.config b/nextflow.config index e5b8a1d..73fd0b3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -196,7 +196,7 @@ profiles { test { includeConfig 'conf/test.config' } test_full { includeConfig 'conf/test_full.config' } test_noprofiling { includeConfig 'conf/test_noprofiling.config' } - test_nopreprocessing { includeConfig 'conf/test_preprocessing.config' } + test_nopreprocessing { includeConfig 'conf/test_nopreprocessing.config' } } // Load igenomes.config if required diff --git a/subworkflows/local/longread_preprocessing.nf b/subworkflows/local/longread_preprocessing.nf index 5ae5417..6a23b0e 100644 --- a/subworkflows/local/longread_preprocessing.nf +++ b/subworkflows/local/longread_preprocessing.nf @@ -48,7 +48,7 @@ workflow LONGREAD_PREPROCESSING { } - FASTQC_PROCESSED ( ch_processed_reads.dump(tag: "filtlong") ) + FASTQC_PROCESSED ( ch_processed_reads ) ch_multiqc_files = ch_multiqc_files.mix( FASTQC_PROCESSED.out.zip ) emit: diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index 18ea7fa..b83c78f 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -66,19 +66,17 @@ workflow PROFILING { .filter { it[0]['instrument_platform'] == 'ILLUMINA' } .map { meta, reads, db_meta, db -> - def sam_format = params.malt_save_reads ? ' --alignments' : "" - // TODO No MALT SAM? - // TODO check all aligned reads published - // TODO try turning on/off aligned reads + def sam_format = params.malt_save_reads ? ' --alignments ./ -za false' : "" // TODO wut? [9a/a441d6] Submitted process > NFCORE_TAXPROFILER:TAXPROFILER:PROFILING:MALT_RUN (null) def temp_meta = [ id: meta['db_name'] ] def new_db_meta = db_meta.clone() new_db_meta['db_params'] = db_meta['db_params'] + sam_format def new_meta = temp_meta + new_db_meta - + new_meta['id'] = new_meta['db_name'] [ new_meta, reads, db ] } .groupTuple(by: [0,2]) + .dump(tag: "into_malt") .multiMap { it -> reads: [ it[0], it[1].flatten() ] @@ -192,7 +190,7 @@ workflow PROFILING { // this will replace output file! ch_diamond_reads_format = params.diamond_save_reads ? 'sam' : params.diamond_output_format - DIAMOND_BLASTX ( ch_input_for_diamond.reads, ch_input_for_diamond.db, params.diamond_output_format, [] ) + DIAMOND_BLASTX ( ch_input_for_diamond.reads, ch_input_for_diamond.db, ch_diamond_reads_format , [] ) ch_versions = ch_versions.mix( DIAMOND_BLASTX.out.versions.first() ) ch_raw_profiles = ch_raw_profiles.mix( DIAMOND_BLASTX.out.tsv )