diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 4a9bc5c7..4ecfbfe3 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -18,11 +18,11 @@
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
- "python.linting.pylintPath": "/opt/conda/bin/pylint",
+ "python.linting.pylintPath": "/opt/conda/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
- "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"],
- },
- },
+ "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
+ }
+ }
}
diff --git a/.editorconfig b/.editorconfig
index b6b31907..9b990088 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -22,3 +22,11 @@ indent_size = unset
[/assets/email*]
indent_size = unset
+
+# ignore Readme
+[README.md]
+indent_style = unset
+
+# ignore python
+[*.{py}]
+indent_style = unset
diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml
index fe4bbfa5..26df7808 100644
--- a/.github/workflows/awsfulltest.yml
+++ b/.github/workflows/awsfulltest.yml
@@ -28,7 +28,7 @@ jobs:
}
profiles: test_full
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
name: Tower debug log file
path: |
diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml
index b53e3b20..7b722e77 100644
--- a/.github/workflows/awstest.yml
+++ b/.github/workflows/awstest.yml
@@ -25,7 +25,7 @@ jobs:
}
profiles: test
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
name: Tower debug log file
path: |
diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml
index 7ebd2e11..6a3b05e6 100644
--- a/.github/workflows/branch.yml
+++ b/.github/workflows/branch.yml
@@ -19,7 +19,7 @@ jobs:
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
- uses: mshick/add-pr-comment@v1
+ uses: mshick/add-pr-comment@v2
with:
message: |
## This PR is against the `master` branch :x:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d44aa343..7c027331 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -59,12 +59,12 @@ jobs:
- name: Run pipeline with test data
run: |
- if [[ "${{ matrix.tags }}" == "test_motus" ]]; then
- wget https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py
+ if [[ "${{ matrix.tags }}" == "test_motus" ]]; then
+ wget https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py
python downloadDB.py > download_db_log.txt
echo 'tool,db_name,db_params,db_path' > 'database_motus.csv'
echo 'motus,db_mOTU,,db_mOTU' >> 'database_motus.csv'
- nextflow run ${GITHUB_WORKSPACE} -profile docker,${{ matrix.tags }} --databases ./database_motus.csv --outdir ./results_${{ matrix.tags }};
- else
+ nextflow run ${GITHUB_WORKSPACE} -profile docker,${{ matrix.tags }} --databases ./database_motus.csv --outdir ./results_${{ matrix.tags }};
+ else
nextflow run ${GITHUB_WORKSPACE} -profile docker,${{ matrix.tags }} --outdir ./results_${{ matrix.tags }};
fi
diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml
index 694e90ec..e37cfda5 100644
--- a/.github/workflows/clean-up.yml
+++ b/.github/workflows/clean-up.yml
@@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- - uses: actions/stale@v7
+ - uses: actions/stale@v9
with:
stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days."
stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful."
diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml
new file mode 100644
index 00000000..8a330045
--- /dev/null
+++ b/.github/workflows/download_pipeline.yml
@@ -0,0 +1,67 @@
+name: Test successful pipeline download with 'nf-core download'
+
+# Run the workflow when:
+# - dispatched manually
+# - when a PR is opened or reopened to master branch
+# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev.
+on:
+ workflow_dispatch:
+ pull_request:
+ types:
+ - opened
+ branches:
+ - master
+ pull_request_target:
+ branches:
+ - master
+
+env:
+ NXF_ANSI_LOG: false
+
+jobs:
+ download:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install Nextflow
+ uses: nf-core/setup-nextflow@v1
+
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+ architecture: "x64"
+ - uses: eWaterCycle/setup-singularity@v7
+ with:
+ singularity-version: 3.8.3
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install git+https://github.com/nf-core/tools.git@dev
+
+ - name: Get the repository name and current branch set as environment variable
+ run: |
+ echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
+ echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
+ echo "REPO_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV}
+
+ - name: Download the pipeline
+ env:
+ NXF_SINGULARITY_CACHEDIR: ./
+ run: |
+ nf-core download ${{ env.REPO_LOWERCASE }} \
+ --revision ${{ env.REPO_BRANCH }} \
+ --outdir ./${{ env.REPOTITLE_LOWERCASE }} \
+ --compress "none" \
+ --container-system 'singularity' \
+ --container-library "quay.io" -l "docker.io" -l "ghcr.io" \
+ --container-cache-utilisation 'amend' \
+ --download-configuration
+
+ - name: Inspect download
+ run: tree ./${{ env.REPOTITLE_LOWERCASE }}
+
+ - name: Run the downloaded pipeline
+ env:
+ NXF_SINGULARITY_CACHEDIR: ./
+ NXF_SINGULARITY_HOME_MOUNT: true
+ run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml
index 7b5ad1c7..74c1ce02 100644
--- a/.github/workflows/fix-linting.yml
+++ b/.github/workflows/fix-linting.yml
@@ -4,7 +4,7 @@ on:
types: [created]
jobs:
- deploy:
+ fix-linting:
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
if: >
contains(github.event.comment.html_url, '/pull/') &&
@@ -13,10 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
# Use the @nf-core-bot token to check out so we can push later
- - uses: actions/checkout@v4
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
token: ${{ secrets.nf_core_bot_auth_token }}
+ # indication that the linting is being fixed
+ - name: React on comment
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
+ with:
+ comment-id: ${{ github.event.comment.id }}
+ reactions: eyes
+
# Action runs on the issue comment, so we don't get the PR by default
# Use the gh cli to check out the PR
- name: Checkout Pull Request
@@ -24,32 +31,59 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
- - uses: actions/setup-node@v4
+ # Install and run pre-commit
+ - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
+ with:
+ python-version: 3.11
- - name: Install Prettier
- run: npm install -g prettier @prettier/plugin-php
+ - name: Install pre-commit
+ run: pip install pre-commit
- # Check that we actually need to fix something
- - name: Run 'prettier --check'
- id: prettier_status
- run: |
- if prettier --check ${GITHUB_WORKSPACE}; then
- echo "result=pass" >> $GITHUB_OUTPUT
- else
- echo "result=fail" >> $GITHUB_OUTPUT
- fi
+ - name: Run pre-commit
+ id: pre-commit
+ run: pre-commit run --all-files
+ continue-on-error: true
- - name: Run 'prettier --write'
- if: steps.prettier_status.outputs.result == 'fail'
- run: prettier --write ${GITHUB_WORKSPACE}
+ # indication that the linting has finished
+ - name: react if linting finished succesfully
+ if: steps.pre-commit.outcome == 'success'
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
+ with:
+ comment-id: ${{ github.event.comment.id }}
+ reactions: "+1"
- name: Commit & push changes
- if: steps.prettier_status.outputs.result == 'fail'
+ id: commit-and-push
+ if: steps.pre-commit.outcome == 'failure'
run: |
git config user.email "core@nf-co.re"
git config user.name "nf-core-bot"
git config push.default upstream
git add .
git status
- git commit -m "[automated] Fix linting with Prettier"
+ git commit -m "[automated] Fix code linting"
git push
+
+ - name: react if linting errors were fixed
+ id: react-if-fixed
+ if: steps.commit-and-push.outcome == 'success'
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
+ with:
+ comment-id: ${{ github.event.comment.id }}
+ reactions: hooray
+
+ - name: react if linting errors were not fixed
+ if: steps.commit-and-push.outcome == 'failure'
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
+ with:
+ comment-id: ${{ github.event.comment.id }}
+ reactions: confused
+
+ - name: react if linting errors were not fixed
+ if: steps.commit-and-push.outcome == 'failure'
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
+ with:
+ issue-number: ${{ github.event.issue.number }}
+ body: |
+ @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually.
+ See [CI log](https://github.com/nf-core/taxprofiler/actions/runs/${{ github.run_id }}) for more details.
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
index 905c58e4..81cd098e 100644
--- a/.github/workflows/linting.yml
+++ b/.github/workflows/linting.yml
@@ -11,61 +11,22 @@ on:
types: [published]
jobs:
- EditorConfig:
+ pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-node@v4
-
- - name: Install editorconfig-checker
- run: npm install -g editorconfig-checker
-
- - name: Run ECLint check
- run: editorconfig-checker -exclude README.md $(find .* -type f | grep -v '.git\|.py\|.md\|json\|yml\|yaml\|html\|css\|work\|.nextflow\|build\|nf_core.egg-info\|log.txt\|Makefile')
-
- Prettier:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - uses: actions/setup-node@v4
-
- - name: Install Prettier
- run: npm install -g prettier
-
- - name: Run Prettier --check
- run: prettier --check ${GITHUB_WORKSPACE}
-
- PythonBlack:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Check code lints with Black
- uses: psf/black@stable
-
- # If the above check failed, post a comment on the PR explaining the failure
- - name: Post PR comment
- if: failure()
- uses: mshick/add-pr-comment@v1
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
with:
- message: |
- ## Python linting (`black`) is failing
-
- To keep the code consistent with lots of contributors, we run automated code consistency checks.
- To fix this CI test, please run:
-
- * Install [`black`](https://black.readthedocs.io/en/stable/): `pip install black`
- * Fix formatting errors in your pipeline: `black .`
-
- Once you push these changes the test should pass, and you can hide this comment :+1:
+ python-version: 3.11
+ cache: "pip"
- We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
+ - name: Install pre-commit
+ run: pip install pre-commit
- Thanks again for your contribution!
- repo-token: ${{ secrets.GITHUB_TOKEN }}
- allow-repeats: false
+ - name: Run pre-commit
+ run: pre-commit run --all-files
nf-core:
runs-on: ubuntu-latest
@@ -76,7 +37,7 @@ jobs:
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: "x64"
@@ -99,7 +60,7 @@ jobs:
- name: Upload linting log file artifact
if: ${{ always() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: linting-logs
path: |
diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml
index 0bbcd30f..147bcd10 100644
--- a/.github/workflows/linting_comment.yml
+++ b/.github/workflows/linting_comment.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download lint results
- uses: dawidd6/action-download-artifact@v2
+ uses: dawidd6/action-download-artifact@v3
with:
workflow: linting.yml
workflow_conclusion: completed
diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml
index 6ad33927..21ac3f06 100644
--- a/.github/workflows/release-announcements.yml
+++ b/.github/workflows/release-announcements.yml
@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
@@ -56,7 +56,7 @@ jobs:
bsky-post:
runs-on: ubuntu-latest
steps:
- - uses: zentered/bluesky-post-action@v0.0.2
+ - uses: zentered/bluesky-post-action@v0.1.0
with:
post: |
Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}!
diff --git a/.gitpod.yml b/.gitpod.yml
index acf72695..363d5b1d 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -7,6 +7,7 @@ tasks:
- name: unset JAVA_TOOL_OPTIONS
command: |
unset JAVA_TOOL_OPTIONS
+
vscode:
extensions: # based on nf-core.nf-core-extensionpack
- codezombiech.gitignore # Language support for .gitignore files
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0c31cdb9..af57081f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,5 +1,10 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: "v2.7.1"
+ rev: "v3.1.0"
hooks:
- id: prettier
+ - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
+ rev: "2.7.3"
+ hooks:
+ - id: editorconfig-checker
+ alias: ec
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 87e86cee..23e932d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,26 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## v1.1.5 - Augmented Akita Patch [2024-02-08]
+
+### `Added`
+
+- [#439](https://github.com/nf-core/taxprofiler/pull/439) Read deduplication with fastp (added by @maxibor)
+- [#440](https://github.com/nf-core/taxprofiler/pull/440) Include mention of pre-built kaiju databases in tutorial.md (added by @Joon-Klaps)
+- [#442](https://github.com/nf-core/taxprofiler/pull/442) Updated to nf-core pipeline template v2.12 (added by @sofstam)
+
+### `Fixed`
+
+- [#444](https://github.com/nf-core/taxprofiler/pull/444) Centrifuge now uses dedicated tmp directory to hopefully prevent mkfifo clashes (❤️ to @erinyoung for reporting, fix by @jfy133)
+
+### `Dependencies`
+
+| Tool | Previous version | New version |
+| ---------- | ---------------- | ----------- |
+| Centrifuge | 1.0.4_beta | 1.0.4.1 |
+
+### `Deprecated`
+
## v1.1.4 - Augmented Akita Patch [2024-01-24]
### `Added`
diff --git a/README.md b/README.md
index 74451a7f..e03ef331 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
-# ![nf-core/taxprofiler](docs/images/nf-core-taxprofiler_logo_custom_light.png#gh-light-mode-only) ![nf-core/taxprofiler](docs/images/nf-core-taxprofiler_logo_custom_dark.png#gh-dark-mode-only)
-
+
+
+
[![GitHub Actions CI Status](https://github.com/nf-core/taxprofiler/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/taxprofiler/actions?query=workflow%3A%22nf-core+CI%22)
[![GitHub Actions Linting Status](https://github.com/nf-core/taxprofiler/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/taxprofiler/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/taxprofiler/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7728364-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7728364)
diff --git a/assets/email_template.html b/assets/email_template.html
index 0718cb71..c6460a26 100644
--- a/assets/email_template.html
+++ b/assets/email_template.html
@@ -12,7 +12,7 @@
-nf-core/taxprofiler v${version}
+nf-core/taxprofiler ${version}
Run Name: $runName
<% if (!success){
diff --git a/assets/email_template.txt b/assets/email_template.txt
index a7d5e6bf..6ccaa334 100644
--- a/assets/email_template.txt
+++ b/assets/email_template.txt
@@ -4,7 +4,7 @@
|\\ | |__ __ / ` / \\ |__) |__ } {
| \\| | \\__, \\__/ | \\ |___ \\`-._,-`-,
`._,._,'
- nf-core/taxprofiler v${version}
+ nf-core/taxprofiler ${version}
----------------------------------------------------
Run Name: $runName
diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml
index 7a6b1290..2ed16397 100644
--- a/assets/multiqc_config.yml
+++ b/assets/multiqc_config.yml
@@ -1,7 +1,7 @@
report_comment: >
- This report has been generated by the nf-core/taxprofiler
+ This report has been generated by the nf-core/taxprofiler
analysis pipeline. For information about how to interpret these results, please see the
- documentation.
+ documentation.
report_section_order:
"nf-core-taxprofiler-methods-description":
diff --git a/assets/nf-core-taxprofiler_logo_light.png b/assets/nf-core-taxprofiler_logo_light.png
index 7e61612f..768e4904 100644
Binary files a/assets/nf-core-taxprofiler_logo_light.png and b/assets/nf-core-taxprofiler_logo_light.png differ
diff --git a/conf/modules.config b/conf/modules.config
index a6c0f82b..795c192a 100644
--- a/conf/modules.config
+++ b/conf/modules.config
@@ -57,7 +57,8 @@ process {
params.shortread_qc_adapterlist ? "" : params.shortread_qc_adapter1 ? "--adapter_sequence ${params.shortread_qc_adapter1}" : "",
// filtering options
"--length_required ${params.shortread_qc_minlength}",
- (params.perform_shortread_complexityfilter && params.shortread_complexityfilter_tool == 'fastp') ? "--low_complexity_filter --complexity_threshold ${params.shortread_complexityfilter_fastp_threshold}" : ''
+ (params.perform_shortread_complexityfilter && params.shortread_complexityfilter_tool == 'fastp') ? "--low_complexity_filter --complexity_threshold ${params.shortread_complexityfilter_fastp_threshold}" : '',
+ params.shortread_qc_dedup ? "--dedup" : ""
].join(' ').trim()
ext.prefix = { "${meta.id}_${meta.run_accession}" }
publishDir = [
@@ -93,7 +94,8 @@ process {
params.shortread_qc_adapterlist ? "" : params.shortread_qc_adapter2 ? "--adapter_sequence_r2 ${params.shortread_qc_adapter2}" : "--detect_adapter_for_pe",
// filtering options
"--length_required ${params.shortread_qc_minlength}",
- params.perform_shortread_complexityfilter && params.shortread_complexityfilter_tool == 'fastp' ? "--low_complexity_filter --complexity_threshold ${params.shortread_complexityfilter_fastp_threshold}" : ''
+ params.perform_shortread_complexityfilter && params.shortread_complexityfilter_tool == 'fastp' ? "--low_complexity_filter --complexity_threshold ${params.shortread_complexityfilter_fastp_threshold}" : '',
+ params.shortread_qc_dedup ? "--dedup" : ""
].join(' ').trim()
ext.prefix = { "${meta.id}_${meta.run_accession}" }
publishDir = [
diff --git a/docs/images/nf-core-taxprofiler_logo_dark.png b/docs/images/nf-core-taxprofiler_logo_dark.png
index 19433254..d2134ad6 100644
Binary files a/docs/images/nf-core-taxprofiler_logo_dark.png and b/docs/images/nf-core-taxprofiler_logo_dark.png differ
diff --git a/docs/images/nf-core-taxprofiler_logo_light.png b/docs/images/nf-core-taxprofiler_logo_light.png
index 7e61612f..f5f4c4ad 100644
Binary files a/docs/images/nf-core-taxprofiler_logo_light.png and b/docs/images/nf-core-taxprofiler_logo_light.png differ
diff --git a/docs/usage/tutorials.md b/docs/usage/tutorials.md
index a7f06b42..000736b5 100644
--- a/docs/usage/tutorials.md
+++ b/docs/usage/tutorials.md
@@ -289,10 +289,10 @@ In total, you need four components: a tab-separated file mapping sequence IDs to
An example of custom `seqid2taxid.map`:
```csv title="seqid2taxid.map"
- NC_001133.9 4392
- NC_012920.1 9606
- NC_001134.8 4392
- NC_001135.5 4392
+ NC_001133.9 4392
+ NC_012920.1 9606
+ NC_001134.8 4392
+ NC_001135.5 4392
```
```bash
@@ -346,7 +346,9 @@ A detailed description can be found [here](https://github.com/bbuchfink/diamond/
### Kaiju custom database
-To build a kaiju database, you need three components: a FASTA file with the protein sequences, the NCBI taxonomy dump files, and you need to define the uppercase characters of the standard 20 amino acids you wish to include.
+A number of kaiju pre-built indexes for reference datasets are maintained by the developers of kaiju and made available on the [kaiju website](https://bioinformatics-centre.github.io/kaiju/downloads.html). These databases can directly be used to run the workflow with Kaiju.
+
+In case the databases above do not contain your desired libraries, you can build a custom kaiju database. To build a kaiju database, you need three components: a FASTA file with the protein sequences, the NCBI taxonomy dump files, and you need to define the uppercase characters of the standard 20 amino acids you wish to include.
:::warning
The headers of the protein fasta file must be numeric NCBI taxon identifiers of the protein sequences.
diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy
index 5a5d753a..9f577f58 100755
--- a/lib/WorkflowMain.groovy
+++ b/lib/WorkflowMain.groovy
@@ -23,7 +23,7 @@ class WorkflowMain {
//
// Validate parameters and print summary to screen
//
- public static void initialise(workflow, params, log) {
+ public static void initialise(workflow, params, log, args) {
// Print workflow version and exit on --version
if (params.version) {
@@ -34,6 +34,8 @@ class WorkflowMain {
// Check that a -profile or Nextflow config has been provided to run the pipeline
NfcoreTemplate.checkConfigProvided(workflow, log)
+ // Check that the profile doesn't contain spaces and doesn't end with a trailing comma
+ checkProfile(workflow.profile, args, log)
// Check that conda channels are set-up correctly
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
@@ -60,4 +62,15 @@ class WorkflowMain {
return null
}
+ //
+ // Exit pipeline if --profile contains spaces
+ //
+ private static void checkProfile(profile, args, log) {
+ if (profile.endsWith(',')) {
+ Nextflow.error "Profile cannot end with a trailing comma. Please remove the comma from the end of the profile string.\nHint: A common mistake is to provide multiple values to `-profile` separated by spaces. Please use commas to separate profiles instead,e.g., `-profile docker,test`."
+ }
+ if (args[0]) {
+ log.warn "nf-core pipelines do not accept positional arguments. The positional argument `${args[0]}` has been detected.\n Hint: A common mistake is to provide multiple values to `-profile` separated by spaces. Please use commas to separate profiles instead,e.g., `-profile docker,test`."
+ }
+ }
}
diff --git a/lib/nfcore_external_java_deps.jar b/lib/nfcore_external_java_deps.jar
deleted file mode 100644
index 805c8bb5..00000000
Binary files a/lib/nfcore_external_java_deps.jar and /dev/null differ
diff --git a/main.nf b/main.nf
index a016b517..d10d46a6 100644
--- a/main.nf
+++ b/main.nf
@@ -39,7 +39,7 @@ if (params.validate_params) {
validateParameters()
}
-WorkflowMain.initialise(workflow, params, log)
+WorkflowMain.initialise(workflow, params, log, args)
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/modules.json b/modules.json
index 938aaf58..7e0ccda3 100644
--- a/modules.json
+++ b/modules.json
@@ -42,12 +42,12 @@
},
"centrifuge/centrifuge": {
"branch": "master",
- "git_sha": "7b0b4276fbad744a69c35d3cbf9d55fdfc9491bd",
+ "git_sha": "9a07a1293d9b818d1e06d0f7b58152f74d462012",
"installed_by": ["modules"]
},
"centrifuge/kreport": {
"branch": "master",
- "git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
+ "git_sha": "9a07a1293d9b818d1e06d0f7b58152f74d462012",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
@@ -73,7 +73,7 @@
},
"fastqc": {
"branch": "master",
- "git_sha": "617777a807a1770f73deb38c80004bac06807eef",
+ "git_sha": "c9488585ce7bd35ccd2a30faa2371454c8112fb9",
"installed_by": ["modules"]
},
"filtlong": {
diff --git a/modules/nf-core/centrifuge/centrifuge/environment.yml b/modules/nf-core/centrifuge/centrifuge/environment.yml
new file mode 100644
index 00000000..cf34dc0e
--- /dev/null
+++ b/modules/nf-core/centrifuge/centrifuge/environment.yml
@@ -0,0 +1,7 @@
+name: centrifuge_centrifuge
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::centrifuge=1.0.4.1
diff --git a/modules/nf-core/centrifuge/centrifuge/main.nf b/modules/nf-core/centrifuge/centrifuge/main.nf
index 6e45ba4e..d9a5653d 100644
--- a/modules/nf-core/centrifuge/centrifuge/main.nf
+++ b/modules/nf-core/centrifuge/centrifuge/main.nf
@@ -2,10 +2,10 @@ process CENTRIFUGE_CENTRIFUGE {
tag "$meta.id"
label 'process_high'
- conda "bioconda::centrifuge=1.0.4_beta"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4_beta--h9a82719_6' :
- 'biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }"
+ 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.1--hdcf5f25_1' :
+ 'biocontainers/centrifuge:1.0.4.1--hdcf5f25_1' }"
input:
tuple val(meta), path(reads)
@@ -40,8 +40,15 @@ process CENTRIFUGE_CENTRIFUGE {
"""
## we add "-no-name ._" to ensure silly Mac OSX metafiles files aren't included
db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/\\.1.cf\$//'`
+
+ ## make a directory for placing the pipe files in somewhere other than default /tmp
+ ## otherwise get pipefile name clashes when multiple centrifuge runs on same node
+ ## use /tmp at the same time
+ mkdir ./temp
+
centrifuge \\
-x \$db_name \\
+ --temp-directory ./temp \\
-p $task.cpus \\
$paired \\
--report-file ${prefix}.report.txt \\
@@ -55,4 +62,30 @@ process CENTRIFUGE_CENTRIFUGE {
centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
END_VERSIONS
"""
+
+ stub:
+ def args = task.ext.args ?: ''
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ def paired = meta.single_end ? "-U ${reads}" : "-1 ${reads[0]} -2 ${reads[1]}"
+ def unaligned = ''
+ def aligned = ''
+ if (meta.single_end) {
+ unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
+ aligned = save_aligned ? "--al-gz ${prefix}.mapped.fastq.gz" : ''
+ } else {
+ unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
+ aligned = save_aligned ? "--al-conc-gz ${prefix}.mapped.fastq.gz" : ''
+ }
+ """
+ touch ${prefix}.report.txt
+ touch ${prefix}.results.txt
+ touch ${prefix}.sam
+ echo | gzip -n > ${prefix}.unmapped.fastq.gz
+ echo | gzip -n > ${prefix}.mapped.fastq.gz
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
+ END_VERSIONS
+ """
}
diff --git a/modules/nf-core/centrifuge/centrifuge/meta.yml b/modules/nf-core/centrifuge/centrifuge/meta.yml
index b51e2522..a06104e1 100644
--- a/modules/nf-core/centrifuge/centrifuge/meta.yml
+++ b/modules/nf-core/centrifuge/centrifuge/meta.yml
@@ -69,3 +69,7 @@ authors:
- "@sofstam"
- "@jfy133"
- "@sateeshperi"
+maintainers:
+ - "@sofstam"
+ - "@jfy133"
+ - "@sateeshperi"
diff --git a/modules/nf-core/centrifuge/centrifuge/tests/main.nf.test b/modules/nf-core/centrifuge/centrifuge/tests/main.nf.test
new file mode 100644
index 00000000..d83b522a
--- /dev/null
+++ b/modules/nf-core/centrifuge/centrifuge/tests/main.nf.test
@@ -0,0 +1,106 @@
+nextflow_process {
+
+ name "Test Process CENTRIFUGE_CENTRIFUGE"
+ script "../main.nf"
+ process "CENTRIFUGE_CENTRIFUGE"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "centrifuge"
+ tag "centrifuge/centrifuge"
+ tag "untar"
+
+ setup {
+ run("UNTAR") {
+ script "../../../untar/main.nf"
+ process {
+ """
+ input[0] = db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/minigut_cf.tar.gz', checkIfExists: true) ]
+ """
+ }
+ }
+ }
+
+ test("sarscov2_fastq_se") {
+
+ when {
+ process {
+ """
+ input[0] = [ [id: 'test', single_end: true], file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
+ input[1] = UNTAR.out.untar.map{ it[1] }
+ input[2] = true
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.report[0][1]).name,
+ file(process.out.results[0][1]).name,
+ file(process.out.fastq_mapped[0][1][0]).name,
+ file(process.out.fastq_unmapped[0][1][0]).name,
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2_fastq_pe") {
+
+ when {
+ process {
+ """
+ input[0] = [
+ [ id:'test', single_end:false ], // meta map
+ [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
+ file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
+ ]
+ input[1] = UNTAR.out.untar.map{ it[1] }
+ input[2] = true
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.report[0][1]).name,
+ file(process.out.results[0][1]).name,
+ file(process.out.fastq_mapped[0][1][0]).name,
+ file(process.out.fastq_unmapped[0][1][0]).name,
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2_fastq_se_stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = [ [id: 'test'], file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
+ input[1] = UNTAR.out.untar.map{ it[1] }
+ input[2] = true
+ input[3] = true
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/centrifuge/centrifuge/tests/main.nf.test.snap b/modules/nf-core/centrifuge/centrifuge/tests/main.nf.test.snap
new file mode 100644
index 00000000..f8a2ef7b
--- /dev/null
+++ b/modules/nf-core/centrifuge/centrifuge/tests/main.nf.test.snap
@@ -0,0 +1,125 @@
+{
+ "sarscov2_fastq_se_stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test"
+ },
+ "test.report.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ [
+ {
+ "id": "test"
+ },
+ "test.results.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "2": [
+ [
+ {
+ "id": "test"
+ },
+ "test.sam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "3": [
+ [
+ {
+ "id": "test"
+ },
+ "test.mapped.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "4": [
+ [
+ {
+ "id": "test"
+ },
+ "test.unmapped.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "5": [
+ "versions.yml:md5,1ce028d9f968eca6df31586fe3b77c84"
+ ],
+ "fastq_mapped": [
+ [
+ {
+ "id": "test"
+ },
+ "test.mapped.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "fastq_unmapped": [
+ [
+ {
+ "id": "test"
+ },
+ "test.unmapped.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
+ ]
+ ],
+ "report": [
+ [
+ {
+ "id": "test"
+ },
+ "test.report.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "results": [
+ [
+ {
+ "id": "test"
+ },
+ "test.results.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "sam": [
+ [
+ {
+ "id": "test"
+ },
+ "test.sam:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,1ce028d9f968eca6df31586fe3b77c84"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-02-02T07:47:36.886757827"
+ },
+ "sarscov2_fastq_se": {
+ "content": [
+ "test.report.txt",
+ "test.results.txt",
+ "",
+ ""
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-02-02T08:22:31.470316024"
+ },
+ "sarscov2_fastq_pe": {
+ "content": [
+ "test.report.txt",
+ "test.results.txt",
+ "test.mapped.fastq.1.gz",
+ "test.unmapped.fastq.1.gz"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-02-02T08:22:48.866073154"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/centrifuge/centrifuge/tests/tags.yml b/modules/nf-core/centrifuge/centrifuge/tests/tags.yml
new file mode 100644
index 00000000..53444cd2
--- /dev/null
+++ b/modules/nf-core/centrifuge/centrifuge/tests/tags.yml
@@ -0,0 +1,2 @@
+centrifuge/centrifuge:
+ - "modules/nf-core/centrifuge/centrifuge/**"
diff --git a/modules/nf-core/centrifuge/kreport/environment.yml b/modules/nf-core/centrifuge/kreport/environment.yml
new file mode 100644
index 00000000..5c8fb451
--- /dev/null
+++ b/modules/nf-core/centrifuge/kreport/environment.yml
@@ -0,0 +1,7 @@
+name: centrifuge_kreport
+channels:
+ - conda-forge
+ - bioconda
+ - defaults
+dependencies:
+ - bioconda::centrifuge=1.0.4.1
diff --git a/modules/nf-core/centrifuge/kreport/main.nf b/modules/nf-core/centrifuge/kreport/main.nf
index da746ca2..25eb7167 100644
--- a/modules/nf-core/centrifuge/kreport/main.nf
+++ b/modules/nf-core/centrifuge/kreport/main.nf
@@ -2,18 +2,18 @@ process CENTRIFUGE_KREPORT {
tag "$meta.id"
label 'process_single'
- conda "bioconda::centrifuge=1.0.4_beta"
+ conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4_beta--h9a82719_6':
- 'biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }"
+ 'https://depot.galaxyproject.org/singularity/centrifuge:1.0.4.1--hdcf5f25_1' :
+ 'biocontainers/centrifuge:1.0.4.1--hdcf5f25_1' }"
input:
tuple val(meta), path(report)
path db
output:
- tuple val(meta), path('*.txt') , emit: kreport
- path "versions.yml" , emit: versions
+ tuple val(meta), path('*.txt'), emit: kreport
+ path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@@ -30,4 +30,16 @@ process CENTRIFUGE_KREPORT {
centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
END_VERSIONS
"""
+
+ stub:
+ def args = task.ext.args ?: ''
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ """
+ touch ${prefix}.txt
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ centrifuge: \$( centrifuge --version | sed -n 1p | sed 's/^.*centrifuge-class version //')
+ END_VERSIONS
+ """
}
diff --git a/modules/nf-core/centrifuge/kreport/meta.yml b/modules/nf-core/centrifuge/kreport/meta.yml
index 822a280e..5641152b 100644
--- a/modules/nf-core/centrifuge/kreport/meta.yml
+++ b/modules/nf-core/centrifuge/kreport/meta.yml
@@ -1,7 +1,12 @@
name: "centrifuge_kreport"
description: Creates Kraken-style reports from centrifuge out files
keywords:
+ - classify
- metagenomics
+ - fastq
+ - db
+ - report
+ - kraken
tools:
- centrifuge:
description: Centrifuge is a classifier for metagenomic sequences.
@@ -19,7 +24,9 @@ input:
type: file
description: File containing the centrifuge classification report
pattern: "*.{txt}"
-
+ - db:
+ type: directory
+ description: Path to directory containing centrifuge database files
output:
- meta:
type: map
@@ -39,3 +46,6 @@ output:
authors:
- "@sofstam"
- "@jfy133"
+maintainers:
+ - "@sofstam"
+ - "@jfy133"
diff --git a/modules/nf-core/centrifuge/kreport/tests/main.nf.test b/modules/nf-core/centrifuge/kreport/tests/main.nf.test
new file mode 100644
index 00000000..6347bd7c
--- /dev/null
+++ b/modules/nf-core/centrifuge/kreport/tests/main.nf.test
@@ -0,0 +1,81 @@
+// nf-core modules test centrifuge/kreport
+nextflow_process {
+
+ name "Test Process CENTRIFUGE_KREPORT"
+ script "../main.nf"
+ process "CENTRIFUGE_KREPORT"
+
+ tag "modules"
+ tag "modules_nfcore"
+ tag "centrifuge"
+ tag "centrifuge/centrifuge"
+ tag "centrifuge/kreport"
+ tag "untar"
+
+ setup {
+ run("UNTAR") {
+ script "../../../untar/main.nf"
+ process {
+ """
+ input[0] = db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/minigut_cf.tar.gz', checkIfExists: true) ]
+ """
+ }
+ }
+ run("CENTRIFUGE_CENTRIFUGE") {
+ script "../../../centrifuge/centrifuge/main.nf"
+ process {
+ """
+ input[0] = [ [id: 'test', single_end: true], file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ]
+ input[1] = UNTAR.out.untar.map{ it[1] }
+ input[2] = true
+ input[3] = true
+ """
+ }
+ }
+ }
+
+ test("sarscov2_fastq_se") {
+
+ when {
+ process {
+ """
+ input[0] = CENTRIFUGE_CENTRIFUGE.out.results
+ input[1] = UNTAR.out.untar.map{it[1]}
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(
+ file(process.out.kreport[0][1]).name,
+ ).match() }
+ )
+ }
+
+ }
+
+ test("sarscov2 - bam - stub") {
+
+ options "-stub"
+
+ when {
+ process {
+ """
+ input[0] = CENTRIFUGE_CENTRIFUGE.out.results
+ input[1] = UNTAR.out.untar.map{it[1]}
+ """
+ }
+ }
+
+ then {
+ assertAll(
+ { assert process.success },
+ { assert snapshot(process.out).match() }
+ )
+ }
+
+ }
+
+}
diff --git a/modules/nf-core/centrifuge/kreport/tests/main.nf.test.snap b/modules/nf-core/centrifuge/kreport/tests/main.nf.test.snap
new file mode 100644
index 00000000..4e0aaa79
--- /dev/null
+++ b/modules/nf-core/centrifuge/kreport/tests/main.nf.test.snap
@@ -0,0 +1,47 @@
+{
+ "sarscov2 - bam - stub": {
+ "content": [
+ {
+ "0": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "1": [
+ "versions.yml:md5,43c766a19f2edf7e05d1a2a0b1816b13"
+ ],
+ "kreport": [
+ [
+ {
+ "id": "test",
+ "single_end": true
+ },
+ "test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
+ ]
+ ],
+ "versions": [
+ "versions.yml:md5,43c766a19f2edf7e05d1a2a0b1816b13"
+ ]
+ }
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-02-02T06:18:36.794405448"
+ },
+ "sarscov2_fastq_se": {
+ "content": [
+ "test.txt"
+ ],
+ "meta": {
+ "nf-test": "0.8.4",
+ "nextflow": "23.10.1"
+ },
+ "timestamp": "2024-02-02T06:28:20.461891873"
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/centrifuge/kreport/tests/tags.yml b/modules/nf-core/centrifuge/kreport/tests/tags.yml
new file mode 100644
index 00000000..a3823d76
--- /dev/null
+++ b/modules/nf-core/centrifuge/kreport/tests/tags.yml
@@ -0,0 +1,2 @@
+centrifuge/kreport:
+ - "modules/nf-core/centrifuge/kreport/**"
diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test
index ad9bc54f..c061650b 100644
--- a/modules/nf-core/fastqc/tests/main.nf.test
+++ b/modules/nf-core/fastqc/tests/main.nf.test
@@ -13,12 +13,10 @@ nextflow_process {
when {
process {
"""
- input[0] = [
- [ id: 'test', single_end:true ],
- [
- file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
- ]
- ]
+ input[0] = Channel.of([
+ [ id: 'test', single_end:true ],
+ [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ]
+ ])
"""
}
}
@@ -44,15 +42,13 @@ nextflow_process {
when {
process {
- """
- input[0] = [
- [id: 'test', single_end: false], // meta map
- [
- file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
- file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
- ]
- ]
- """
+ """
+ input[0] = Channel.of([
+ [id: 'test', single_end: false], // meta map
+ [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ]
+ ])
+ """
}
}
@@ -76,11 +72,11 @@ nextflow_process {
when {
process {
- """
- input[0] = [
- [id: 'test', single_end: false], // meta map
- file(params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], checkIfExists: true)
- ]
+ """
+ input[0] = Channel.of([
+ [id: 'test', single_end: false], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true)
+ ])
"""
}
}
@@ -124,21 +120,45 @@ nextflow_process {
}
}
+ test("sarscov2 paired-end [bam]") {
+
+ when {
+ process {
+ """
+ input[0] = Channel.of([
+ [id: 'test', single_end: false], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true)
+ ])
+ """
+ }
+ }
+
+ then {
+ assertAll (
+ { assert process.success },
+
+ { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" },
+ { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" },
+ { assert path(process.out.html[0][1]).text.contains("File type | Conventional base calls |
") },
+
+ { assert snapshot(process.out.versions).match("versions") }
+ )
+ }
+ }
+
test("sarscov2 multiple [fastq]") {
when {
process {
- """
- input[0] = [
- [id: 'test', single_end: false], // meta map
- [
- file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
- file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
- file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true),
- file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true)
- ]
- ]
- """
+ """
+ input[0] = Channel.of([
+ [id: 'test', single_end: false], // meta map
+ [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true),
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true) ]
+ ])
+ """
}
}
@@ -168,12 +188,12 @@ nextflow_process {
when {
process {
- """
- input[0] = [
- [ id:'mysample', single_end:true ], // meta map
- file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
- ]
- """
+ """
+ input[0] = Channel.of([
+ [ id:'mysample', single_end:true ], // meta map
+ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)
+ ])
+ """
}
}
@@ -197,12 +217,10 @@ nextflow_process {
when {
process {
"""
- input[0] = [
- [ id: 'test', single_end:true ],
- [
- file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
- ]
- ]
+ input[0] = Channel.of([
+ [ id: 'test', single_end:true ],
+ [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ]
+ ])
"""
}
}
diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap
index 5ef5afbd..5d624bb8 100644
--- a/modules/nf-core/fastqc/tests/main.nf.test.snap
+++ b/modules/nf-core/fastqc/tests/main.nf.test.snap
@@ -7,7 +7,7 @@
"versions.yml:md5,e1cc25ca8af856014824abd842e93978"
]
],
- "timestamp": "2023-12-29T02:48:05.126117287"
+ "timestamp": "2024-01-17T18:40:57.254299"
},
"versions": {
"content": [
@@ -15,6 +15,6 @@
"versions.yml:md5,e1cc25ca8af856014824abd842e93978"
]
],
- "timestamp": "2023-12-29T02:46:49.507942667"
+ "timestamp": "2024-01-17T18:36:50.033627"
}
}
\ No newline at end of file
diff --git a/nextflow.config b/nextflow.config
index 5a955074..35aff8fe 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -71,6 +71,7 @@ params {
shortread_qc_adapter2 = null
shortread_qc_adapterlist = null
shortread_qc_minlength = 15
+ shortread_qc_dedup = false
perform_longread_qc = false
longread_qc_skipadaptertrim = false
@@ -196,12 +197,12 @@ try {
}
// Load nf-core/taxprofiler custom profiles from different institutions.
-// Warning: Uncomment only if a pipeline-specific instititutional config already exists on nf-core/configs!
+// Warning: Uncomment only if a pipeline-specific institutional config already exists on nf-core/configs!
try {
- includeConfig "${params.custom_config_base}/pipeline/taxprofiler.config"
+ includeConfig "${params.custom_config_base}/pipeline/taxprofiler.config"
} catch (Exception e) {
- System.err.println("WARNING: Could not load nf-core/config/taxprofiler profiles: ${params.custom_config_base}/pipeline/taxprofiler.config")
- }
+ System.err.println("WARNING: Could not load nf-core/config/taxprofiler profiles: ${params.custom_config_base}/pipeline/taxprofiler.config")
+ }
profiles {
debug {
@@ -217,6 +218,7 @@ profiles {
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
+ channels = ['conda-forge', 'bioconda', 'defaults']
apptainer.enabled = false
}
mamba {
@@ -372,7 +374,7 @@ manifest {
description = """Taxonomic classification and profiling of shotgun short- and long-read metagenomic data"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
- version = '1.1.4'
+ version = '1.1.5'
doi = '10.1101/2023.10.20.563221'
}
diff --git a/nextflow_schema.json b/nextflow_schema.json
index 23cad833..0f921833 100644
--- a/nextflow_schema.json
+++ b/nextflow_schema.json
@@ -147,6 +147,12 @@
"description": "Specify the minimum length of reads to be retained",
"help_text": "Specifying a mimum read length filtering can speed up profiling by reducing the number of short unspecific reads that need to be match/aligned to the database.\n\n> Modifies tool parameter(s):\n> - removed from reads `--length_required`\n> - AdapterRemoval: `--minlength`"
},
+ "shortread_qc_dedup": {
+ "type": "boolean",
+ "fa_icon": "fas fa-toggle-on",
+ "description": "Perform deduplication of the input reads (fastp only)",
+ "help_text": "This enables the deduplication of processed reads during fastp adapter removal and/or merging. It removes identical reads that are likely artefacts from laboratory protocols (e.g. amplification), and provide no additional sequence information to the library.\n\nRemoving duplicates can increase runtime and increase accuracy of abundance calculations.\n\n> Modifies tool parameter(s):\n> fastp: ` --dedup`\n"
+ },
"perform_shortread_complexityfilter": {
"type": "boolean",
"fa_icon": "fas fa-toggle-on",
@@ -862,7 +868,7 @@
"type": "string",
"format": "directory-path",
"description": "Directory / URL base for iGenomes references.",
- "default": "s3://ngi-igenomes/igenomes",
+ "default": "s3://ngi-igenomes/igenomes/",
"fa_icon": "fas fa-cloud-download-alt",
"hidden": true
},
diff --git a/pyproject.toml b/pyproject.toml
index 0d62beb6..7d08e1c8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,10 +1,13 @@
-# Config file for Python. Mostly used to configure linting of bin/check_samplesheet.py with Black.
+# Config file for Python. Mostly used to configure linting of bin/*.py with Ruff.
# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation.
-[tool.black]
+[tool.ruff]
line-length = 120
-target_version = ["py37", "py38", "py39", "py310"]
+target-version = "py38"
+select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"]
+cache-dir = "~/.cache/ruff"
-[tool.isort]
-profile = "black"
-known_first_party = ["nf_core"]
-multi_line_output = 3
+[tool.ruff.isort]
+known-first-party = ["nf_core"]
+
+[tool.ruff.per-file-ignores]
+"__init__.py" = ["E402", "F401"]
diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf
index b4c71efb..e306f1de 100644
--- a/subworkflows/local/profiling.nf
+++ b/subworkflows/local/profiling.nf
@@ -176,7 +176,7 @@ workflow PROFILING {
// Note may need to rename back to to just bracken in those downstream steps depending on context.
.map {
meta, report ->
- def new_tool =
+ def new_tool =
[meta + [tool: meta.tool == 'bracken' ? 'kraken2-bracken' : meta.tool], report]
}
)
diff --git a/workflows/taxprofiler.nf b/workflows/taxprofiler.nf
index 0cdfa02d..a83b54c4 100644
--- a/workflows/taxprofiler.nf
+++ b/workflows/taxprofiler.nf
@@ -350,6 +350,13 @@ workflow.onComplete {
}
}
+workflow.onError {
+ if (workflow.errorReport.contains("Process requirement exceeds available memory")) {
+ println("🛑 Default resources exceed availability 🛑 ")
+ println("💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡")
+ }
+}
+
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END