diff --git a/subworkflows/local/generate_downstream_samplesheets/main.nf b/subworkflows/local/generate_downstream_samplesheets/main.nf index 2be09249..bc2600a2 100644 --- a/subworkflows/local/generate_downstream_samplesheets/main.nf +++ b/subworkflows/local/generate_downstream_samplesheets/main.nf @@ -7,20 +7,30 @@ workflow GENERATE_DOWNSTREAM_SAMPLESHEETS { ch_reads main: - ch_header = Channel.empty() format = 'csv' // most common format in nf-core format_sep = ',' - // Make your samplesheet channel construct here depending on your downstream pipelines - if ( params.generate_pipeline_samplesheets == 'taxprofiler' ) { + if ( params.generate_pipeline_samplesheets == 'taxprofiler' && params.save_clipped_reads ) { // save_clipped_reads must be true + def fastq_rel_path = '/' + if (params.bbnorm) { + fastq_rel_path = '/bbmap/bbnorm/' + } else if (!params.keep_phix) { + fastq_rel_path = '/QC_shortreads/remove_phix/' + } + else if (params.host_fasta) { + fastq_rel_path = '/QC_shortreads/remove_host/' + } + else if (!params.skip_clipping) { + fastq_rel_path = '/QC_shortreads/fastp/' + } ch_list_for_samplesheet = ch_reads .map { meta, fastq -> def sample = meta.id def run_accession = meta.id def instrument_platform = "" - def fastq_1 = file(params.outdir).toString() + '/' + fastq[0].getName() - def fastq_2 = file(params.outdir).toString() + '/' + fastq[1].getName() + def fastq_1 = file(params.outdir).toString() + fastq_rel_path + meta.id + '/' + fastq[0].getName() + def fastq_2 = file(params.outdir).toString() + fastq_rel_path + meta.id + '/' + fastq[1].getName() def fasta = "" [ sample: sample, run_accession: run_accession, instrument_platform: instrument_platform, fastq_1: fastq_1, fastq_2: fastq_2, fasta: fasta ] } diff --git a/workflows/mag.nf b/workflows/mag.nf index c06c9892..ff2e0dc6 100644 --- a/workflows/mag.nf +++ b/workflows/mag.nf @@ -1009,7 +1009,6 @@ workflow MAG { ch_input_for_samplesheet = Channel .empty() .mix( ch_short_reads_assembly ) - .view() if ( params.generate_downstream_samplesheets ) { GENERATE_DOWNSTREAM_SAMPLESHEETS ( ch_input_for_samplesheet )