diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ec7e537b7..82ce14f40 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -27,6 +27,9 @@ If you're not used to this workflow with git, you can start with some [docs from ## Tests +You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to +receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir `. + When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests. Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fdc75549e..5ed2fd931 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,6 +19,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/rnas - [ ] If necessary, also make a PR on the nf-core/rnaseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. - [ ] Make sure your code lints (`nf-core lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). +- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). - [ ] Usage Documentation in `docs/usage.md` is updated. - [ ] Output Documentation in `docs/output.md` is updated. - [ ] `CHANGELOG.md` is updated. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ce4d2098..66bd47cf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - "latest-everything" steps: - name: Check out pipeline code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Nextflow uses: nf-core/setup-nextflow@v1 diff --git a/.github/workflows/cloud_tests_full.yml b/.github/workflows/cloud_tests_full.yml index 3c4b23106..c7ba753bb 100644 --- a/.github/workflows/cloud_tests_full.yml +++ b/.github/workflows/cloud_tests_full.yml @@ -23,70 +23,75 @@ jobs: matrix: aligner: ["star_salmon", "star_rsem"] steps: - - uses: seqeralabs/action-tower-launch@v1 + - uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} compute_env: ${{ secrets.TOWER_CE_AWS_CPU }} workdir: "${{ secrets.TOWER_BUCKET_AWS }}/work/rnaseq/work-${{ github.sha }}" run_name: "aws_rnaseq_full_${{ matrix.aligner }}" + revision: ${{ github.sha }} profiles: test_full_aws parameters: | { "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", "aligner": "${{ matrix.aligner }}", - "outdir": "${{ secrets.TOWER_BUCKET_AWS }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}" + "outdir": "${{ secrets.TOWER_BUCKET_AWS }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}/" } - uses: actions/upload-artifact@v3 with: name: Tower debug log file path: tower_action_*.log - run-full-tests-on-gcp: - if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'gcp' || !github.event.inputs }} + + run-full-tests-on-azure: + if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'azure' || !github.event.inputs }} runs-on: ubuntu-latest strategy: matrix: aligner: ["star_salmon", "star_rsem"] steps: - - uses: seqeralabs/action-tower-launch@v1 + - uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_CE_GCP_CPU }} - workdir: "${{ secrets.TOWER_BUCKET_GCP }}/work/rnaseq/work-${{ github.sha }}" - run_name: "gcp_rnaseq_full_${{ matrix.aligner }}" - profiles: test_full_gcp + compute_env: ${{ secrets.TOWER_CE_AZURE_CPU }} + workdir: "${{ secrets.TOWER_BUCKET_AZURE }}/work/rnaseq/work-${{ github.sha }}" + run_name: "azure_rnaseq_full_${{ matrix.aligner }}" + revision: ${{ github.sha }} + profiles: test_full_azure parameters: | { "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", "aligner": "${{ matrix.aligner }}", - "outdir": "${{ secrets.TOWER_BUCKET_GCP }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}" + "outdir": "${{ secrets.TOWER_BUCKET_AZURE }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}/", + "igenomes_base": "${{ secrets.TOWER_IGENOMES_BASE_AZURE }}" } - uses: actions/upload-artifact@v3 with: name: Tower debug log file path: tower_action_*.log - run-full-tests-on-azure: - if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'azure' || !github.event.inputs }} + + run-full-tests-on-gcp: + if: ${{ github.event.inputs.platform == 'gcp' || !github.event.inputs }} runs-on: ubuntu-latest strategy: matrix: aligner: ["star_salmon", "star_rsem"] steps: - - uses: seqeralabs/action-tower-launch@v1 + - uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_CE_AZURE_CPU }} - workdir: "${{ secrets.TOWER_BUCKET_AZURE }}/work/rnaseq/work-${{ github.sha }}" - run_name: "azure_rnaseq_full_${{ matrix.aligner }}" - profiles: test_full_azure + compute_env: ${{ secrets.TOWER_CE_GCP_CPU }} + workdir: "${{ secrets.TOWER_BUCKET_GCP }}/work/rnaseq/work-${{ github.sha }}" + run_name: "gcp_rnaseq_full_${{ matrix.aligner }}" + revision: ${{ github.sha }} + profiles: test_full_gcp parameters: | { "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", "aligner": "${{ matrix.aligner }}", - "outdir": "${{ secrets.TOWER_BUCKET_AZURE }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}", - "igenomes_base": "${{ secrets.TOWER_IGENOMES_BASE_AZURE }}" + "outdir": "${{ secrets.TOWER_BUCKET_GCP }}/rnaseq/results-${{ github.sha }}/aligner_${{ matrix.aligner }}/" } - uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/cloud_tests_small.yml b/.github/workflows/cloud_tests_small.yml index 6f2e6d8a9..69647ff04 100644 --- a/.github/workflows/cloud_tests_small.yml +++ b/.github/workflows/cloud_tests_small.yml @@ -18,57 +18,62 @@ jobs: if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'aws' }} runs-on: ubuntu-latest steps: - - uses: seqeralabs/action-tower-launch@v1 + - uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} compute_env: ${{ secrets.TOWER_CE_AWS_CPU }} workdir: "${{ secrets.TOWER_BUCKET_AWS }}/work/rnaseq/work-${{ github.sha }}" run_name: "aws_rnaseq_small" + revision: ${{ github.sha }} profiles: test parameters: | { - "outdir": "${{ secrets.TOWER_BUCKET_AWS }}/rnaseq/results-test-${{ github.sha }}" + "outdir": "${{ secrets.TOWER_BUCKET_AWS }}/rnaseq/results-test-${{ github.sha }}/" } - uses: actions/upload-artifact@v3 with: name: Tower debug log file path: tower_action_*.log - run-small-tests-on-gcp: - if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'gcp' }} + + run-small-tests-on-azure: + if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'azure' }} runs-on: ubuntu-latest steps: - - uses: seqeralabs/action-tower-launch@v1 + - uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_CE_GCP_CPU }} - workdir: "${{ secrets.TOWER_BUCKET_GCP }}/work/rnaseq/work-${{ github.sha }}" - run_name: "gcp_rnaseq_small" + compute_env: ${{ secrets.TOWER_CE_AZURE_CPU }} + workdir: "${{ secrets.TOWER_BUCKET_AZURE }}/work/rnaseq/work-${{ github.sha }}" + run_name: "azure_rnaseq_small" + revision: ${{ github.sha }} profiles: test parameters: | { - "outdir": "${{ secrets.TOWER_BUCKET_GCP }}/rnaseq/results-test-${{ github.sha }}" + "outdir": "${{ secrets.TOWER_BUCKET_AZURE }}/rnaseq/results-test-${{ github.sha }}/" } - uses: actions/upload-artifact@v3 with: name: Tower debug log file path: tower_action_*.log - run-small-tests-on-azure: - if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'azure' }} + + run-small-tests-on-gcp: + if: ${{ github.event.inputs.platform == 'gcp' }} runs-on: ubuntu-latest steps: - - uses: seqeralabs/action-tower-launch@v1 + - uses: seqeralabs/action-tower-launch@v2 with: workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_CE_AZURE_CPU }} - workdir: "${{ secrets.TOWER_BUCKET_AZURE }}/work/rnaseq/work-${{ github.sha }}" - run_name: "azure_rnaseq_small" + compute_env: ${{ secrets.TOWER_CE_GCP_CPU }} + workdir: "${{ secrets.TOWER_BUCKET_GCP }}/work/rnaseq/work-${{ github.sha }}" + run_name: "gcp_rnaseq_small" + revision: ${{ github.sha }} profiles: test parameters: | { - "outdir": "${{ secrets.TOWER_BUCKET_AZURE }}/rnaseq/results-test-${{ github.sha }}" + "outdir": "${{ secrets.TOWER_BUCKET_GCP }}/rnaseq/results-test-${{ github.sha }}/" } - uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml index 8b2617a2e..619e58a6e 100644 --- a/.github/workflows/fix-linting.yml +++ b/.github/workflows/fix-linting.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.nf_core_bot_auth_token }} @@ -24,7 +24,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 - name: Install Prettier run: npm install -g prettier @prettier/plugin-php diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b8bdd2143..905c58e44 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -14,9 +14,9 @@ jobs: EditorConfig: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 - name: Install editorconfig-checker run: npm install -g editorconfig-checker @@ -27,9 +27,9 @@ jobs: Prettier: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 - name: Install Prettier run: npm install -g prettier @@ -40,7 +40,7 @@ jobs: PythonBlack: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check code lints with Black uses: psf/black@stable @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Nextflow uses: nf-core/setup-nextflow@v1 diff --git a/.github/workflows/release-announcments.yml b/.github/workflows/release-announcements.yml similarity index 100% rename from .github/workflows/release-announcments.yml rename to .github/workflows/release-announcements.yml diff --git a/.gitpod.yml b/.gitpod.yml index 25488dcc0..acf726953 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,7 +4,9 @@ tasks: command: | pre-commit install --install-hooks nextflow self-update - + - name: unset JAVA_TOOL_OPTIONS + command: | + unset JAVA_TOOL_OPTIONS vscode: extensions: # based on nf-core.nf-core-extensionpack - codezombiech.gitignore # Language support for .gitignore files diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ef0b84d7..e2d4c8fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,60 @@ 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). +## [[3.14.0](https://github.com/nf-core/rnaseq/releases/tag/3.14.0)] - 2024-01-08 + +### Credits + +Special thanks to the following for their contributions to the release: + +- [Adam Talbot](https://github.com/adamrtalbot) +- [Jonathan Manning](https://github.com/pinin4fjords) +- [Mahesh Binzer-Panchal](https://github.com/mahesh-panchal) +- [Matthias Zepper](https://github.com/MatthiasZepper) +- [Maxime Garcia](https://github.com/maxulysse) +- [Phil Ewels](https://github.com/ewels) +- [Vlad Savelyev](https://github.com/vladsavelyev) + +Thank you to everyone else that has contributed by reporting bugs, enhancements or in any other way, shape or form. + +### Enhancements & fixes + +- [PR #1135](https://github.com/nf-core/rnaseq/pull/1135) - Update [action-tower-launch](https://github.com/marketplace/actions/action-tower-launch) to v2 which supports more variable handling +- [PR #1141](https://github.com/nf-core/rnaseq/pull/1141) - Important! Template update for nf-core/tools v2.11 +- [PR #1143](https://github.com/nf-core/rnaseq/pull/1143) - Move fasta check back to Groovy ([#1142](https://github.com/nf-core/rnaseq/issues/1142)) +- [PR #1144](https://github.com/nf-core/rnaseq/pull/1144) - Interface to kmer size for pseudoaligners ([#1111](https://github.com/nf-core/rnaseq/issues/1111)) +- [PR #1149](https://github.com/nf-core/rnaseq/pull/1149) - Fix and patch version commands for Fastp, FastQC and UMI-tools modules ([#1103](https://github.com/nf-core/rnaseq/issues/1103)) +- [PR #1150](https://github.com/nf-core/rnaseq/pull/1150) - Be more flexible on attribute values in GTFs ([#1132](https://github.com/nf-core/rnaseq/issues/1132)) +- [PR #1151](https://github.com/nf-core/rnaseq/pull/1151) - fix to #1150: reinstate conditional +- [PR #1152](https://github.com/nf-core/rnaseq/pull/1152) - Bump container versions for tools using Docker V1 manifest ([#1140](https://github.com/nf-core/rnaseq/issues/1140)) +- [PR #1154](https://github.com/nf-core/rnaseq/pull/1154) - Prerelease 3.14.0 fixes ([#1111](https://github.com/nf-core/rnaseq/issues/1111), [#1153](https://github.com/nf-core/rnaseq/issues/1153)) +- [PR #1157](https://github.com/nf-core/rnaseq/pull/1157) - Add slash to `--outdir` for cloud tests to fix Azure validation issue +- [PR #1159](https://github.com/nf-core/rnaseq/pull/1159) - Issues loading MultiQC report ([#1158](https://github.com/nf-core/rnaseq/issues/1158)) + +### Parameters + +| Old parameter | New parameter | +| ------------- | ---------------------------- | +| | `--pseudo_aligner_kmer_size` | + +> **NB:** Parameter has been **updated** if both old and new parameter information is present. +> **NB:** Parameter has been **added** if just the new parameter information is present. +> **NB:** Parameter has been **removed** if new parameter information isn't present. + +### Software dependencies + +| Dependency | Old version | New version | +| ---------- | ----------- | ----------- | +| `multiqc` | 1.17 | 1.19 | +| `qualimap` | 2.2.2d | 2.3 | +| `rseqc` | 3.0.1 | 5.0.3 | + +> **NB:** Dependency has been **updated** if both old and new version information is present. +> +> **NB:** Dependency has been **added** if just the new version information is present. +> +> **NB:** Dependency has been **removed** if new version information isn't present. + ## [[3.13.2](https://github.com/nf-core/rnaseq/releases/tag/3.13.2)] - 2023-11-21 ### Credits diff --git a/README.md b/README.md index b45db8c7a..9e3b4641a 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,8 @@ ## Usage -:::note -If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how -to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) -with `-profile test` before running the workflow on actual data. -::: +> [!NOTE] +> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data. First, prepare a samplesheet with your input data that looks as follows: @@ -84,11 +81,9 @@ nextflow run nf-core/rnaseq \ -profile ``` -:::warning -Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those -provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; -see [docs](https://nf-co.re/usage/configuration#custom-configuration-files). -::: +> [!WARNING] +> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; +> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files). For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/rnaseq/usage) and the [parameter documentation](https://nf-co.re/rnaseq/parameters). diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 4085d95e3..e738f4854 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,5 @@ report_comment: > - This report has been generated by the nf-core/rnaseq - analysis pipeline. For information about how to interpret these results, please see the - documentation. + This report has been generated by the nf-core/rnaseq analysis pipeline. For information about how to interpret these results, please see the documentation. report_section_order: "nf-core-rnaseq-methods-description": order: -1000 @@ -11,6 +9,7 @@ report_section_order: order: -1002 export_plots: true +disable_version_detection: true # Run only these modules run_modules: diff --git a/bin/dupradar.r b/bin/dupradar.r index d58b0eee1..00119f550 100755 --- a/bin/dupradar.r +++ b/bin/dupradar.r @@ -93,6 +93,7 @@ curve_y <- curve_y[seq(1, length(curve_y), 10)] curve_x = 10^curve_x # Write to file line="#id: dupradar +#plot_type: 'linegraph' #section_name: 'DupRadar' #section_href: 'bioconductor.org/packages/release/bioc/html/dupRadar.html' #description: \"provides duplication rate quality control for RNA-Seq datasets. Highly expressed genes can be expected to have a lot of duplicate reads, but high numbers of duplicates at low read counts can indicate low library complexity with technical duplication. diff --git a/bin/tx2gene.py b/bin/tx2gene.py index 8e0c1c6a5..d8256f5f9 100755 --- a/bin/tx2gene.py +++ b/bin/tx2gene.py @@ -6,6 +6,7 @@ import argparse import glob import os +import re from collections import Counter, defaultdict, OrderedDict from collections.abc import Set from typing import Dict @@ -50,14 +51,18 @@ def discover_transcript_attribute(gtf_file: str, transcripts: Set[str]) -> str: Returns: str: The attribute name that corresponds to transcripts in the GTF file. """ + votes = Counter() with open(gtf_file) as inh: # Read GTF file, skipping header lines for line in filter(lambda x: not x.startswith("#"), inh): cols = line.split("\t") - # Parse attribute column and update votes for each attribute found - attributes = dict(item.strip().split(" ", 1) for item in cols[8].split(";") if item.strip()) - votes.update(key for key, value in attributes.items() if value.strip('"') in transcripts) + + # Use regular expression to correctly split the attributes string + attributes_str = cols[8] + attributes = dict(re.findall(r'(\S+) "(.*?)(? filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } @@ -51,94 +51,97 @@ process { withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' { publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'GFFREAD' { ext.args = '--keep-exon-attrs -F -T' publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'HISAT2_EXTRACTSPLICESITES' { publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'SALMON_INDEX' { - ext.args = params.gencode ? '--gencode' : '' + ext.args = { [ + params.gencode ? '--gencode' : '', + params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}": '' + ].join(' ').trim() } publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'KALLISTO_INDEX' { - ext.args = { params.gencode ? '--gencode' : '' } + ext.args = params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}" : '' publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'RSEM_PREPAREREFERENCE_GENOME' { ext.args = '--star' publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'GTF2BED' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'GTF_FILTER' { ext.args = { params.skip_gtf_transcript_filter ?: '--skip_transcript_id_check' } publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'CUSTOM_GETCHROMSIZES' { publishDir = [ - path: { "${params.outdir}/genome" }, + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } withName: 'CAT_FASTQ' { publishDir = [ - path: { "${params.outdir}/fastq" }, + path: { params.save_merged_fastq ? "${params.outdir}/fastq" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_merged_fastq ? filename : null } + saveAs: { filename -> (filename.endsWith('.fastq.gz') && params.save_merged_fastq) ? filename : null } ] } } @@ -148,9 +151,9 @@ if (!params.skip_bbsplit && params.bbsplit_fasta_list) { withName: '.*:PREPARE_GENOME:BBMAP_BBSPLIT' { ext.args = 'build=1' publishDir = [ - path: { "${params.outdir}/genome/index" }, + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } } @@ -225,7 +228,7 @@ if (!params.skip_trimming) { pattern: "*.{html,zip}" ], [ - path: { "${params.outdir}/${params.trimmer}" }, + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fq.gz", saveAs: { params.save_trimmed ? it : null } @@ -256,7 +259,7 @@ if (!params.skip_trimming) { pattern: "*.log" ], [ - path: { "${params.outdir}/${params.trimmer}" }, + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", saveAs: { params.save_trimmed ? it : null } @@ -283,7 +286,7 @@ if (params.with_umi && !params.skip_umi_extract) { pattern: "*.log" ], [ - path: { "${params.outdir}/umitools" }, + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", saveAs: { params.save_umi_intermeds ? it : null } @@ -308,7 +311,7 @@ if (!params.skip_bbsplit) { pattern: '*.txt' ], [ - path: { "${params.outdir}/bbsplit" }, + path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.fastq.gz', saveAs: { params.save_bbsplit_reads ? it : null } @@ -329,7 +332,7 @@ if (params.remove_ribo_rna) { pattern: "*.log" ], [ - path: { "${params.outdir}/sortmerna" }, + path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.fastq.gz", saveAs: { params.save_non_ribo_reads ? it : null } @@ -357,7 +360,9 @@ if (!params.skip_alignment) { withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.bam", saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && @@ -369,7 +374,9 @@ if (!params.skip_alignment) { withName: 'NFCORE_RNASEQ:RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { ext.args = { params.bam_csi_index ? '-c' : '' } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.{bai,csi}", saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && @@ -435,7 +442,7 @@ if (!params.skip_alignment) { pattern: '*.tsv' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } @@ -447,7 +454,7 @@ if (!params.skip_alignment) { ext.args = { params.bam_csi_index ? '-c' : '' } ext.prefix = { "${meta.id}.umi_dedup.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.{bai,csi}', saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } @@ -553,13 +560,13 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { pattern: '*.{out,tab}' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds ? it : null } ], [ - path: { "${params.outdir}/${params.aligner}/unmapped" }, + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.fastq.gz', saveAs: { params.save_unaligned ? it : null } @@ -608,7 +615,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { ext.args = '-n' ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -624,7 +631,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { pattern: '*.log' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -635,7 +642,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.transcriptome.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -644,7 +651,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bai', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -654,7 +661,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: 'NFCORE_RNASEQ:RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.{stats,flagstat,idxstats}', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -675,7 +682,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { pattern: '*.tsv' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -685,7 +692,7 @@ if (!params.skip_alignment && params.aligner == 'star_salmon') { withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:SAMTOOLS_INDEX' { publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bai', saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } @@ -744,7 +751,7 @@ if (!params.skip_alignment && params.aligner == 'star_rsem') { pattern: "*.{stat,results}" ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.bam", saveAs: { params.save_align_intermeds ? it : null } @@ -801,13 +808,13 @@ if (!params.skip_alignment && params.aligner == 'hisat2') { pattern: '*.log' ], [ - path: { "${params.outdir}/${params.aligner}" }, + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.bam', saveAs: { params.save_align_intermeds ? it : null } ], [ - path: { "${params.outdir}/${params.aligner}/unmapped" }, + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, mode: params.publish_dir_mode, pattern: '*.fastq.gz', saveAs: { params.save_unaligned ? it : null } diff --git a/docs/usage.md b/docs/usage.md index 524acba9b..7b148c636 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -20,7 +20,7 @@ You will need to create a samplesheet with information about the samples you wou The `sample` identifiers have to be the same when you have re-sequenced the same sample more than once e.g. to increase sequencing depth. The pipeline will concatenate the raw reads before performing any downstream analysis. Below is an example for the same sample sequenced across 3 lanes. If you set the strandedness value to `auto` the pipeline will sub-sample the input FastQ files to 1 million reads, use Salmon Quant to infer the strandedness automatically and then propagate this information to the remainder of the pipeline. If the strandedness has been inferred or provided incorrectly a warning will be present at the top of the MultiQC report so please be sure to check when looking at the QC for your samples. -```console +```csv title="samplesheet.csv" sample,fastq_1,fastq_2,strandedness CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz,auto CONTROL_REP1,AEG588A1_S1_L003_R1_001.fastq.gz,AEG588A1_S1_L003_R2_001.fastq.gz,auto @@ -33,7 +33,7 @@ The pipeline will auto-detect whether a sample is single- or paired-end using th A final samplesheet file consisting of both single- and paired-end data may look something like the one below. This is for 6 samples, where `TREATMENT_REP3` has been sequenced twice. -```console +```csv title="samplesheet.csv" sample,fastq_1,fastq_2,strandedness CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz,forward CONTROL_REP2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz,forward diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index cecbacf29..5cdc9a73c 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -4,6 +4,7 @@ import org.yaml.snakeyaml.Yaml import groovy.json.JsonOutput +import nextflow.extension.FilesEx class NfcoreTemplate { @@ -164,12 +165,14 @@ class NfcoreTemplate { try { if (params.plaintext_email) { throw GroovyException('Send plaintext e-mail, not HTML') } // Try to send HTML e-mail using sendmail + def sendmail_tf = new File(workflow.launchDir.toString(), ".sendmail_tmp.html") + sendmail_tf.withWriter { w -> w << sendmail_html } [ 'sendmail', '-t' ].execute() << sendmail_html log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (sendmail)-" } catch (all) { // Catch failures and try with plaintext def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ] - if ( mqc_report.size() <= max_multiqc_email_size.toBytes() ) { + if ( mqc_report != null && mqc_report.size() <= max_multiqc_email_size.toBytes() ) { mail_cmd += [ '-A', mqc_report ] } mail_cmd.execute() << email_html @@ -178,14 +181,16 @@ class NfcoreTemplate { } // Write summary e-mail HTML to a file - def output_d = new File("${params.outdir}/pipeline_info/") - if (!output_d.exists()) { - output_d.mkdirs() - } - def output_hf = new File(output_d, "pipeline_report.html") + def output_hf = new File(workflow.launchDir.toString(), ".pipeline_report.html") output_hf.withWriter { w -> w << email_html } - def output_tf = new File(output_d, "pipeline_report.txt") + FilesEx.copyTo(output_hf.toPath(), "${params.outdir}/pipeline_info/pipeline_report.html"); + output_hf.delete() + + // Write summary e-mail TXT to a file + def output_tf = new File(workflow.launchDir.toString(), ".pipeline_report.txt") output_tf.withWriter { w -> w << email_txt } + FilesEx.copyTo(output_tf.toPath(), "${params.outdir}/pipeline_info/pipeline_report.txt"); + output_tf.delete() } // @@ -250,15 +255,14 @@ class NfcoreTemplate { // Dump pipeline parameters in a json file // public static void dump_parameters(workflow, params) { - def output_d = new File("${params.outdir}/pipeline_info/") - if (!output_d.exists()) { - output_d.mkdirs() - } - def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') - def output_pf = new File(output_d, "params_${timestamp}.json") + def filename = "params_${timestamp}.json" + def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") def jsonStr = JsonOutput.toJson(params) - output_pf.text = JsonOutput.prettyPrint(jsonStr) + temp_pf.text = JsonOutput.prettyPrint(jsonStr) + + FilesEx.copyTo(temp_pf.toPath(), "${params.outdir}/pipeline_info/params_${timestamp}.json") + temp_pf.delete() } // diff --git a/lib/WorkflowRnaseq.groovy b/lib/WorkflowRnaseq.groovy index 25e52ffe4..29a1724e3 100755 --- a/lib/WorkflowRnaseq.groovy +++ b/lib/WorkflowRnaseq.groovy @@ -14,6 +14,10 @@ class WorkflowRnaseq { public static void initialise(params, log) { genomeExistsError(params, log) + if (!params.fasta) { + Nextflow.error("Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file.") + } + if (!params.gtf && !params.gff) { Nextflow.error("No GTF or GFF3 annotation specified! The pipeline requires at least one of these files.") } diff --git a/modules.json b/modules.json index 74bd0d197..113f5139f 100644 --- a/modules.json +++ b/modules.json @@ -18,7 +18,8 @@ "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "bba7e362e4afead70653f84d8700588ea28d0f9e", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/custom/dumpsoftwareversions/custom-dumpsoftwareversions.diff" }, "custom/getchromsizes": { "branch": "master", @@ -28,12 +29,14 @@ "fastp": { "branch": "master", "git_sha": "d497a4868ace3302016ea8ed4b395072d5e833cd", - "installed_by": ["fastq_fastqc_umitools_fastp", "modules"] + "installed_by": ["fastq_fastqc_umitools_fastp", "modules"], + "patch": "modules/nf-core/fastp/fastp.diff" }, "fastqc": { "branch": "master", "git_sha": "102cc9b709a6da9f7cee2373563ab1464fca9c0a", - "installed_by": ["fastq_fastqc_umitools_trimgalore", "fastq_fastqc_umitools_fastp"] + "installed_by": ["fastq_fastqc_umitools_trimgalore", "fastq_fastqc_umitools_fastp"], + "patch": "modules/nf-core/fastqc/fastqc.diff" }, "fq/subsample": { "branch": "master", @@ -42,7 +45,7 @@ }, "gffread": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", + "git_sha": "4ab13872435962dadc239979554d13709e20bf29", "installed_by": ["modules"] }, "gunzip": { @@ -88,7 +91,8 @@ "qualimap/rnaseq": { "branch": "master", "git_sha": "4657d98bc9f565e067c4d924126ce107056f5e2f", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/qualimap/rnaseq/qualimap-rnaseq.diff" }, "rsem/calculateexpression": { "branch": "master", @@ -103,42 +107,50 @@ "rseqc/bamstat": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/bamstat/rseqc-bamstat.diff" }, "rseqc/inferexperiment": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/inferexperiment/rseqc-inferexperiment.diff" }, "rseqc/innerdistance": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/innerdistance/rseqc-innerdistance.diff" }, "rseqc/junctionannotation": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/junctionannotation/rseqc-junctionannotation.diff" }, "rseqc/junctionsaturation": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/junctionsaturation/rseqc-junctionsaturation.diff" }, "rseqc/readdistribution": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/readdistribution/rseqc-readdistribution.diff" }, "rseqc/readduplication": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/readduplication/rseqc-readduplication.diff" }, "rseqc/tin": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["bam_rseqc"] + "installed_by": ["bam_rseqc"], + "patch": "modules/nf-core/rseqc/tin/rseqc-tin.diff" }, "salmon/index": { "branch": "master", @@ -222,12 +234,14 @@ "umitools/dedup": { "branch": "master", "git_sha": "7297204bf49273300a3dbfa4b7a4027c8683f1bd", - "installed_by": ["bam_dedup_stats_samtools_umitools"] + "installed_by": ["bam_dedup_stats_samtools_umitools"], + "patch": "modules/nf-core/umitools/dedup/umitools-dedup.diff" }, "umitools/extract": { "branch": "master", "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["fastq_fastqc_umitools_fastp", "fastq_fastqc_umitools_trimgalore"] + "installed_by": ["fastq_fastqc_umitools_fastp", "fastq_fastqc_umitools_trimgalore"], + "patch": "modules/nf-core/umitools/extract/umitools-extract.diff" }, "untar": { "branch": "master", diff --git a/modules/local/multiqc/main.nf b/modules/local/multiqc/main.nf index a59d8a533..be0dfe2c3 100644 --- a/modules/local/multiqc/main.nf +++ b/modules/local/multiqc/main.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_medium' - conda "bioconda::multiqc=1.17" + conda "bioconda::multiqc=1.19" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.17--pyhdfd78af_1' : - 'biocontainers/multiqc:1.17--pyhdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.19--pyhdfd78af_0' : + 'biocontainers/multiqc:1.19--pyhdfd78af_0' }" input: path multiqc_config diff --git a/modules/local/umitools_prepareforrsem/main.nf b/modules/local/umitools_prepareforrsem/main.nf index 9ee41737d..d3c2bd2c2 100644 --- a/modules/local/umitools_prepareforrsem/main.nf +++ b/modules/local/umitools_prepareforrsem/main.nf @@ -30,7 +30,7 @@ process UMITOOLS_PREPAREFORRSEM { cat <<-END_VERSIONS > versions.yml "${task.process}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') + umitools: \$(umi_tools --version | sed 's/^.*UMI-tools version://; s/ *\$//') END_VERSIONS """ } diff --git a/modules/nf-core/custom/dumpsoftwareversions/custom-dumpsoftwareversions.diff b/modules/nf-core/custom/dumpsoftwareversions/custom-dumpsoftwareversions.diff new file mode 100644 index 000000000..2ec89807d --- /dev/null +++ b/modules/nf-core/custom/dumpsoftwareversions/custom-dumpsoftwareversions.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/custom/dumpsoftwareversions' +--- modules/nf-core/custom/dumpsoftwareversions/main.nf ++++ modules/nf-core/custom/dumpsoftwareversions/main.nf +@@ -2,10 +2,10 @@ + label 'process_single' + + // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container +- conda "${moduleDir}/environment.yml" ++ conda "bioconda::multiqc=1.19" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/multiqc:1.17--pyhdfd78af_0' : +- 'biocontainers/multiqc:1.17--pyhdfd78af_0' }" ++ 'https://depot.galaxyproject.org/singularity/multiqc:1.19--pyhdfd78af_0' : ++ 'biocontainers/multiqc:1.19--pyhdfd78af_0' }" + + input: + path versions + +************************************************************ diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 7685b33cd..b2dcf480e 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,10 +2,10 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "${moduleDir}/environment.yml" + conda "bioconda::multiqc=1.19" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.17--pyhdfd78af_0' : - 'biocontainers/multiqc:1.17--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.19--pyhdfd78af_0' : + 'biocontainers/multiqc:1.19--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/fastp/fastp.diff b/modules/nf-core/fastp/fastp.diff new file mode 100644 index 000000000..b50d8e387 --- /dev/null +++ b/modules/nf-core/fastp/fastp.diff @@ -0,0 +1,32 @@ +Changes in module 'nf-core/fastp' +--- modules/nf-core/fastp/main.nf ++++ modules/nf-core/fastp/main.nf +@@ -45,7 +45,7 @@ + $adapter_list \\ + $fail_fastq \\ + $args \\ +- 2> ${prefix}.fastp.log \\ ++ 2> >(tee ${prefix}.fastp.log >&2) \\ + | gzip -c > ${prefix}.fastp.fastq.gz + + cat <<-END_VERSIONS > versions.yml +@@ -66,7 +66,7 @@ + $adapter_list \\ + $fail_fastq \\ + $args \\ +- 2> ${prefix}.fastp.log ++ 2> >(tee ${prefix}.fastp.log >&2) + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +@@ -91,7 +91,7 @@ + --thread $task.cpus \\ + --detect_adapter_for_pe \\ + $args \\ +- 2> ${prefix}.fastp.log ++ 2> >(tee ${prefix}.fastp.log >&2) + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + +************************************************************ diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index 831b7f128..8cade07f0 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -45,7 +45,7 @@ process FASTP { $adapter_list \\ $fail_fastq \\ $args \\ - 2> ${prefix}.fastp.log \\ + 2> >(tee ${prefix}.fastp.log >&2) \\ | gzip -c > ${prefix}.fastp.fastq.gz cat <<-END_VERSIONS > versions.yml @@ -66,7 +66,7 @@ process FASTP { $adapter_list \\ $fail_fastq \\ $args \\ - 2> ${prefix}.fastp.log + 2> >(tee ${prefix}.fastp.log >&2) cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -91,7 +91,7 @@ process FASTP { --thread $task.cpus \\ --detect_adapter_for_pe \\ $args \\ - 2> ${prefix}.fastp.log + 2> >(tee ${prefix}.fastp.log >&2) cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastqc/fastqc.diff b/modules/nf-core/fastqc/fastqc.diff new file mode 100644 index 000000000..0518d2b8f --- /dev/null +++ b/modules/nf-core/fastqc/fastqc.diff @@ -0,0 +1,23 @@ +Changes in module 'nf-core/fastqc' +--- modules/nf-core/fastqc/main.nf ++++ modules/nf-core/fastqc/main.nf +@@ -37,7 +37,7 @@ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +- fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) ++ fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) + END_VERSIONS + """ + +@@ -49,7 +49,7 @@ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +- fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) ++ fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) + END_VERSIONS + """ + } + +************************************************************ diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 67209f793..c9f64702b 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -37,7 +37,7 @@ process FASTQC { cat <<-END_VERSIONS > versions.yml "${task.process}": - fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) + fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) END_VERSIONS """ @@ -49,7 +49,7 @@ process FASTQC { cat <<-END_VERSIONS > versions.yml "${task.process}": - fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) + fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) END_VERSIONS """ } diff --git a/modules/nf-core/gffread/main.nf b/modules/nf-core/gffread/main.nf index f4472b0e8..68f8045b5 100644 --- a/modules/nf-core/gffread/main.nf +++ b/modules/nf-core/gffread/main.nf @@ -2,7 +2,7 @@ process GFFREAD { tag "$gff" label 'process_low' - conda "bioconda::gffread=0.12.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/gffread:0.12.1--h8b12597_0' : 'biocontainers/gffread:0.12.1--h8b12597_0' }" diff --git a/modules/nf-core/gffread/meta.yml b/modules/nf-core/gffread/meta.yml index 203357477..f486f8bb5 100644 --- a/modules/nf-core/gffread/meta.yml +++ b/modules/nf-core/gffread/meta.yml @@ -12,13 +12,11 @@ tools: tool_dev_url: https://github.com/gpertea/gffread doi: 10.12688/f1000research.23297.1 licence: ["MIT"] - input: - gff: type: file description: A reference file in either the GFF3, GFF2 or GTF format. pattern: "*.{gff, gtf}" - output: - gtf: type: file @@ -28,6 +26,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@emiller88" +maintainers: + - "@emiller88" diff --git a/modules/nf-core/qualimap/rnaseq/main.nf b/modules/nf-core/qualimap/rnaseq/main.nf index 044c983fc..b8a370973 100644 --- a/modules/nf-core/qualimap/rnaseq/main.nf +++ b/modules/nf-core/qualimap/rnaseq/main.nf @@ -2,10 +2,10 @@ process QUALIMAP_RNASEQ { tag "$meta.id" label 'process_medium' - conda "bioconda::qualimap=2.2.2d" + conda "bioconda::qualimap=2.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/qualimap:2.2.2d--1' : - 'biocontainers/qualimap:2.2.2d--1' }" + 'https://depot.galaxyproject.org/singularity/qualimap:2.3--hdfd78af_0' : + 'biocontainers/qualimap:2.3--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/qualimap/rnaseq/qualimap-rnaseq.diff b/modules/nf-core/qualimap/rnaseq/qualimap-rnaseq.diff new file mode 100644 index 000000000..48f498081 --- /dev/null +++ b/modules/nf-core/qualimap/rnaseq/qualimap-rnaseq.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/qualimap/rnaseq' +--- modules/nf-core/qualimap/rnaseq/main.nf ++++ modules/nf-core/qualimap/rnaseq/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::qualimap=2.2.2d" ++ conda "bioconda::qualimap=2.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/qualimap:2.2.2d--1' : +- 'biocontainers/qualimap:2.2.2d--1' }" ++ 'https://depot.galaxyproject.org/singularity/qualimap:2.3--hdfd78af_0' : ++ 'biocontainers/qualimap:2.3--hdfd78af_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/bamstat/main.nf b/modules/nf-core/rseqc/bamstat/main.nf index 04c1eefd0..66c9a7451 100644 --- a/modules/nf-core/rseqc/bamstat/main.nf +++ b/modules/nf-core/rseqc/bamstat/main.nf @@ -2,10 +2,10 @@ process RSEQC_BAMSTAT { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/bamstat/rseqc-bamstat.diff b/modules/nf-core/rseqc/bamstat/rseqc-bamstat.diff new file mode 100644 index 000000000..a8ee45a91 --- /dev/null +++ b/modules/nf-core/rseqc/bamstat/rseqc-bamstat.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/bamstat' +--- modules/nf-core/rseqc/bamstat/main.nf ++++ modules/nf-core/rseqc/bamstat/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/inferexperiment/main.nf b/modules/nf-core/rseqc/inferexperiment/main.nf index 5f9f4b111..df24d7262 100644 --- a/modules/nf-core/rseqc/inferexperiment/main.nf +++ b/modules/nf-core/rseqc/inferexperiment/main.nf @@ -2,10 +2,10 @@ process RSEQC_INFEREXPERIMENT { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/inferexperiment/rseqc-inferexperiment.diff b/modules/nf-core/rseqc/inferexperiment/rseqc-inferexperiment.diff new file mode 100644 index 000000000..728b4799f --- /dev/null +++ b/modules/nf-core/rseqc/inferexperiment/rseqc-inferexperiment.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/inferexperiment' +--- modules/nf-core/rseqc/inferexperiment/main.nf ++++ modules/nf-core/rseqc/inferexperiment/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/innerdistance/main.nf b/modules/nf-core/rseqc/innerdistance/main.nf index a63a2bf03..b84115cee 100644 --- a/modules/nf-core/rseqc/innerdistance/main.nf +++ b/modules/nf-core/rseqc/innerdistance/main.nf @@ -2,10 +2,10 @@ process RSEQC_INNERDISTANCE { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/innerdistance/rseqc-innerdistance.diff b/modules/nf-core/rseqc/innerdistance/rseqc-innerdistance.diff new file mode 100644 index 000000000..dc760c5da --- /dev/null +++ b/modules/nf-core/rseqc/innerdistance/rseqc-innerdistance.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/innerdistance' +--- modules/nf-core/rseqc/innerdistance/main.nf ++++ modules/nf-core/rseqc/innerdistance/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/junctionannotation/main.nf b/modules/nf-core/rseqc/junctionannotation/main.nf index 4029ac765..9f9c96725 100644 --- a/modules/nf-core/rseqc/junctionannotation/main.nf +++ b/modules/nf-core/rseqc/junctionannotation/main.nf @@ -2,10 +2,10 @@ process RSEQC_JUNCTIONANNOTATION { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/junctionannotation/rseqc-junctionannotation.diff b/modules/nf-core/rseqc/junctionannotation/rseqc-junctionannotation.diff new file mode 100644 index 000000000..b210db990 --- /dev/null +++ b/modules/nf-core/rseqc/junctionannotation/rseqc-junctionannotation.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/junctionannotation' +--- modules/nf-core/rseqc/junctionannotation/main.nf ++++ modules/nf-core/rseqc/junctionannotation/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/junctionsaturation/main.nf b/modules/nf-core/rseqc/junctionsaturation/main.nf index 93cc61b23..f99049c0d 100644 --- a/modules/nf-core/rseqc/junctionsaturation/main.nf +++ b/modules/nf-core/rseqc/junctionsaturation/main.nf @@ -2,10 +2,10 @@ process RSEQC_JUNCTIONSATURATION { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/junctionsaturation/rseqc-junctionsaturation.diff b/modules/nf-core/rseqc/junctionsaturation/rseqc-junctionsaturation.diff new file mode 100644 index 000000000..663340cf6 --- /dev/null +++ b/modules/nf-core/rseqc/junctionsaturation/rseqc-junctionsaturation.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/junctionsaturation' +--- modules/nf-core/rseqc/junctionsaturation/main.nf ++++ modules/nf-core/rseqc/junctionsaturation/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/readdistribution/main.nf b/modules/nf-core/rseqc/readdistribution/main.nf index f3e588d69..3bf42d1e3 100644 --- a/modules/nf-core/rseqc/readdistribution/main.nf +++ b/modules/nf-core/rseqc/readdistribution/main.nf @@ -2,10 +2,10 @@ process RSEQC_READDISTRIBUTION { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/readdistribution/rseqc-readdistribution.diff b/modules/nf-core/rseqc/readdistribution/rseqc-readdistribution.diff new file mode 100644 index 000000000..4219e2ac3 --- /dev/null +++ b/modules/nf-core/rseqc/readdistribution/rseqc-readdistribution.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/readdistribution' +--- modules/nf-core/rseqc/readdistribution/main.nf ++++ modules/nf-core/rseqc/readdistribution/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/readduplication/main.nf b/modules/nf-core/rseqc/readduplication/main.nf index 023118536..d83547205 100644 --- a/modules/nf-core/rseqc/readduplication/main.nf +++ b/modules/nf-core/rseqc/readduplication/main.nf @@ -2,10 +2,10 @@ process RSEQC_READDUPLICATION { tag "$meta.id" label 'process_medium' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/rseqc/readduplication/rseqc-readduplication.diff b/modules/nf-core/rseqc/readduplication/rseqc-readduplication.diff new file mode 100644 index 000000000..748685c0b --- /dev/null +++ b/modules/nf-core/rseqc/readduplication/rseqc-readduplication.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/readduplication' +--- modules/nf-core/rseqc/readduplication/main.nf ++++ modules/nf-core/rseqc/readduplication/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_medium' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam) + +************************************************************ diff --git a/modules/nf-core/rseqc/tin/main.nf b/modules/nf-core/rseqc/tin/main.nf index 872938b62..38f1c1757 100644 --- a/modules/nf-core/rseqc/tin/main.nf +++ b/modules/nf-core/rseqc/tin/main.nf @@ -2,10 +2,10 @@ process RSEQC_TIN { tag "$meta.id" label 'process_high' - conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" + conda "bioconda::rseqc=5.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : - 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" + 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : + 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/rseqc/tin/rseqc-tin.diff b/modules/nf-core/rseqc/tin/rseqc-tin.diff new file mode 100644 index 000000000..aa4727128 --- /dev/null +++ b/modules/nf-core/rseqc/tin/rseqc-tin.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/rseqc/tin' +--- modules/nf-core/rseqc/tin/main.nf ++++ modules/nf-core/rseqc/tin/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_high' + +- conda "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" ++ conda "bioconda::rseqc=5.0.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1' : +- 'biocontainers/rseqc:3.0.1--py37h516909a_1' }" ++ 'https://depot.galaxyproject.org/singularity/rseqc:5.0.3--py39hf95cd2a_0' : ++ 'biocontainers/rseqc:5.0.3--py39hf95cd2a_0' }" + + input: + tuple val(meta), path(bam), path(bai) + +************************************************************ diff --git a/modules/nf-core/umitools/dedup/main.nf b/modules/nf-core/umitools/dedup/main.nf index 56ea04691..824ebeeb3 100644 --- a/modules/nf-core/umitools/dedup/main.nf +++ b/modules/nf-core/umitools/dedup/main.nf @@ -42,7 +42,7 @@ process UMITOOLS_DEDUP { cat <<-END_VERSIONS > versions.yml "${task.process}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') + umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) END_VERSIONS """ @@ -56,7 +56,7 @@ process UMITOOLS_DEDUP { cat <<-END_VERSIONS > versions.yml "${task.process}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') + umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) END_VERSIONS """ } diff --git a/modules/nf-core/umitools/dedup/umitools-dedup.diff b/modules/nf-core/umitools/dedup/umitools-dedup.diff new file mode 100644 index 000000000..327583445 --- /dev/null +++ b/modules/nf-core/umitools/dedup/umitools-dedup.diff @@ -0,0 +1,23 @@ +Changes in module 'nf-core/umitools/dedup' +--- modules/nf-core/umitools/dedup/main.nf ++++ modules/nf-core/umitools/dedup/main.nf +@@ -42,7 +42,7 @@ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +- umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') ++ umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) + END_VERSIONS + """ + +@@ -56,7 +56,7 @@ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +- umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') ++ umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) + END_VERSIONS + """ + } + +************************************************************ diff --git a/modules/nf-core/umitools/extract/main.nf b/modules/nf-core/umitools/extract/main.nf index 2f94fa93e..5ffe4eb76 100644 --- a/modules/nf-core/umitools/extract/main.nf +++ b/modules/nf-core/umitools/extract/main.nf @@ -33,7 +33,7 @@ process UMITOOLS_EXTRACT { cat <<-END_VERSIONS > versions.yml "${task.process}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') + umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) END_VERSIONS """ } else { @@ -49,7 +49,7 @@ process UMITOOLS_EXTRACT { cat <<-END_VERSIONS > versions.yml "${task.process}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') + umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) END_VERSIONS """ } diff --git a/modules/nf-core/umitools/extract/umitools-extract.diff b/modules/nf-core/umitools/extract/umitools-extract.diff new file mode 100644 index 000000000..464a23c00 --- /dev/null +++ b/modules/nf-core/umitools/extract/umitools-extract.diff @@ -0,0 +1,23 @@ +Changes in module 'nf-core/umitools/extract' +--- modules/nf-core/umitools/extract/main.nf ++++ modules/nf-core/umitools/extract/main.nf +@@ -33,7 +33,7 @@ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +- umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') ++ umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) + END_VERSIONS + """ + } else { +@@ -49,7 +49,7 @@ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": +- umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') ++ umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) + END_VERSIONS + """ + } + +************************************************************ diff --git a/nextflow.config b/nextflow.config index 89f72ec5b..f4d9f87e2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -59,6 +59,7 @@ params { // Alignment aligner = 'star_salmon' pseudo_aligner = null + pseudo_aligner_kmer_size = 31 seq_center = null bam_csi_index = false star_ignore_sjdbgtf = false @@ -157,6 +158,7 @@ profiles { dumpHashes = true process.beforeScript = 'echo $HOSTNAME' cleanup = false + nextflow.enable.configProcessNamesValidation = true } conda { conda.enabled = true @@ -179,16 +181,16 @@ profiles { } docker { docker.enabled = true - docker.userEmulation = true conda.enabled = false singularity.enabled = false podman.enabled = false shifter.enabled = false charliecloud.enabled = false apptainer.enabled = false + docker.runOptions = '-u $(id -u):$(id -g)' } arm { - docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { singularity.enabled = true @@ -268,7 +270,7 @@ singularity.registry = 'quay.io' // Nextflow plugins plugins { - id 'nf-validation' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-validation@1.1.3' // Validation of pipeline parameters and creation of an input channel from a sample sheet } // Load igenomes.config if required @@ -292,6 +294,9 @@ env { // Capture exit codes from upstream processes when piping process.shell = ['/bin/bash', '-euo', 'pipefail'] +// Disable process selector warnings by default. Use debug profile to enable warnings. +nextflow.enable.configProcessNamesValidation = false + def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') timeline { enabled = true @@ -317,7 +322,7 @@ manifest { description = """RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control.""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '3.13.2' + version = '3.14.0' doi = 'https://doi.org/10.5281/zenodo.1400710' } diff --git a/nextflow_schema.json b/nextflow_schema.json index 60e6585cf..42e4e8967 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -211,8 +211,7 @@ "hidden": true, "help_text": "Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`." } - }, - "required": ["fasta"] + } }, "read_trimming_options": { "title": "Read trimming options", @@ -361,6 +360,13 @@ "fa_icon": "fas fa-hamburger", "enum": ["salmon", "kallisto"] }, + "pseudo_aligner_kmer_size": { + "type": "integer", + "default": 31, + "description": "Kmer length passed to indexing step of pseudoaligners", + "help_text": "Failure to set a good kmer size could cause issues with quantification with Kallisto or Salmon. This is mostly an issue for short reads (<50bp), where the default kmer size of 31 is an problem.", + "fa_icon": "fas fa-ruler-horizontal" + }, "bam_csi_index": { "type": "boolean", "description": "Create a CSI index for BAM files instead of the traditional BAI index. This will be required for genomes with larger chromosome sizes.", diff --git a/workflows/rnaseq.nf b/workflows/rnaseq.nf index f8def2d10..9250125dc 100755 --- a/workflows/rnaseq.nf +++ b/workflows/rnaseq.nf @@ -244,47 +244,6 @@ workflow RNASEQ { .set { ch_cat_fastq } ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first().ifEmpty(null)) - // Branch FastQ channels if 'auto' specified to infer strandedness - ch_cat_fastq - .branch { - meta, fastq -> - auto_strand : meta.strandedness == 'auto' - return [ meta, fastq ] - known_strand: meta.strandedness != 'auto' - return [ meta, fastq ] - } - .set { ch_strand_fastq } - - // - // SUBWORKFLOW: Sub-sample FastQ files and pseudoalign with Salmon to auto-infer strandedness - // - // Return empty channel if ch_strand_fastq.auto_strand is empty so salmon index isn't created - PREPARE_GENOME.out.fasta - .combine(ch_strand_fastq.auto_strand) - .map { it.first() } - .first() - .set { ch_genome_fasta } - - FASTQ_SUBSAMPLE_FQ_SALMON ( - ch_strand_fastq.auto_strand, - ch_genome_fasta, - PREPARE_GENOME.out.transcript_fasta, - PREPARE_GENOME.out.gtf, - PREPARE_GENOME.out.salmon_index, - !params.salmon_index && !('salmon' in prepareToolIndices) - ) - ch_versions = ch_versions.mix(FASTQ_SUBSAMPLE_FQ_SALMON.out.versions) - - FASTQ_SUBSAMPLE_FQ_SALMON - .out - .json_info - .join(ch_strand_fastq.auto_strand) - .map { meta, json, reads -> - return [ meta + [ strandedness: WorkflowRnaseq.getSalmonInferredStrandedness(json) ], reads ] - } - .mix(ch_strand_fastq.known_strand) - .set { ch_strand_inferred_fastq } - // // SUBWORKFLOW: Read QC, extract UMI and trim adapters with TrimGalore! // @@ -295,7 +254,7 @@ workflow RNASEQ { ch_trim_read_count = Channel.empty() if (params.trimmer == 'trimgalore') { FASTQ_FASTQC_UMITOOLS_TRIMGALORE ( - ch_strand_inferred_fastq, + ch_cat_fastq, params.skip_fastqc || params.skip_qc, params.with_umi, params.skip_umi_extract, @@ -316,7 +275,7 @@ workflow RNASEQ { // if (params.trimmer == 'fastp') { FASTQ_FASTQC_UMITOOLS_FASTP ( - ch_strand_inferred_fastq, + ch_cat_fastq, params.skip_fastqc || params.skip_qc, params.with_umi, params.skip_umi_extract, @@ -388,6 +347,50 @@ workflow RNASEQ { ch_sortmerna_multiqc = SORTMERNA.out.log ch_versions = ch_versions.mix(SORTMERNA.out.versions.first()) } + + // + // SUBWORKFLOW: Sub-sample FastQ files and pseudoalign with Salmon to auto-infer strandedness + // + + // Branch FastQ channels if 'auto' specified to infer strandedness + ch_filtered_reads + .branch { + meta, fastq -> + auto_strand : meta.strandedness == 'auto' + return [ meta, fastq ] + known_strand: meta.strandedness != 'auto' + return [ meta, fastq ] + } + .set { ch_strand_fastq } + + // Return empty channel if ch_strand_fastq.auto_strand is empty so salmon index isn't created + PREPARE_GENOME + .out + .fasta + .combine(ch_strand_fastq.auto_strand) + .map { it.first() } + .first() + .set { ch_genome_fasta } + + FASTQ_SUBSAMPLE_FQ_SALMON ( + ch_strand_fastq.auto_strand, + ch_genome_fasta, + PREPARE_GENOME.out.transcript_fasta, + PREPARE_GENOME.out.gtf, + PREPARE_GENOME.out.salmon_index, + !params.salmon_index && !('salmon' in prepareToolIndices) + ) + ch_versions = ch_versions.mix(FASTQ_SUBSAMPLE_FQ_SALMON.out.versions) + + FASTQ_SUBSAMPLE_FQ_SALMON + .out + .json_info + .join(ch_strand_fastq.auto_strand) + .map { meta, json, reads -> + return [ meta + [ strandedness: WorkflowRnaseq.getSalmonInferredStrandedness(json) ], reads ] + } + .mix(ch_strand_fastq.known_strand) + .set { ch_strand_inferred_filtered_fastq } // // SUBWORKFLOW: Alignment with STAR and gene/transcript quantification with Salmon @@ -402,7 +405,7 @@ workflow RNASEQ { ch_aligner_clustering_multiqc = Channel.empty() if (!params.skip_alignment && params.aligner == 'star_salmon') { ALIGN_STAR ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, PREPARE_GENOME.out.star_index.map { [ [:], it ] }, PREPARE_GENOME.out.gtf.map { [ [:], it ] }, params.star_ignore_sjdbgtf, @@ -521,7 +524,7 @@ workflow RNASEQ { ch_rsem_multiqc = Channel.empty() if (!params.skip_alignment && params.aligner == 'star_rsem') { QUANTIFY_RSEM ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, PREPARE_GENOME.out.rsem_index, PREPARE_GENOME.out.fasta.map { [ [:], it ] } ) @@ -555,7 +558,7 @@ workflow RNASEQ { ch_hisat2_multiqc = Channel.empty() if (!params.skip_alignment && params.aligner == 'hisat2') { FASTQ_ALIGN_HISAT2 ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, PREPARE_GENOME.out.hisat2_index.map { [ [:], it ] }, PREPARE_GENOME.out.splicesites.map { [ [:], it ] }, PREPARE_GENOME.out.fasta.map { [ [:], it ] } @@ -826,7 +829,7 @@ workflow RNASEQ { } QUANTIFY_PSEUDO_ALIGNMENT ( - ch_filtered_reads, + ch_strand_inferred_filtered_fastq, ch_pseudo_index, ch_dummy_file, PREPARE_GENOME.out.gtf,