diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index efebe9e0..902a3782 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/airrflow then the best place to ask is on the nf-core Slack [#airrflow](https://nfcore.slack.com/channels/airrflow) channel ([join our Slack here](https://nf-co.re/join/slack)).
+:::info
+If you need help using or modifying nf-core/airrflow then the best place to ask is on the nf-core Slack [#airrflow](https://nfcore.slack.com/channels/airrflow) channel ([join our Slack here](https://nf-co.re/join/slack)).
+:::
## Contribution workflow
@@ -116,4 +118,3 @@ To get started:
Devcontainer specs:
- [DevContainer config](.devcontainer/devcontainer.json)
-- [Dockerfile](.devcontainer/Dockerfile)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index f2e98962..b0260675 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -42,7 +42,7 @@ body:
attributes:
label: System information
description: |
- * Nextflow version _(eg. 22.10.1)_
+ * Nextflow version _(eg. 23.04.0)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_
diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml
index 34a98d01..6b25b2c6 100644
--- a/.github/workflows/awsfulltest.yml
+++ b/.github/workflows/awsfulltest.yml
@@ -14,18 +14,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Launch workflow via tower
- 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_COMPUTE_ENV }}
+ revision: ${{ github.sha }}
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/airrflow/work-${{ github.sha }}
parameters: |
{
+ "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/airrflow/results-${{ github.sha }}"
}
- profiles: test_full,aws_tower
+ profiles: test_full
+
- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
- path: tower_action_*.log
+ path: |
+ tower_action_*.log
+ tower_action_*.json
diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml
index 64fb9141..269c6875 100644
--- a/.github/workflows/awstest.yml
+++ b/.github/workflows/awstest.yml
@@ -12,18 +12,22 @@ jobs:
steps:
# Launch workflow using Tower CLI tool action
- name: Launch workflow via tower
- 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_COMPUTE_ENV }}
+ revision: ${{ github.sha }}
workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/airrflow/work-${{ github.sha }}
parameters: |
{
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/airrflow/results-test-${{ github.sha }}"
}
- profiles: test,aws_tower
+ profiles: test
+
- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
- path: tower_action_*.log
+ path: |
+ tower_action_*.log
+ tower_action_*.json
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 11eab3db..5cd19a48 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
NXF_VER:
- - "22.10.1"
+ - "23.04.0"
- "latest-everything"
steps:
- name: Check out pipeline code
@@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
NXF_VER:
- - "22.10.1"
+ - "23.04.0"
- "latest-everything"
profile:
["test_tcr", "test_no_umi", "test_nocluster", "test_fetchimgt", "test_assembled_hs", "test_assembled_mm"]
diff --git a/.github/workflows/ci_immcantation.yml b/.github/workflows/ci_immcantation.yml
index 8669923d..b2b1dff9 100644
--- a/.github/workflows/ci_immcantation.yml
+++ b/.github/workflows/ci_immcantation.yml
@@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
NXF_VER:
- - "22.10.1"
+ - "23.04.0"
- "latest-everything"
profile:
[
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
index 888cb4bc..b8bdd214 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/.gitpod.yml b/.gitpod.yml
index 85d95ecc..25488dcc 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -1,4 +1,9 @@
image: nfcore/gitpod:latest
+tasks:
+ - name: Update Nextflow and setup pre-commit
+ command: |
+ pre-commit install --install-hooks
+ nextflow self-update
vscode:
extensions: # based on nf-core.nf-core-extensionpack
diff --git a/.nf-core.yml b/.nf-core.yml
index 2c0141ff..4ae6f7f0 100644
--- a/.nf-core.yml
+++ b/.nf-core.yml
@@ -1,4 +1,6 @@
lint:
files_exist:
- conf/igenomes.config
+ multiqc_config:
+ - report_comment
repository_type: pipeline
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f9dd337..5d02bbeb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#259](https://github.com/nf-core/airrflow/pull/259) Update to `EnchantR v0.1.3`.
- [#266](https://github.com/nf-core/airrflow/pull/266) Added clonal reports tables to final report folder.
- [#266](https://github.com/nf-core/airrflow/pull/266) Added processes to include sampleID to filename in assembled workflow to keep it unique.
+- [#276](https://github.com/nf-core/airrflow/pull/276) Parametrize FindThreshold Report and Presto Buildconsensus UMI.
+- [#279](https://github.com/nf-core/airrflow/pull/279) Update to nf-core tools v2.10.
### `Fixed`
@@ -19,12 +21,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#259](https://github.com/nf-core/airrflow/pull/259) Samplesheet only allows data from one species.
- [#259](https://github.com/nf-core/airrflow/pull/259) Introduced fix for a too long command with hundreds of datasets.
- [#266](https://github.com/nf-core/airrflow/pull/266) Convert samplesheet required columns to strings when needed.
+- [#276](https://github.com/nf-core/airrflow/pull/266) Temporary fix for Dowser with singularity
### `Dependencies`
| Dependency | Old version | New version |
| ---------- | ----------- | ----------- |
-| r-enchantr | 0.1.2 | 0.1.3 |
+| r-enchantr | 0.1.2 | 0.1.5 |
## [3.1.0] - 2023-06-05 "Protego"
diff --git a/CITATIONS.md b/CITATIONS.md
index 9f71f033..a5f49a34 100644
--- a/CITATIONS.md
+++ b/CITATIONS.md
@@ -12,6 +12,44 @@
- [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/.
+
+- [Fastp](https://doi.org/10.1093/bioinformatics/bty560)
+
+ > Shifu Chen, Yanqing Zhou, Yaru Chen, Jia Gu, fastp: an ultra-fast all-in-one FASTQ preprocessor, Bioinformatics. 2018 Sept 1; 34(17):i884–i890. doi: 10.1093/bioinformatics/bty560.
+
+- [pRESTO](https://doi.org/10.1093/bioinformatics/btu138)
+
+ > Vander Heiden, J. A., Yaari, G., Uduman, M., Stern, J. N. H., O’Connor, K. C., Hafler, D. A., … Kleinstein, S. H. (2014). pRESTO: a toolkit for processing high-throughput sequencing raw reads of lymphocyte receptor repertoires. Bioinformatics, 30(13), 1930–1932.
+
+- [SHazaM, Change-O](https://doi.org/10.1093/bioinformatics/btv359)
+
+ > Gupta, N. T., Vander Heiden, J. A., Uduman, M., Gadala-Maria, D., Yaari, G., & Kleinstein, S. H. (2015). Change-O: a toolkit for analyzing large-scale B cell immunoglobulin repertoire sequencing data: Table 1. Bioinformatics, 31(20), 3356–3358.
+
+- [Alakazam](https://doi.org/10.1126/scitranslmed.3008879)
+
+ > Stern, J. N. H., Yaari, G., Vander Heiden, J. A., Church, G., Donahue, W. F., Hintzen, R. Q., … O’Connor, K. C. (2014). B cells populating the multiple sclerosis brain mature in the draining cervical lymph nodes. Science Translational Medicine, 6(248).
+
+- [SCOPer](https://doi.org/10.1093/bioinformatics/bty235)
+
+ > Nouri N, Kleinstein S (2018). “A spectral clustering-based method for identifying clones from high-throughput B cell repertoire sequencing data.” Bioinformatics, i341-i349.
+
+ > Nouri N, Kleinstein S (2020). “Somatic hypermutation analysis for improved identification of B cell clonal families from next-generation sequencing data.” PLOS Computational Biology, 16(6), e1007977.
+
+ > Gupta N, Adams K, Briggs A, Timberlake S, Vigneault F, Kleinstein S (2017). “Hierarchical clustering can identify B cell clones with high confidence in Ig repertoire sequencing data.” The Journal of Immunology, 2489-2499.
+
+- [Dowser](https://doi.org/10.1371/journal.pcbi.1009885)
+
+ > Hoehn K, Pybus O, Kleinstein S (2022). “Phylogenetic analysis of migration, differentiation, and class switching in B cells.” PLoS Computational Biology.
+
+- [IgPhyML](https://www.pnas.org/doi/10.1073/pnas.1906020116)
+
+ > Hoehn K, Van der Heiden J, Zhou J, Lunter G, Pybus O, Kleinstein S (2019). “Repertoire-wide phylogenetic models of B cell molecular evolution reveal evolutionary signatures of aging and vaccination.” PNAS.
+
+- [TIgGER](https://doi.org/10.1073/pnas.1417683112)
+
+ > Gadala-maria, D., Yaari, G., Uduman, M., & Kleinstein, S. H. (2015). Automated analysis of high-throughput B-cell sequencing data reveals a high frequency of novel immunoglobulin V gene segment alleles. Proceedings of the National Academy of Sciences, 112(8), 1–9.
+
- [Fastp](https://doi.org/10.1093/bioinformatics/bty560)
> Shifu Chen, Yanqing Zhou, Yaru Chen, Jia Gu, fastp: an ultra-fast all-in-one FASTQ preprocessor, Bioinformatics. 2018 Sept 1; 34(17):i884–i890. doi: 10.1093/bioinformatics/bty560.
@@ -68,5 +106,8 @@
- [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241)
+ > Merkel, D. (2014). Docker: lightweight linux containers for consistent development and deployment. Linux Journal, 2014(239), 2. doi: 10.5555/2600239.2600241.
+
- [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/)
+
> Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index f4fd052f..c089ec78 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 63d2f522..7fb75a1c 100644
--- a/README.md
+++ b/README.md
@@ -4,13 +4,14 @@
[![GitHub Actions Linting Status](https://github.com/nf-core/airrflow/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/airrflow/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/airrflow/results)
[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.2642009-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.2642009)
-[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A522.10.1-23aa62.svg)](https://www.nextflow.io/)
+[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)
[![Launch on Nextflow Tower](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Nextflow%20Tower-%234256e7)](https://tower.nf/launch?pipeline=https://github.com/nf-core/airrflow)
[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23airrflow-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/airrflow)
[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/nf_core)
+[![Follow on Mastodon](https://img.shields.io/badge/mastodon-nf__core-6364ff?labelColor=FFFFFF&logo=mastodon)](https://mstdn.science/@nf_core)
[![Watch on YouTube](http://img.shields.io/badge/youtube-nf--core-FF0000?labelColor=000000&logo=youtube)](https://www.youtube.com/c/nf-core)
## Introduction
@@ -128,9 +129,11 @@ See the [usage documentation](https://nf-co.re/airrflow/usage) and the [paramete
> 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/airrflow/usage) and the [parameter documentation](https://nf-co.re/airrflow/parameters).
+
## Pipeline output
-To see the the results of a test run with a full size dataset refer to the [results](https://nf-co.re/airrflow/results) tab on the nf-core website pipeline page.
+To see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/airrflow/results) tab on the nf-core website pipeline page.
For more details about the output files and reports, please refer to the
[output documentation](https://nf-co.re/airrflow/output).
diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml
index 4b9bedf5..e4acf864 100644
--- a/assets/methods_description_template.yml
+++ b/assets/methods_description_template.yml
@@ -3,17 +3,21 @@ description: "Suggested text and references to use when describing pipeline usag
section_name: "nf-core/airrflow Methods Description"
section_href: "https://github.com/nf-core/airrflow"
plot_type: "html"
-## TODO nf-core: Update the HTML below to your prefered methods description, e.g. add publication citation for this pipeline
+## TODO nf-core: Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
## You inject any metadata in the Nextflow '${workflow}' object
data: |
Methods
- Data was processed using nf-core/airrflow v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (Ewels et al., 2020).
+ Data was processed using nf-core/airrflow v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (Ewels et al., 2020), utilising reproducible software environments from the Bioconda (Grüning et al., 2018) and Biocontainers (da Veiga Leprevost et al., 2017) projects.
The pipeline was executed with Nextflow v${workflow.nextflow.version} (Di Tommaso et al., 2017) with the following command:
${workflow.commandLine}
+ ${tool_citations}
References
- - Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. https://doi.org/10.1038/nbt.3820
- - Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. https://doi.org/10.1038/s41587-020-0439-x
+ - Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. doi: 10.1038/nbt.3820
+ - Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. doi: 10.1038/s41587-020-0439-x
+ - Grüning, B., Dale, R., Sjödin, A., Chapman, B. A., Rowe, J., Tomkins-Tinch, C. H., Valieris, R., Köster, J., & Bioconda Team. (2018). Bioconda: sustainable and comprehensive software distribution for the life sciences. Nature Methods, 15(7), 475–476. doi: 10.1038/s41592-018-0046-7
+ - da Veiga Leprevost, F., Grüning, B. A., Alves Aflitos, S., Röst, H. L., Uszkoreit, J., Barsnes, H., Vaudel, M., Moreno, P., Gatto, L., Weber, J., Bai, M., Jimenez, R. C., Sachsenberg, T., Pfeuffer, J., Vera Alvarez, R., Griss, J., Nesvizhskii, A. I., & Perez-Riverol, Y. (2017). BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics (Oxford, England), 33(16), 2580–2582. doi: 10.1093/bioinformatics/btx192
+ ${tool_bibliography}
Notes:
diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml
index e8e62182..889351d6 100644
--- a/assets/multiqc_config.yml
+++ b/assets/multiqc_config.yml
@@ -1,5 +1,5 @@
-report_comment: >
- This report has been generated by the
nf-core/airrflow
+report_comment:
+ This report has been generated by the
nf-core/airrflow
analysis pipeline. For information about how to interpret these results, please see the
documentation.
diff --git a/assets/nf-core-airrflow_logo_light.png b/assets/nf-core-airrflow_logo_light.png
index bf5a8518..2c7265f7 100644
Binary files a/assets/nf-core-airrflow_logo_light.png and b/assets/nf-core-airrflow_logo_light.png differ
diff --git a/assets/schema_input.json b/assets/schema_input.json
new file mode 100644
index 00000000..327564f0
--- /dev/null
+++ b/assets/schema_input.json
@@ -0,0 +1,65 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema",
+ "$id": "https://raw.githubusercontent.com/nf-core/airrflow/master/assets/schema_input.json",
+ "title": "nf-core/airrflow pipeline - params.input schema",
+ "description": "Schema for the file provided with params.input",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "sample_id": {
+ "type": "string",
+ "pattern": "^\\S+$",
+ "errorMessage": "Sample name must be provided and cannot contain spaces."
+ },
+ "subject_id": {
+ "type": "string",
+ "pattern": "^\\S+$",
+ "errorMessage": "Subject name must be provided and cannot contain spaces."
+ },
+ "species": {
+ "type": "string",
+ "enum": ["mouse", "human"],
+ "errorMessage": "Species name must be provided and must be one of: mouse, human."
+ },
+ "pcr_target_locus": {
+ "type": "string",
+ "enum": ["TR", "IG", "ig", "tr", "Ig", "Tr"],
+ "errorMessage": "PCR target locus must be provided and must be one of: TR, IG."
+ },
+ "tissue": {
+ "type": "string",
+ "pattern": "^\\S+$",
+ "errorMessage": "Tissue name must be provided and cannot contain spaces."
+ },
+ "sex": {
+ "type": "string",
+ "pattern": "^\\S+$",
+ "errorMessage": "Sex must be provided, specify NA if unknown."
+ },
+ "age": {
+ "type": "string",
+ "errorMessage": "Age must be provided, specify NA if unknown."
+ },
+ "biomaterial_provider": {
+ "type": "string",
+ "errorMessage": "Biomaterial provider must be provided."
+ },
+ "single_cell": {
+ "type": "boolean",
+ "pattern": "^\\S+$",
+ "errorMessage": "Single cell must be provided as a TRUE/FALSE value."
+ }
+ },
+ "required": [
+ "sample_id",
+ "subject_id",
+ "species",
+ "pcr_target_locus",
+ "tissue",
+ "sex",
+ "age",
+ "biomaterial_provider"
+ ]
+ }
+}
diff --git a/assets/slackreport.json b/assets/slackreport.json
index 043d02f2..bd9523d9 100644
--- a/assets/slackreport.json
+++ b/assets/slackreport.json
@@ -3,7 +3,7 @@
{
"fallback": "Plain-text summary of the attachment.",
"color": "<% if (success) { %>good<% } else { %>danger<%} %>",
- "author_name": "sanger-tol/readmapping v${version} - ${runName}",
+ "author_name": "nf-core/airrflow v${version} - ${runName}",
"author_icon": "https://www.nextflow.io/docs/latest/_static/favicon.ico",
"text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors<% } %>",
"fields": [
diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py
index 355caec3..39c2514e 100755
--- a/bin/check_samplesheet.py
+++ b/bin/check_samplesheet.py
@@ -86,7 +86,6 @@ def check_samplesheet(file_in, assembled):
"subject_id",
"species",
"pcr_target_locus",
- "tissue",
]
no_whitespaces_assembled = [
"sample_id",
diff --git a/conf/modules.config b/conf/modules.config
index 029b68af..65b31c5a 100644
--- a/conf/modules.config
+++ b/conf/modules.config
@@ -178,12 +178,15 @@ process {
]
}
- withName: PRESTO_BUILDCONSENSUS {
+ withName: PRESTO_BUILDCONSENSUS_UMI {
publishDir = [
path: { "${params.outdir}/presto/06-build-consensus/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
+ ext.args = ''
+ ext.args2 = ''
+ ext.args3 = 'ID BARCODE SEQCOUNT PRIMER PRCOUNT PRCONS PRFREQ CONSCOUNT'
}
withName: PRESTO_POSTCONSENSUS_PAIRSEQ {
@@ -434,6 +437,12 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
+ ext.args = ['findthreshold_method':'gmm',
+ 'findthreshold_model':'gamma-norm',
+ 'findthreshold_edge':0.9,
+ 'findthreshold_cutoff':'user',
+ 'findthreshold_spc':0.995,
+ 'subsample':10000]
}
withName: DEFINE_CLONES_COMPUTE {
@@ -445,7 +454,7 @@ process {
ext.args = ['outname':'', 'model':'hierarchical',
'method':'nt', 'linkage':'single',
'skip_convergence':true,
- 'outputby':'sample_id', 'min_n':30]
+ 'min_n':30]
}
withName: DEFINE_CLONES_REPORT {
@@ -457,7 +466,7 @@ process {
ext.args = ['outname':'', 'model':'hierarchical',
'method':'nt', 'linkage':'single',
'skip_convergence':false,
- 'outputby':'sample_id', 'min_n':30]
+ 'min_n':30]
}
withName: DOWSER_LINEAGES {
diff --git a/conf/test_full.config b/conf/test_full.config
index 52781925..8196a9d3 100644
--- a/conf/test_full.config
+++ b/conf/test_full.config
@@ -28,3 +28,12 @@ params {
umi_start = 0
umi_position = 'R1'
}
+
+process {
+ withName:DOWSER_LINEAGES{
+ ext.args = ['build':'igphyml',
+ 'minseq':5,
+ 'traits':'c_primer',
+ 'tips':'c_primer']
+ }
+}
diff --git a/docs/output.md b/docs/output.md
index e2477c8d..cf269b42 100644
--- a/docs/output.md
+++ b/docs/output.md
@@ -388,10 +388,10 @@ This folder is genereated when `detect_contamination` is set to `true`.
- `clonal_analysis/find_threshold/`
- `*log`: Log of the process that will be parsed to generate a report.
- - `all_reps_threshold-mean.tsv`: Mean of all hamming distance thresholds of the
- Junction regions as determined by Shazam.
- - `all_reps_threshold-summary.tsv`: Thresholds for each group of `--cloneby` samples.
- `all_reps_dist_report`: Report
+ - `tables/all_reps_threshold-mean.tsv`: Mean of all hamming distance thresholds of the
+ Junction regions as determined by Shazam.
+ - `tables/all_reps_threshold-summary.tsv`: Thresholds for each group of `--cloneby` samples.
diff --git a/docs/usage.md b/docs/usage.md
index 712fbe3f..356b82bd 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -4,15 +4,15 @@
> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._
-# Introduction
+## Introduction
The nf-core/airrflow pipeline allows processing BCR and TCR targeted sequencing data from bulk and single-cell sequencing protocols. It performs sequence assembly, V(D)J assignment, clonotyping, lineage reconsctruction and repertoire analysis using the [Immcantation](https://immcantation.readthedocs.io/en/stable/) framework.
![nf-core/airrflow overview](images/airrflow_workflow_overview.png)
-# Running the pipeline
+## Running the pipeline
-## Quickstart
+### Quickstart
A typical command for running the pipeline for **bulk raw fastq files** is:
@@ -39,6 +39,7 @@ nextflow run nf-core/airrflow \
--outdir results
```
+Check the section [Input samplesheet](#input-samplesheet) below for instructions on how to create the samplesheet, and the [Supported library generation protocols](#supported-bulk-library-generation-methods-protocols) section below for examples on how to run the pipeline for different bulk sequencing protocols.
For more information about the parameters, please refer to the [parameters documentation](https://nf-co.re/airrflow/parameters).
The command above will launch the pipeline with the `docker` configuration profile. See below for more information about profiles.
@@ -56,7 +57,8 @@ 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).
-> The above pipeline run specified with a params file in yaml format:
+
+The above pipeline run specified with a params file in yaml format:
```bash
nextflow run nf-core/airrflow -profile docker -params-file params.yaml
@@ -68,12 +70,31 @@ with `params.yaml` containing:
input: './samplesheet.csv'
outdir: './results/'
genome: 'GRCh37'
-input: 'data'
<...>
```
You can also generate such `YAML`/`JSON` files via [nf-core/launch](https://nf-co.re/launch).
+## Updating the pipeline
+
+When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:
+
+```bash
+nextflow pull nf-core/airrflow
+```
+
+## Reproducibility
+
+It is a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since.
+
+First, go to the [nf-core/airrflow releases page](https://github.com/nf-core/airrflow/releases) and find the latest pipeline version - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`. Of course, you can switch to another version by changing the number after the `-r` flag.
+
+This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. For example, at the bottom of the MultiQC reports.
+
+To further assist in reproducibility, 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.
+
## Input samplesheet
### Fastq input samplesheet (bulk sequencing only)
@@ -344,27 +365,7 @@ The UMI barcodes are typically read from an index file but sometimes can be prov
- No UMIs in R1 or R2 reads: if no UMIs are present in the samples, specify `--umi_length 0` to use the sans-UMI subworkflow.
-## Updating the pipeline
-
-When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:
-
-```bash
-nextflow pull nf-core/airrflow
-```
-
-## Reproducibility
-
-It is a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since.
-
-First, go to the [nf-core/airrflow releases page](https://github.com/nf-core/airrflow/releases) and find the latest pipeline version - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`. Of course, you can switch to another version by changing the number after the `-r` flag.
-
-This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. For example, at the bottom of the MultiQC reports.
-
-To further assist in reproducibility, 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.
-
-# Core Nextflow arguments
+## Core Nextflow arguments
> **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen).
@@ -401,58 +402,58 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof
- `conda`
- A generic configuration profile to be used with [Conda](https://conda.io/docs/). Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter, Charliecloud, or Apptainer.
-## `-resume`
+### `-resume`
Specify this when restarting a pipeline. Nextflow will use cached results from any pipeline steps where the inputs are the same, continuing from where it got to previously. For input to be considered the same, not only the names must be identical but the files' contents as well. For more info about this parameter, see [this blog post](https://www.nextflow.io/blog/2019/demystifying-nextflow-resume.html).
You can also supply a run name to resume a specific run: `-resume [run-name]`. Use the `nextflow log` command to show previous run names.
-## `-c`
+### `-c`
Specify the path to a specific config file (this is a core Nextflow command). See the [nf-core website documentation](https://nf-co.re/usage/configuration) for more information.
-## Nextflow memory requirements
-
-In some cases, the Nextflow Java virtual machines can start to request a large amount of memory.
-We recommend adding the following line to your environment to limit this (typically in `~/.bashrc` or `~./bash_profile`):
-
-```bash
-NXF_OPTS='-Xms1g -Xmx4g'
-```
-
-## Running in the background
-
-Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished.
-
-The Nextflow `-bg` flag launches Nextflow in the background, detached from your terminal so that the workflow does not stop if you log out of your session. The logs are saved to a file.
-
-Alternatively, you can use `screen` / `tmux` or similar tool to create a detached session which you can log back into at a later time.
-Some HPC setups also allow you to run nextflow within a cluster job submitted your job scheduler (from where it submits more jobs).
-
-# Custom configuration
+## Custom configuration
-## Resource requests
+### Resource requests
Whilst the default requirements set within the pipeline will hopefully work for most people and with most input data, you may find that you want to customise the compute resources that the pipeline requests. Each step in the pipeline has a default set of requirements for number of CPUs, memory and time. For most of the steps in the pipeline, if the job exits with any of the error codes specified [here](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L18) it will automatically be resubmitted with higher requests (2 x original, then 3 x original). If it still fails after the third attempt then the pipeline execution is stopped.
To change the resource requests, please see the [max resources](https://nf-co.re/docs/usage/configuration#max-resources) and [tuning workflow resources](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources) section of the nf-core website.
-## Custom Containers
+### Custom Containers
In some cases you may wish to change which container or conda environment a step of the pipeline uses for a particular tool. By default nf-core pipelines use containers and software from the [biocontainers](https://biocontainers.pro/) or [bioconda](https://bioconda.github.io/) projects. However in some cases the pipeline specified version may be out of date.
To use a different container from the default container or conda environment specified in a pipeline, please see the [updating tool versions](https://nf-co.re/docs/usage/configuration#updating-tool-versions) section of the nf-core website.
-## Custom Tool Arguments
+### Custom Tool Arguments
A pipeline might not always support every possible argument or option of a particular tool used in pipeline. Fortunately, nf-core pipelines provide some freedom to users to insert additional parameters that the pipeline does not include by default.
To learn how to provide additional arguments to a particular tool of the pipeline, please see the [customising tool arguments](https://nf-co.re/docs/usage/configuration#customising-tool-arguments) section of the nf-core website.
-## nf-core/configs
+### nf-core/configs
In most cases, you will only need to create a custom config as a one-off but if you and others within your organisation are likely to be running nf-core pipelines regularly and need to use the same settings regularly it may be a good idea to request that your custom config file is uploaded to the `nf-core/configs` git repository. Before you do this please can you test that the config file works with your pipeline of choice using the `-c` parameter. You can then create a pull request to the `nf-core/configs` repository with the addition of your config file, associated documentation file (see examples in [`nf-core/configs/docs`](https://github.com/nf-core/configs/tree/master/docs)), and amending [`nfcore_custom.config`](https://github.com/nf-core/configs/blob/master/nfcore_custom.config) to include your custom profile.
See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more information about creating your own configuration files.
If you have any questions or issues please send us a message on [Slack](https://nf-co.re/join/slack) on the [`#configs` channel](https://nfcore.slack.com/channels/configs).
+
+## Running in the background
+
+Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished.
+
+The Nextflow `-bg` flag launches Nextflow in the background, detached from your terminal so that the workflow does not stop if you log out of your session. The logs are saved to a file.
+
+Alternatively, you can use `screen` / `tmux` or similar tool to create a detached session which you can log back into at a later time.
+Some HPC setups also allow you to run nextflow within a cluster job submitted your job scheduler (from where it submits more jobs).
+
+## Nextflow memory requirements
+
+In some cases, the Nextflow Java virtual machines can start to request a large amount of memory.
+We recommend adding the following line to your environment to limit this (typically in `~/.bashrc` or `~./bash_profile`):
+
+```bash
+NXF_OPTS='-Xms1g -Xmx4g'
+```
diff --git a/lib/NfcoreSchema.groovy b/lib/NfcoreSchema.groovy
deleted file mode 100755
index 9b34804d..00000000
--- a/lib/NfcoreSchema.groovy
+++ /dev/null
@@ -1,530 +0,0 @@
-//
-// This file holds several functions used to perform JSON parameter validation, help and summary rendering for the nf-core pipeline template.
-//
-
-import nextflow.Nextflow
-import org.everit.json.schema.Schema
-import org.everit.json.schema.loader.SchemaLoader
-import org.everit.json.schema.ValidationException
-import org.json.JSONObject
-import org.json.JSONTokener
-import org.json.JSONArray
-import groovy.json.JsonSlurper
-import groovy.json.JsonBuilder
-
-class NfcoreSchema {
-
- //
- // Resolve Schema path relative to main workflow directory
- //
- public static String getSchemaPath(workflow, schema_filename='nextflow_schema.json') {
- return "${workflow.projectDir}/${schema_filename}"
- }
-
- //
- // Function to loop over all parameters defined in schema and check
- // whether the given parameters adhere to the specifications
- //
- /* groovylint-disable-next-line UnusedPrivateMethodParameter */
- public static void validateParameters(workflow, params, log, schema_filename='nextflow_schema.json') {
- def has_error = false
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
- // Check for nextflow core params and unexpected params
- def json = new File(getSchemaPath(workflow, schema_filename=schema_filename)).text
- def Map schemaParams = (Map) new JsonSlurper().parseText(json).get('definitions')
- def nf_params = [
- // Options for base `nextflow` command
- 'bg',
- 'c',
- 'C',
- 'config',
- 'd',
- 'D',
- 'dockerize',
- 'h',
- 'log',
- 'q',
- 'quiet',
- 'syslog',
- 'v',
-
- // Options for `nextflow run` command
- 'ansi',
- 'ansi-log',
- 'bg',
- 'bucket-dir',
- 'c',
- 'cache',
- 'config',
- 'dsl2',
- 'dump-channels',
- 'dump-hashes',
- 'E',
- 'entry',
- 'latest',
- 'lib',
- 'main-script',
- 'N',
- 'name',
- 'offline',
- 'params-file',
- 'pi',
- 'plugins',
- 'poll-interval',
- 'pool-size',
- 'profile',
- 'ps',
- 'qs',
- 'queue-size',
- 'r',
- 'resume',
- 'revision',
- 'stdin',
- 'stub',
- 'stub-run',
- 'test',
- 'w',
- 'with-apptainer',
- 'with-charliecloud',
- 'with-conda',
- 'with-dag',
- 'with-docker',
- 'with-mpi',
- 'with-notification',
- 'with-podman',
- 'with-report',
- 'with-singularity',
- 'with-timeline',
- 'with-tower',
- 'with-trace',
- 'with-weblog',
- 'without-docker',
- 'without-podman',
- 'work-dir'
- ]
- def unexpectedParams = []
-
- // Collect expected parameters from the schema
- def expectedParams = []
- def enums = [:]
- for (group in schemaParams) {
- for (p in group.value['properties']) {
- expectedParams.push(p.key)
- if (group.value['properties'][p.key].containsKey('enum')) {
- enums[p.key] = group.value['properties'][p.key]['enum']
- }
- }
- }
-
- for (specifiedParam in params.keySet()) {
- // nextflow params
- if (nf_params.contains(specifiedParam)) {
- log.error "ERROR: You used a core Nextflow option with two hyphens: '--${specifiedParam}'. Please resubmit with '-${specifiedParam}'"
- has_error = true
- }
- // unexpected params
- def params_ignore = params.schema_ignore_params.split(',') + 'schema_ignore_params'
- def expectedParamsLowerCase = expectedParams.collect{ it.replace("-", "").toLowerCase() }
- def specifiedParamLowerCase = specifiedParam.replace("-", "").toLowerCase()
- def isCamelCaseBug = (specifiedParam.contains("-") && !expectedParams.contains(specifiedParam) && expectedParamsLowerCase.contains(specifiedParamLowerCase))
- if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam) && !isCamelCaseBug) {
- // Temporarily remove camelCase/camel-case params #1035
- def unexpectedParamsLowerCase = unexpectedParams.collect{ it.replace("-", "").toLowerCase()}
- if (!unexpectedParamsLowerCase.contains(specifiedParamLowerCase)){
- unexpectedParams.push(specifiedParam)
- }
- }
- }
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
- // Validate parameters against the schema
- InputStream input_stream = new File(getSchemaPath(workflow, schema_filename=schema_filename)).newInputStream()
- JSONObject raw_schema = new JSONObject(new JSONTokener(input_stream))
-
- // Remove anything that's in params.schema_ignore_params
- raw_schema = removeIgnoredParams(raw_schema, params)
-
- Schema schema = SchemaLoader.load(raw_schema)
-
- // Clean the parameters
- def cleanedParams = cleanParameters(params)
-
- // Convert to JSONObject
- def jsonParams = new JsonBuilder(cleanedParams)
- JSONObject params_json = new JSONObject(jsonParams.toString())
-
- // Validate
- try {
- schema.validate(params_json)
- } catch (ValidationException e) {
- println ''
- log.error 'ERROR: Validation of pipeline parameters failed!'
- JSONObject exceptionJSON = e.toJSON()
- printExceptions(exceptionJSON, params_json, log, enums)
- println ''
- has_error = true
- }
-
- // Check for unexpected parameters
- if (unexpectedParams.size() > 0) {
- Map colors = NfcoreTemplate.logColours(params.monochrome_logs)
- println ''
- def warn_msg = 'Found unexpected parameters:'
- for (unexpectedParam in unexpectedParams) {
- warn_msg = warn_msg + "\n* --${unexpectedParam}: ${params[unexpectedParam].toString()}"
- }
- log.warn warn_msg
- log.info "- ${colors.dim}Ignore this warning: params.schema_ignore_params = \"${unexpectedParams.join(',')}\" ${colors.reset}"
- println ''
- }
-
- if (has_error) {
- Nextflow.error('Exiting!')
- }
- }
-
- //
- // Beautify parameters for --help
- //
- public static String paramsHelp(workflow, params, command, schema_filename='nextflow_schema.json') {
- Map colors = NfcoreTemplate.logColours(params.monochrome_logs)
- Integer num_hidden = 0
- String output = ''
- output += 'Typical pipeline command:\n\n'
- output += " ${colors.cyan}${command}${colors.reset}\n\n"
- Map params_map = paramsLoad(getSchemaPath(workflow, schema_filename=schema_filename))
- Integer max_chars = paramsMaxChars(params_map) + 1
- Integer desc_indent = max_chars + 14
- Integer dec_linewidth = 160 - desc_indent
- for (group in params_map.keySet()) {
- Integer num_params = 0
- String group_output = colors.underlined + colors.bold + group + colors.reset + '\n'
- def group_params = params_map.get(group) // This gets the parameters of that particular group
- for (param in group_params.keySet()) {
- if (group_params.get(param).hidden && !params.show_hidden_params) {
- num_hidden += 1
- continue;
- }
- def type = '[' + group_params.get(param).type + ']'
- def description = group_params.get(param).description
- def defaultValue = group_params.get(param).default != null ? " [default: " + group_params.get(param).default.toString() + "]" : ''
- def description_default = description + colors.dim + defaultValue + colors.reset
- // Wrap long description texts
- // Loosely based on https://dzone.com/articles/groovy-plain-text-word-wrap
- if (description_default.length() > dec_linewidth){
- List olines = []
- String oline = "" // " " * indent
- description_default.split(" ").each() { wrd ->
- if ((oline.size() + wrd.size()) <= dec_linewidth) {
- oline += wrd + " "
- } else {
- olines += oline
- oline = wrd + " "
- }
- }
- olines += oline
- description_default = olines.join("\n" + " " * desc_indent)
- }
- group_output += " --" + param.padRight(max_chars) + colors.dim + type.padRight(10) + colors.reset + description_default + '\n'
- num_params += 1
- }
- group_output += '\n'
- if (num_params > 0){
- output += group_output
- }
- }
- if (num_hidden > 0){
- output += colors.dim + "!! Hiding $num_hidden params, use --show_hidden_params to show them !!\n" + colors.reset
- }
- output += NfcoreTemplate.dashedLine(params.monochrome_logs)
- return output
- }
-
- //
- // Groovy Map summarising parameters/workflow options used by the pipeline
- //
- public static LinkedHashMap paramsSummaryMap(workflow, params, schema_filename='nextflow_schema.json') {
- // Get a selection of core Nextflow workflow options
- def Map workflow_summary = [:]
- if (workflow.revision) {
- workflow_summary['revision'] = workflow.revision
- }
- workflow_summary['runName'] = workflow.runName
- if (workflow.containerEngine) {
- workflow_summary['containerEngine'] = workflow.containerEngine
- }
- if (workflow.container) {
- workflow_summary['container'] = workflow.container
- }
- workflow_summary['launchDir'] = workflow.launchDir
- workflow_summary['workDir'] = workflow.workDir
- workflow_summary['projectDir'] = workflow.projectDir
- workflow_summary['userName'] = workflow.userName
- workflow_summary['profile'] = workflow.profile
- workflow_summary['configFiles'] = workflow.configFiles.join(', ')
-
- // Get pipeline parameters defined in JSON Schema
- def Map params_summary = [:]
- def params_map = paramsLoad(getSchemaPath(workflow, schema_filename=schema_filename))
- for (group in params_map.keySet()) {
- def sub_params = new LinkedHashMap()
- def group_params = params_map.get(group) // This gets the parameters of that particular group
- for (param in group_params.keySet()) {
- if (params.containsKey(param)) {
- def params_value = params.get(param)
- def schema_value = group_params.get(param).default
- def param_type = group_params.get(param).type
- if (schema_value != null) {
- if (param_type == 'string') {
- if (schema_value.contains('$projectDir') || schema_value.contains('${projectDir}')) {
- def sub_string = schema_value.replace('\$projectDir', '')
- sub_string = sub_string.replace('\${projectDir}', '')
- if (params_value.contains(sub_string)) {
- schema_value = params_value
- }
- }
- if (schema_value.contains('$params.outdir') || schema_value.contains('${params.outdir}')) {
- def sub_string = schema_value.replace('\$params.outdir', '')
- sub_string = sub_string.replace('\${params.outdir}', '')
- if ("${params.outdir}${sub_string}" == params_value) {
- schema_value = params_value
- }
- }
- }
- }
-
- // We have a default in the schema, and this isn't it
- if (schema_value != null && params_value != schema_value) {
- sub_params.put(param, params_value)
- }
- // No default in the schema, and this isn't empty
- else if (schema_value == null && params_value != "" && params_value != null && params_value != false) {
- sub_params.put(param, params_value)
- }
- }
- }
- params_summary.put(group, sub_params)
- }
- return [ 'Core Nextflow options' : workflow_summary ] << params_summary
- }
-
- //
- // Beautify parameters for summary and return as string
- //
- public static String paramsSummaryLog(workflow, params) {
- Map colors = NfcoreTemplate.logColours(params.monochrome_logs)
- String output = ''
- def params_map = paramsSummaryMap(workflow, params)
- def max_chars = paramsMaxChars(params_map)
- for (group in params_map.keySet()) {
- def group_params = params_map.get(group) // This gets the parameters of that particular group
- if (group_params) {
- output += colors.bold + group + colors.reset + '\n'
- for (param in group_params.keySet()) {
- output += " " + colors.blue + param.padRight(max_chars) + ": " + colors.green + group_params.get(param) + colors.reset + '\n'
- }
- output += '\n'
- }
- }
- output += "!! Only displaying parameters that differ from the pipeline defaults !!\n"
- output += NfcoreTemplate.dashedLine(params.monochrome_logs)
- return output
- }
-
- //
- // Loop over nested exceptions and print the causingException
- //
- private static void printExceptions(ex_json, params_json, log, enums, limit=5) {
- def causingExceptions = ex_json['causingExceptions']
- if (causingExceptions.length() == 0) {
- def m = ex_json['message'] =~ /required key \[([^\]]+)\] not found/
- // Missing required param
- if (m.matches()) {
- log.error "* Missing required parameter: --${m[0][1]}"
- }
- // Other base-level error
- else if (ex_json['pointerToViolation'] == '#') {
- log.error "* ${ex_json['message']}"
- }
- // Error with specific param
- else {
- def param = ex_json['pointerToViolation'] - ~/^#\//
- def param_val = params_json[param].toString()
- if (enums.containsKey(param)) {
- def error_msg = "* --${param}: '${param_val}' is not a valid choice (Available choices"
- if (enums[param].size() > limit) {
- log.error "${error_msg} (${limit} of ${enums[param].size()}): ${enums[param][0..limit-1].join(', ')}, ... )"
- } else {
- log.error "${error_msg}: ${enums[param].join(', ')})"
- }
- } else {
- log.error "* --${param}: ${ex_json['message']} (${param_val})"
- }
- }
- }
- for (ex in causingExceptions) {
- printExceptions(ex, params_json, log, enums)
- }
- }
-
- //
- // Remove an element from a JSONArray
- //
- private static JSONArray removeElement(json_array, element) {
- def list = []
- int len = json_array.length()
- for (int i=0;i
- if(raw_schema.keySet().contains('definitions')){
- raw_schema.definitions.each { definition ->
- for (key in definition.keySet()){
- if (definition[key].get("properties").keySet().contains(ignore_param)){
- // Remove the param to ignore
- definition[key].get("properties").remove(ignore_param)
- // If the param was required, change this
- if (definition[key].has("required")) {
- def cleaned_required = removeElement(definition[key].required, ignore_param)
- definition[key].put("required", cleaned_required)
- }
- }
- }
- }
- }
- if(raw_schema.keySet().contains('properties') && raw_schema.get('properties').keySet().contains(ignore_param)) {
- raw_schema.get("properties").remove(ignore_param)
- }
- if(raw_schema.keySet().contains('required') && raw_schema.required.contains(ignore_param)) {
- def cleaned_required = removeElement(raw_schema.required, ignore_param)
- raw_schema.put("required", cleaned_required)
- }
- }
- return raw_schema
- }
-
- //
- // Clean and check parameters relative to Nextflow native classes
- //
- private static Map cleanParameters(params) {
- def new_params = params.getClass().newInstance(params)
- for (p in params) {
- // remove anything evaluating to false
- if (!p['value']) {
- new_params.remove(p.key)
- }
- // Cast MemoryUnit to String
- if (p['value'].getClass() == nextflow.util.MemoryUnit) {
- new_params.replace(p.key, p['value'].toString())
- }
- // Cast Duration to String
- if (p['value'].getClass() == nextflow.util.Duration) {
- new_params.replace(p.key, p['value'].toString().replaceFirst(/d(?!\S)/, "day"))
- }
- // Cast LinkedHashMap to String
- if (p['value'].getClass() == LinkedHashMap) {
- new_params.replace(p.key, p['value'].toString())
- }
- }
- return new_params
- }
-
- //
- // This function tries to read a JSON params file
- //
- private static LinkedHashMap paramsLoad(String json_schema) {
- def params_map = new LinkedHashMap()
- try {
- params_map = paramsRead(json_schema)
- } catch (Exception e) {
- println "Could not read parameters settings from JSON. $e"
- params_map = new LinkedHashMap()
- }
- return params_map
- }
-
- //
- // Method to actually read in JSON file using Groovy.
- // Group (as Key), values are all parameters
- // - Parameter1 as Key, Description as Value
- // - Parameter2 as Key, Description as Value
- // ....
- // Group
- // -
- private static LinkedHashMap paramsRead(String json_schema) throws Exception {
- def json = new File(json_schema).text
- def Map schema_definitions = (Map) new JsonSlurper().parseText(json).get('definitions')
- def Map schema_properties = (Map) new JsonSlurper().parseText(json).get('properties')
- /* Tree looks like this in nf-core schema
- * definitions <- this is what the first get('definitions') gets us
- group 1
- title
- description
- properties
- parameter 1
- type
- description
- parameter 2
- type
- description
- group 2
- title
- description
- properties
- parameter 1
- type
- description
- * properties <- parameters can also be ungrouped, outside of definitions
- parameter 1
- type
- description
- */
-
- // Grouped params
- def params_map = new LinkedHashMap()
- schema_definitions.each { key, val ->
- def Map group = schema_definitions."$key".properties // Gets the property object of the group
- def title = schema_definitions."$key".title
- def sub_params = new LinkedHashMap()
- group.each { innerkey, value ->
- sub_params.put(innerkey, value)
- }
- params_map.put(title, sub_params)
- }
-
- // Ungrouped params
- def ungrouped_params = new LinkedHashMap()
- schema_properties.each { innerkey, value ->
- ungrouped_params.put(innerkey, value)
- }
- params_map.put("Other parameters", ungrouped_params)
-
- return params_map
- }
-
- //
- // Get maximum number of characters across all parameter names
- //
- private static Integer paramsMaxChars(params_map) {
- Integer max_chars = 0
- for (group in params_map.keySet()) {
- def group_params = params_map.get(group) // This gets the parameters of that particular group
- for (param in group_params.keySet()) {
- if (param.size() > max_chars) {
- max_chars = param.size()
- }
- }
- }
- return max_chars
- }
-}
diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy
index 25a0a74a..01b8653d 100755
--- a/lib/NfcoreTemplate.groovy
+++ b/lib/NfcoreTemplate.groovy
@@ -3,6 +3,7 @@
//
import org.yaml.snakeyaml.Yaml
+import groovy.json.JsonOutput
class NfcoreTemplate {
@@ -128,7 +129,7 @@ class NfcoreTemplate {
def email_html = html_template.toString()
// Render the sendmail template
- def max_multiqc_email_size = params.max_multiqc_email_size as nextflow.util.MemoryUnit
+ def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as nextflow.util.MemoryUnit
def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes() ]
def sf = new File("$projectDir/assets/sendmail_template.txt")
def sendmail_template = engine.createTemplate(sf).make(smail_fields)
@@ -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/WorkflowAirrflow.groovy b/lib/WorkflowAirrflow.groovy
index 800936b4..9b1c3b97 100755
--- a/lib/WorkflowAirrflow.groovy
+++ b/lib/WorkflowAirrflow.groovy
@@ -40,14 +40,56 @@ class WorkflowAirrflow {
return yaml_file_text
}
- public static String methodsDescriptionText(run_workflow, mqc_methods_yaml) {
+ //
+ // Generate methods description for MultiQC
+ //
+
+ public static String toolCitationText(params) {
+
+ // TODO 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 = [
+ "Tools used in the workflow included:",
+ "FastQC (Andrews 2010),",
+ "MultiQC (Ewels et al. 2016)",
+ "."
+ ].join(' ').trim()
+
+ return citation_text
+ }
+
+ public static String toolBibliographyText(params) {
+
+ // TODO Optionally add bibliographic entries to this list.
+ // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Author (2023) Pub name, Journal, DOI" : "",
+ // Uncomment function in methodsDescriptionText to render in MultiQC report
+ def reference_text = [
+ "Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).",
+ "Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354"
+ ].join(' ').trim()
+
+ return reference_text
+ }
+
+ public static String methodsDescriptionText(run_workflow, mqc_methods_yaml, params) {
// Convert to a named map so can be used as with familar NXF ${workflow} variable syntax in the MultiQC YML file
def meta = [:]
meta.workflow = run_workflow.toMap()
meta['manifest_map'] = run_workflow.manifest.toMap()
- meta['doi_text'] = meta.manifest_map.doi ? "(doi: ${meta.manifest_map.doi})" : ''
- meta['nodoi_text'] = meta.manifest_map.doi ? '' : 'If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used. '
+ // Pipeline DOI
+ meta["doi_text"] = meta.manifest_map.doi ? "(doi: ${meta.manifest_map.doi})" : ""
+ meta["nodoi_text"] = meta.manifest_map.doi ? "": "If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used. "
+
+ // Tool references
+ meta["tool_citations"] = ""
+ meta["tool_bibliography"] = ""
+
+ // TODO Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
+ //meta["tool_citations"] = toolCitationText(params).replaceAll(", \\.", ".").replaceAll("\\. \\.", ".").replaceAll(", \\.", ".")
+ //meta["tool_bibliography"] = toolBibliographyText(params)
+
def methods_text = mqc_methods_yaml.text
diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy
index 5342cbb3..538ea8a4 100755
--- a/lib/WorkflowMain.groovy
+++ b/lib/WorkflowMain.groovy
@@ -19,40 +19,11 @@ class WorkflowMain {
" https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md"
}
- //
- // Generate help string
- //
- public static String help(workflow, params) {
- def command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.tsv --cprimers CPrimers.fasta --vprimers VPrimers.fasta --umi_length 12 --loci ig"
- def help_string = ''
- help_string += NfcoreTemplate.logo(workflow, params.monochrome_logs)
- help_string += NfcoreSchema.paramsHelp(workflow, params, command)
- help_string += '\n' + citation(workflow) + '\n'
- help_string += NfcoreTemplate.dashedLine(params.monochrome_logs)
- return help_string
- }
-
- //
- // Generate parameter summary log string
- //
- public static String paramsSummaryLog(workflow, params) {
- def summary_log = ''
- summary_log += NfcoreTemplate.logo(workflow, params.monochrome_logs)
- summary_log += NfcoreSchema.paramsSummaryLog(workflow, params)
- summary_log += '\n' + citation(workflow) + '\n'
- summary_log += NfcoreTemplate.dashedLine(params.monochrome_logs)
- return summary_log
- }
//
// Validate parameters and print summary to screen
//
public static void initialise(workflow, params, log) {
- // Print help to screen if required
- if (params.help) {
- log.info help(workflow, params)
- System.exit(0)
- }
// Print workflow version and exit on --version
if (params.version) {
@@ -61,14 +32,6 @@ class WorkflowMain {
System.exit(0)
}
- // Print parameter summary log to screen
- log.info paramsSummaryLog(workflow, params)
-
- // Validate workflow parameters via the JSON schema
- if (params.validate_params) {
- NfcoreSchema.validateParameters(workflow, params, log)
- }
-
// Check that a -profile or Nextflow config has been provided to run the pipeline
NfcoreTemplate.checkConfigProvided(workflow, log)
diff --git a/main.nf b/main.nf
index 2c213e4b..095f148f 100644
--- a/main.nf
+++ b/main.nf
@@ -17,6 +17,23 @@ nextflow.enable.dsl = 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
+// Commented out as taking too long for big samplesheets
+//include { validateParameters; paramsHelp } from 'plugin/nf-validation'
+
+// Print help message if needed
+if (params.help) {
+ def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs)
+ def citation = '\n' + WorkflowMain.citation(workflow) + '\n'
+ def String command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv --genome GRCh37 -profile docker"
+ log.info logo + paramsHelp(command) + citation + NfcoreTemplate.dashedLine(params.monochrome_logs)
+ System.exit(0)
+}
+
+// Validate input parameters
+//if (params.validate_params) {
+// validateParameters()
+//}
+
WorkflowMain.initialise(workflow, params, log)
/*
diff --git a/modules/local/airrflow_report/airrflow_report.nf b/modules/local/airrflow_report/airrflow_report.nf
index 9621d685..0ba78193 100644
--- a/modules/local/airrflow_report/airrflow_report.nf
+++ b/modules/local/airrflow_report/airrflow_report.nf
@@ -2,10 +2,12 @@ process AIRRFLOW_REPORT {
tag "${meta.id}"
label 'process_high'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
tuple val(meta), path(tab) // sequence tsv table in AIRR format
diff --git a/modules/local/enchantr/collapse_duplicates.nf b/modules/local/enchantr/collapse_duplicates.nf
index 2257913f..6880de53 100644
--- a/modules/local/enchantr/collapse_duplicates.nf
+++ b/modules/local/enchantr/collapse_duplicates.nf
@@ -4,10 +4,12 @@ process COLLAPSE_DUPLICATES {
label 'process_long_parallelized'
label 'immcantation'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
tuple val(meta), path(tabs) // tuple [val(meta), sequence tsv in AIRR format ]
diff --git a/modules/local/enchantr/define_clones.nf b/modules/local/enchantr/define_clones.nf
index 7321603a..c127bbc0 100644
--- a/modules/local/enchantr/define_clones.nf
+++ b/modules/local/enchantr/define_clones.nf
@@ -21,10 +21,12 @@ process DEFINE_CLONES {
label 'process_long_parallelized'
label 'immcantation'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
tuple val(meta), path(tabs) // meta, sequence tsv in AIRR format
@@ -54,6 +56,7 @@ process DEFINE_CLONES {
'imgt_db'='${imgt_base}', \\
'species'='auto', \\
'cloneby'='${params.cloneby}', \\
+ 'outputby'='${params.cloneby}',
'force'=FALSE, \\
'threshold'=${thr}, \\
'singlecell'='${params.singlecell}','outdir'=getwd(), \\
diff --git a/modules/local/enchantr/detect_contamination.nf b/modules/local/enchantr/detect_contamination.nf
index 003c2126..6cdc2fa5 100644
--- a/modules/local/enchantr/detect_contamination.nf
+++ b/modules/local/enchantr/detect_contamination.nf
@@ -5,10 +5,12 @@ process DETECT_CONTAMINATION {
label 'immcantation'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
path(tabs)
diff --git a/modules/local/enchantr/dowser_lineages.nf b/modules/local/enchantr/dowser_lineages.nf
index 2e398f58..51930bb9 100644
--- a/modules/local/enchantr/dowser_lineages.nf
+++ b/modules/local/enchantr/dowser_lineages.nf
@@ -21,10 +21,12 @@ process DOWSER_LINEAGES {
label 'process_long_parallelized'
label 'immcantation'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
tuple val(meta), path(tabs)
diff --git a/modules/local/enchantr/find_threshold.nf b/modules/local/enchantr/find_threshold.nf
index 32ff652e..06df734c 100644
--- a/modules/local/enchantr/find_threshold.nf
+++ b/modules/local/enchantr/find_threshold.nf
@@ -21,10 +21,12 @@ process FIND_THRESHOLD {
label 'process_long_parallelized'
label 'immcantation'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
@@ -36,8 +38,8 @@ process FIND_THRESHOLD {
// tuple val(meta), path("*threshold-pass.tsv"), emit: tab // sequence tsv in AIRR format
path("*_command_log.txt"), emit: logs //process logs
path "*_report"
- path "*_threshold-summary.tsv", emit: threshold_summary
- path "*_threshold-mean.tsv", emit: mean_threshold
+ path "all_reps_dist_report/tables/*_threshold-summary.tsv", emit: threshold_summary, optional:true
+ path "all_reps_dist_report/tables/*_threshold-mean.tsv", emit: mean_threshold
path "versions.yml", emit: versions
script:
diff --git a/modules/local/enchantr/remove_chimeric.nf b/modules/local/enchantr/remove_chimeric.nf
index 41467ecb..2489362e 100644
--- a/modules/local/enchantr/remove_chimeric.nf
+++ b/modules/local/enchantr/remove_chimeric.nf
@@ -5,10 +5,12 @@ process REMOVE_CHIMERIC {
label 'immcantation'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
diff --git a/modules/local/enchantr/report_file_size.nf b/modules/local/enchantr/report_file_size.nf
index c9a2052c..b43e1c35 100644
--- a/modules/local/enchantr/report_file_size.nf
+++ b/modules/local/enchantr/report_file_size.nf
@@ -6,10 +6,12 @@ process REPORT_FILE_SIZE {
label 'immcantation'
label 'process_single'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
path logs
diff --git a/modules/local/enchantr/single_cell_qc.nf b/modules/local/enchantr/single_cell_qc.nf
index 3275c523..5f1190e1 100644
--- a/modules/local/enchantr/single_cell_qc.nf
+++ b/modules/local/enchantr/single_cell_qc.nf
@@ -20,10 +20,12 @@ process SINGLE_CELL_QC {
label 'immcantation'
label 'process_medium'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
path(tabs)
diff --git a/modules/local/enchantr/validate_input.nf b/modules/local/enchantr/validate_input.nf
index fd6bd345..d87b27b2 100644
--- a/modules/local/enchantr/validate_input.nf
+++ b/modules/local/enchantr/validate_input.nf
@@ -6,10 +6,12 @@ process VALIDATE_INPUT {
label 'immcantation'
label 'process_single'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
file samplesheet
diff --git a/modules/local/presto/presto_buildconsensus.nf b/modules/local/presto/presto_buildconsensus.nf
index d5e92621..6f5d9b20 100644
--- a/modules/local/presto/presto_buildconsensus.nf
+++ b/modules/local/presto/presto_buildconsensus.nf
@@ -20,11 +20,14 @@ process PRESTO_BUILDCONSENSUS {
path "versions.yml" , emit: versions
script:
- def barcode_field = params.cluster_sets ? "CLUSTER" : "BARCODE"
+ def barcode_field = params.cluster_sets ? 'CLUSTER' : 'BARCODE'
+ def args = task.ext.args ?: ''
+ def args2 = task.ext.args2 ?: ''
+ def args3 = task.ext.args3 ?: ''
"""
- BuildConsensus.py -s $R1 --bf ${barcode_field} --nproc ${task.cpus} --pf PRIMER --prcons $params.primer_consensus --maxerror $params.buildconsensus_maxerror --maxgap $params.buildconsensus_maxgap --outname ${meta.id}_R1 --log ${meta.id}_R1.log > ${meta.id}_command_log.txt
- BuildConsensus.py -s $R2 --bf ${barcode_field} --nproc ${task.cpus} --pf PRIMER --prcons $params.primer_consensus --maxerror $params.buildconsensus_maxerror --maxgap $params.buildconsensus_maxgap --outname ${meta.id}_R2 --log ${meta.id}_R2.log >> ${meta.id}_command_log.txt
- ParseLog.py -l ${meta.id}_R1.log ${meta.id}_R2.log -f ID BARCODE SEQCOUNT PRIMER PRCOUNT PRCONS PRFREQ CONSCOUNT
+ BuildConsensus.py -s $R1 --bf ${barcode_field} --nproc ${task.cpus} --pf PRIMER --prcons ${params.primer_consensus} --maxerror ${params.buildconsensus_maxerror} --maxgap ${params.buildconsensus_maxgap} ${args} --outname ${meta.id}_R1 --log ${meta.id}_R1.log > ${meta.id}_command_log.txt
+ BuildConsensus.py -s $R2 --bf ${barcode_field} --nproc ${task.cpus} --pf PRIMER --prcons ${params.primer_consensus} --maxerror ${params.buildconsensus_maxerror} --maxgap ${params.buildconsensus_maxgap} ${args2} --outname ${meta.id}_R2 --log ${meta.id}_R2.log >> ${meta.id}_command_log.txt
+ ParseLog.py -l ${meta.id}_R1.log ${meta.id}_R2.log -f ${args3}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diff --git a/modules/local/reveal/add_meta_to_tab.nf b/modules/local/reveal/add_meta_to_tab.nf
index f24433e2..b6c817a1 100644
--- a/modules/local/reveal/add_meta_to_tab.nf
+++ b/modules/local/reveal/add_meta_to_tab.nf
@@ -3,10 +3,12 @@ process ADD_META_TO_TAB {
label 'immcantation'
label 'process_single'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
cache 'deep' // Without 'deep' this process would run when using -resume
diff --git a/modules/local/reveal/filter_junction_mod3.nf b/modules/local/reveal/filter_junction_mod3.nf
index 841fbba9..fa312ece 100644
--- a/modules/local/reveal/filter_junction_mod3.nf
+++ b/modules/local/reveal/filter_junction_mod3.nf
@@ -3,10 +3,12 @@ process FILTER_JUNCTION_MOD3 {
label 'immcantation'
label 'process_single'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
tuple val(meta), path(tab) // sequence tsv in AIRR format
diff --git a/modules/local/reveal/filter_quality.nf b/modules/local/reveal/filter_quality.nf
index a649caef..202840a4 100644
--- a/modules/local/reveal/filter_quality.nf
+++ b/modules/local/reveal/filter_quality.nf
@@ -3,10 +3,12 @@ process FILTER_QUALITY {
label 'immcantation'
label 'process_single'
- conda "bioconda::r-enchantr=0.1.3"
+ if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
+ error "nf-core/airrflow currently does not support Conda. Please use a container profile instead."
+ }
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/r-enchantr:0.1.3--r42hdfd78af_0':
- 'biocontainers/r-enchantr:0.1.3--r42hdfd78af_0' }"
+ 'docker.io/immcantation/airrflow:devel':
+ 'docker.io/immcantation/airrflow:devel' }"
input:
tuple val(meta), path(tab) // sequence tsv in AIRR format
diff --git a/nextflow.config b/nextflow.config
index 77d8ef57..c4d958c6 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -79,9 +79,10 @@ params {
singlecell = 'single_cell'
clonal_threshold = 'auto'
skip_all_clones_report = false
+ skip_report_threshold = false
// tree lineage options
- igphyml="/usr/local/bin/igphyml"
+ igphyml="/usr/local/share/igphyml/src/igphyml"
skip_lineage = false
// -----------------------
@@ -111,7 +112,6 @@ params {
// Boilerplate options
outdir = null
- tracedir = "${params.outdir}/pipeline_info"
publish_dir_mode = 'copy'
email = null
email_on_fail = null
@@ -120,17 +120,15 @@ params {
hook_url = null
help = false
version = false
- validate_params = true
- show_hidden_params = false
- schema_ignore_params = 'genomes'
// Config options
+ config_profile_name = null
+ config_profile_description = null
custom_config_version = 'master'
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
- config_profile_description = null
config_profile_contact = null
config_profile_url = null
- config_profile_name = null
+
// Max resource options
// Defaults only, expecting to be overwritten
@@ -138,6 +136,13 @@ params {
max_cpus = 16
max_time = '240.h'
+ // Schema validation default options
+ validationFailUnrecognisedParams = false
+ validationLenientMode = false
+ validationSchemaIgnoreParams = 'genomes'
+ validationShowHiddenParams = false
+ validate_params = true
+
}
// Load base.config by default for all pipelines
@@ -157,14 +162,11 @@ try {
// } catch (Exception e) {
// System.err.println("WARNING: Could not load nf-core/config/airrflow profiles: ${params.custom_config_base}/pipeline/airrflow.config")
// }
-docker.registry = 'quay.io'
-podman.registry = 'quay.io'
-
profiles {
debug {
dumpHashes = true
process.beforeScript = 'echo $HOSTNAME'
- cleanup = false
+ cleanup = false
}
conda {
conda.enabled = true
@@ -265,6 +267,18 @@ profiles {
test_igblast { includeConfig 'conf/test_igblast.config' }
}
+// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile
+// Will not be used unless Apptainer / Docker / Podman / Singularity are enabled
+// Set to your registry if you have a mirror of containers
+apptainer.registry = 'quay.io'
+docker.registry = 'quay.io'
+podman.registry = 'quay.io'
+singularity.registry = 'quay.io'
+
+// Nextflow plugins
+plugins {
+ id 'nf-validation' // Validation of pipeline parameters and creation of an input channel from a sample sheet
+}
// Load igenomes.config if required
if (!params.igenomes_ignore) {
@@ -272,7 +286,6 @@ if (!params.igenomes_ignore) {
} else {
params.genomes = [:]
}
-
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
// The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container.
// See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable.
@@ -281,6 +294,8 @@ env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER = "/.Rprofile"
R_ENVIRON_USER = "/.Renviron"
+ R_LIBS_SITE = "NULL"
+ R_LIBS_USER = "NULL"
JULIA_DEPOT_PATH = "/usr/local/share/julia"
}
@@ -290,19 +305,19 @@ process.shell = ['/bin/bash', '-euo', 'pipefail']
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
timeline {
enabled = true
- file = "${params.tracedir}/execution_timeline_${trace_timestamp}.html"
+ file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html"
}
report {
enabled = true
- file = "${params.tracedir}/execution_report_${trace_timestamp}.html"
+ file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html"
}
trace {
enabled = true
- file = "${params.tracedir}/execution_trace_${trace_timestamp}.txt"
+ file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt"
}
dag {
enabled = true
- file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.html"
+ file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html"
}
manifest {
@@ -311,7 +326,7 @@ manifest {
homePage = 'https://github.com/nf-core/airrflow'
description = """B and T cell repertoire analysis pipeline with the Immcantation framework."""
mainScript = 'main.nf'
- nextflowVersion = '!>=22.10.1'
+ nextflowVersion = '!>=23.04.0'
version = '3.2.0dev'
doi = '10.5281/zenodo.2642009'
}
diff --git a/nextflow_schema.json b/nextflow_schema.json
index e6a3365e..e1e77e77 100644
--- a/nextflow_schema.json
+++ b/nextflow_schema.json
@@ -14,10 +14,14 @@
"properties": {
"input": {
"type": "string",
- "mimetype": "text/tsv",
- "fa_icon": "fas fa-table",
- "description": "Path to a tsv file providing paths to the fastq files for each sample and the necessary metadata for the analysis.",
- "help_text": "The input file includes important sample metadata and the path to the R1 and R2 fastq files, and index read file (I), if available. Please check the usage docs on information on how to create the input samplesheet."
+ "format": "file-path",
+ "exists": true,
+ "mimetype": "text/csv",
+ "pattern": "^\\S+\\.tsv$",
+ "schema": "assets/schema_input.json",
+ "description": "Path to comma-separated file containing information about the samples in the experiment.",
+ "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row. See [usage docs](https://nf-co.re/airrflow/usage#samplesheet-input).",
+ "fa_icon": "fas fa-file-csv"
},
"mode": {
"type": "string",
@@ -364,6 +368,11 @@
"type": "boolean",
"description": "Skip report of EnchantR DefineClones for all samples together.",
"fa_icon": "fas fa-angle-double-right"
+ },
+ "skip_report_threshold": {
+ "type": "boolean",
+ "description": "Skip report of EnchantR FindThreshold for all samples together.",
+ "fa_icon": "fas fa-angle-double-right"
}
},
"help_text": "By default, the pipeline will define clones for each of the samples, as two sequences having the same V-gene assignment, C-gene assignment, J-gene assignment, and junction length. Additionally, the similarity of the CDR3 sequences will be assessed by Hamming distances. \n\nA distance threshold for determining if two sequences come from the same clone or not is automatically determined by the process find threshold. Alternatively, a hamming distance threshold can be manually set by setting the `--clonal_threshold` parameter.",
@@ -514,7 +523,7 @@
"description": "Maximum amount of time that can be requested for any single job.",
"default": "240.h",
"fa_icon": "far fa-clock",
- "pattern": "^(\\d+\\.?\\s*(s|m|h|day)\\s*)+$",
+ "pattern": "^(\\d+\\.?\\s*(s|m|h|d|day)\\s*)+$",
"hidden": true,
"help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '2.h'`"
}
@@ -531,12 +540,14 @@
"type": "boolean",
"description": "Display help text.",
"fa_icon": "fas fa-question-circle",
+ "default": false,
"hidden": true
},
"version": {
"type": "boolean",
"description": "Display version and exit.",
"fa_icon": "fas fa-question-circle",
+ "default": false,
"hidden": true
},
"publish_dir_mode": {
@@ -560,6 +571,7 @@
"type": "boolean",
"description": "Send plain-text email instead of HTML.",
"fa_icon": "fas fa-remove-format",
+ "default": false,
"hidden": true
},
"multiqc_title": {
@@ -579,6 +591,7 @@
"type": "boolean",
"description": "Do not use coloured log outputs.",
"fa_icon": "fas fa-palette",
+ "default": false,
"hidden": true
},
"hook_url": {
@@ -590,6 +603,7 @@
},
"multiqc_config": {
"type": "string",
+ "format": "file-path",
"description": "Custom config file to supply to MultiQC.",
"fa_icon": "fas fa-cog",
"hidden": true
@@ -605,13 +619,6 @@
"description": "Custom MultiQC yaml file containing HTML including a methods description.",
"fa_icon": "fas fa-cog"
},
- "tracedir": {
- "type": "string",
- "description": "Directory to keep pipeline Nextflow logs and reports.",
- "default": "${params.outdir}/pipeline_info",
- "fa_icon": "fas fa-cogs",
- "hidden": true
- },
"validate_params": {
"type": "boolean",
"description": "Boolean whether to validate parameters against the schema at runtime",
@@ -619,12 +626,29 @@
"fa_icon": "fas fa-check-square",
"hidden": true
},
- "show_hidden_params": {
+ "validationShowHiddenParams": {
"type": "boolean",
"fa_icon": "far fa-eye-slash",
"description": "Show all params when using `--help`",
+ "default": false,
"hidden": true,
"help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters."
+ },
+ "validationFailUnrecognisedParams": {
+ "type": "boolean",
+ "fa_icon": "far fa-check-circle",
+ "description": "Validation of parameters fails when an unrecognised parameter is found.",
+ "default": false,
+ "hidden": true,
+ "help_text": "By default, when an unrecognised parameter is found, it returns a warinig."
+ },
+ "validationLenientMode": {
+ "type": "boolean",
+ "fa_icon": "far fa-check-circle",
+ "description": "Validation of parameters in lenient more.",
+ "default": false,
+ "hidden": true,
+ "help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)."
}
}
}
diff --git a/subworkflows/local/clonal_analysis.nf b/subworkflows/local/clonal_analysis.nf
index ff4afacf..b4c413f6 100644
--- a/subworkflows/local/clonal_analysis.nf
+++ b/subworkflows/local/clonal_analysis.nf
@@ -51,13 +51,14 @@ workflow CLONAL_ANALYSIS {
.dump(tag: 'ch_find_threshold_samplesheet')
.collectFile(name: 'find_threshold_samplesheet.txt', newLine: true)
- REPORT_THRESHOLD (
- ch_find_threshold,
- ch_logo,
- ch_find_threshold_samplesheet
- )
- ch_versions = ch_versions.mix(REPORT_THRESHOLD.out.versions)
-
+ if (!params.skip_report_threshold){
+ REPORT_THRESHOLD (
+ ch_find_threshold,
+ ch_logo,
+ ch_find_threshold_samplesheet
+ )
+ ch_versions = ch_versions.mix(REPORT_THRESHOLD.out.versions)
+ }
}
// prepare ch for define clones
diff --git a/workflows/airrflow.nf b/workflows/airrflow.nf
index 74aab699..2984ecba 100644
--- a/workflows/airrflow.nf
+++ b/workflows/airrflow.nf
@@ -1,12 +1,18 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- VALIDATE INPUTS
+ PRINT PARAMS SUMMARY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
-def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params)
+include { paramsSummaryLog; paramsSummaryMap } from 'plugin/nf-validation'
+
+def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs)
+def citation = '\n' + WorkflowMain.citation(workflow) + '\n'
+def summary_params = paramsSummaryMap(workflow)
+
+// Print parameter summary log to screen
+log.info logo + paramsSummaryLog(workflow) + citation
-// Validate input parameters
WorkflowAirrflow.initialise(params, log)
// Check input path parameters to see if they exist
@@ -28,6 +34,8 @@ if (params.input) {
ch_multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true)
ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config, checkIfExists: true ) : Channel.empty()
+ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath( params.multiqc_logo, checkIfExists: true ) : Channel.empty()
+ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
// Report files
ch_report_rmd = Channel.fromPath(params.report_rmd, checkIfExists: true)
@@ -229,9 +237,12 @@ workflow AIRRFLOW {
workflow_summary = WorkflowAirrflow.paramsSummaryMultiqc(workflow, summary_params)
ch_workflow_summary = Channel.value(workflow_summary)
+ methods_description = WorkflowAirrflow.methodsDescriptionText(workflow, ch_multiqc_custom_methods_description, params)
+ ch_methods_description = Channel.value(methods_description)
+
ch_multiqc_files = Channel.empty()
- ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')
ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
+ ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
ch_multiqc_files = ch_multiqc_files.mix(ch_fastp_html.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_fastp_json.ifEmpty([]))