Skip to content

Commit

Permalink
Merge pull request #72 from cidgoh/dev
Browse files Browse the repository at this point in the history
Squashed some bugs and added automation to the genomics group
  • Loading branch information
anwarMZ authored Oct 9, 2024
2 parents ebdae81 + 0c0620d commit 3c48b98
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/notify-slack-on-release.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions subworkflows/local/plasmids.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 0 additions & 4 deletions subworkflows/local/seqqc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,15 @@ workflow SEQQC {
// SUBWORKFLOW: Read in samplesheet, validate and stage input files
//


ch_input
.branch {
illumina : it[0].mode == 'illumina'
nanopore : it[0].mode == 'nanopore'
}
.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)

//
Expand Down
22 changes: 21 additions & 1 deletion workflows/bacpaq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 3c48b98

Please sign in to comment.