diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ea27a5843a..4ecfbfe335 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,6 +2,7 @@ "name": "nfcore", "image": "nfcore/gitpod:latest", "remoteUser": "gitpod", + "runArgs": ["--privileged"], // Configure tool-specific properties. "customizations": { diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 201dc37670..bc5ca344a3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,7 +9,9 @@ Please use the pre-filled template to save time. However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;) -> If you need help using or modifying nf-core/sarek then the best place to ask is on the nf-core Slack [#sarek](https://nfcore.slack.com/channels/sarek) channel ([join our Slack here](https://nf-co.re/join/slack)). +:::info +If you need help using or modifying nf-core/sarek then the best place to ask is on the nf-core Slack [#sarek](https://nfcore.slack.com/channels/sarek) channel ([join our Slack here](https://nf-co.re/join/slack)). +::: ## Contribution workflow diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index 6ae1c5b8a8..1f2cf7e557 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -48,7 +48,7 @@ jobs: parameters: | { "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", - "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/sarek/results-test-${{ github.sha }}/${{ matrix.profile }}" + "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/sarek/results-${{ github.sha }}/${{ matrix.profile }}" } profiles: ${{ matrix.profile }} diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 888cb4bc35..b8bdd21432 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: "3.8" + python-version: "3.11" architecture: "x64" - name: Install dependencies diff --git a/.github/workflows/release-announcments.yml b/.github/workflows/release-announcments.yml new file mode 100644 index 0000000000..6ad339277f --- /dev/null +++ b/.github/workflows/release-announcments.yml @@ -0,0 +1,68 @@ +name: release-announcements +# Automatic release toot and tweet anouncements +on: + release: + types: [published] + workflow_dispatch: + +jobs: + toot: + runs-on: ubuntu-latest + steps: + - uses: rzr/fediverse-action@master + with: + access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} + host: "mstdn.science" # custom host if not "mastodon.social" (default) + # GitHub event payload + # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release + message: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + + send-tweet: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install tweepy==4.14.0 + - name: Send tweet + shell: python + run: | + import os + import tweepy + + client = tweepy.Client( + access_token=os.getenv("TWITTER_ACCESS_TOKEN"), + access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"), + consumer_key=os.getenv("TWITTER_CONSUMER_KEY"), + consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"), + ) + tweet = os.getenv("TWEET") + client.create_tweet(text=tweet) + env: + TWEET: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + + bsky-post: + runs-on: ubuntu-latest + steps: + - uses: zentered/bluesky-post-action@v0.0.2 + with: + post: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + env: + BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} + BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} + # diff --git a/.nf-core.yml b/.nf-core.yml index c804dc3544..ee325600a3 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -11,4 +11,3 @@ lint: - lib/NfcoreTemplate.groovy - lib/NfcoreSchema.groovy template_strings: False - multiqc_config: False diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d1e2b4338..bda739b522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file. 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.3.2](https://github.com/nf-core/sarek/releases/tag/3.3.2) - Ráhpajávvre + +Ráhpajávvre is the Lule Sámi spelling of Rapaselet. + +### Added + +- [#1246](https://github.com/nf-core/sarek/pull/1246) - Back to dev +- [#1259](https://github.com/nf-core/sarek/pull/1259) - nf-prov plugin + +### Changed + +- [#1248](https://github.com/nf-core/sarek/pull/1248) - Improve annotation-cache docs +- [#1261](https://github.com/nf-core/sarek/pull/1261) - Enable cache for annotation generation when using 'merge' + +### Fixed + +- [#1247](https://github.com/nf-core/sarek/pull/1247) - FIX: Result paths for full size test to be correctly displayed on the website +- [#1256](https://github.com/nf-core/sarek/pull/1256) - Fix issue with controlfreec container declaration +- [#1270](https://github.com/nf-core/sarek/pull/1270) - Revert controlfreec/assesssignificance module to 11.6 + +### Dependencies + +| Dependency | Old version | New version | +| -------------------------------- | ----------- | ----------- | +| Control-FREEC/assesssignificance | 11.6b | 11.6 | + ## [3.3.1](https://github.com/nf-core/sarek/releases/tag/3.3.1) - Biellorippjávrre A lake near the Rapaselet delta. diff --git a/CITATIONS.md b/CITATIONS.md index 062f2cef35..632a65b795 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -66,7 +66,7 @@ - [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) - > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. Available online https://www.bioinformatics.babraham.ac.uk/projects/fastqc/. + > Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. - [FGBio](https://github.com/fulcrumgenomics/fgbio) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f4fd052f1f..c089ec78c4 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,18 +1,20 @@ -# Code of Conduct at nf-core (v1.0) +# Code of Conduct at nf-core (v1.4) ## Our Pledge -In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core, pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: +In the interest of fostering an open, collaborative, and welcoming environment, we as contributors and maintainers of nf-core pledge to making participation in our projects and community a harassment-free experience for everyone, regardless of: - Age +- Ability - Body size +- Caste - Familial status - Gender identity and expression - Geographical location - Level of experience - Nationality and national origins - Native language -- Physical and neurological ability +- Neurodiversity - Race or ethnicity - Religion - Sexual identity and orientation @@ -22,80 +24,133 @@ Please note that the list above is alphabetised and is therefore not ranked in a ## Preamble -> Note: This Code of Conduct (CoC) has been drafted by the nf-core Safety Officer and been edited after input from members of the nf-core team and others. "We", in this document, refers to the Safety Officer and members of the nf-core core team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will amended periodically to keep it up-to-date, and in case of any dispute, the most current version will apply. +:::note +This Code of Conduct (CoC) has been drafted by Renuka Kudva, Cris Tuñí, and Michael Heuer, with input from the nf-core Core Team and Susanna Marquez from the nf-core community. "We", in this document, refers to the Safety Officers and members of the nf-core Core Team, both of whom are deemed to be members of the nf-core community and are therefore required to abide by this Code of Conduct. This document will be amended periodically to keep it up-to-date. In case of any dispute, the most current version will apply. +::: -An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). Our current safety officer is Renuka Kudva. +An up-to-date list of members of the nf-core core team can be found [here](https://nf-co.re/about). + +Our Safety Officers are Saba Nafees, Cris Tuñí, and Michael Heuer. nf-core is a young and growing community that welcomes contributions from anyone with a shared vision for [Open Science Policies](https://www.fosteropenscience.eu/taxonomy/term/8). Open science policies encompass inclusive behaviours and we strive to build and maintain a safe and inclusive environment for all individuals. -We have therefore adopted this code of conduct (CoC), which we require all members of our community and attendees in nf-core events to adhere to in all our workspaces at all times. Workspaces include but are not limited to Slack, meetings on Zoom, Jitsi, YouTube live etc. +We have therefore adopted this CoC, which we require all members of our community and attendees of nf-core events to adhere to in all our workspaces at all times. Workspaces include, but are not limited to, Slack, meetings on Zoom, gather.town, YouTube live etc. -Our CoC will be strictly enforced and the nf-core team reserve the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. +Our CoC will be strictly enforced and the nf-core team reserves the right to exclude participants who do not comply with our guidelines from our workspaces and future nf-core activities. -We ask all members of our community to help maintain a supportive and productive workspace and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. +We ask all members of our community to help maintain supportive and productive workspaces and to avoid behaviours that can make individuals feel unsafe or unwelcome. Please help us maintain and uphold this CoC. -Questions, concerns or ideas on what we can include? Contact safety [at] nf-co [dot] re +Questions, concerns, or ideas on what we can include? Contact members of the Safety Team on Slack or email safety [at] nf-co [dot] re. ## Our Responsibilities -The safety officer is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. +Members of the Safety Team (the Safety Officers) are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. -The safety officer in consultation with the nf-core core team have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +The Safety Team, in consultation with the nf-core core team, have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this CoC, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -Members of the core team or the safety officer who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and be subject to the same actions as others in violation of the CoC. +Members of the core team or the Safety Team who violate the CoC will be required to recuse themselves pending investigation. They will not have access to any reports of the violations and will be subject to the same actions as others in violation of the CoC. -## When are where does this Code of Conduct apply? +## When and where does this Code of Conduct apply? -Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events. This includes but is not limited to the following listed alphabetically and therefore in no order of preference: +Participation in the nf-core community is contingent on following these guidelines in all our workspaces and events, such as hackathons, workshops, bytesize, and collaborative workspaces on gather.town. These guidelines include, but are not limited to, the following (listed alphabetically and therefore in no order of preference): - Communicating with an official project email address. - Communicating with community members within the nf-core Slack channel. - Participating in hackathons organised by nf-core (both online and in-person events). -- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence. -- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, Jitsi, YouTube live etc. +- Participating in collaborative work on GitHub, Google Suite, community calls, mentorship meetings, email correspondence, and on the nf-core gather.town workspace. +- Participating in workshops, training, and seminar series organised by nf-core (both online and in-person events). This applies to events hosted on web-based platforms such as Zoom, gather.town, Jitsi, YouTube live etc. - Representing nf-core on social media. This includes both official and personal accounts. ## nf-core cares 😊 -nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include but are not limited to the following (listed in alphabetical order): +nf-core's CoC and expectations of respectful behaviours for all participants (including organisers and the nf-core team) include, but are not limited to, the following (listed in alphabetical order): - Ask for consent before sharing another community member’s personal information (including photographs) on social media. - Be respectful of differing viewpoints and experiences. We are all here to learn from one another and a difference in opinion can present a good learning opportunity. -- Celebrate your accomplishments at events! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) +- Celebrate your accomplishments! (Get creative with your use of emojis 🎉 🥳 💯 🙌 !) - Demonstrate empathy towards other community members. (We don’t all have the same amount of time to dedicate to nf-core. If tasks are pending, don’t hesitate to gently remind members of your team. If you are leading a task, ask for help if you feel overwhelmed.) - Engage with and enquire after others. (This is especially important given the geographically remote nature of the nf-core community, so let’s do this the best we can) - Focus on what is best for the team and the community. (When in doubt, ask) -- Graciously accept constructive criticism, yet be unafraid to question, deliberate, and learn. +- Accept feedback, yet be unafraid to question, deliberate, and learn. - Introduce yourself to members of the community. (We’ve all been outsiders and we know that talking to strangers can be hard for some, but remember we’re interested in getting to know you and your visions for open science!) -- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communications to be kind.**) +- Show appreciation and **provide clear feedback**. (This is especially important because we don’t see each other in person and it can be harder to interpret subtleties. Also remember that not everyone understands a certain language to the same extent as you do, so **be clear in your communication to be kind.**) - Take breaks when you feel like you need them. -- Using welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack.) +- Use welcoming and inclusive language. (Participants are encouraged to display their chosen pronouns on Zoom or in communication on Slack) ## nf-core frowns on 😕 -The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this code of conduct. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces. +The following behaviours from any participants within the nf-core community (including the organisers) will be considered unacceptable under this CoC. Engaging or advocating for any of the following could result in expulsion from nf-core workspaces: - Deliberate intimidation, stalking or following and sustained disruption of communication among participants of the community. This includes hijacking shared screens through actions such as using the annotate tool in conferencing software such as Zoom. - “Doxing” i.e. posting (or threatening to post) another person’s personal identifying information online. - Spamming or trolling of individuals on social media. -- Use of sexual or discriminatory imagery, comments, or jokes and unwelcome sexual attention. -- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion or work experience. +- Use of sexual or discriminatory imagery, comments, jokes, or unwelcome sexual attention. +- Verbal and text comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, religion, or work experience. ### Online Trolling -The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the added issue of online trolling. This is unacceptable, reports of such behaviour will be taken very seriously, and perpetrators will be excluded from activities immediately. +The majority of nf-core interactions and events are held online. Unfortunately, holding events online comes with the risk of online trolling. This is unacceptable — reports of such behaviour will be taken very seriously and perpetrators will be excluded from activities immediately. -All community members are required to ask members of the group they are working within for explicit consent prior to taking screenshots of individuals during video calls. +All community members are **required** to ask members of the group they are working with for explicit consent prior to taking screenshots of individuals during video calls. -## Procedures for Reporting CoC violations +## Procedures for reporting CoC violations If someone makes you feel uncomfortable through their behaviours or actions, report it as soon as possible. -You can reach out to members of the [nf-core core team](https://nf-co.re/about) and they will forward your concerns to the safety officer(s). +You can reach out to members of the Safety Team (Saba Nafees, Cris Tuñí, and Michael Heuer) on Slack. Alternatively, contact a member of the nf-core core team [nf-core core team](https://nf-co.re/about), and they will forward your concerns to the Safety Team. + +Issues directly concerning members of the Core Team or the Safety Team will be dealt with by other members of the core team and the safety manager — possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson and details will be shared in due course. + +All reports will be handled with the utmost discretion and confidentiality. + +You can also report any CoC violations to safety [at] nf-co [dot] re. In your email report, please do your best to include: + +- Your contact information. +- Identifying information (e.g. names, nicknames, pseudonyms) of the participant who has violated the Code of Conduct. +- The behaviour that was in violation and the circumstances surrounding the incident. +- The approximate time of the behaviour (if different than the time the report was made). +- Other people involved in the incident, if applicable. +- If you believe the incident is ongoing. +- If there is a publicly available record (e.g. mailing list record, a screenshot). +- Any additional information. + +After you file a report, one or more members of our Safety Team will contact you to follow up on your report. + +## Who will read and handle reports + +All reports will be read and handled by the members of the Safety Team at nf-core. + +If members of the Safety Team are deemed to have a conflict of interest with a report, they will be required to recuse themselves as per our Code of Conduct and will not have access to any follow-ups. + +To keep this first report confidential from any of the Safety Team members, please submit your first report by direct messaging on Slack/direct email to any of the nf-core members you are comfortable disclosing the information to, and be explicit about which member(s) you do not consent to sharing the information with. + +## Reviewing reports + +After receiving the report, members of the Safety Team will review the incident report to determine whether immediate action is required, for example, whether there is immediate threat to participants’ safety. + +The Safety Team, in consultation with members of the nf-core core team, will assess the information to determine whether the report constitutes a Code of Conduct violation, for them to decide on a course of action. + +In the case of insufficient information, one or more members of the Safety Team may contact the reporter, the reportee, or any other attendees to obtain more information. -Issues directly concerning members of the core team will be dealt with by other members of the core team and the safety manager, and possible conflicts of interest will be taken into account. nf-core is also in discussions about having an ombudsperson, and details will be shared in due course. +Once additional information is gathered, the Safety Team will collectively review and decide on the best course of action to take, if any. The Safety Team reserves the right to not act on a report. -All reports will be handled with utmost discretion and confidentially. +## Confidentiality + +All reports, and any additional information included, are only shared with the team of safety officers (and possibly members of the core team, in case the safety officer is in violation of the CoC). We will respect confidentiality requests for the purpose of protecting victims of abuse. + +We will not name harassment victims, beyond discussions between the safety officer and members of the nf-core team, without the explicit consent of the individuals involved. + +## Enforcement + +Actions taken by the nf-core’s Safety Team may include, but are not limited to: + +- Asking anyone to stop a behaviour. +- Asking anyone to leave the event and online spaces either temporarily, for the remainder of the event, or permanently. +- Removing access to the gather.town and Slack, either temporarily or permanently. +- Communicating to all participants to reinforce our expectations for conduct and remind what is unacceptable behaviour; this may be public for practical reasons. +- Communicating to all participants that an incident has taken place and how we will act or have acted — this may be for the purpose of letting event participants know we are aware of and dealing with the incident. +- Banning anyone from participating in nf-core-managed spaces, future events, and activities, either temporarily or permanently. +- No action. ## Attribution and Acknowledgements @@ -106,6 +161,22 @@ All reports will be handled with utmost discretion and confidentially. ## Changelog -### v1.0 - March 12th, 2021 +### v1.4 - February 8th, 2022 + +- Included a new member of the Safety Team. Corrected a typographical error in the text. + +### v1.3 - December 10th, 2021 + +- Added a statement that the CoC applies to nf-core gather.town workspaces. Corrected typographical errors in the text. + +### v1.2 - November 12th, 2021 + +- Removed information specific to reporting CoC violations at the Hackathon in October 2021. + +### v1.1 - October 14th, 2021 + +- Updated with names of new Safety Officers and specific information for the hackathon in October 2021. + +### v1.0 - March 15th, 2021 - Complete rewrite from original [Contributor Covenant](http://contributor-covenant.org/) CoC. diff --git a/README.md b/README.md index 1a81ac2cbc..8c1ef5d130 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # ![nf-core/sarek](docs/images/nf-core-sarek_logo_light.png#gh-light-mode-only) ![nf-core/sarek](docs/images/nf-core-sarek_logo_dark.png#gh-dark-mode-only) -> **An open-source analysis pipeline to detect germline or somatic variants from whole genome or targeted sequencing** - [![GitHub Actions CI Status](https://github.com/nf-core/sarek/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/sarek/actions?query=workflow%3A%22nf-core+CI%22) [![GitHub Actions Linting Status](https://github.com/nf-core/sarek/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/sarek/actions?query=workflow%3A%22nf-core+linting%22) [![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/sarek/results) @@ -61,10 +59,11 @@ Depending on the options and samples provided, the pipeline can currently perfor ## 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: @@ -86,14 +85,11 @@ nextflow run nf-core/sarek \ --outdir ``` -See [usage docs](https://nf-co.re/sarek/usage) for all of the available options when running the pipeline. - -## Documentation - -> **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/sarek/usage) and the [parameter documentation](https://nf-co.re/sarek/parameters). diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 6a75b8ce7e..862e4dbafd 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -3,9 +3,9 @@ custom_logo_url: https://github.com/nf-core/sarek/ custom_logo_title: "nf-core/sarek" report_comment: > - This report has been generated by the nf-core/sarek + This report has been generated by the nf-core/sarek analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-sarek-methods-description": order: -1000 diff --git a/docs/output.md b/docs/output.md index 9f90bac28c..b250ed2817 100644 --- a/docs/output.md +++ b/docs/output.md @@ -10,30 +10,35 @@ The directories listed below will be created in the results directory after the The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes data using the following steps: +- [Directory Structure](#directory-structure) - [Preprocessing](#preprocessing) - - [Prepare input files](#preparation-of-input-files-fastq-or-ubam) + - [Preparation of input files (FastQ or (u)BAM)](#preparation-of-input-files-fastq-or-ubam) - [Trim adapters](#trim-adapters) - [Split FastQ files](#split-fastq-files) + - [UMI consensus](#umi-consensus) - [Map to Reference](#map-to-reference) - [BWA](#bwa) - [BWA-mem2](#bwa-mem2) - [DragMap](#dragmap) - - [Sentieon bwa mem](#sentieon-bwa-mem) - - [Duplicate Marking](#mark-duplicates) + - [Sentieon BWA mem](#sentieon-bwa-mem) + - [Mark Duplicates](#mark-duplicates) - [GATK MarkDuplicates (Spark)](#gatk-markduplicates-spark) - - [Sentieon LocusCollector and Dedup](#sentieon-locuscollector-dedup) + - [Sentieon LocusCollector and Dedup](#sentieon-locuscollector-and-dedup) - [Base Quality Score Recalibration](#base-quality-score-recalibration) - [GATK BaseRecalibrator (Spark)](#gatk-baserecalibrator-spark) - [GATK ApplyBQSR (Spark)](#gatk-applybqsr-spark) - [CSV files](#csv-files) - [Variant Calling](#variant-calling) - [SNVs and small indels](#snvs-and-small-indels) + - [bcftools](#bcftools) - [DeepVariant](#deepvariant) - [FreeBayes](#freebayes) - [GATK HaplotypeCaller](#gatk-haplotypecaller) - - [Sentieon Haplotyper](#sentieon-haplotyper) + - [GATK Germline Single Sample Variant Calling](#gatk-germline-single-sample-variant-calling) + - [GATK Joint Germline Variant Calling](#gatk-joint-germline-variant-calling) - [GATK Mutect2](#gatk-mutect2) - - [bcftools](#bcftools) + - [Sentieon Haplotyper](#sentieon-haplotyper) + - [Sentieon Joint Germline Variant Calling](#sentieon-joint-germline-variant-calling) - [Strelka2](#strelka2) - [Structural Variants](#structural-variants) - [Manta](#manta) @@ -42,22 +47,22 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d - [ASCAT](#ascat) - [CNVKit](#cnvkit) - [Control-FREEC](#control-freec) - - [MSI status](#msi-status) + - [Microsatellite instability (MSI)](#microsatellite-instability-msi) - [MSIsensorPro](#msisensorpro) - - [Concatenation](#concatentation) + - [Concatenation](#concatenation) - [Variant annotation](#variant-annotation) - [snpEff](#snpeff) - [VEP](#vep) -- [Quality control and reporting](#qc-and-reporting) +- [Quality control and reporting](#quality-control-and-reporting) - [Quality control](#quality-control) - [FastQC](#fastqc) - [FastP](#fastp) + - [Mosdepth](#mosdepth) - [GATK MarkDuplicates reports](#gatk-markduplicates-reports) - [Sentieon Dedup reports](#sentieon-dedup-reports) - - [mosdepth](#mosdepth) - [samtools stats](#samtools-stats) - [bcftools stats](#bcftools-stats) - - [vcftools](#vcftools) + - [VCFtools](#vcftools) - [snpEff reports](#snpeff-reports) - [VEP reports](#vep-reports) - [Reporting](#reporting) @@ -762,7 +767,7 @@ It requires a normal sample for each tumour to differentiate the somatic and ger - Germline sites detected. -### Concatentation +### Concatenation Germline VCFs from `DeepVariant`, `FreeBayes`, `HaplotypeCaller`, `Haplotyper`, `Manta`, `bcftools mpileup`, `Strelka2`, or `Tiddit` are concatenated with `bcftools concat`. The field `SOURCE` is added to the VCF header to report the variant caller. @@ -853,6 +858,9 @@ The plots display:
Output files for all samples +:::note +The FastQC plots displayed in the MultiQC report shows _untrimmed_ reads. They may contain adapter sequence and potentially regions with low quality. +::: **Output directory: `{outdir}/reports/fastqc/`** - `_fastqc.html` and `_fastqc.html` @@ -1072,6 +1080,7 @@ Results generated by MultiQC collect pipeline QC from supported tools e.g. FastQ - Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`. - Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline. - Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`. + - Parameters used by the pipeline run: `params.json`.
diff --git a/docs/usage.md b/docs/usage.md index 63e338c3c6..0895fac23c 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -37,7 +37,9 @@ If you wish to repeatedly use the same parameters for multiple runs, rather than Pipeline settings can be provided in a `yaml` or `json` file via `-params-file `. -> ⚠️ Do not use `-c ` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args). +:::warning +Do not use `-c ` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args). +::: The above pipeline run specified with a params file in yaml format: @@ -327,11 +329,15 @@ This version number will be logged in reports when you run the pipeline, so that To further assist in reproducbility, you can use share and re-use [parameter files](#running-the-pipeline) to repeat pipeline runs with the same settings without having to write out a command with every single parameter. -> 💡 If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles. +:::tip +If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles. +::: # Core Nextflow arguments -> **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen). +:::note +These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen). +::: ## `-profile` @@ -340,7 +346,9 @@ Profiles can give configuration presets for different compute environments. Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Apptainer, Conda) - see below. -> We highly recommend the use of `Docker` or `Singularity` containers for full pipeline reproducibility, however when this is not possible, `Conda` is also supported. +:::info +We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. +::: The pipeline also dynamically loads configurations from [github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to see if your system is available in these configs please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). @@ -840,17 +848,17 @@ For GATK.GRCh38 the links for each reference file and the corresponding processe ## How to customise SnpEff and VEP annotation -SNPeff and VEP require a large resource of files known as a cache. +SNPeff and VEP both require a large resource of files known as a cache. These are folders composed of multiple gigabytes of files which need to be available for the software to properly function. To use these, supply the parameters `--vep_cache` and/or `--snpeff_cache` with the locations to the root of the annotation cache folder for each tool. ### Specify the cache location Params `--snpeff_cache` and `--vep_cache` are used to specify the locations to the root of the annotation cache folder. -The cache will be located within a subfolder with the path `${vep_species}/${vep_genome}_${vep_cache_version}` for VEP and `${snpeff_species}.${snpeff_version}` for SnpEff. +The cache will be located within a subfolder with the path `${snpeff_species}.${snpeff_version}` for SnpEff and `${vep_species}/${vep_genome}_${vep_cache_version}` for VEP. If this directory is missing, Sarek will raise an error. -For example this is a typical folder structure for GRCh38 and WBCel235, with SNPeff cache version 105 and VEP cache version 110: +For example this is a typical folder structure for `GRCh38` and `WBCel235`, with SNPeff cache version 105 and VEP cache version 110: ```text /data/ @@ -872,20 +880,20 @@ Both SnpEff and VEP will figure out internally the path towards the specific cac By default all is specified in the [igenomes.config](https://github.com/nf-core/sarek/blob/master/conf/igenomes.config) file. Explanation can be found for all params in the documentation: -- [snpeff_db](https://nf-co.re/sarek/latest/parameters#snpeff_db) -- [snpeff_genome](https://nf-co.re/sarek/latest/parameters#snpeff_genome) -- [vep_genome](https://nf-co.re/sarek/latest/parameters#vep_genome) -- [vep_species](https://nf-co.re/sarek/latest/parameters#vep_species) -- [vep_cache_version](https://nf-co.re/sarek/latest/parameters#vep_cache_version) +- [snpeff_db](https://nf-co.re/sarek/parameters#snpeff_db) +- [snpeff_genome](https://nf-co.re/sarek/parameters#snpeff_genome) +- [vep_genome](https://nf-co.re/sarek/parameters#vep_genome) +- [vep_species](https://nf-co.re/sarek/parameters#vep_species) +- [vep_cache_version](https://nf-co.re/sarek/parameters#vep_cache_version) With the previous example of `GRCh38`, these are the values that were used for these params: ```bash snpeff_db = '105' snpeff_genome = 'GRCh38' +vep_cache_version = '110' vep_genome = 'GRCh38' vep_species = 'homo_sapiens' -vep_cache_version = '110' ``` ### Usage recommendation with AWS iGenomes @@ -931,11 +939,11 @@ nextflow run nf-core/sarek \ These params can be specified in a config file or in a profile using the params scope, or even in a json or a yaml file using the `-params-file` nextflow option. Note: we recommend storing each annotation cache in a separate directory so each cache version is handled differently. -This may mean you have many similar directories but will dramatically reduce the storage burden on machines running the VEP or snpEff process. +This may mean you have many similar directories but will dramatically reduce the storage burden on machines running the SnpEff or VEP process. ### Use annotation-cache for SnpEff and VEP -[Annotation-cache](https://github.com/annotation-cache) is an open AWS registry resource that stores a mirror of some cache files on AWS S3 which can be used with Sarek. +[Annotation-cache](https://annotation-cache.github.io) is an open AWS registry resource that stores a mirror of some cache files on AWS S3 which can be used with Sarek. It contains some genome builds which can be found by checking the contents of the S3 bucket. SNPeff and VEP cache are stored at the following location on S3: @@ -954,7 +962,9 @@ aws s3 --no-sign-request ls s3://annotation-cache/vep_cache/ Since both Snpeff and VEP are internally figuring the path towards the specific cache version / species, `annotation-cache` is using an extra set of keys to specify the species and genome build. -So if you are using this resource, please either use the `--use_annotation_cache_keys`, or point towards the specific species, genome and build matches the directory structure within the cache. +So if you are using this resource, please either set `--use_annotation_cache_keys` to use the AWS annotation cache, or point towards your own cache folder structure matching the expected structure. + +Please refer to the [annotation-cache documentation](https://annotation-cache.github.io) for more details. ### Use Sarek to download cache and annotate in one go diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy index 38067765ee..2fdc3c29eb 100755 --- a/lib/NfcoreTemplate.groovy +++ b/lib/NfcoreTemplate.groovy @@ -3,6 +3,7 @@ // import org.yaml.snakeyaml.Yaml +import groovy.json.JsonOutput class NfcoreTemplate { @@ -222,6 +223,21 @@ 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 jsonStr = JsonOutput.toJson(params) + output_pf.text = JsonOutput.prettyPrint(jsonStr) + } + // // Print pipeline summary on completion // diff --git a/lib/WorkflowSarek.groovy b/lib/WorkflowSarek.groovy index 17d5953f12..12f001c251 100755 --- a/lib/WorkflowSarek.groovy +++ b/lib/WorkflowSarek.groovy @@ -52,7 +52,7 @@ class WorkflowSarek { public static String toolCitationText(params) { - // TODO Optionally add in-text citation tools to this list. + // TODO nf-core: Optionally add in-text citation tools to this list. // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "", // Uncomment function in methodsDescriptionText to render in MultiQC report def citation_text = [ diff --git a/modules.json b/modules.json index 1837c6d402..84b30a76dc 100644 --- a/modules.json +++ b/modules.json @@ -77,27 +77,28 @@ }, "controlfreec/assesssignificance": { "branch": "master", - "git_sha": "053564d29a20d45323547973c4023914923823df", - "installed_by": ["modules"] + "git_sha": "3fbcafe2543dabcc7b2be0f3b24507002b3e4b0d", + "installed_by": ["modules"], + "patch": "modules/nf-core/controlfreec/assesssignificance/controlfreec-assesssignificance.diff" }, "controlfreec/freec": { "branch": "master", - "git_sha": "053564d29a20d45323547973c4023914923823df", + "git_sha": "3fbcafe2543dabcc7b2be0f3b24507002b3e4b0d", "installed_by": ["modules"] }, "controlfreec/freec2bed": { "branch": "master", - "git_sha": "053564d29a20d45323547973c4023914923823df", + "git_sha": "3fbcafe2543dabcc7b2be0f3b24507002b3e4b0d", "installed_by": ["modules"] }, "controlfreec/freec2circos": { "branch": "master", - "git_sha": "053564d29a20d45323547973c4023914923823df", + "git_sha": "3fbcafe2543dabcc7b2be0f3b24507002b3e4b0d", "installed_by": ["modules"] }, "controlfreec/makegraph": { "branch": "master", - "git_sha": "053564d29a20d45323547973c4023914923823df", + "git_sha": "3fbcafe2543dabcc7b2be0f3b24507002b3e4b0d", "installed_by": ["modules"], "patch": "modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff" }, diff --git a/modules/nf-core/controlfreec/assesssignificance/controlfreec-assesssignificance.diff b/modules/nf-core/controlfreec/assesssignificance/controlfreec-assesssignificance.diff new file mode 100644 index 0000000000..a80891d309 --- /dev/null +++ b/modules/nf-core/controlfreec/assesssignificance/controlfreec-assesssignificance.diff @@ -0,0 +1,19 @@ +Changes in module 'nf-core/controlfreec/assesssignificance' +--- modules/nf-core/controlfreec/assesssignificance/main.nf ++++ modules/nf-core/controlfreec/assesssignificance/main.nf +@@ -2,10 +2,10 @@ + tag "$meta.id" + label 'process_low' + +- conda "bioconda::control-freec=11.6b" ++ conda "bioconda::control-freec=11.6" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? +- 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : +- 'biocontainers/control-freec:11.6b--hdbdd923_0' }" ++ 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1' : ++ 'biocontainers/control-freec:11.6--h1b792b2_1' }" + + input: + tuple val(meta), path(cnvs), path(ratio) + +************************************************************ diff --git a/modules/nf-core/controlfreec/assesssignificance/main.nf b/modules/nf-core/controlfreec/assesssignificance/main.nf index 5019780964..8c5cd42b41 100644 --- a/modules/nf-core/controlfreec/assesssignificance/main.nf +++ b/modules/nf-core/controlfreec/assesssignificance/main.nf @@ -2,10 +2,10 @@ process CONTROLFREEC_ASSESSSIGNIFICANCE { tag "$meta.id" label 'process_low' - conda "bioconda::control-freec=11.6b" + conda "bioconda::control-freec=11.6" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ': - 'biocontainers/control-freec:11.6b--hdbdd923_0 ' }" + 'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1' : + 'biocontainers/control-freec:11.6--h1b792b2_1' }" input: tuple val(meta), path(cnvs), path(ratio) diff --git a/modules/nf-core/controlfreec/freec/main.nf b/modules/nf-core/controlfreec/freec/main.nf index 7ba83353c9..213ef92927 100644 --- a/modules/nf-core/controlfreec/freec/main.nf +++ b/modules/nf-core/controlfreec/freec/main.nf @@ -4,8 +4,8 @@ process CONTROLFREEC_FREEC { conda "bioconda::control-freec=11.6b" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ': - 'biocontainers/control-freec:11.6b--hdbdd923_0 ' }" + 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : + 'biocontainers/control-freec:11.6b--hdbdd923_0' }" input: tuple val(meta), path(mpileup_normal), path(mpileup_tumor), path(cpn_normal), path(cpn_tumor), path(minipileup_normal), path(minipileup_tumor) diff --git a/modules/nf-core/controlfreec/freec2bed/main.nf b/modules/nf-core/controlfreec/freec2bed/main.nf index 31c35e1d8a..0d5332a2d7 100644 --- a/modules/nf-core/controlfreec/freec2bed/main.nf +++ b/modules/nf-core/controlfreec/freec2bed/main.nf @@ -4,8 +4,8 @@ process CONTROLFREEC_FREEC2BED { conda "bioconda::control-freec=11.6b" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ': - 'biocontainers/control-freec:11.6b--hdbdd923_0 ' }" + 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : + 'biocontainers/control-freec:11.6b--hdbdd923_0' }" input: tuple val(meta), path(ratio) diff --git a/modules/nf-core/controlfreec/freec2circos/main.nf b/modules/nf-core/controlfreec/freec2circos/main.nf index f0a1fb445a..c748af8be7 100644 --- a/modules/nf-core/controlfreec/freec2circos/main.nf +++ b/modules/nf-core/controlfreec/freec2circos/main.nf @@ -4,8 +4,8 @@ process CONTROLFREEC_FREEC2CIRCOS { conda "bioconda::control-freec=11.6b" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ': - 'biocontainers/control-freec:11.6b--hdbdd923_0 ' }" + 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : + 'biocontainers/control-freec:11.6b--hdbdd923_0' }" input: tuple val(meta), path(ratio) diff --git a/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff b/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff index a78c18fa32..13f4208a05 100644 --- a/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff +++ b/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff @@ -1,16 +1,16 @@ Changes in module 'nf-core/controlfreec/makegraph' --- modules/nf-core/controlfreec/makegraph/main.nf +++ modules/nf-core/controlfreec/makegraph/main.nf -@@ -7,7 +7,7 @@ - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ': - 'biocontainers/control-freec:11.6b--hdbdd923_0 ' }" +@@ -8,7 +8,7 @@ + 'biocontainers/control-freec:11.6b--hdbdd923_0' }" + input: - tuple val(meta), path(ratio), path(baf), val(ploidy) + tuple val(meta), path(ratio), path(baf) output: tuple val(meta), path("*_BAF.png") , emit: png_baf -@@ -24,7 +24,7 @@ +@@ -25,7 +25,7 @@ def prefix = task.ext.prefix ?: "${meta.id}" def baf = baf ?: "" """ diff --git a/modules/nf-core/controlfreec/makegraph/main.nf b/modules/nf-core/controlfreec/makegraph/main.nf index f9978bf952..533065c6e4 100644 --- a/modules/nf-core/controlfreec/makegraph/main.nf +++ b/modules/nf-core/controlfreec/makegraph/main.nf @@ -4,8 +4,9 @@ process CONTROLFREEC_MAKEGRAPH { conda "bioconda::control-freec=11.6b" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ': - 'biocontainers/control-freec:11.6b--hdbdd923_0 ' }" + 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : + 'biocontainers/control-freec:11.6b--hdbdd923_0' }" + input: tuple val(meta), path(ratio), path(baf) diff --git a/nextflow.config b/nextflow.config index 8bf4d71e0e..123a58ae90 100644 --- a/nextflow.config +++ b/nextflow.config @@ -129,7 +129,7 @@ params { // Schema validation default options validationFailUnrecognisedParams = false validationLenientMode = true - validationSchemaIgnoreParams = 'genomes,cf_ploidy' + validationSchemaIgnoreParams = 'cf_ploidy,genomes,igenomes_base' validationShowHiddenParams = false validate_params = true } @@ -229,6 +229,7 @@ profiles { } apptainer { apptainer.enabled = true + apptainer.autoMounts = true charliecloud.enabled = false conda.enabled = false docker.enabled = false @@ -237,8 +238,8 @@ profiles { singularity.enabled = false } gitpod { - executor.cpus = 16 - executor.memory = 60.GB + executor.cpus = 4 + executor.memory = 8.GB executor.name = 'local' } // Basic test profile for CI @@ -287,6 +288,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-prov' // Provenance reports for pipeline runs } // Load igenomes.config if required @@ -327,6 +329,10 @@ dag { enabled = true file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html" } +prov { + enabled = true + file = "${params.outdir}/pipeline_info/manifest_${trace_timestamp}.bco.json" +} manifest { name = 'nf-core/sarek' @@ -335,7 +341,7 @@ manifest { description = """An open-source analysis pipeline to detect germline or somatic variants from whole genome or targeted sequencing""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '3.3.1' + version = '3.3.2' doi = '10.12688/f1000research.16665.2, 10.1101/2023.07.19.549462, 10.5281/zenodo.3476425' } diff --git a/nextflow_schema.json b/nextflow_schema.json index 03ae8c15df..51850b6fa9 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -406,16 +406,14 @@ "fa_icon": "fas fa-file", "default": "s3://annotation-cache/vep_cache/", "description": "Path to VEP cache.", - "help_text": "Path to VEP cache which should contain the relevant species, genome and build directories at the path ${vep_species}/${vep_genome}_${vep_cache_version}", - "hidden": true + "help_text": "Path to VEP cache which should contain the relevant species, genome and build directories at the path ${vep_species}/${vep_genome}_${vep_cache_version}" }, "snpeff_cache": { "type": "string", "fa_icon": "fas fa-file", "default": "s3://annotation-cache/snpeff_cache/", "description": "Path to snpEff cache.", - "help_text": "Path to snpEff cache which should contain the relevant genome and build directory in the path ${snpeff_species}.${snpeff_version}", - "hidden": true + "help_text": "Path to snpEff cache which should contain the relevant genome and build directory in the path ${snpeff_species}.${snpeff_version}" }, "vep_include_fasta": { "type": "boolean", @@ -514,13 +512,12 @@ "default": "--everything --filter_common --per_gene --total_length --offline --format vcf", "fa_icon": "fas fa-toolbox", "description": "Add an extra custom argument to VEP.", - "hidden": true, "help_text": "Using this params you can add custom args to VEP." }, "use_annotation_cache_keys": { "type": "boolean", "fa_icon": "fas fa-toolbox", - "description": "Use annotation cache keys for snpeff_cache and vep_cache.", + "description": "Use annotation cache keys for snpeff_cache and vep_cache.\nOnly when using annotation-cache or a similar structure.\nSee [here](https://annotation-cache.github.io/) for more information.", "hidden": true }, "outdir_cache": { @@ -720,36 +717,31 @@ "type": "string", "fa_icon": "fas fa-database", "description": "snpEff DB version.", - "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nThis is used to specify the database to be use to annotate with.\nAlternatively databases' names can be listed with the `snpEff databases`.", - "hidden": true + "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nThis is used to specify the database to be use to annotate with.\nAlternatively databases' names can be listed with the `snpEff databases`." }, "snpeff_genome": { "type": "string", "fa_icon": "fas fa-microscope", "description": "snpEff genome.", - "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nThis is used to specify the genome when using the container with pre-downloaded cache.", - "hidden": true + "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nThis is used to specify the genome when using the container with pre-downloaded cache." }, "vep_genome": { "type": "string", "fa_icon": "fas fa-microscope", "description": "VEP genome.", - "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nThis is used to specify the genome when using the container with pre-downloaded cache.", - "hidden": true + "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nThis is used to specify the genome when using the container with pre-downloaded cache." }, "vep_species": { "type": "string", "fa_icon": "fas fa-microscope", "description": "VEP species.", - "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nAlternatively species listed in Ensembl Genomes caches can be used.", - "hidden": true + "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nAlternatively species listed in Ensembl Genomes caches can be used." }, "vep_cache_version": { "type": "number", "fa_icon": "fas fa-tag", "description": "VEP cache version.", - "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nAlternatively cache version can be use to specify the correct Ensembl Genomes version number as these differ from the concurrent Ensembl/VEP version numbers", - "hidden": true + "help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nAlternatively cache version can be use to specify the correct Ensembl Genomes version number as these differ from the concurrent Ensembl/VEP version numbers" }, "save_reference": { "type": "boolean", diff --git a/workflows/sarek.nf b/workflows/sarek.nf index 13a2d8d73b..5ae80fbae1 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -57,8 +57,8 @@ def checkPathParamList = [ ] // only check if we are using the tools -if (params.tools && params.tools.contains("snpeff")) checkPathParamList.add(params.snpeff_cache) -if (params.tools && params.tools.contains("vep")) checkPathParamList.add(params.vep_cache) +if (params.tools && (params.tools.split(',').contains('snpeff') || params.tools.split(',').contains('merge'))) checkPathParamList.add(params.snpeff_cache) +if (params.tools && (params.tools.split(',').contains('vep') || params.tools.split(',').contains('merge'))) checkPathParamList.add(params.vep_cache) // Validate input parameters WorkflowSarek.initialise(params, log) @@ -216,7 +216,7 @@ if (params.step == 'mapping' && params.aligner.contains("sentieon-bwamem") && pa error("Sentieon BWA is currently not compatible with FGBio UMI handeling. Please choose a different aligner.") } -if (params.tools && params.tools.contains("sentieon_haplotyper") && params.joint_germline && (!params.sentieon_haplotyper_emit_mode || !(params.sentieon_haplotyper_emit_mode.contains('gvcf')))) { +if (params.tools && params.tools.split(',').contains("sentieon_haplotyper") && params.joint_germline && (!params.sentieon_haplotyper_emit_mode || !(params.sentieon_haplotyper_emit_mode.contains('gvcf')))) { error("When setting the option `--joint_germline` and including `sentieon_haplotyper` among the requested tools, please set `--sentieon_haplotyper_emit_mode` to include `gvcf`.") } @@ -287,7 +287,7 @@ if (params.tools && (params.tools.split(',').contains('ascat') || params.tools.s } if ((params.download_cache) && (params.snpeff_cache || params.vep_cache)) { - error("Please specify either `--download_cache` or `--snpeff_cache`, `--vep_cache`.\nhttps://nf-co.re/sarek/dev/usage#how-to-customise-snpeff-and-vep-annotation") + error("Please specify either `--download_cache` or `--snpeff_cache`, `--vep_cache`.\nhttps://nf-co.re/sarek/usage#how-to-customise-snpeff-and-vep-annotation") } /* @@ -323,26 +323,48 @@ vep_genome = params.vep_genome ?: Channel.empty() vep_species = params.vep_species ?: Channel.empty() // Initialize files channels based on params, not defined within the params.genomes[params.genome] scope -if (params.snpeff_cache && params.tools && params.tools.contains("snpeff")) { - def snpeff_annotation_cache_key = params.use_annotation_cache_keys ? "${params.snpeff_genome}.${params.snpeff_db}/" : "" +if (params.snpeff_cache && params.tools && (params.tools.split(',').contains("snpeff") || params.tools.split(',').contains('merge'))) { + def snpeff_annotation_cache_key = '' + if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache") { + snpeff_annotation_cache_key = "${params.snpeff_genome}.${params.snpeff_db}/" + } else { + snpeff_annotation_cache_key = params.use_annotation_cache_keys ? "${params.snpeff_genome}.${params.snpeff_db}/" : "" + } def snpeff_cache_dir = "${snpeff_annotation_cache_key}${params.snpeff_genome}.${params.snpeff_db}" def snpeff_cache_path_full = file("$params.snpeff_cache/$snpeff_cache_dir", type: 'dir') if ( !snpeff_cache_path_full.exists() || !snpeff_cache_path_full.isDirectory() ) { - error("Files within --snpeff_cache invalid. Make sure there is a directory named ${snpeff_cache_dir} in ${params.snpeff_cache}.\nhttps://nf-co.re/sarek/dev/usage#how-to-customise-snpeff-and-vep-annotation") + if (params.snpeff_cache == "s3://annotation-cache/snpeff_cache") { + error("This path is not available within annotation-cache. Please check https://annotation-cache.github.io/ to create a request for it.") + } else { + error("Files within --snpeff_cache invalid. Make sure there is a directory named ${snpeff_cache_dir} in ${params.snpeff_cache}.\nhttps://nf-co.re/sarek/usage#how-to-customise-snpeff-and-vep-annotation") + } } snpeff_cache = Channel.fromPath(file("${params.snpeff_cache}/${snpeff_annotation_cache_key}"), checkIfExists: true).collect() .map{ cache -> [ [ id:"${params.snpeff_genome}.${params.snpeff_db}" ], cache ] } -} else snpeff_cache = [] - -if (params.vep_cache && params.tools && params.tools.contains("vep")) { - def vep_annotation_cache_key = params.use_annotation_cache_keys ? "${params.vep_cache_version}_${params.vep_genome}/" : "" + } else if (params.tools && (params.tools.split(',').contains("snpeff") || params.tools.split(',').contains('merge')) && !params.download_cache) { + error("No cache for SnpEff or automatic download of said cache has been detected.\nPlease refer to https://nf-co.re/sarek/docs/usage/#how-to-customise-snpeff-and-vep-annotation for more information.") + } else snpeff_cache = [] + +if (params.vep_cache && params.tools && (params.tools.split(',').contains("vep") || params.tools.split(',').contains('merge'))) { + def vep_annotation_cache_key = '' + if (params.vep_cache == "s3://annotation-cache/vep_cache") { + vep_annotation_cache_key = "${params.vep_cache_version}_${params.vep_genome}/" + } else { + vep_annotation_cache_key = params.use_annotation_cache_keys ? "${params.vep_cache_version}_${params.vep_genome}/" : "" + } def vep_cache_dir = "${vep_annotation_cache_key}${params.vep_species}/${params.vep_cache_version}_${params.vep_genome}" def vep_cache_path_full = file("$params.vep_cache/$vep_cache_dir", type: 'dir') if ( !vep_cache_path_full.exists() || !vep_cache_path_full.isDirectory() ) { - error("Files within --vep_cache invalid. Make sure there is a directory named ${vep_cache_dir} in ${params.vep_cache}.\nhttps://nf-co.re/sarek/dev/usage#how-to-customise-snpeff-and-vep-annotation") + if (params.vep_cache == "s3://annotation-cache/vep_cache") { + error("This path is not available within annotation-cache. Please check https://annotation-cache.github.io/ to create a request for it.") + } else { + error("Files within --vep_cache invalid. Make sure there is a directory named ${vep_cache_dir} in ${params.vep_cache}.\nhttps://nf-co.re/sarek/usage#how-to-customise-snpeff-and-vep-annotation") + } } vep_cache = Channel.fromPath(file("${params.vep_cache}/${vep_annotation_cache_key}"), checkIfExists: true).collect() -} else vep_cache = [] + } else if (params.tools && (params.tools.split(',').contains("vep") || params.tools.split(',').contains('merge')) && !params.download_cache) { + error("No cache for VEP or automatic download of said cache has been detected.\nPlease refer to https://nf-co.re/sarek/docs/usage/#how-to-customise-snpeff-and-vep-annotation for more information.") + } else vep_cache = [] vep_extra_files = [] @@ -1292,7 +1314,10 @@ workflow SAREK { */ workflow.onComplete { - if (params.email || params.email_on_fail) NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report) + if (params.email || params.email_on_fail) { + NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report) + } + NfcoreTemplate.dump_parameters(workflow, params) NfcoreTemplate.summary(workflow, params, log) if (params.hook_url) NfcoreTemplate.IM_notification(workflow, params, summary_params, projectDir, log) }