From 306efd9be22821ba4bfa5127fb7b9520a56a3a9d Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 9 Feb 2024 16:52:00 +0000 Subject: [PATCH 1/6] Added some PacBio files for testing Not truly original PacBio files because they've been subsetted, but good enough for testing. --- assets/samplesheet.csv | 2 ++ assets/samplesheet_s3.csv | 2 ++ 2 files changed, 4 insertions(+) diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv index 5368f49..4caf749 100644 --- a/assets/samplesheet.csv +++ b/assets/samplesheet.csv @@ -3,3 +3,5 @@ mMelMel1,illumina,/lustre/scratch123/tol/resources/nextflow/test-data/Meles_mele mMelMel2,illumina,/lustre/scratch123/tol/resources/nextflow/test-data/Meles_meles/genomic_data/mMelMel2/illumina/31231_4#1.subset.cram, mMelMel3,hic,/lustre/scratch123/tol/resources/nextflow/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2#1.subset.cram, mMelMel3,ont,/lustre/scratch123/tol/resources/nextflow/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz, +mMelMel3,pacbio,/lustre/scratch123/tol/resources/nextflow/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam, +mMelMel3,pacbio,/lustre/scratch123/tol/resources/nextflow/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam, diff --git a/assets/samplesheet_s3.csv b/assets/samplesheet_s3.csv index 3987d18..5089aed 100644 --- a/assets/samplesheet_s3.csv +++ b/assets/samplesheet_s3.csv @@ -3,3 +3,5 @@ mMelMel1,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_d mMelMel2,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel2/illumina/31231_4%231.subset.cram, mMelMel3,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2%231.subset.cram, mMelMel3,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz, +mMelMel3,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam, +mMelMel3,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam, From 1cfc1191a1ed5e54ba12e6a13c6f45f11fefab31 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 9 Feb 2024 17:45:16 +0000 Subject: [PATCH 2/6] bugfix: pair each blocklist with its BAM file --- modules/local/pacbio_filter.nf | 4 ++-- subworkflows/local/filter_pacbio.nf | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/local/pacbio_filter.nf b/modules/local/pacbio_filter.nf index e4deaa4..36dd257 100644 --- a/modules/local/pacbio_filter.nf +++ b/modules/local/pacbio_filter.nf @@ -11,8 +11,8 @@ process PACBIO_FILTER { tuple val(meta), path(txt) output: - path("*.blocklist"), emit: list - path "versions.yml", emit: versions + tuple val(meta), path("*.blocklist"), emit: list + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/subworkflows/local/filter_pacbio.nf b/subworkflows/local/filter_pacbio.nf index 3d55282..7dfe8a1 100644 --- a/subworkflows/local/filter_pacbio.nf +++ b/subworkflows/local/filter_pacbio.nf @@ -60,9 +60,18 @@ workflow FILTER_PACBIO { // Create filtered BAM file SAMTOOLS_CONVERT.out.bam | join ( SAMTOOLS_CONVERT.out.csi ) + | join ( PACBIO_FILTER.out.list ) + | set { ch_reads_and_list } + + ch_reads_and_list + | map { meta, bam, csi, list -> [meta, bam, csi] } | set { ch_reads } - SAMTOOLS_FILTER ( ch_reads, [ [], [] ], PACBIO_FILTER.out.list ) + ch_reads_and_list + | map { meta, bam, csi, list -> list } + | set { ch_lists } + + SAMTOOLS_FILTER ( ch_reads, [ [], [] ], ch_lists ) ch_versions = ch_versions.mix ( SAMTOOLS_FILTER.out.versions.first() ) From 9ba1ce5f7f6f06f8b060d28332dc36fdfffde19e Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Thu, 23 May 2024 21:19:42 +0000 Subject: [PATCH 3/6] Version bump and changelog update --- CHANGELOG.md | 6 ++++++ nextflow.config | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f955c..6dcf618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[1.2.2](https://github.com/sanger-tol/readmapping/releases/tag/1.2.2)] - [2024-05-23] + +### Enhancements & fixes + +- Fixed the bug in the filtering of multiple PacBio files + ## [[1.2.1](https://github.com/sanger-tol/readmapping/releases/tag/1.2.1)] - [2024-02-29] ### Enhancements & fixes diff --git a/nextflow.config b/nextflow.config index 03de7e7..cd9aae7 100644 --- a/nextflow.config +++ b/nextflow.config @@ -183,7 +183,7 @@ manifest { description = 'Pipeline to map reads generated using different sequencing technologies against a genome assembly.' mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '1.2.1' + version = '1.2.2' doi = '10.5281/zenodo.6563577' } From 5b0793f4663429ddefd15435ec98c16a4f5f896d Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 24 May 2024 10:16:31 +0000 Subject: [PATCH 4/6] Updated the CI since we name the branch "main" --- .github/workflows/branch.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index d8a793b..3a6b782 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -1,15 +1,15 @@ name: nf-core branch protection -# This workflow is triggered on PRs to master branch on the repository -# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev` +# This workflow is triggered on PRs to main branch on the repository +# It fails when someone tries to make a PR against the nf-core `main` branch instead of `dev` on: pull_request_target: - branches: [master] + branches: [main] jobs: test: runs-on: ubuntu-latest steps: - # PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches + # PRs to the nf-core repo main branch are only ok if coming from the nf-core repo `dev` or any `patch` branches - name: Check PRs if: github.repository == 'sanger-tol/readmapping' run: | @@ -22,7 +22,7 @@ jobs: uses: mshick/add-pr-comment@v1 with: message: | - ## This PR is against the `master` branch :x: + ## This PR is against the `main` branch :x: * Do not close this PR * Click _Edit_ and change the `base` to `dev` @@ -32,9 +32,9 @@ jobs: Hi @${{ github.event.pull_request.user.login }}, - It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `master` branch. - The `master` branch on nf-core repositories should always contain code from the latest release. - Because of this, PRs to `master` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch. + It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `main` branch. + The `main` branch on nf-core repositories should always contain code from the latest release. + Because of this, PRs to `main` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch. You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page. Note that even after this, the test will continue to show as failing until you push a new commit. From b519fe1a8bc207df3220389d085ca9418b57dc67 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 24 May 2024 10:21:16 +0000 Subject: [PATCH 5/6] Updated the release names --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dcf618..8eb80be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,13 +3,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [[1.2.2](https://github.com/sanger-tol/readmapping/releases/tag/1.2.2)] - [2024-05-23] +## [[1.2.2](https://github.com/sanger-tol/readmapping/releases/tag/1.2.2)] - Norwegian Ridgeback (patch 2) -[2024-05-23] ### Enhancements & fixes - Fixed the bug in the filtering of multiple PacBio files -## [[1.2.1](https://github.com/sanger-tol/readmapping/releases/tag/1.2.1)] - [2024-02-29] +## [[1.2.1](https://github.com/sanger-tol/readmapping/releases/tag/1.2.1)] - Norwegian Ridgeback (patch 1) - [2024-02-29] ### Enhancements & fixes From 39ebe5845cc8e49b3699fbbe3fb65114b06842aa Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 24 May 2024 10:35:12 +0000 Subject: [PATCH 6/6] this file is an exception to the linting rules --- .nf-core.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.nf-core.yml b/.nf-core.yml index 3af6a29..8031c1e 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -18,6 +18,7 @@ lint: - assets/sendmail_template.txt - docs/README.md - lib/NfcoreTemplate.groovy + - .github/workflows/branch.yml nextflow_config: - manifest.name - manifest.homePage