diff --git a/.github/workflows/notify-slack-on-release.yml b/.github/workflows/notify-slack-on-release.yml new file mode 100644 index 0000000..5e0963c --- /dev/null +++ b/.github/workflows/notify-slack-on-release.yml @@ -0,0 +1,18 @@ +name: Notify Slack on New Release + +on: + release: + types: [published] + +jobs: + notify: + runs-on: ubuntu-latest + + steps: + - name: Send notification to Slack + env: + SLACK_WEBHOOK_URL: ${{ secrets.CIDGOH_SLACK_WEBHOOK }} + run: | + curl -X POST -H 'Content-type: application/json' --data \ + '{"text":"A new release has been published: <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> by *${{ github.event.release.author.login }}*.\n\n*Release Notes:* \n${{ github.event.release.body }}"}' \ + $SLACK_WEBHOOK_URL diff --git a/subworkflows/local/plasmids.nf b/subworkflows/local/plasmids.nf index 5749bc4..b00dbee 100644 --- a/subworkflows/local/plasmids.nf +++ b/subworkflows/local/plasmids.nf @@ -7,6 +7,8 @@ workflow PLASMIDS { take: genome main: + ch_plasmidfinder_fa = Channel.empty() + ch_mobsuite_fa = Channel.empty() // inititalize version channel ch_versions = Channel.empty() diff --git a/subworkflows/local/seqqc.nf b/subworkflows/local/seqqc.nf index 75c5f49..8dbc5ae 100644 --- a/subworkflows/local/seqqc.nf +++ b/subworkflows/local/seqqc.nf @@ -97,7 +97,6 @@ workflow SEQQC { // SUBWORKFLOW: Read in samplesheet, validate and stage input files // - ch_input .branch { illumina : it[0].mode == 'illumina' @@ -105,11 +104,8 @@ workflow SEQQC { } .set {ch_raw_reads} - - CAT_NANOPORE_FASTQ(ch_raw_reads.nanopore) ch_reads_merged = CAT_NANOPORE_FASTQ.out.reads - //ch_versions = ch_versions.mix(CAT_NANOPORE_FASTQ.out.versions) ch_reads = ch_reads.mix(ch_raw_reads.illumina).mix(ch_reads_merged) // diff --git a/workflows/bacpaq.nf b/workflows/bacpaq.nf index dc06a46..2fefab6 100644 --- a/workflows/bacpaq.nf +++ b/workflows/bacpaq.nf @@ -12,7 +12,12 @@ ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath( params.mu ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath( params.multiqc_logo, checkIfExists: true ) : Channel.empty() //ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) */ - +def convertEmptyToNull = { value -> + if (value.toString().trim().isEmpty() || (value instanceof List && value.isEmpty())) { + return null + } + return value +} /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -43,6 +48,9 @@ workflow BACPAQ { ch_multiqc_files = Channel.empty() ch_illumina = samplesheet + .map { meta, fastq_1, fastq_2, fastq_dir, genome -> + [meta, convertEmptyToNull(fastq_1), fastq_2, fastq_dir, genome] + } .filter { meta, fastq_1, fastq_2, fastq_dir, genome -> fastq_1 != null } @@ -53,14 +61,26 @@ workflow BACPAQ { return [ [ id:meta.id, single_end: false, mode:'illumina' ], [fastq_1, fastq_2 ]] } } + ch_illumina.ifEmpty { + log.warn "No Illumina samples found in the samplesheet, skipping Illumina-specifc processes." + } ch_onp = samplesheet + .map { meta, fastq_1, fastq_2, fastq_dir, genome -> + [meta, fastq_1, fastq_2, convertEmptyToNull(fastq_dir), genome] + } .filter { meta, fastq_1, fastq_2, fastq_dir, genome -> fastq_dir != null } .map { meta, fastq_1, fastq_2, fastq_dir, genome -> return [ [ id:meta.id, single_end: true, mode:'nanopore' ], [fastq_dir ]] } + ch_onp.ifEmpty { + log.warn "No Nanopore samples found in the samplesheet, skipping Nanopore-specifc processes." + } ch_genome = samplesheet + .map { meta, fastq_1, fastq_2, fastq_dir, genome -> + [meta, fastq_1, fastq_2, fastq_dir, convertEmptyToNull(genome)] + } .filter { meta, fastq_1, fastq_2, fastq_dir, genome -> genome != null }