diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b290e090 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,20 @@ +{ + "name": "nfcore", + "image": "nfcore/gitpod:latest", + "remoteUser": "gitpod", + "runArgs": ["--privileged"], + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "/opt/conda/bin/python" + }, + + // 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"] + } + } +} diff --git a/.editorconfig b/.editorconfig index b78de6e6..72dda289 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ trim_trailing_whitespace = true indent_size = 4 indent_style = space -[*.{md,yml,yaml,html,css,scss,js,cff}] +[*.{md,yml,yaml,html,css,scss,js}] indent_size = 2 # These files are edited and tested upstream in nf-core/modules @@ -18,7 +18,16 @@ end_of_line = unset insert_final_newline = unset trim_trailing_whitespace = unset indent_style = unset -indent_size = unset +[/subworkflows/nf-core/**] +charset = unset +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +indent_style = unset [/assets/email*] indent_size = unset + +# ignore python and markdown +[*.{py,md}] +indent_style = unset diff --git a/.gitattributes b/.gitattributes index 050bb120..7a2dabc2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.config linguist-language=nextflow +*.nf.test linguist-language=nextflow modules/nf-core/** linguist-generated subworkflows/nf-core/** linguist-generated diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0584e7de..88b788b7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,6 +9,7 @@ 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 ;) +> [!NOTE] > If you need help using or modifying nf-core/plantpathsurveil then the best place to ask is on the nf-core Slack [#plantpathsurveil](https://nfcore.slack.com/channels/plantpathsurveil) channel ([join our Slack here](https://nf-co.re/join/slack)). ## Contribution workflow @@ -18,13 +19,19 @@ If you'd like to write some code for nf-core/plantpathsurveil, the standard work 1. Check that there isn't already an issue about your idea in the [nf-core/plantpathsurveil issues](https://github.com/nf-core/plantpathsurveil/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this 2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/plantpathsurveil repository](https://github.com/nf-core/plantpathsurveil) to your GitHub account 3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) -4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). +4. Use `nf-core pipelines schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). 5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). ## Tests +You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command: + +```bash +nf-test test --profile debug,test,docker --verbose +``` + When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests. Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then. @@ -33,7 +40,7 @@ There are typically two types of tests that run: ### Lint tests `nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to. -To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint ` command. +To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core pipelines lint ` command. If any failures or warnings are encountered, please follow the listed URL for more documentation. @@ -68,7 +75,7 @@ If you wish to contribute a new step, please use the following coding standards: 2. Write the process block (see below). 3. Define the output channel if needed (see below). 4. Add any new parameters to `nextflow.config` with a default (see below). -5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool). +5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool). 6. Add sanity checks and validation for all relevant parameters. 7. Perform local tests to validate that the new code works as expected. 8. If applicable, add a new test command in `.github/workflow/ci.yml`. @@ -79,13 +86,13 @@ If you wish to contribute a new step, please use the following coding standards: Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope. -Once there, use `nf-core schema build` to add to `nextflow_schema.json`. +Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json`. ### Default processes resource requirements -Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. +Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. -The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block. +The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block. ### Naming schemes @@ -96,8 +103,23 @@ Please use the following naming schemes, to make it easy to understand what is g ### Nextflow version bumping -If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]` +If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core pipelines bump-version --nextflow . [min-nf-version]` ### Images and figures For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). + +## GitHub Codespaces + +This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal. + +To get started: + +- Open the repo in [Codespaces](https://github.com/nf-core/plantpathsurveil/codespaces) +- Tools installed + - nf-core + - Nextflow + +Devcontainer specs: + +- [DevContainer config](.devcontainer/devcontainer.json) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index deb65ff1..852ff617 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -42,9 +42,9 @@ body: attributes: label: System information description: | - * Nextflow version _(eg. 21.10.3)_ + * 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 or Charliecloud)_ + * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_ * OS _(eg. CentOS Linux, macOS, Linux Mint)_ * Version of nf-core/plantpathsurveil _(eg. 1.1, 1.5, 1.8.2)_ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d23c9b69..068d5667 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,9 +15,11 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/plan - [ ] This comment contains a description of changes (with reason). - [ ] If you've fixed a bug or added code that should be tested, add tests! -- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/plantpathsurveil/tree/master/.github/CONTRIBUTING.md)- [ ] If necessary, also make a PR on the nf-core/plantpathsurveil _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. -- [ ] Make sure your code lints (`nf-core lint`). +- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/plantpathsurveil/tree/master/.github/CONTRIBUTING.md) +- [ ] If necessary, also make a PR on the nf-core/plantpathsurveil _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. +- [ ] Make sure your code lints (`nf-core pipelines lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). +- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). - [ ] Usage Documentation in `docs/usage.md` is updated. - [ ] Output Documentation in `docs/output.md` is updated. - [ ] `CHANGELOG.md` is updated. diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index 1592235e..0003d256 100644 --- a/.github/workflows/awsfulltest.yml +++ b/.github/workflows/awsfulltest.yml @@ -1,20 +1,37 @@ name: nf-core AWS full size tests -# This workflow is triggered on published releases. +# This workflow is triggered on PRs opened against the master branch. # It can be additionally triggered manually with GitHub actions workflow dispatch button. # It runs the -profile 'test_full' on AWS batch on: - release: - types: [published] + pull_request: + branches: + - master workflow_dispatch: + pull_request_review: + types: [submitted] + jobs: - run-tower: + run-platform: name: Run AWS full tests - if: github.repository == 'nf-core/plantpathsurveil' + # run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered + if: github.repository == 'nf-core/plantpathsurveil' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - - name: Launch workflow via tower - uses: nf-core/tower-action@v3 + - uses: octokit/request-action@v2.x + id: check_approvals + with: + route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: test_variables + if: github.event_name != 'workflow_dispatch' + run: | + JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}' + CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length') + test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required + - name: Launch workflow via Seqera Platform + uses: seqeralabs/action-tower-launch@v2 # TODO nf-core: You can customise AWS full pipeline tests as required # Add full size test data (but still relatively small datasets for few samples) # on the `test_full.config` test runs with only one set of parameters @@ -22,13 +39,18 @@ jobs: 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/plantpathsurveil/work-${{ github.sha }} parameters: | { + "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/plantpathsurveil/results-${{ github.sha }}" } - profiles: test_full,aws_tower - - uses: actions/upload-artifact@v3 + profiles: test_full + + - uses: actions/upload-artifact@v4 with: - name: Tower debug log file - path: tower_action_*.log + name: Seqera Platform debug log file + path: | + seqera_platform_action_*.log + seqera_platform_action_*.json diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index 83962d09..54128572 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -5,25 +5,29 @@ name: nf-core AWS test on: workflow_dispatch: jobs: - run-tower: + run-platform: name: Run AWS tests if: github.repository == 'nf-core/plantpathsurveil' runs-on: ubuntu-latest steps: - # Launch workflow using Tower CLI tool action - - name: Launch workflow via tower - uses: nf-core/tower-action@v3 + # Launch workflow using Seqera Platform CLI tool action + - name: Launch workflow via Seqera Platform + 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/plantpathsurveil/work-${{ github.sha }} parameters: | { "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/plantpathsurveil/results-test-${{ github.sha }}" } - profiles: test,aws_tower - - uses: actions/upload-artifact@v3 + profiles: test + + - uses: actions/upload-artifact@v4 with: - name: Tower debug log file - path: tower_action_*.log + name: Seqera Platform debug log file + path: | + seqera_platform_action_*.log + seqera_platform_action_*.json diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index d877c877..b7bc4174 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -13,13 +13,13 @@ jobs: - name: Check PRs if: github.repository == 'nf-core/plantpathsurveil' run: | - { [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/plantpathsurveil ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] + { [[ ${{github.event.pull_request.head.repo.full_name }} == nf-core/plantpathsurveil ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] # If the above check failed, post a comment on the PR explaining the failure # 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@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 with: message: | ## This PR is against the `master` branch :x: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfa778e8..bbcd3997 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,33 +7,79 @@ on: pull_request: release: types: [published] + workflow_dispatch: env: NXF_ANSI_LOG: false + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + +concurrency: + group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" + cancel-in-progress: true jobs: test: - name: Run pipeline with test data + name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})" # Only run on push if this is the nf-core dev branch (merged PRs) if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/plantpathsurveil') }}" runs-on: ubuntu-latest strategy: matrix: NXF_VER: - - "21.10.3" + - "24.04.2" - "latest-everything" + profile: + - "conda" + - "docker" + - "singularity" + test_name: + - "test" + isMaster: + - ${{ github.base_ref == 'master' }} + # Exclude conda and singularity on dev + exclude: + - isMaster: false + profile: "conda" + - isMaster: false + profile: "singularity" steps: - name: Check out pipeline code - uses: actions/checkout@v2 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + - name: Set up Nextflow + uses: nf-core/setup-nextflow@v2 with: version: "${{ matrix.NXF_VER }}" - - name: Run pipeline with test data - # TODO nf-core: You can customise CI pipeline run tests as required - # For example: adding multiple test runs with different parameters - # Remember that you can parallelise this by using strategy.matrix + - name: Set up Apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 + with: + miniconda-version: "latest" + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge,bioconda + + - name: Set up Conda + if: matrix.profile == 'conda' + run: | + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH + + - name: Clean up Disk space + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" run: | - nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results + nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml new file mode 100644 index 00000000..0b6b1f27 --- /dev/null +++ b/.github/workflows/clean-up.yml @@ -0,0 +1,24 @@ +name: "Close user-tagged issues and PRs" +on: + schedule: + - cron: "0 0 * * 0" # Once a week + +jobs: + clean-up: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # 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." + close-issue-message: "This issue was closed because it has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor and then staled for 20 days with no activity." + days-before-stale: 30 + days-before-close: 20 + days-before-pr-close: -1 + any-of-labels: "awaiting-changes,awaiting-feedback" + exempt-issue-labels: "WIP" + exempt-pr-labels: "WIP" + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml new file mode 100644 index 00000000..713dc3e7 --- /dev/null +++ b/.github/workflows/download_pipeline.yml @@ -0,0 +1,119 @@ +name: Test successful pipeline download with 'nf-core pipelines 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: + inputs: + testbranch: + description: "The specific branch you wish to utilize for the test execution of nf-core pipelines download." + required: true + default: "dev" + pull_request: + types: + - opened + - edited + - synchronize + 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@v2 + + - name: Disk space cleanup + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 + with: + python-version: "3.12" + architecture: "x64" + + - name: Setup Apptainer + uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0 + with: + apptainer-version: 1.3.4 + + - 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.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} + + - name: Make a cache directory for the container images + run: | + mkdir -p ./singularity_container_images + + - name: Download the pipeline + env: + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + run: | + nf-core pipelines 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 "community.wave.seqera.io" \ + --container-cache-utilisation 'amend' \ + --download-configuration 'yes' + + - name: Inspect download + run: tree ./${{ env.REPOTITLE_LOWERCASE }} + + - name: Count the downloaded number of container images + id: count_initial + run: | + image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) + echo "Initial container image count: $image_count" + echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV} + + - name: Run the downloaded pipeline (stub) + id: stub_run_pipeline + continue-on-error: true + env: + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + - name: Run the downloaded pipeline (stub run not supported) + id: run_pipeline + if: ${{ job.steps.stub_run_pipeline.status == failure() }} + env: + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results + + - name: Count the downloaded number of container images + id: count_afterwards + run: | + image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) + echo "Post-pipeline run container image count: $image_count" + echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV} + + - name: Compare container image counts + run: | + if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then + initial_count=${{ env.IMAGE_COUNT_INITIAL }} + final_count=${{ env.IMAGE_COUNT_AFTER }} + difference=$((final_count - initial_count)) + echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!" + tree ./singularity_container_images + exit 1 + else + echo "The pipeline can be downloaded successfully!" + fi diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml index 8d28d6d2..30b09cb3 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@v3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 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@v2 + # Install and run pre-commit + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 + with: + python-version: "3.12" - - 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 "::set-output name=result::pass" - else - echo "::set-output name=result::fail" - 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/plantpathsurveil/actions/runs/${{ github.run_id }}) for more details. diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 8a5ce69b..a502573c 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,95 +1,72 @@ name: nf-core linting # This workflow is triggered on pushes and PRs to the repository. -# It runs the `nf-core lint` and markdown lint tests to ensure +# It runs the `nf-core pipelines lint` and markdown lint tests to ensure # that the code meets the nf-core guidelines. on: push: + branches: + - dev pull_request: release: types: [published] jobs: - EditorConfig: + pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - uses: actions/setup-node@v2 - - - 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@v2 - - - uses: actions/setup-node@v2 - - - 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@v2 - - - 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.12 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # 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 .` + python-version: "3.12" - Once you push these changes the test should pass, and you can hide this comment :+1: + - name: Install pre-commit + run: pip install pre-commit - 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! - - 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 steps: - name: Check out pipeline code - uses: actions/checkout@v2 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 + uses: nf-core/setup-nextflow@v2 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 with: - python-version: "3.7" + python-version: "3.12" architecture: "x64" + - name: read .nf-core.yml + uses: pietrobolcato/action-read-yaml@1.1.0 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yml + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nf-core + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + + - name: Run nf-core pipelines lint + if: ${{ github.base_ref != 'master' }} + env: + GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} + run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md - - name: Run nf-core lint + - name: Run nf-core pipelines lint --release + if: ${{ github.base_ref == 'master' }} env: GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} - run: nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md + run: nf-core -l lint_log.txt pipelines lint --release --dir ${GITHUB_WORKSPACE} --markdown lint_results.md - name: Save PR number if: ${{ always() }} @@ -97,7 +74,7 @@ jobs: - name: Upload linting log file artifact if: ${{ always() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: linting-logs path: | diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 04758f61..42e519bf 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -11,17 +11,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Download lint results - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6 with: workflow: linting.yml workflow_conclusion: completed - name: Get PR number id: pr_number - run: echo "::set-output name=pr_number::$(cat linting-logs/PR_number.txt)" + run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT - name: Post PR comment - uses: marocchino/sticky-pull-request-comment@v2 + uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.pr_number.outputs.pr_number }} diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml new file mode 100644 index 00000000..c6ba35df --- /dev/null +++ b/.github/workflows/release-announcements.yml @@ -0,0 +1,75 @@ +name: release-announcements +# Automatic release toot and tweet anouncements +on: + release: + types: [published] + workflow_dispatch: + +jobs: + toot: + runs-on: ubuntu-latest + steps: + - name: get topics and convert to hashtags + id: get_topics + run: | + echo "topics=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ')" | sed 's/-//g' >> $GITHUB_OUTPUT + + - uses: rzr/fediverse-action@master + with: + access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} + host: "mstdn.science" # custom host if not "mastodon.social" (default) + # GitHub event payload + # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release + message: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + + ${{ steps.get_topics.outputs.topics }} #nfcore #openscience #nextflow #bioinformatics + + send-tweet: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install tweepy==4.14.0 + - name: Send tweet + shell: python + run: | + import os + import tweepy + + client = tweepy.Client( + access_token=os.getenv("TWITTER_ACCESS_TOKEN"), + access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"), + consumer_key=os.getenv("TWITTER_CONSUMER_KEY"), + consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"), + ) + tweet = os.getenv("TWEET") + client.create_tweet(text=tweet) + env: + TWEET: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} + + bsky-post: + runs-on: ubuntu-latest + steps: + - uses: zentered/bluesky-post-action@80dbe0a7697de18c15ad22f4619919ceb5ccf597 # v0.1.0 + with: + post: | + Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! + + Please see the changelog: ${{ github.event.release.html_url }} + env: + BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }} + BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }} + # diff --git a/.github/workflows/template_version_comment.yml b/.github/workflows/template_version_comment.yml new file mode 100644 index 00000000..e8aafe44 --- /dev/null +++ b/.github/workflows/template_version_comment.yml @@ -0,0 +1,46 @@ +name: nf-core template version comment +# This workflow is triggered on PRs to check if the pipeline template version matches the latest nf-core version. +# It posts a comment to the PR, even if it comes from a fork. + +on: pull_request_target + +jobs: + template_version: + runs-on: ubuntu-latest + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Read template version from .nf-core.yml + uses: nichmor/minimal-read-yaml@v0.0.2 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yml + + - name: Install nf-core + run: | + python -m pip install --upgrade pip + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + + - name: Check nf-core outdated + id: nf_core_outdated + run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV} + + - name: Post nf-core template version comment + uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 + if: | + contains(env.OUTPUT, 'nf-core') + with: + repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} + allow-repeats: false + message: | + > [!WARNING] + > Newer version of the nf-core template is available. + > + > Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}. + > Please update your pipeline to the latest version. + > + > For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync). + # diff --git a/.gitignore b/.gitignore index 8a7dfea0..408b9a48 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ README.html seqtk_sample/ docs/lab_meetings path_surveil_data -.RData \ No newline at end of file +.RData +null/ diff --git a/.gitpod.yml b/.gitpod.yml index 85d95ecc..46118637 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,14 +1,17 @@ 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 - - codezombiech.gitignore # Language support for .gitignore files - # - cssho.vscode-svgviewer # SVG viewer - - esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code - - eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed + #- esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code - EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files - Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar - mechatroner.rainbow-csv # Highlight columns in csv files in different colors - # - nextflow.nextflow # Nextflow syntax highlighting + - nextflow.nextflow # Nextflow syntax highlighting - oderwat.indent-rainbow # Highlight indentation level - streetsidesoftware.code-spell-checker # Spelling checker for source code + - charliermarsh.ruff # Code linter Ruff diff --git a/.nf-core.yml b/.nf-core.yml index 3805dc81..e1f3d235 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1 +1,17 @@ +bump_version: null +lint: null +nf_core_version: 3.0.2 +org_path: null repository_type: pipeline +template: + author: "Zachary S.L. Foster, Martha Sudermann, Nicholas C. Cauldron, Fernanda I.\ + \ Bocardo, Hung Phan, Je\uFB00 H. Chang, Niklaus J. Gr\xFCnwald" + description: Surveillance of plant pathogens using high-throughput sequencing + force: false + is_nfcore: true + name: pathogensurveillance + org: nf-core + outdir: . + skip_features: null + version: 1.0dev +update: null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..9e9f0e1c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v3.1.0" + hooks: + - id: prettier + additional_dependencies: + - prettier@3.2.5 + + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: "3.0.3" + hooks: + - id: editorconfig-checker + alias: ec diff --git a/.prettierignore b/.prettierignore index eb74a574..437d763d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ email_template.html adaptivecard.json +slackreport.json .nextflow* work/ data/ @@ -8,3 +9,4 @@ results/ testing/ testing* *.pyc +bin/ diff --git a/CITATION.cff b/CITATION.cff deleted file mode 100644 index 017666c0..00000000 --- a/CITATION.cff +++ /dev/null @@ -1,56 +0,0 @@ -cff-version: 1.2.0 -message: "If you use `nf-core tools` in your work, please cite the `nf-core` publication" -authors: - - family-names: Ewels - given-names: Philip - - family-names: Peltzer - given-names: Alexander - - family-names: Fillinger - given-names: Sven - - family-names: Patel - given-names: Harshil - - family-names: Alneberg - given-names: Johannes - - family-names: Wilm - given-names: Andreas - - family-names: Garcia - given-names: Maxime Ulysse - - family-names: Di Tommaso - given-names: Paolo - - family-names: Nahnsen - given-names: Sven -title: "The nf-core framework for community-curated bioinformatics pipelines." -version: 2.4.1 -doi: 10.1038/s41587-020-0439-x -date-released: 2022-05-16 -url: https://github.com/nf-core/tools -prefered-citation: - type: article - authors: - - family-names: Ewels - given-names: Philip - - family-names: Peltzer - given-names: Alexander - - family-names: Fillinger - given-names: Sven - - family-names: Patel - given-names: Harshil - - family-names: Alneberg - given-names: Johannes - - family-names: Wilm - given-names: Andreas - - family-names: Garcia - given-names: Maxime Ulysse - - family-names: Di Tommaso - given-names: Paolo - - family-names: Nahnsen - given-names: Sven - doi: 10.1038/s41587-020-0439-x - journal: nature biotechnology - start: 276 - end: 278 - title: "The nf-core framework for community-curated bioinformatics pipelines." - issue: 3 - volume: 38 - year: 2020 - url: https://dx.doi.org/10.1038/s41587-020-0439-x diff --git a/CITATIONS.md b/CITATIONS.md index aa681972..c27617f5 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -12,8 +12,11 @@ - [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) +> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. + - [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) - > Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924. + +> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924. ## Software packaging/containerisation tools @@ -31,5 +34,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 2ee2d545..729da10f 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,26 @@ - - -[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/pathogensurveillance/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) - -[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A521.10.3-23aa62.svg)](https://www.nextflow.io/) +

+ + + nf-core/plantpathsurveil + +

+ +[![GitHub Actions CI Status](https://github.com/nf-core/plantpathsurveil/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/plantpathsurveil/actions/workflows/ci.yml) +[![GitHub Actions Linting Status](https://github.com/nf-core/plantpathsurveil/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/plantpathsurveil/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/plantpathsurveil/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) +[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) + +[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-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/pathogensurveillance) +[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/plantpathsurveil) -[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23pathogensurveillance-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/pathogensurveillance)[![Follow on Twitter](http://img.shields.io/badge/twitter-%40nf__core-1DA1F2?labelColor=000000&logo=twitter)](https://twitter.com/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) +[![Get help on Slack](http://img.shields.io/badge/slack-nf--core%20%23plantpathsurveil-4A154B?labelColor=000000&logo=slack)](https://nfcore.slack.com/channels/plantpathsurveil)[![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) ## NOTE: THIS PROJECT IS UNDER DEVELOPMENT AND MAY NOT FUNCTION AS EXPECTED UNTIL THIS MESSAGE GOES AWAY ## Introduction - - **nf-core/pathogensurveillance** is a population genomic pipeline for pathogen diagnosis, variant detection, and biosurveillance. The pipeline accepts the paths to raw reads for one or more organisms (in the form of a CSV file) and creates reports in the form of interactive HTML reports or PDF documents. Significant features include the ability to analyze unidentified eukaryotic and prokaryotic samples, creation of reports for multiple user-defined groupings of samples, automated discovery and downloading of reference assemblies from NCBI RefSeq, and rapid initial identification based on k-mer sketches followed by a more robust core genome phylogeny and SNP-based phylogeny. @@ -40,13 +39,12 @@ This ensures that the pipeline runs on AWS, has sensible resource allocation def ![Pipeline flowchart](docs/posters/pipeline_diagram.png) -## Quick Start +## Usage -1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=21.10.3`) +> [!NOTE] +> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data. -2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) (you can follow [this tutorial](https://singularity-tutorial.github.io/01-installation/)), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(you can use [`Conda`](https://conda.io/miniconda.html) both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_. - -3. Download the pipeline and test it on a minimal dataset with a single command: +First, prepare a samplesheet with your input data that looks as follows: ```bash nextflow run nf-core/pathogensurveillance -r dev -profile RUN_TOOL,xanthomonas_small -resume --out_dir test_output @@ -59,9 +57,9 @@ This ensures that the pipeline runs on AWS, has sensible resource allocation def > - If you are using `singularity`, please use the [`nf-core download`](https://nf-co.re/tools/#downloading-pipelines-for-offline-use) command to download images first, before running the pipeline. Setting the [`NXF_SINGULARITY_CACHEDIR` or `singularity.cacheDir`](https://www.nextflow.io/docs/latest/singularity.html?#singularity-docker-hub) Nextflow options enables you to store and re-use the images from a central location for future pipeline runs. > - If you are using `conda`, it is highly recommended to use the [`NXF_CONDA_CACHEDIR` or `conda.cacheDir`](https://www.nextflow.io/docs/latest/conda.html) settings to store the environments in a central location for future pipeline runs. -4. Start running your own analysis! +--> - +Now, you can run the pipeline using: ```bash nextflow run nf-core/pathogensurveillance -r dev -profile RUN_TOOL -resume --sample_data --out_dir --download_bakta_db @@ -80,13 +78,14 @@ https://grunwaldlab.github.io/pathogensurveillance_documentation The primary input to the pipeline is a CSV (comma comma-separated value) file, specified using the `--sample_data` option. This can be made in a spreadsheet program like LibreOffice Calc or Microsoft Excel by exporting to CSV. Columns can be in any order and unneeded columns can be left out or left blank. -Column names are case insensitive and spaces are equivalent to underscores. +Column names are case insensitive and spaces are equivalent to underscores and can be left out. Only a single column containing either paths to raw sequence data, SRA (Sequence Read Archive) accessions, or NCBI queries to search the SRA is required and each sample can have values in different columns. Any columns not recognized by `pathogensurveillance` will be ignored, allowing users to adapt existing sample metadata table by adding new columns. Below is a description of each column used by `pathogensurveillance`: * **sample_id**: The unique identifier for each sample. This will be used in file names to distinguish samples in the output. Each sample ID must correspond to a single source of sequence data (e.g. the `path` and `ncbi_accession` columns), although the same sequence data can be used by different IDs. Any values supplied that correspond to different sources of sequence data or contain characters that cannot appear in file names (\/:*?"<>| .) will be modified automatically. If not supplied, it will be inferred from the `path`, `ncbi_accession`, or `name` columns. * **name**: A human-readable label for the sample that is used in plots and tables. If not supplied, it will be inferred from `sample_id`. +* **description**: A longer human-readable label that is used in plots and tables. If not supplied, it will be inferred from `name`. * **path**: Path to input sequence data, typically gzipped FASTQ files. When paired end sequencing is used, this is used for the forward read's data and `path_2` is used for the reverse reads. This can be a local file path or a URL to an online location. The `sequence_type` column must have a value. * **path_2**: Path to the FASTQ files for the reverse read when paired-end sequencing is used. This can be a local file path or a URL to an online location. The `sequence_type` column must have a value. * **ncbi_accession**: An SRA accession ID for reads to be downloaded and used as samples. Values in the `sequence_type` column will be looked up if not supplied. @@ -104,8 +103,9 @@ If not provided, the pipeline will download and choose references to use automat References are assigned to samples if they share a reference group ID in the `ref_group_ids` columns that can appear in both input CSVs. The reference metadata CSV or the sample metadata CSV can have the following columns: -* **ref_group_ids**: One or more reference group IDs separated by ";". These are used to group references and supply an ID that can be used in the `ref_group_ids` column of the sample metadata CSV to assign references to particular samples. * **ref_id**: The unique identifier for each user-defined reference genome. This will be used in file names to distinguish samples in the output. Each reference ID must correspond to a single source of reference data (The `ref_path`, `ref_ncbi_accession`, and `ref_ncbi_query` columns), although the same reference data can be used by multiple IDs. Any values that correspond to different sources of reference data or contain characters that cannot appear in file names (\/:*?"<>| .) will be modified automatically. If not supplied, it will be inferred from the `path`, `ref_name` columns or supplied automatically when `ref_ncbi_accession` or `ref_ncbi_query` are used. -* ref_id: The unique identify for each reference input. This will be used in file names to distinguish references in the output. Each sample ID must correspond to a single source of reference data (e.g. the `ref_path` and `ref_ncbi_accession` columns), although the same sequence data can be used by different IDs. Any values supplied that correspond to different sources of reference data or contain characters that cannot appear in file names (\/:*?"<>| .) will be modified automatically. If not supplied, it will be inferred from the `ref_path`, `ref_ncbi_accession`, or `ref_name` columns. +* **ref_group_ids**: One or more reference group IDs separated by ";". These are used to group references and supply an ID that can be used in the `ref_group_ids` column of the sample metadata CSV to assign references to particular samples. +* **ref_id**: The unique identifier for each user-defined reference genome. This will be used in file names to distinguish samples in the output. Each reference ID must correspond to a single source of reference data (The `ref_path`, `ref_ncbi_accession`, and `ref_ncbi_query` columns), although the same reference data can be used by multiple IDs. Any values that correspond to different sources of reference data or contain characters that cannot appear in file names (\/:*?"<>| .) will be modified automatically. If not supplied, it will be inferred from the `path`, `ref_name` columns or supplied automatically when `ref_ncbi_accession` or `ref_ncbi_query` are used. +* **ref_id**: The unique identify for each reference input. This will be used in file names to distinguish references in the output. Each sample ID must correspond to a single source of reference data (e.g. the `ref_path` and `ref_ncbi_accession` columns), although the same sequence data can be used by different IDs. Any values supplied that correspond to different sources of reference data or contain characters that cannot appear in file names (\/:*?"<>| .) will be modified automatically. If not supplied, it will be inferred from the `ref_path`, `ref_ncbi_accession`, or `ref_name` columns. * **ref_name**: A human-readable label for user-defined reference genomes that is used in plots and tables. If not supplied, it will be inferred from `ref_id`. It will be supplied automatically when the `ref_ncbi_query` column is used. * **ref_description**: A longer human-readable label for user-defined reference genomes that is used in plots and tables. If not supplied, it will be inferred from `ref_name`. It will be supplied automatically when the `ref_ncbi_query` column is used. * **ref_path**: Path to user-defined reference genomes for each sample. This can be a local file path or a URL to an online location. @@ -121,9 +121,6 @@ The reference metadata CSV or the sample metadata CSV can have the following col nf-core/pathogensurveillance was originally written by Zachary S.L. Foster, Camilo Parada-Rojas, Martha Sudermann, Nicholas C. Cauldron, Fernanda I. Bocardo, Ricardo Alcalá-Briseño, Hung Phan, Jeff H. Chang, Niklaus J. Grünwald. -We thank the following people for their extensive assistance in the development of this pipeline: - - ## Contributions and Support @@ -135,7 +132,6 @@ For further information or help, don't hesitate to get in touch on the [Slack `# - An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file. diff --git a/assets/email_template.html b/assets/email_template.html index ccb8a793..90a30e3b 100644 --- a/assets/email_template.html +++ b/assets/email_template.html @@ -12,7 +12,7 @@ -

nf-core/plantpathsurveil v${version}

+

nf-core/plantpathsurveil ${version}

Run Name: $runName

<% if (!success){ diff --git a/assets/email_template.txt b/assets/email_template.txt index 5cc2f886..a85fb6a5 100644 --- a/assets/email_template.txt +++ b/assets/email_template.txt @@ -4,7 +4,7 @@ |\\ | |__ __ / ` / \\ |__) |__ } { | \\| | \\__, \\__/ | \\ |___ \\`-._,-`-, `._,._,' - nf-core/plantpathsurveil v${version} + nf-core/plantpathsurveil ${version} ---------------------------------------------------- Run Name: $runName diff --git a/assets/main_report/index.qmd b/assets/main_report/index.qmd index b6a98f52..bea97713 100644 --- a/assets/main_report/index.qmd +++ b/assets/main_report/index.qmd @@ -1,7 +1,7 @@ --- title: Pathogen Surveillance Report params: - inputs: "/home/fosterz/files/projects/pathogensurveillance/work/24/59694d38068d1a1835061d34ad77f4/_no_group_defined__inputs" + inputs: "/home/fosterz/projects/pathogensurveillance/test/output/xanthomonas/prepare_report_input/xan_test_inputs" execute: echo: false bibliography: references.bib @@ -18,7 +18,7 @@ knitr::opts_chunk$set(echo = FALSE, fig.width = 8, warning = FALSE, message = FA # "_test_data/xanthomonas/xan_test_inputs" # "_test_data/mycobacteroides/_no_group_defined__inputs" # "_test_data/chaos/all_inputs" -"/home/fosterz/data/files/projects/current/pathogensurveillance/test/output/xanthomonas_small/prepare_report_input/subgroup_inputs" +# "/home/fosterz/data/files/projects/current/pathogensurveillance/test/output/xanthomonas_small/prepare_report_input/subgroup_inputs" ``` diff --git a/assets/main_report/packages.bib b/assets/main_report/packages.bib index 653ed439..e31d3b85 100644 --- a/assets/main_report/packages.bib +++ b/assets/main_report/packages.bib @@ -101,7 +101,7 @@ @Manual{R-igraph title = {igraph: Network Analysis and Visualization}, author = {Gábor Csárdi and Tamás Nepusz and Vincent Traag and Szabolcs Horvát and Fabio Zanini and Daniel Noom and Kirill Müller}, year = {2024}, - note = {R package version 2.0.3}, + note = {R package version 2.1.1}, url = {https://r.igraph.org/}, } diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml index aff6f38d..13d21c52 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/plantpathsurveil Methods Description" section_href: "https://github.com/nf-core/plantpathsurveil" 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/plantpathsurveil v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (Ewels et al., 2020).

+

Data was processed using nf-core/plantpathsurveil 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 29f907b5..874315b9 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/plantpathsurveil + This report has been generated by the nf-core/plantpathsurveil analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-core-plantpathsurveil-methods-description": order: -1000 @@ -11,3 +11,5 @@ report_section_order: order: -1002 export_plots: true + +disable_version_detection: true diff --git a/assets/nf-core-plantpathsurveil_logo_light.png b/assets/nf-core-plantpathsurveil_logo_light.png index a198273a..25d0133a 100644 Binary files a/assets/nf-core-plantpathsurveil_logo_light.png and b/assets/nf-core-plantpathsurveil_logo_light.png differ diff --git a/assets/schema_input.json b/assets/schema_input.json index db905b7d..f83bf8ef 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -1,36 +1,65 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/nf-core/plantpathsurveil/master/assets/schema_input.json", - "title": "nf-core/plantpathsurveil pipeline - params.input schema", - "description": "Schema for the file provided with params.input", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/nf-core/pathogensurveillance/master/assets/schema_input.json", + "title": "nf-core/pathogensurveillance pipeline - params.sample_data schema", + "description": "Schema for the file provided with params.sample_data", "type": "array", "items": { "type": "object", "properties": { - "sample": { - "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Sample name must be provided and cannot contain spaces" + "sample_id": { + "type": "string" + }, + "name": { + "type": "string" }, - "fastq_1": { + "description": { + "type": "string" + }, + "path": { "type": "string", + "format": "file-path", + "exists": true, "pattern": "^\\S+\\.f(ast)?q\\.gz$", "errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'" }, - "fastq_2": { - "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'", - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.f(ast)?q\\.gz$" - }, - { - "type": "string", - "maxLength": 0 - } - ] - } + "path_2": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.f(ast)?q\\.gz$", + "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'" + }, + "ncbi_accession": { + "type": "string", + "pattern": "^[A-Z]{3}[0-9]+$", + "errorMessage": "The `ncbi_accession` column contains at least on value that does not look like an NCBI accession (3 captial letters followed by numbers)." + }, + "ncbi_query": { + "type": "string" + }, + "ncbi_query_max": { + "type": "string" + }, + "sequence_type": { + "type": "string" + }, + "report_group_ids": { + "type": "string" + }, + "color_by": { + "type": "string" + }, + "ploidy": { + "type": "number" + }, + "enabled": { + "type": "boolean" + }, + "ref_group_ids": { + "type": "string" + }, }, - "required": ["sample", "fastq_1"] + "required": [] } } diff --git a/assets/slackreport.json b/assets/slackreport.json new file mode 100644 index 00000000..36662fa5 --- /dev/null +++ b/assets/slackreport.json @@ -0,0 +1,34 @@ +{ + "attachments": [ + { + "fallback": "Plain-text summary of the attachment.", + "color": "<% if (success) { %>good<% } else { %>danger<%} %>", + "author_name": "nf-core/plantpathsurveil ${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": [ + { + "title": "Command used to launch the workflow", + "value": "```${commandLine}```", + "short": false + } + <% + if (!success) { %> + , + { + "title": "Full error message", + "value": "```${errorReport}```", + "short": false + }, + { + "title": "Pipeline configuration", + "value": "<% out << summary.collect{ k,v -> k == "hook_url" ? "_${k}_: (_hidden_)" : ( ( v.class.toString().contains('Path') || ( v.class.toString().contains('String') && v.contains('/') ) ) ? "_${k}_: `${v}`" : (v.class.toString().contains('DateTime') ? ("_${k}_: " + v.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM))) : "_${k}_: ${v}") ) }.join(",\n") %>", + "short": false + } + <% } + %> + ], + "footer": "Completed at <% out << dateComplete.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM)) %> (duration: ${duration})" + } + ] +} diff --git a/bin/assign_context_references.R b/bin/assign_context_references.R index cde443a9..00bf3d01 100755 --- a/bin/assign_context_references.R +++ b/bin/assign_context_references.R @@ -8,22 +8,27 @@ # Parse inputs args <- commandArgs(trailingOnly = TRUE) # args <- c( -# 'scratch/assign_context_refs_bug/species_group_1_comp.csv', -# 'scratch/assign_context_refs_bug/species_group_1.csv', +# '/home/fosterz/projects/pathogensurveillance/work/6f/a0cee6f7bc72095001e3142499cedb/all_comp.csv', +# '/home/fosterz/projects/pathogensurveillance/work/6f/a0cee6f7bc72095001e3142499cedb/all.csv', # '3', -# '5', +# '2', +# '10', # 'all_context_refs.csv' # ) -names(args) <- c('ani_matrix', 'sample_data', 'n_refs_closest', 'n_refs_contextual', 'output_path') +names(args) <- c('ani_matrix', 'sample_data', 'n_refs_closest', 'n_refs_closest_named', 'n_refs_contextual', 'output_path') args <- as.list(args) ani_matrix <- read.csv(args$ani_matrix, header = TRUE, check.names = FALSE) rownames(ani_matrix) <- colnames(ani_matrix) n_refs_closest <- as.integer(args$n_refs_closest) +n_refs_closest_named <- as.integer(args$n_refs_closest_named) n_refs_contextual <- as.integer(args$n_refs_contextual) # Read sample data with user-defined references -sample_data <- read.csv(args$sample_data, header = FALSE, col.names = c('sample_id', 'references', 'usage')) +sample_data <- read.csv(args$sample_data, header = FALSE, col.names = c('sample_id', 'ref_id', 'ref_name', 'ref_desc', 'usage')) +sample_data <- unique(sample_data) sample_ids <- unique(sample_data$sample_id) +ref_name_key <- stats::setNames(sample_data$ref_name, sample_data$ref_id) +ref_desc_key <- stats::setNames(sample_data$ref_desc, sample_data$ref_id) # If 'exclusive' references are present for a sample, remove all other references. Also remove 'excluded' references sample_data <- do.call(rbind, lapply(split(sample_data, sample_data$sample_id), function(table) { @@ -35,7 +40,7 @@ sample_data <- do.call(rbind, lapply(split(sample_data, sample_data$sample_id), return(table) })) rownames(sample_data) <- NULL -all_ids <- unique(c(sample_data$references, sample_data$sample_id)) +all_ids <- unique(c(sample_data$ref_id, sample_data$sample_id)) ani_matrix <- ani_matrix[row.names(ani_matrix) %in% all_ids, names(ani_matrix) %in% all_ids, drop = FALSE] # Scale ANI values for each sample @@ -48,15 +53,21 @@ rescale <- function(x) { } ref_ids <- unique(rownames(ani_matrix)[! rownames(ani_matrix) %in% sample_ids]) ani_ref_v_samples <- ani_matrix[ref_ids, sample_ids, drop = FALSE] -ani_ref_v_samples[ani_ref_v_samples == 0] <- NA -ani_scaled <- as.data.frame(apply(ani_ref_v_samples, MARGIN = 2, rescale, simplify = FALSE)) +ani_ref_v_samples[ani_ref_v_samples == 0] <- NA # stops zeros from skewing the scale +ani_scaled <- as.data.frame(apply(ani_ref_v_samples, MARGIN = 2, rescale, simplify = FALSE), check.names = FALSE) +ani_scaled[is.na(ani_scaled)] <- 0 # Initialize list of selected references with closest references and required references closest_refs <- unlist(lapply(sample_ids, function(id) { rownames(ani_scaled)[tail(order(ani_scaled[, id]), n = n_refs_closest)] })) +closest_named_refs <- unlist(lapply(sample_ids, function(id) { + ordered_ref_ids <- rownames(ani_scaled)[order(ani_scaled[, id])] + is_latin_binomial <- grepl(ref_name_key[ordered_ref_ids], pattern = '^[a-zA-Z]+ [a-zA-Z]+($| ).*$') + return(tail(ordered_ref_ids[is_latin_binomial], n = n_refs_closest_named)) +})) required_refs <- unlist(lapply(sample_ids, function(id) { - sample_data$references[sample_data$sample_id == id & sample_data$usage %in% c('required', 'exclusive')] + sample_data$ref_id[sample_data$sample_id == id & sample_data$usage %in% c('required', 'exclusive')] })) selected_refs <- unique(c(closest_refs, required_refs)) @@ -87,7 +98,13 @@ bin_data <- filter_bins(bin_data, selected_refs) # Select reference that works for the most remaining bins and repeat until no bins are left while (nrow(bin_data) > 0) { bin_counts <- table(unlist(bin_data$refs)) - best_ref <- names(bin_counts)[which.max(bin_counts)] + best_refs <- names(bin_counts)[bin_counts == max(bin_counts)] + is_latin_binomial <- grepl(ref_name_key[best_refs], pattern = '^[a-zA-Z]+ [a-zA-Z]+($| ).*$') + if (any(is_latin_binomial)) { + best_ref <- best_refs[is_latin_binomial][1] + } else { + best_ref <- best_refs[1] + } selected_refs <- c(selected_refs, best_ref) bin_data <- filter_bins(bin_data, selected_refs) } diff --git a/bin/assign_mapping_reference.R b/bin/assign_mapping_reference.R index 9ec3fad7..f8377a46 100755 --- a/bin/assign_mapping_reference.R +++ b/bin/assign_mapping_reference.R @@ -3,16 +3,16 @@ # Parse inputs args <- commandArgs(trailingOnly = TRUE) # args <- c( -# '/media/fosterz/external_primary/files/projects/work/current/pathogensurveillance/work/96/ff75e7540756721ef4a41543c19b9d/other_comp.csv', -# '/media/fosterz/external_primary/files/projects/work/current/pathogensurveillance/work/96/ff75e7540756721ef4a41543c19b9d/other.csv', +# '/home/fosterz/projects/pathogensurveillance/work/8c/3a11d9f2fa629a1ac0e9ecb48fc419/all_comp.csv', +# '/home/fosterz/projects/pathogensurveillance/work/8c/3a11d9f2fa629a1ac0e9ecb48fc419/all.csv', # 'deleteme.csv', -# '0.9' +# '0.85' # ) args <- as.list(args) names(args) <- c("ani_matrix", "samp_ref_pairs", "out_path", "start_min_ani") ani_matrix <- read.csv(args$ani_matrix, check.names = FALSE) rownames(ani_matrix) <- as.character(colnames(ani_matrix)) -samp_ref_pairs <- read.csv(args$samp_ref_pairs, header = FALSE, col.names = c("sample_id", "reference_id", "usage")) +samp_ref_pairs <- read.csv(args$samp_ref_pairs, header = FALSE, col.names = c("sample_id", "ref_id", "ref_name", "ref_desc", "usage")) samp_ref_pairs$sample_id <- as.character(samp_ref_pairs$sample_id) start_min_ani <- as.numeric(args$start_min_ani) # The minimum ANI for a reference to be assigned to a samples end_min_ani <- max(c(0, start_min_ani - 0.3)) # How low the minimum can go if no samples can be assigned @@ -33,12 +33,12 @@ samp_ref_pairs <- do.call(rbind, lapply(split(samp_ref_pairs, samp_ref_pairs$sam rownames(samp_ref_pairs) <- NULL # Function to assign references given a minimum ANI -reference_ids <- unique(samp_ref_pairs$reference_id) +reference_ids <- unique(samp_ref_pairs$ref_id) assign_ref <- function(sample_ids, min_ani) { valid_samples_for_ref <- lapply(reference_ids, function(ref_id) { good_ani <- ani_matrix[ref_id, sample_ids] >= min_ani can_use_ref <- unlist(lapply(sample_ids, function(sample_id) { - any(samp_ref_pairs$sample_id == sample_id & samp_ref_pairs$reference_id == ref_id) + any(samp_ref_pairs$sample_id == sample_id & samp_ref_pairs$ref_id == ref_id) })) sample_ids[good_ani & can_use_ref] }) @@ -48,7 +48,10 @@ assign_ref <- function(sample_ids, min_ani) { return(NULL) } best_refs <- reference_ids[n_samples == max(n_samples)] - best_ref <- best_refs[which.max(rowMeans(ani_matrix[best_refs, sample_ids, drop = FALSE]))] + mean_ani <- vapply(best_refs, function(ref_id) { + mean(unlist(ani_matrix[ref_id, valid_samples_for_ref[[ref_id]], drop = FALSE])) + }, FUN.VALUE = numeric(1)) + best_ref <- best_refs[which.max(mean_ani)] return(data.frame(sample_id = valid_samples_for_ref[[best_ref]], reference_id = best_ref)) } diff --git a/bin/check_samplesheet.R b/bin/check_samplesheet.R index 37068e50..7de8130f 100755 --- a/bin/check_samplesheet.R +++ b/bin/check_samplesheet.R @@ -3,8 +3,6 @@ # This script takes 4 arguments: # 1. The path to the per-sample CSV input to the pipeline supplied by the user # 2. The path to the per-reference CSV input to the pipeline supplied by the user -# 3. The path to the reformatted version of the CSV per-sample output by this script -# 4. The path to the reformatted version of the CSV per-sample output by this script # # The first part of this script defines constants that might need to be changed in the future. @@ -142,6 +140,7 @@ args <- as.list(args) # args <- list('~/Downloads/sample_data_N273_14ncbigenomes.csv', '~/Downloads/ref_data.csv') # args <- list('test/data/metadata/chaos_samples.csv', 'test/data/metadata/chaos_references.csv') # args <- list("~/Downloads/ncbi_and_usda_3516_metadata.csv") +# args <- list("test/data/metadata/mixed.csv", "test/data/metadata/mixed_references.csv") metadata_original_samp <- read.csv(args[[1]], check.names = FALSE) if (length(args) > 1) { metadata_original_ref <- read.csv(args[[2]], check.names = FALSE) @@ -341,6 +340,8 @@ if (nrow(metadata_ref) > 0) { ref_in_samp_data <- metadata_samp[, known_columns_ref] has_ref_data <- apply(ref_in_samp_data[, unlist(required_input_columns_ref)], MARGIN = 1, function(x) any(is_present(x))) ref_data_addition <- ref_in_samp_data[has_ref_data, ] +user_specific_ref_cols <- colnames(metadata_ref)[! colnames(metadata_ref) %in% colnames(ref_data_addition)] +ref_data_addition[user_specific_ref_cols] <- rep('', nrow(ref_data_addition)) ref_data_addition <- ref_data_addition[, colnames(metadata_ref)] metadata_ref <- rbind(metadata_ref, ref_data_addition) @@ -733,23 +734,24 @@ undefined_accessions <- unique(metadata_samp$ncbi_accession[! is_present(metadat type_replace_key <- lapply(undefined_accessions, lookup_sequence_type) names(type_replace_key) <- undefined_accessions is_undefined <- metadata_samp$ncbi_accession %in% undefined_accessions -metadata_samp$sequence_type[is_undefined] <- type_replace_key[metadata_samp$ncbi_accession[is_undefined]] +metadata_samp$sequence_type[is_undefined] <- unlist(type_replace_key[metadata_samp$ncbi_accession[is_undefined]]) # Validate sequence_type column metadata_samp$sequence_type <- unlist(lapply(seq_along(metadata_samp$sequence_type), function(index) { + user_value <- metadata_samp$sequence_type[index] is_seq_type <- unlist(lapply(known_read_types, function(type) { - grepl(metadata_samp$sequence_type[index], pattern = type, ignore.case = TRUE) + grepl(user_value, pattern = type, ignore.case = TRUE) })) if (sum(is_seq_type) == 0) { stop(call. = FALSE, paste0( - 'The value in the "sequence_type" column on row ', index, ' ("', metadata_samp$sequence_type[index], '") does not contain a supported sequence type. ', + 'The value in the "sequence_type" column ("', user_value, '") on row ', index, ' ("', metadata_samp$sequence_type[index], '") does not contain a supported sequence type. ', 'The following sequencing types are supported (case insensitive):\n', paste0('"', known_read_types, '"', collapse = ', '), '\n' )) } if (sum(is_seq_type) > 1) { stop(call. = FALSE, paste0( - 'The value in the "sequence_type" column on row ', index, ' contains the names of multiple sequencing types. ', + 'The value in the "sequence_type" column ("', user_value, '") on row ', index, ' contains the names of multiple sequencing types. ', 'Exactly one of the following words must appear (case insensitive):\n', paste0('"', known_read_types, '"', collapse = ', '), '\n' )) @@ -801,6 +803,10 @@ if (nrow(metadata_ref) > 0) { metadata_ref <- unique(metadata_ref) } +# Replace double quotes with single quotes to not conflict with the CSV format quoting values +metadata_samp[] <- lapply(metadata_samp, gsub, pattern = '"', replacement = "'") +metadata_ref[] <- lapply(metadata_ref, gsub, pattern = '"', replacement = "'") + # Write output metadata write.csv(metadata_samp, file = 'sample_metadata.csv', row.names = FALSE, na = '') write.csv(metadata_ref, file = 'reference_metadata.csv', row.names = FALSE, na = '') diff --git a/bin/pick_assemblies.R b/bin/pick_assemblies.R index ceb57fc7..1dda99ee 100755 --- a/bin/pick_assemblies.R +++ b/bin/pick_assemblies.R @@ -9,43 +9,12 @@ min_coverage <- 30 # Parse taxonomy inputs args <- commandArgs(trailingOnly = TRUE) # args <- c( -# '/home/fosterz/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/ERR3500120_families.txt', -# '/home/fosterz/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/ERR3500120_genera.txt', -# '/home/fosterz/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/ERR3500120_species.txt', -# '30', '20', '10', +# '/home/fosterz/projects/pathogensurveillance/work/1b/c039e2f449d01480354f6df552bdcc/SAMN11100996_families.txt', +# '/home/fosterz/projects/pathogensurveillance/work/1b/c039e2f449d01480354f6df552bdcc/SAMN11100996_genera.txt', +# '/home/fosterz/projects/pathogensurveillance/work/1b/c039e2f449d01480354f6df552bdcc/SAMN11100996_species.txt', +# '30', '20', '10', 'false', # 'ERR3500120.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Aleyrodidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Amborellaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Aphididae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Buthidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Cerambycidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Cercopithecidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Cheirogaleidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Chrysomelidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Cordycipitaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Cricetidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Cucurbitaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Culicidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Dasypodidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Dasyuridae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Delphacidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Fabaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Formicidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Galagidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Halomonadaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Lampyridae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Liviidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Malvaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Micrococcaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Muscidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Nectriaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Nitidulidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Orchidaceae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Otariidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Pentatomidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Tephritidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Theridiidae.tsv', -# '~/files/projects/pathogensurveillance/work/98/9b5787f3c655cd5f51f2194df064cf/Xanthomonadaceae.tsv' ) +# '/home/fosterz/projects/pathogensurveillance/work/1b/c039e2f449d01480354f6df552bdcc/Neisseriaceae.tsv' ) args <- as.list(args) families <- readLines(args[[1]]) genera <- readLines(args[[2]]) @@ -53,13 +22,14 @@ species <- readLines(args[[3]]) n_ref_strains <- args[[4]] n_ref_species <- args[[5]] n_ref_genera <- args[[6]] -out_path <- args[[7]] +only_binomial <- as.logical(args[[7]]) +out_path <- args[[8]] # Parse input TSVs -if (length(args) < 8) { +if (length(args) < 9) { stop('No family-level reference metadata files supplied. Check input data.') } -tsv_paths <- unlist(args[8:length(args)]) +tsv_paths <- unlist(args[9:length(args)]) tsv_families <- gsub(basename(tsv_paths), pattern = '.tsv', replacement = '', fixed = TRUE) tsv_data <- lapply(seq_along(tsv_paths), function(index) { output <- read.csv(tsv_paths[index], sep = '\t') @@ -71,6 +41,12 @@ assem_data$Coverage <- as.numeric(assem_data$Coverage) assem_data$ScaffoldN50 <- as.numeric(assem_data$ScaffoldN50) assem_data$genus <- gsub(assem_data$SpeciesName, pattern = '([a-zA-Z0-9.]+) (.*)', replacement = '\\1') +# Filter out references with non-standard names +if (only_binomial) { + is_latin_binomial <- grepl(assem_data$SpeciesName, pattern = '^[a-zA-Z]+ [a-zA-Z]+($| ).*$') + assem_data <- assem_data[is_latin_binomial, ] +} + # Add column for modified ID modified_id <- gsub(assem_data$LastMajorReleaseAccession, pattern = '[\\/:*?"<>| .]', replacement = '_') assem_data <- cbind(reference_id = modified_id, assem_data) diff --git a/bin/subset_core_gene.R b/bin/subset_core_gene.R index e5246cdd..2232d887 100755 --- a/bin/subset_core_gene.R +++ b/bin/subset_core_gene.R @@ -9,7 +9,7 @@ args <- commandArgs(trailingOnly = TRUE) names(args) <- c("gene_families", "gene_seq_dir_path", "metadata", "min_core_genes", "max_core_genes", "csv_output_path", "fasta_output_path") args <- as.list(args) raw_gene_data <- read.csv(args$gene_families, header = TRUE, sep = '\t', check.names = FALSE) -metadata <- read.csv(args$metadata, header = FALSE, col.names = c('sample_id', 'references', 'usage')) +metadata <- read.csv(args$metadata, header = FALSE, col.names = c('sample_id', 'ref_id', 'ref_name', 'ref_desc', 'usage')) min_core_genes <- as.integer(args$min_core_genes) max_core_genes <- as.integer(args$max_core_genes) raw_gene_data1 <- raw_gene_data diff --git a/conf/aps_workshop.config b/conf/aps_workshop.config index e9323f31..bbaff440 100644 --- a/conf/aps_workshop.config +++ b/conf/aps_workshop.config @@ -16,7 +16,7 @@ params { // Input data sample_data = 'test/data/metadata/aps_workshop.csv' - out_dir = 'aps_workshop_output' + outdir = 'aps_workshop_output' download_bakta_db = true cache_type = 'lenient' } diff --git a/conf/base.config b/conf/base.config index f3ea11bd..442c5d54 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,14 +10,13 @@ process { - cpus = { check_max( 1 * task.attempt, 'cpus' ) } - memory = { check_max( 4.GB * task.attempt, 'memory' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } + cpus = { 1 * task.attempt } + memory = { 6.GB * task.attempt } + time = { 4.h * task.attempt } - // errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' } - errorStrategy = 'retry' - maxRetries = 1 // number of errors allowed for a particular instance - maxErrors = 5 // total number of errors allows for a process for all instances + errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' } + maxRetries = 1 + maxErrors = '-1' // Process-specific resource requirements // NOTE - Please try and re-use the labels below as much as possible. @@ -27,30 +26,30 @@ process { // TODO nf-core: Customise requirements for specific processes. // See https://www.nextflow.io/docs/latest/config.html#config-process-selectors withLabel:process_single { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 4.GB * task.attempt, 'memory' ) } - time = { check_max( 16.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 6.GB * task.attempt } + time = { 4.h * task.attempt } } withLabel:process_low { - cpus = { check_max( 2 * task.attempt, 'cpus' ) } - memory = { check_max( 8.GB * task.attempt, 'memory' ) } - time = { check_max( 16.h * task.attempt, 'time' ) } + cpus = { 2 * task.attempt } + memory = { 12.GB * task.attempt } + time = { 4.h * task.attempt } } withLabel:process_medium { - cpus = { check_max( 4 * task.attempt, 'cpus' ) } - memory = { check_max( 16.GB * task.attempt, 'memory' ) } - time = { check_max( 24.h * task.attempt, 'time' ) } + cpus = { 6 * task.attempt } + memory = { 36.GB * task.attempt } + time = { 8.h * task.attempt } } withLabel:process_high { - cpus = { check_max( 8 * task.attempt, 'cpus' ) } - memory = { check_max( 32.GB * task.attempt, 'memory' ) } - time = { check_max( 48.h * task.attempt, 'time' ) } + cpus = { 12 * task.attempt } + memory = { 72.GB * task.attempt } + time = { 16.h * task.attempt } } withLabel:process_long { - time = { check_max( 48.h * task.attempt, 'time' ) } + time = { 20.h * task.attempt } } withLabel:process_high_memory { - memory = { check_max( 128.GB * task.attempt, 'memory' ) } + memory = { 200.GB * task.attempt } } withLabel:error_ignore { errorStrategy = 'ignore' @@ -59,26 +58,23 @@ process { errorStrategy = 'retry' maxRetries = 2 } - withName:CUSTOM_DUMPSOFTWAREVERSIONS { - // cache = false // Not sure why this was set to false in the template - } } report { enabled = true - file = "${params.out_dir}/pipeline_info/execution_report.html" + file = "${params.outdir}/pipeline_info/execution_report.html" overwrite = true } timeline { enabled = true - file = "${params.out_dir}/pipeline_info/timeline_report.html" + file = "${params.outdir}/pipeline_info/timeline_report.html" overwrite = true } trace { enabled = true - file = "${params.out_dir}/pipeline_info/trace_report.tsv" + file = "${params.outdir}/pipeline_info/trace_report.tsv" overwrite = true fields = "task_id,hash,native_id,process,tag,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem,peak_rss,peak_vmem,rchar,wchar,syscr,syscw,read_bytes,write_bytes,vol_ctxt,inv_ctxt,workdir,scratch,error_action" } diff --git a/conf/chaos.config b/conf/chaos.config index 6c97bfda..f2e85817 100644 --- a/conf/chaos.config +++ b/conf/chaos.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ params { // Input data sample_data = 'test/data/metadata/chaos_samples.csv' reference_data = 'test/data/metadata/chaos_references.csv' - out_dir = 'test/output/chaos' + outdir = 'test/output/chaos' download_bakta_db = true } diff --git a/conf/complex.config b/conf/complex.config index 756ba284..3d05cd18 100644 --- a/conf/complex.config +++ b/conf/complex.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ params { // Input data sample_data = 'test/data/metadata/complex.csv' - out_dir = 'test/output/complex' + outdir = 'test/output/complex' download_bakta_db = true } diff --git a/conf/complex_minimal.config b/conf/complex_minimal.config index d8907913..5bd1eb74 100644 --- a/conf/complex_minimal.config +++ b/conf/complex_minimal.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ params { // Input data sample_data = 'test/data/metadata/complex_minimal.csv' - out_dir = 'test/output/complex_minimal' + outdir = 'test/output/complex_minimal' download_bakta_db = true } diff --git a/conf/complex_small.config b/conf/complex_small.config index c70b7968..b2ce7f7b 100644 --- a/conf/complex_small.config +++ b/conf/complex_small.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ params { // Input data sample_data = 'test/data/metadata/complex_small.csv' - out_dir = 'test/output/complex_small' + outdir = 'test/output/complex_small' download_bakta_db = true } diff --git a/conf/fungi_n81.config b/conf/fungi_n81.config index ca83bdf3..5ee1334e 100644 --- a/conf/fungi_n81.config +++ b/conf/fungi_n81.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/plantpathsurveil -profile fungi_n81, --out_dir + nextflow run nf-core/plantpathsurveil -profile fungi_n81, --outdir ---------------------------------------------------------------------------------------- */ @@ -15,6 +15,6 @@ params { // Input data sample_data = 'test/data/metadata/boxwood.csv' - out_dir = 'test/output/fungi_n81' + outdir = 'test/output/fungi_n81' download_bakta_db = false } diff --git a/conf/high_complexity_kpneumoniae.config b/conf/high_complexity_kpneumoniae.config index a4c0bd54..463bd509 100644 --- a/conf/high_complexity_kpneumoniae.config +++ b/conf/high_complexity_kpneumoniae.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/plantpathsurveil -profile high_complexity_kpneumoniae, --out_dir + nextflow run nf-core/plantpathsurveil -profile high_complexity_kpneumoniae, --outdir ---------------------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ params { // Input data sample_data = 'test/data/metadata/high_complexity_kpneumoniae.csv' - out_dir = 'test/output/high_complexity_kpneumoniae' + outdir = 'test/output/high_complexity_kpneumoniae' download_bakta_db = true } diff --git a/conf/igenomes.config b/conf/igenomes.config new file mode 100644 index 00000000..3f114377 --- /dev/null +++ b/conf/igenomes.config @@ -0,0 +1,440 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for iGenomes paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines reference genomes using iGenome paths. + Can be used by any config that customises the base path using: + $params.igenomes_base / --igenomes_base +---------------------------------------------------------------------------------------- +*/ + +params { + // illumina iGenomes reference file paths + genomes { + 'GRCh37' { + fasta = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/README.txt" + mito_name = "MT" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/GRCh37-blacklist.bed" + } + 'GRCh38' { + fasta = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed" + } + 'CHM13' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/BWAIndex/" + bwamem2 = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/BWAmem2Index/" + gtf = "${params.igenomes_base}/Homo_sapiens/NCBI/CHM13/Annotation/Genes/genes.gtf" + gff = "ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/914/755/GCF_009914755.1_T2T-CHM13v2.0/GCF_009914755.1_T2T-CHM13v2.0_genomic.gff.gz" + mito_name = "chrM" + } + 'GRCm38' { + fasta = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/README.txt" + mito_name = "MT" + macs_gsize = "1.87e9" + blacklist = "${projectDir}/assets/blacklists/GRCm38-blacklist.bed" + } + 'TAIR10' { + fasta = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Annotation/README.txt" + mito_name = "Mt" + } + 'EB2' { + fasta = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Annotation/README.txt" + } + 'UMD3.1' { + fasta = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Annotation/README.txt" + mito_name = "MT" + } + 'WBcel235' { + fasta = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Annotation/Genes/genes.bed" + mito_name = "MtDNA" + macs_gsize = "9e7" + } + 'CanFam3.1' { + fasta = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Annotation/README.txt" + mito_name = "MT" + } + 'GRCz10' { + fasta = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'BDGP6' { + fasta = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Annotation/Genes/genes.bed" + mito_name = "M" + macs_gsize = "1.2e8" + } + 'EquCab2' { + fasta = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Annotation/README.txt" + mito_name = "MT" + } + 'EB1' { + fasta = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Annotation/README.txt" + } + 'Galgal4' { + fasta = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'Gm01' { + fasta = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Annotation/README.txt" + } + 'Mmul_1' { + fasta = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Annotation/README.txt" + mito_name = "MT" + } + 'IRGSP-1.0' { + fasta = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Annotation/Genes/genes.bed" + mito_name = "Mt" + } + 'CHIMP2.1.4' { + fasta = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Annotation/README.txt" + mito_name = "MT" + } + 'Rnor_5.0' { + fasta = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'Rnor_6.0' { + fasta = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'R64-1-1' { + fasta = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Annotation/Genes/genes.bed" + mito_name = "MT" + macs_gsize = "1.2e7" + } + 'EF2' { + fasta = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Annotation/README.txt" + mito_name = "MT" + macs_gsize = "1.21e7" + } + 'Sbi1' { + fasta = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Annotation/README.txt" + } + 'Sscrofa10.2' { + fasta = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Annotation/README.txt" + mito_name = "MT" + } + 'AGPv3' { + fasta = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Annotation/Genes/genes.bed" + mito_name = "Mt" + } + 'hg38' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed" + } + 'hg19' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/hg19-blacklist.bed" + } + 'mm10' { + fasta = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "1.87e9" + blacklist = "${projectDir}/assets/blacklists/mm10-blacklist.bed" + } + 'bosTau8' { + fasta = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Annotation/Genes/genes.bed" + mito_name = "chrM" + } + 'ce10' { + fasta = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "9e7" + } + 'canFam3' { + fasta = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Annotation/README.txt" + mito_name = "chrM" + } + 'danRer10' { + fasta = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "1.37e9" + } + 'dm6' { + fasta = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "1.2e8" + } + 'equCab2' { + fasta = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Annotation/README.txt" + mito_name = "chrM" + } + 'galGal4' { + fasta = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Annotation/README.txt" + mito_name = "chrM" + } + 'panTro4' { + fasta = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Annotation/README.txt" + mito_name = "chrM" + } + 'rn6' { + fasta = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Annotation/Genes/genes.bed" + mito_name = "chrM" + } + 'sacCer3' { + fasta = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/BismarkIndex/" + readme = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "1.2e7" + } + 'susScr3' { + fasta = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Annotation/README.txt" + mito_name = "chrM" + } + } +} diff --git a/conf/igenomes_ignored.config b/conf/igenomes_ignored.config new file mode 100644 index 00000000..b4034d82 --- /dev/null +++ b/conf/igenomes_ignored.config @@ -0,0 +1,9 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for iGenomes paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Empty genomes dictionary to use when igenomes is ignored. +---------------------------------------------------------------------------------------- +*/ + +params.genomes = [:] diff --git a/conf/mixed.config b/conf/mixed.config index e697fff9..5a7273eb 100644 --- a/conf/mixed.config +++ b/conf/mixed.config @@ -1,20 +1,10 @@ -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Nextflow config file for running minimal tests -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Defines input files and everything required to run a fast and simple pipeline test. - - Use as follows: - nextflow run nf-core/plantpathsurveil -profile mixed, --out_dir - ----------------------------------------------------------------------------------------- -*/ params { - config_profile_name = 'Test profile of mixed (fungi, oomycete, bacteria, nematode) SRA files' - config_profile_description = 'Test profile of mixed (fungi, oomycete, bacteria, nematode) SRA files' + config_profile_name = 'Test profile of mixed samples that use most major abilites of the piepline' + config_profile_description = 'Test profile of mixed samples that use most major abilites of the piepline' // Input data sample_data = 'test/data/metadata/mixed.csv' - out_dir = 'test/output/mixed' + reference_data = 'test/data/metadata/mixed_references.csv' + outdir = 'test/output/mixed' download_bakta_db = true } diff --git a/conf/mixed_bacteria.config b/conf/mixed_bacteria.config index 21717606..96f8c407 100644 --- a/conf/mixed_bacteria.config +++ b/conf/mixed_bacteria.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/plantpathsurveil -profile mixed_bacteria, --out_dir + nextflow run nf-core/plantpathsurveil -profile mixed_bacteria, --outdir ---------------------------------------------------------------------------------------- */ @@ -15,6 +15,6 @@ params { // Input data sample_data = 'test/data/metadata/mixed_bacteria.csv' - out_dir = 'test/output/mixed_bacteria' + outdir = 'test/output/mixed_bacteria' download_bakta_db = true } diff --git a/conf/modules.config b/conf/modules.config index 45a3b5f5..7cc829f0 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -18,7 +18,7 @@ process { publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -27,55 +27,59 @@ process { withName: SAMPLESHEET_CHECK { publishDir = [ - path: { "${params.out_dir}/pipeline_info" }, + path: { "${params.outdir}/pipeline_info" }, mode: check_prio(params.copymode,'high'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 1.GB * task.attempt } + time = { 1.h * task.attempt } } withName: INITIAL_CLASSIFICATION { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 1.GB * task.attempt } + time = { 1.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: PICK_ASSEMBLIES { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 1.GB * task.attempt } + time = { 1.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: DOWNLOAD_ASSEMBLIES { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } + cpus = { 1 } + memory = { 1.GB * task.attempt } + time = { 8.h * task.attempt } storeDir = { params.data_dir == "false" ? null : "${params.data_dir}/assemblies" } - time = { check_max( 4.h * task.attempt, 'time' ) } + errorStrategy = { sleep(Math.pow(4, task.attempt) * 60000 as long); return task.attempt > 2 ? 'ignore' : 'retry' } + maxForks = 5 + maxRetries = 3 + maxErrors = 15 publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: MAKE_GFF_WITH_FASTA { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 1.GB * task.attempt } + time = { 1.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -84,18 +88,18 @@ process { withName: FASTQC { ext.args = '--quiet' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode, 'medium'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: SUBSET_READS { - cpus = { check_max( 2 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } - time = { check_max( 2.h * task.attempt, 'time' ) } + cpus = { 2 } + memory = { 1.GB * task.attempt } + time = { 2.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -103,7 +107,7 @@ process { withName: CUSTOM_DUMPSOFTWAREVERSIONS { publishDir = [ - path: { "${params.out_dir}/pipeline_info" }, + path: { "${params.outdir}/pipeline_info" }, mode: check_prio(params.copymode,'high'), pattern: '*_versions.yml' ] @@ -112,7 +116,7 @@ process { withName: SAMTOOLS_INDEX { ext.args = '-c' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -120,22 +124,22 @@ process { withName: BBMAP_SENDSKETCH { ext.args = 'tossbrokenreads=t printall=t reads=10m samplerate=0.5 minkeycount=2' - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 1.GB * task.attempt, 'memory' ) } - time = { check_max( 1.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 1.GB * task.attempt } + time = { 1.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: BWA_INDEX { - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 8.GB * task.attempt, 'memory' ) } // It seems `bwa index` might start using disk instead of RAM when running out of RAW rahter than just failing, slowing it down. - time = { check_max( 24.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 8.GB * task.attempt } // It seems `bwa index` might start using disk instead of RAM when running out of RAW rahter than just failing, slowing it do. + time = { 24.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -143,11 +147,11 @@ process { withName: BWA_MEM { ext.args = '-M' - cpus = { check_max( 8 , 'cpus' ) } - memory = { check_max( 16.GB * task.attempt, 'memory' ) } - time = { check_max( 48.h * task.attempt, 'time' ) } + cpus = { 8 } + memory = { 16.GB * task.attempt } + time = { 48.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -157,7 +161,7 @@ process { ext.prefix = { "${fasta.getBaseName()}" } cpus = 1 publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -170,7 +174,7 @@ process { ext.prefix = { "${meta.id}.formatted" } cpus = 1 publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -180,7 +184,7 @@ process { ext.args = { params.temp_dir ? "--temp ${params.temp_dir}" : "" } storeDir = { params.data_dir == "false" ? null : "${params.data_dir}/reads" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -189,7 +193,7 @@ process { withName: TABIX_TABIX { ext.args = '-p vcf' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -199,7 +203,7 @@ process { ext.args = '--genotype-filter-expression "isHet == 1" --genotype-filter-name "isHetFilter" --set-filtered-genotype-to-no-call' ext.prefix = { "${meta.id}.variantfiltration" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -209,16 +213,33 @@ process { ext.args = '-f "ABHet < 0.0 | ABHet > 0.33" -f "ABHom < 0.0 | ABHom > 0.97" -f "MaxAASR > 0.4" -f "MQ > 30"' ext.prefix = { "${meta.id}.vcffilter" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: SPADES { - ext.args = '--careful -k 21,33,55,77,99' + cpus = { 4 * task.attempt } + memory = { 16.GB * Math.pow(4, task.attempt - 1)} + time = { 24.h * task.attempt } + errorStrategy = { return task.attempt > 2 ? 'ignore' : 'retry' } + maxRetries = 2 publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + mode: check_prio(params.copymode,'low'), + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: 'FLYE.*' { + cpus = { 4 * task.attempt } + memory = { 16.GB * Math.pow(4, task.attempt - 1)} + time = { 24.h * task.attempt } + errorStrategy = { return task.attempt > 2 ? 'ignore' : 'retry' } + maxRetries = 2 + publishDir = [ + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -227,7 +248,7 @@ process { withName: FILTER_ASSEMBLY { ext.args = '--cov_cutoff 1 --len_cutoff 100' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -236,7 +257,7 @@ process { withName: FIND_ASSEMBLIES { storeDir = { params.data_dir == "false" ? null : "${params.data_dir}/assembly_metadata" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -245,7 +266,7 @@ process { withName: BAKTA_BAKTADBDOWNLOAD { ext.args = '--type light' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -253,7 +274,7 @@ process { withName: BAKTA_BAKTADBDOWNLOAD { publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -264,7 +285,7 @@ process { withName: BUSCO_DOWNLOAD { storeDir = { params.data_dir == "false" ? null : "${params.data_dir}/busco_db" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -273,7 +294,7 @@ process { withName: BAKTA_BAKTA { ext.args = '--force --skip-plot --skip-crispr' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -282,7 +303,7 @@ process { withName: MAFFT_SMALL { ext.prefix = { "${fasta.getSimpleName()}_aligned" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -291,7 +312,7 @@ process { withName: IQTREE2 { ext.args = '--seqtype DNA -m GTR' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -300,7 +321,7 @@ process { withName: IQTREE2_SNP { ext.args = '--seqtype DNA -m GTR+ASC' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -309,9 +330,8 @@ process { withName: NANOPLOT { ext.args = { "--prefix ${meta.id}_" } publishDir = [ - path: { "${params.out_dir}/reports" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode, 'medium'), - overwrite: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -320,7 +340,7 @@ process { ext.args = '-s 150 -W 150' ext.prefix = { "${meta.id}_chopped" } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -328,11 +348,11 @@ process { withName: SOURMASH_SKETCH { ext.args = "dna --param-string 'scaled=1000,k=21,k=31,k=51'" - cpus = { check_max( 1 , 'cpus' ) } - memory = { check_max( 8.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + cpus = { 1 } + memory = { 8.GB * task.attempt } + time = { 4.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -341,11 +361,11 @@ process { withName: TRIM_AND_SKETCH { ext.args = "-C 3 -Z 18 -V" ext.args2 = "dna --param-string 'scaled=1000,k=21,k=31,k=51'" - cpus = { check_max( 1 * task.attempt, 'cpus' ) } - memory = { check_max( 16.GB * task.attempt, 'memory' ) } - time = { check_max( 12.h * task.attempt, 'time' ) } + cpus = { 1 * task.attempt } + memory = { 16.GB * task.attempt } + time = { 12.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -353,11 +373,11 @@ process { withName: SOURMASH_COMPARE { ext.args = "-k 31 --ani" - cpus = { check_max( 4 * task.attempt, 'cpus' ) } - memory = { check_max( 16.GB * task.attempt, 'memory' ) } - time = { check_max( 12.h * task.attempt, 'time' ) } + cpus = { 4 * task.attempt } + memory = { 16.GB * task.attempt } + time = { 12.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -365,7 +385,7 @@ process { withName: 'MAIN_REPORT.*' { publishDir = [ - path: { "${params.out_dir}/reports" }, + path: { "${params.outdir}/reports" }, mode: check_prio(params.copymode, 'high'), overwrite: true, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } @@ -375,20 +395,20 @@ process { withName: 'GRAPHTYPER_VCFCONCATENATE' { cpus = 1 - memory = { check_max( 16.GB * task.attempt, 'memory' ) } - time = { check_max( 12.h * task.attempt, 'time' ) } + memory = { 16.GB * task.attempt } + time = { 12.h * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: PIRATE { - time = { check_max( 240.h * task.attempt, 'time' ) } - cpus = { check_max( 8 * task.attempt, 'cpus' ) } + time = { 240.h * task.attempt } + cpus = { 8 * task.attempt } publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -397,7 +417,7 @@ process { withName: GRAPHTYPER_GENOTYPE { ext.args = '--no_filter_on_proper_pairs' publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'low'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -405,7 +425,7 @@ process { withName: PREPARE_REPORT_INPUT { publishDir = [ - path: { "${params.out_dir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, + path: { "${params.outdir}/${task.process.tokenize(':')[-1].toLowerCase()}" }, mode: check_prio(params.copymode,'high'), saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] diff --git a/conf/mycobacteroides.config b/conf/mycobacteroides.config index 5eb3cd75..f6f95d03 100644 --- a/conf/mycobacteroides.config +++ b/conf/mycobacteroides.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/plantpathsurveil -profile mycobacteroides, --out_dir + nextflow run nf-core/plantpathsurveil -profile mycobacteroides, --outdir ---------------------------------------------------------------------------------------- */ @@ -15,6 +15,6 @@ params { // Input data sample_data = 'test/data/metadata/mycobacteroides.csv' - out_dir = 'test/output/mycobacteroides' + outdir = 'test/output/mycobacteroides' download_bakta_db = true } diff --git a/conf/mycobacteroides_small.config b/conf/mycobacteroides_small.config index f9d1221a..9a7bea29 100644 --- a/conf/mycobacteroides_small.config +++ b/conf/mycobacteroides_small.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/plantpathsurveil -profile mycobacteroides_small, --out_dir + nextflow run nf-core/plantpathsurveil -profile mycobacteroides_small, --outdir ---------------------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ params { // Input data sample_data = 'test/data/metadata/mycobacteroides_small.csv' - out_dir = 'test/output/mycobacteroides_small' + outdir = 'test/output/mycobacteroides_small' download_bakta_db = true } diff --git a/conf/ramorum_small.config b/conf/ramorum_small.config index 168663d1..79b4e9d4 100644 --- a/conf/ramorum_small.config +++ b/conf/ramorum_small.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/plantpathsurveil -profile ramorum_small, --out_dir + nextflow run nf-core/plantpathsurveil -profile ramorum_small, --outdir ---------------------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ params { // Input data sample_data = 'test/data/metadata/ramorum_small.csv' - out_dir = 'test/output/ramorum_small' + outdir = 'test/output/ramorum_small' download_bakta_db = true } diff --git a/conf/test.config b/conf/test.config new file mode 100644 index 00000000..ada7c20f --- /dev/null +++ b/conf/test.config @@ -0,0 +1,32 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/plantpathsurveil -profile test, --outdir + +---------------------------------------------------------------------------------------- +*/ + +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + +params { + config_profile_name = 'Test profile' + config_profile_description = 'Minimal test dataset to check pipeline function' + + // Input data + // TODO nf-core: Specify the paths to your test data on nf-core/test-datasets + // TODO nf-core: Give any required params for the test so that command line flags are not needed + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv' + + // Genome references + genome = 'R64-1-1' +} diff --git a/conf/test_full.config b/conf/test_full.config new file mode 100644 index 00000000..398ea6c4 --- /dev/null +++ b/conf/test_full.config @@ -0,0 +1,24 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running full-size tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a full size pipeline test. + + Use as follows: + nextflow run nf-core/plantpathsurveil -profile test_full, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'Full test profile' + config_profile_description = 'Full test dataset to check pipeline function' + + // Input data for full size test + // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) + // TODO nf-core: Give any required params for the test so that command line flags are not needed + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' + + // Genome references + genome = 'R64-1-1' +} diff --git a/conf/wagner_2023.config b/conf/wagner_2023.config index bf1fa43d..62dc630f 100644 --- a/conf/wagner_2023.config +++ b/conf/wagner_2023.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,6 +16,6 @@ params { // Input data sample_data = 'test/data/metadata/wagner_2023.csv' - out_dir = 'test/output/wagner_2023' + outdir = 'test/output/wagner_2023' download_bakta_db = true } diff --git a/conf/wagner_2023_small.config b/conf/wagner_2023_small.config index f79c4c4b..06bec846 100644 --- a/conf/wagner_2023_small.config +++ b/conf/wagner_2023_small.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,6 +16,6 @@ params { // Input data sample_data = 'test/data/metadata/wagner_2023_small.csv' - out_dir = 'test/output/wagner_2023_small' + outdir = 'test/output/wagner_2023_small' download_bakta_db = true } diff --git a/conf/xanthomonas.config b/conf/xanthomonas.config index d3c4868a..eeda2338 100644 --- a/conf/xanthomonas.config +++ b/conf/xanthomonas.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,6 +16,6 @@ params { // Input data sample_data = 'test/data/metadata/xanthomonas.csv' - out_dir = 'test/output/xanthomonas' + outdir = 'test/output/xanthomonas' download_bakta_db = true } diff --git a/conf/xanthomonas_small.config b/conf/xanthomonas_small.config index 66d771c2..b3041f30 100644 --- a/conf/xanthomonas_small.config +++ b/conf/xanthomonas_small.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a full size pipeline test. Use as follows: - nextflow run nf-core/pathogensurveillance -profile xanthomonas_small, --out_dir + nextflow run nf-core/pathogensurveillance -profile xanthomonas_small, --outdir ---------------------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ params { // Input data sample_data = 'test/data/metadata/xanthomonas_small.csv' - out_dir = 'test/output/xanthomonas_small' + outdir = 'test/output/xanthomonas_small' download_bakta_db = true } diff --git a/docs/images/mqc_fastqc_adapter.png b/docs/images/mqc_fastqc_adapter.png deleted file mode 100755 index 361d0e47..00000000 Binary files a/docs/images/mqc_fastqc_adapter.png and /dev/null differ diff --git a/docs/images/mqc_fastqc_counts.png b/docs/images/mqc_fastqc_counts.png deleted file mode 100755 index cb39ebb8..00000000 Binary files a/docs/images/mqc_fastqc_counts.png and /dev/null differ diff --git a/docs/images/mqc_fastqc_quality.png b/docs/images/mqc_fastqc_quality.png deleted file mode 100755 index a4b89bf5..00000000 Binary files a/docs/images/mqc_fastqc_quality.png and /dev/null differ diff --git a/docs/images/nf-core-pathogensurveillance_logo_dark.png b/docs/images/nf-core-pathogensurveillance_logo_dark.png index cf218098..d584b628 100644 Binary files a/docs/images/nf-core-pathogensurveillance_logo_dark.png and b/docs/images/nf-core-pathogensurveillance_logo_dark.png differ diff --git a/docs/images/nf-core-pathogensurveillance_logo_light.png b/docs/images/nf-core-pathogensurveillance_logo_light.png index dab329c1..15d5e8aa 100644 Binary files a/docs/images/nf-core-pathogensurveillance_logo_light.png and b/docs/images/nf-core-pathogensurveillance_logo_light.png differ diff --git a/docs/journal.txt b/docs/journal.txt index bc116cf3..696858fb 100644 --- a/docs/journal.txt +++ b/docs/journal.txt @@ -1,3 +1,47 @@ +## 2024-10-24 + +Working on test dataset for Jeff's proposal. +Desired attributes: +- [x] Illumina +- [x] pacbio +- [x] nanopore +- [x] prokaryotes +- [x] fungi +- [x] sample by query +- [x] sample by path +- [x] sample by accession +- [x] reference by query +- [x] reference by file +- [x] reference by accession +- [x] different reference usages +- [x] multiple report groups + +Started work on 'assemble_first' branch to make genome assembly the first step. +I refactored the genome assembly code to be more flexible with multiple assembliers, but still have not chosen an assemblier for eukaryotes sequenced with short reads or tested the code yet. + + + + + +## 2024-10-22 + +Working on reference selection figure. + +Shared steps in reference selection: +* Sendsketch +* download metadata for all refseq entries for each family encountered +* Select references to download based on Sendsketch results, some for each taxonomic rank +* Make sketches of all reads and references +* All vs all comparison of sketches + +Contextual reference selection: +* Select references such that each sample in a tree has a references for each ANI bin as well as the most similar referneces. + +Primary reference selection: +* Select a minimum number of references such that samples are within a ANI threshold of their refernece + + + [2024-05-24 09:40:59 AM] Planning new reference group input The goal is to allow users to specify multiple references per sample to be used for both variant calling and phylogenetic analyses. diff --git a/docs/output.md b/docs/output.md index 19bbbe03..0f5ac723 100644 --- a/docs/output.md +++ b/docs/output.md @@ -29,14 +29,6 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d [FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the [FastQC help pages](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/). -![MultiQC - FastQC sequence counts plot](images/mqc_fastqc_counts.png) - -![MultiQC - FastQC mean quality scores plot](images/mqc_fastqc_quality.png) - -![MultiQC - FastQC adapter content plot](images/mqc_fastqc_adapter.png) - -> **NB:** The FastQC plots displayed in the MultiQC report shows _untrimmed_ reads. They may contain adapter sequence and potentially regions with low quality. - ### MultiQC
@@ -62,6 +54,7 @@ Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQ - Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`. - Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline. - Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`. + - Parameters used by the pipeline run: `params.json`.
diff --git a/docs/usage.md b/docs/usage.md index 58d7603a..631bdb65 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -20,7 +20,7 @@ You will need to create a samplesheet with information about the samples you wou The `sample` identifiers have to be the same when you have re-sequenced the same sample more than once e.g. to increase sequencing depth. The pipeline will concatenate the raw reads before performing any downstream analysis. Below is an example for the same sample sequenced across 3 lanes: -```console +```csv title="samplesheet.csv" sample,fastq_1,fastq_2 CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz CONTROL_REP1,AEG588A1_S1_L003_R1_001.fastq.gz,AEG588A1_S1_L003_R2_001.fastq.gz @@ -33,7 +33,7 @@ The pipeline will auto-detect whether a sample is single- or paired-end using th A final samplesheet file consisting of both single- and paired-end data may look something like the one below. This is for 6 samples, where `TREATMENT_REP3` has been sequenced twice. -```console +```csv title="samplesheet.csv" sample,fastq_1,fastq_2 CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz CONTROL_REP2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz @@ -57,7 +57,7 @@ An [example samplesheet](../assets/samplesheet.csv) has been provided with the p The typical command for running the pipeline is as follows: ```bash -nextflow run nf-core/plantpathsurveil --input samplesheet.csv --outdir --genome GRCh37 -profile docker +nextflow run nf-core/plantpathsurveil --input ./samplesheet.csv --outdir ./results --genome GRCh37 -profile docker ``` This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles. @@ -71,6 +71,31 @@ work # Directory containing the nextflow working files # Other nextflow hidden files, eg. history of pipeline runs and old logs. ``` +If you wish to repeatedly use the same parameters for multiple runs, rather than specifying each flag in the command, you can specify these in a params file. + +Pipeline settings can be provided in a `yaml` or `json` file via `-params-file `. + +:::warning +Do not use `-c ` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args). +::: + +The above pipeline run specified with a params file in yaml format: + +```bash +nextflow run nf-core/plantpathsurveil -profile docker -params-file params.yaml +``` + +with: + +```yaml title="params.yaml" +input: './samplesheet.csv' +outdir: './results/' +genome: 'GRCh37' +<...> +``` + +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: @@ -83,29 +108,42 @@ nextflow pull nf-core/plantpathsurveil 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/plantpathsurveil releases page](https://github.com/nf-core/plantpathsurveil/releases) and find the latest version number - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`. +First, go to the [nf-core/plantpathsurveil releases page](https://github.com/nf-core/plantpathsurveil/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 reproducbility, you can use share and re-use [parameter files](#running-the-pipeline) to repeat pipeline runs with the same settings without having to write out a command with every single parameter. -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. +:::tip +If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles. +::: ## Core Nextflow arguments -> **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen). +:::note +These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen). +::: ### `-profile` Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments. -Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Conda) - see below. When using Biocontainers, most of these software packaging methods pull Docker containers from quay.io e.g [FastQC](https://quay.io/repository/biocontainers/fastqc) except for Singularity which directly downloads Singularity images via https hosted by the [Galaxy project](https://depot.galaxyproject.org/singularity/) and Conda which downloads and installs software locally from [Bioconda](https://bioconda.github.io/). +Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Apptainer, Conda) - see below. -> We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. +:::info +We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. +::: The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to see if your system is available in these configs please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). Note that multiple profiles can be loaded, for example: `-profile test,docker` - the order of arguments is important! They are loaded in sequence, so later profiles can overwrite earlier profiles. -If `-profile` is not specified, the pipeline will run locally and expect all software to be installed and available on the `PATH`. This is _not_ recommended. +If `-profile` is not specified, the pipeline will run locally and expect all software to be installed and available on the `PATH`. This is _not_ recommended, since it can lead to different results on different machines dependent on the computer enviroment. +- `test` + - A profile with a complete configuration for automated testing + - Includes links to test data so needs no other parameters - `docker` - A generic configuration profile to be used with [Docker](https://docker.com/) - `singularity` @@ -116,11 +154,12 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof - A generic configuration profile to be used with [Shifter](https://nersc.gitlab.io/development/shifter/how-to-use/) - `charliecloud` - A generic configuration profile to be used with [Charliecloud](https://hpc.github.io/charliecloud/) +- `apptainer` + - A generic configuration profile to be used with [Apptainer](https://apptainer.org/) +- `wave` + - A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later). - `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 or Charliecloud. -- `test` - - A profile with a complete configuration for automated testing - - Includes links to test data so needs no other parameters + - 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` @@ -138,96 +177,19 @@ Specify the path to a specific config file (this is a core Nextflow command). Se 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. -For example, if the nf-core/rnaseq pipeline is failing after multiple re-submissions of the `STAR_ALIGN` process due to an exit code of `137` this would indicate that there is an out of memory issue: +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. -```console -[62/149eb0] NOTE: Process `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN (WT_REP1)` terminated with an error exit status (137) -- Execution is retried (1) -Error executing process > 'NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN (WT_REP1)' +### Custom Containers -Caused by: - Process `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN (WT_REP1)` terminated with an error exit status (137) +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 maybe out of date. -Command executed: - STAR \ - --genomeDir star \ - --readFilesIn WT_REP1_trimmed.fq.gz \ - --runThreadN 2 \ - --outFileNamePrefix WT_REP1. \ - +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. -Command exit status: - 137 +### Custom Tool Arguments -Command output: - (empty) +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. -Command error: - .command.sh: line 9: 30 Killed STAR --genomeDir star --readFilesIn WT_REP1_trimmed.fq.gz --runThreadN 2 --outFileNamePrefix WT_REP1. -Work dir: - /home/pipelinetest/work/9d/172ca5881234073e8d76f2a19c88fb - -Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run` -``` - -To bypass this error you would need to find exactly which resources are set by the `STAR_ALIGN` process. The quickest way is to search for `process STAR_ALIGN` in the [nf-core/rnaseq Github repo](https://github.com/nf-core/rnaseq/search?q=process+STAR_ALIGN). -We have standardised the structure of Nextflow DSL2 pipelines such that all module files will be present in the `modules/` directory and so, based on the search results, the file we want is `modules/nf-core/software/star/align/main.nf`. -If you click on the link to that file you will notice that there is a `label` directive at the top of the module that is set to [`label process_high`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/modules/nf-core/software/star/align/main.nf#L9). -The [Nextflow `label`](https://www.nextflow.io/docs/latest/process.html#label) directive allows us to organise workflow processes in separate groups which can be referenced in a configuration file to select and configure subset of processes having similar computing requirements. -The default values for the `process_high` label are set in the pipeline's [`base.config`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L33-L37) which in this case is defined as 72GB. -Providing you haven't set any other standard nf-core parameters to **cap** the [maximum resources](https://nf-co.re/usage/configuration#max-resources) used by the pipeline then we can try and bypass the `STAR_ALIGN` process failure by creating a custom config file that sets at least 72GB of memory, in this case increased to 100GB. -The custom config below can then be provided to the pipeline via the [`-c`](#-c) parameter as highlighted in previous sections. - -```nextflow -process { - withName: 'NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN' { - memory = 100.GB - } -} -``` - -> **NB:** We specify the full process name i.e. `NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:STAR_ALIGN` in the config file because this takes priority over the short name (`STAR_ALIGN`) and allows existing configuration using the full process name to be correctly overridden. -> -> If you get a warning suggesting that the process selector isn't recognised check that the process name has been specified correctly. - -### Updating containers - -The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. If for some reason you need to use a different version of a particular tool with the pipeline then you just need to identify the `process` name and override the Nextflow `container` definition for that process using the `withName` declaration. For example, in the [nf-core/viralrecon](https://nf-co.re/viralrecon) pipeline a tool called [Pangolin](https://github.com/cov-lineages/pangolin) has been used during the COVID-19 pandemic to assign lineages to SARS-CoV-2 genome sequenced samples. Given that the lineage assignments change quite frequently it doesn't make sense to re-release the nf-core/viralrecon everytime a new version of Pangolin has been released. However, you can override the default container used by the pipeline by creating a custom config file and passing it as a command-line argument via `-c custom.config`. - -1. Check the default version used by the pipeline in the module file for [Pangolin](https://github.com/nf-core/viralrecon/blob/a85d5969f9025409e3618d6c280ef15ce417df65/modules/nf-core/software/pangolin/main.nf#L14-L19) -2. Find the latest version of the Biocontainer available on [Quay.io](https://quay.io/repository/biocontainers/pangolin?tag=latest&tab=tags) -3. Create the custom config accordingly: - - - For Docker: - - ```nextflow - process { - withName: PANGOLIN { - container = 'quay.io/biocontainers/pangolin:3.0.5--pyhdfd78af_0' - } - } - ``` - - - For Singularity: - - ```nextflow - process { - withName: PANGOLIN { - container = 'https://depot.galaxyproject.org/singularity/pangolin:3.0.5--pyhdfd78af_0' - } - } - ``` - - - For Conda: - - ```nextflow - process { - withName: PANGOLIN { - conda = 'bioconda::pangolin=3.0.5' - } - } - ``` - -> **NB:** If you wish to periodically update individual tool-specific results (e.g. Pangolin) generated by the pipeline then you must ensure to keep the `work/` directory otherwise the `-resume` ability of the pipeline will be compromised and it will restart from scratch. +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 @@ -237,14 +199,6 @@ See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config 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). -## Azure Resource Requests - -To be used with the `azurebatch` profile by specifying the `-profile azurebatch`. -We recommend providing a compute `params.vm_type` of `Standard_D16_v3` VMs by default but these options can be changed if required. - -Note that the choice of VM size depends on your quota and the overall workload during the analysis. -For a thorough list, please refer the [Azure Sizes for virtual machines in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). - ## Running in the background Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished. diff --git a/initialclassification/families.txt b/initialclassification/families.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/initialclassification/genera.txt b/initialclassification/genera.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/initialclassification/species.txt b/initialclassification/species.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/NfcoreSchema.groovy b/lib/NfcoreSchema.groovy deleted file mode 100755 index b3d092f8..00000000 --- a/lib/NfcoreSchema.groovy +++ /dev/null @@ -1,529 +0,0 @@ -// -// This file holds several functions used to perform JSON parameter validation, help and summary rendering for the nf-core pipeline template. -// - -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', - 'version', - - // 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-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) { - System.exit(1) - } - } - - // - // 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 deleted file mode 100755 index 5b7a62af..00000000 --- a/lib/NfcoreTemplate.groovy +++ /dev/null @@ -1,313 +0,0 @@ -// -// This file holds several functions used within the nf-core pipeline template. -// - -import org.yaml.snakeyaml.Yaml - -class NfcoreTemplate { - - // - // Check AWS Batch related parameters have been specified correctly - // - public static void awsBatch(workflow, params) { - if (workflow.profile.contains('awsbatch')) { - // Check params.awsqueue and params.awsregion have been set if running on AWSBatch - assert (params.awsqueue && params.awsregion) : "Specify correct --awsqueue and --awsregion parameters on AWSBatch!" - // Check outdir paths to be S3 buckets if running on AWSBatch - assert params.outdir.startsWith('s3:') : "Outdir not on S3 - specify S3 Bucket to run on AWSBatch!" - } - } - - // - // Warn if a -profile or Nextflow config has not been provided to run the pipeline - // - public static void checkConfigProvided(workflow, log) { - if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { - log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + - "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + - " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + - " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + - " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + - "Please refer to the quick start section and usage docs for the pipeline.\n " - } - } - - // - // Construct and send completion email - // - public static void email(workflow, params, summary_params, projectDir, log, multiqc_report=[]) { - - // Set up the e-mail variables - def subject = "[$workflow.manifest.name] Successful: $workflow.runName" - if (!workflow.success) { - subject = "[$workflow.manifest.name] FAILED: $workflow.runName" - } - - def summary = [:] - for (group in summary_params.keySet()) { - summary << summary_params[group] - } - - def misc_fields = [:] - misc_fields['Date Started'] = workflow.start - misc_fields['Date Completed'] = workflow.complete - misc_fields['Pipeline script file path'] = workflow.scriptFile - misc_fields['Pipeline script hash ID'] = workflow.scriptId - if (workflow.repository) misc_fields['Pipeline repository Git URL'] = workflow.repository - if (workflow.commitId) misc_fields['Pipeline repository Git Commit'] = workflow.commitId - if (workflow.revision) misc_fields['Pipeline Git branch/tag'] = workflow.revision - misc_fields['Nextflow Version'] = workflow.nextflow.version - misc_fields['Nextflow Build'] = workflow.nextflow.build - misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp - - def email_fields = [:] - email_fields['version'] = workflow.manifest.version - email_fields['runName'] = workflow.runName - email_fields['success'] = workflow.success - email_fields['dateComplete'] = workflow.complete - email_fields['duration'] = workflow.duration - email_fields['exitStatus'] = workflow.exitStatus - email_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - email_fields['errorReport'] = (workflow.errorReport ?: 'None') - email_fields['commandLine'] = workflow.commandLine - email_fields['projectDir'] = workflow.projectDir - email_fields['summary'] = summary << misc_fields - - // On success try attach the multiqc report - def mqc_report = null - try { - if (workflow.success) { - mqc_report = multiqc_report.getVal() - if (mqc_report.getClass() == ArrayList && mqc_report.size() >= 1) { - if (mqc_report.size() > 1) { - log.warn "[$workflow.manifest.name] Found multiple reports from process 'MULTIQC', will use only one" - } - mqc_report = mqc_report[0] - } - } - } catch (all) { - if (multiqc_report) { - log.warn "[$workflow.manifest.name] Could not attach MultiQC report to summary email" - } - } - - // Check if we are only sending emails on failure - def email_address = params.email - if (!params.email && params.email_on_fail && !workflow.success) { - email_address = params.email_on_fail - } - - // Render the TXT template - def engine = new groovy.text.GStringTemplateEngine() - def tf = new File("$projectDir/assets/email_template.txt") - def txt_template = engine.createTemplate(tf).make(email_fields) - def email_txt = txt_template.toString() - - // Render the HTML template - def hf = new File("$projectDir/assets/email_template.html") - def html_template = engine.createTemplate(hf).make(email_fields) - 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 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) - def sendmail_html = sendmail_template.toString() - - // Send the HTML e-mail - Map colors = logColours(params.monochrome_logs) - if (email_address) { - try { - if (params.plaintext_email) { throw GroovyException('Send plaintext e-mail, not HTML') } - // Try to send HTML e-mail using sendmail - [ 'sendmail', '-t' ].execute() << sendmail_html - log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (sendmail)-" - } catch (all) { - // Catch failures and try with plaintext - def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ] - if ( mqc_report.size() <= max_multiqc_email_size.toBytes() ) { - mail_cmd += [ '-A', mqc_report ] - } - mail_cmd.execute() << email_html - log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (mail)-" - } - } - - // Write summary e-mail HTML to a file - def output_d = new File("${params.outdir}/pipeline_info/") - if (!output_d.exists()) { - output_d.mkdirs() - } - def output_hf = new File(output_d, "pipeline_report.html") - output_hf.withWriter { w -> w << email_html } - def output_tf = new File(output_d, "pipeline_report.txt") - output_tf.withWriter { w -> w << email_txt } - } - - // - // Construct and send adaptive card - // https://adaptivecards.io - // - public static void adaptivecard(workflow, params, summary_params, projectDir, log) { - def hook_url = params.hook_url - - def summary = [:] - for (group in summary_params.keySet()) { - summary << summary_params[group] - } - - def misc_fields = [:] - misc_fields['start'] = workflow.start - misc_fields['complete'] = workflow.complete - misc_fields['scriptfile'] = workflow.scriptFile - misc_fields['scriptid'] = workflow.scriptId - if (workflow.repository) misc_fields['repository'] = workflow.repository - if (workflow.commitId) misc_fields['commitid'] = workflow.commitId - if (workflow.revision) misc_fields['revision'] = workflow.revision - misc_fields['nxf_version'] = workflow.nextflow.version - misc_fields['nxf_build'] = workflow.nextflow.build - misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp - - def msg_fields = [:] - msg_fields['version'] = workflow.manifest.version - msg_fields['runName'] = workflow.runName - msg_fields['success'] = workflow.success - msg_fields['dateComplete'] = workflow.complete - msg_fields['duration'] = workflow.duration - msg_fields['exitStatus'] = workflow.exitStatus - msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - msg_fields['errorReport'] = (workflow.errorReport ?: 'None') - msg_fields['commandLine'] = workflow.commandLine - msg_fields['projectDir'] = workflow.projectDir - msg_fields['summary'] = summary << misc_fields - - // Render the JSON template - def engine = new groovy.text.GStringTemplateEngine() - def hf = new File("$projectDir/assets/adaptivecard.json") - def json_template = engine.createTemplate(hf).make(msg_fields) - def json_message = json_template.toString() - - // POST - def post = new URL(hook_url).openConnection(); - post.setRequestMethod("POST") - post.setDoOutput(true) - post.setRequestProperty("Content-Type", "application/json") - post.getOutputStream().write(json_message.getBytes("UTF-8")); - def postRC = post.getResponseCode(); - if (! postRC.equals(200)) { - log.warn(post.getErrorStream().getText()); - } - } - - // - // Print pipeline summary on completion - // - public static void summary(workflow, params, log) { - Map colors = logColours(params.monochrome_logs) - if (workflow.success) { - if (workflow.stats.ignoredCount == 0) { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Pipeline completed successfully${colors.reset} \n\n To clean the cache, enter the command: \n nextflow clean ${workflow.runName} -f \n" - } else { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Pipeline completed successfully, but with errored process(es) ${colors.reset}- \n\n To clean the cache, run the command: \n nextflow clean ${workflow.runName} -f \n" - } - } else { - log.info "-${colors.purple}[$workflow.manifest.name]${colors.red} Pipeline completed with errors${colors.reset} \n\n To clean the cache, run the command: \n nextflow clean ${workflow.runName} -f \n" - } - } - - // - // ANSII Colours used for terminal logging - // - public static Map logColours(Boolean monochrome_logs) { - Map colorcodes = [:] - - // Reset / Meta - colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" - colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" - colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" - colorcodes['underlined'] = monochrome_logs ? '' : "\033[4m" - colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" - colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" - colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" - - // Regular Colors - colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" - colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" - colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" - colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" - colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" - colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" - colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" - colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" - - // Bold - colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" - colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" - colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" - colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" - colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" - colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" - colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" - colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" - - // Underline - colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" - colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" - colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" - colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" - colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" - colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" - colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" - colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" - - // High Intensity - colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" - colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" - colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" - colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" - colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" - colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" - colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" - colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" - - // Bold High Intensity - colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" - colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" - colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" - colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" - colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" - colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" - colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" - colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" - - return colorcodes - } - - // - // Does what is says on the tin - // - public static String dashedLine(monochrome_logs) { - Map colors = logColours(monochrome_logs) - return "-${colors.dim}----------------------------------------------------${colors.reset}-" - } - - // - // nf-core logo - // - public static String logo(workflow, monochrome_logs) { - Map colors = logColours(monochrome_logs) - String.format( - """\n - ${dashedLine(monochrome_logs)} - ${colors.green},--.${colors.black}/${colors.green},-.${colors.reset} - ${colors.blue} ___ __ __ __ ___ ${colors.green}/,-._.--~\'${colors.reset} - ${colors.blue} |\\ | |__ __ / ` / \\ |__) |__ ${colors.yellow}} {${colors.reset} - ${colors.blue} | \\| | \\__, \\__/ | \\ |___ ${colors.green}\\`-._,-`-,${colors.reset} - ${colors.green}`._,._,\'${colors.reset} - ${colors.purple} ${workflow.manifest.name} v${workflow.manifest.version}${colors.reset} - ${dashedLine(monochrome_logs)} - """.stripIndent() - ) - } -} diff --git a/lib/Utils.groovy b/lib/Utils.groovy deleted file mode 100644 index 8d030f4e..00000000 --- a/lib/Utils.groovy +++ /dev/null @@ -1,47 +0,0 @@ -// -// This file holds several Groovy functions that could be useful for any Nextflow pipeline -// - -import org.yaml.snakeyaml.Yaml - -class Utils { - - // - // When running with -profile conda, warn if channels have not been set-up appropriately - // - public static void checkCondaChannels(log) { - Yaml parser = new Yaml() - def channels = [] - try { - def config = parser.load("conda config --show channels".execute().text) - channels = config.channels - } catch(NullPointerException | IOException e) { - log.warn "Could not verify conda channel configuration." - return - } - - // Check that all channels are present - // This channel list is ordered by required channel priority. - def required_channels_in_order = ['conda-forge', 'bioconda', 'defaults'] - def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean - - // Check that they are in the right order - def channel_priority_violation = false - def n = required_channels_in_order.size() - for (int i = 0; i < n - 1; i++) { - channel_priority_violation |= !(channels.indexOf(required_channels_in_order[i]) < channels.indexOf(required_channels_in_order[i+1])) - } - - if (channels_missing | channel_priority_violation) { - log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " There is a problem with your Conda configuration!\n\n" + - " You will need to set-up the conda-forge and bioconda channels correctly.\n" + - " Please refer to https://bioconda.github.io/\n" + - " The observed channel order is \n" + - " ${channels}\n" + - " but the following channel order is required:\n" + - " ${required_channels_in_order}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - } - } -} diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy deleted file mode 100755 index 1362446f..00000000 --- a/lib/WorkflowMain.groovy +++ /dev/null @@ -1,93 +0,0 @@ -// -// This file holds several functions specific to the main.nf workflow in the nf-core/plantpathsurveil pipeline -// - -class WorkflowMain { - - // - // Citation string for pipeline - // - public static String citation(workflow) { - return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + - // TODO nf-core: Add Zenodo DOI for pipeline after first release - //"* The pipeline\n" + - //" https://doi.org/10.5281/zenodo.XXXXXXX\n\n" + - "* The nf-core framework\n" + - " https://doi.org/10.1038/s41587-020-0439-x\n\n" + - "* Software dependencies\n" + - " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md" - } - - // - // Print help to screen if required - // - public static String help(workflow, params, log) { - def command = "nextflow run ${workflow.manifest.name} --input samplesheet.csv -profile docker" - 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 - } - - // - // Print parameter summary log to screen - // - public static String paramsSummaryLog(workflow, params, log) { - 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, log) - System.exit(0) - } - - // Validate workflow parameters via the JSON schema - if (params.validate_params) { - NfcoreSchema.validateParameters(workflow, params, log) - } - - // Print parameter summary log to screen - - log.info paramsSummaryLog(workflow, params, log) - - // Check that a -profile or Nextflow config has been provided to run the pipeline - NfcoreTemplate.checkConfigProvided(workflow, log) - - // Check that conda channels are set-up correctly - if (params.enable_conda) { - Utils.checkCondaChannels(log) - } - - // Check AWS batch settings - NfcoreTemplate.awsBatch(workflow, params) - - // Check input has been provided - if (!params.sample_data) { - log.error "Please provide a sample metadata CSV to the pipeline e.g. '--sample_data samplesheet.csv'" - System.exit(1) - } - } - // - // Get attribute from genome config file e.g. fasta - // - public static Object getGenomeAttribute(params, attribute) { - if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { - if (params.genomes[ params.genome ].containsKey(attribute)) { - return params.genomes[ params.genome ][ attribute ] - } - } - return null - } -} diff --git a/lib/WorkflowPathogensurveillance.groovy b/lib/WorkflowPathogensurveillance.groovy deleted file mode 100755 index 3c949504..00000000 --- a/lib/WorkflowPathogensurveillance.groovy +++ /dev/null @@ -1,80 +0,0 @@ -// -// This file holds several functions specific to the workflow/pathogensurvaillance.nf in the nf-core/pathogensurveillance pipeline -// - -import groovy.text.SimpleTemplateEngine - -class WorkflowPathogensurveillance { - - // - // Check and validate parameters - // - public static void initialise(params, log) { - // genomeExistsError(params, log) - - /* - if (!params.fasta) { - log.error "Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file." - System.exit(1) - } - */ - } - - // - // Get workflow summary for MultiQC - // - public static String paramsSummaryMultiqc(workflow, summary) { - String summary_section = '' - for (group in summary.keySet()) { - def group_params = summary.get(group) // This gets the parameters of that particular group - if (group_params) { - summary_section += "

$group

\n" - summary_section += "
\n" - for (param in group_params.keySet()) { - summary_section += "
$param
${group_params.get(param) ?: 'N/A'}
\n" - } - summary_section += "
\n" - } - } - - String yaml_file_text = "id: '${workflow.manifest.name.replace('/','-')}-summary'\n" - yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" - yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" - yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" - yaml_file_text += "plot_type: 'html'\n" - yaml_file_text += "data: |\n" - yaml_file_text += "${summary_section}" - return yaml_file_text - } - - public static String methodsDescriptionText(run_workflow, mqc_methods_yaml) { - // 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.
  • " - - def methods_text = mqc_methods_yaml.text - - def engine = new SimpleTemplateEngine() - def description_html = engine.createTemplate(methods_text).make(meta) - - return description_html - }// - // Exit pipeline if incorrect --genome key provided - // - /* - private static void genomeExistsError(params, log) { - if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - log.error "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + - " Currently, the available genome keys are:\n" + - " ${params.genomes.keySet().join(", ")}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - System.exit(1) - } - } - */ -} 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 34f126cd..1bc97c9f 100644 --- a/main.nf +++ b/main.nf @@ -1,61 +1,67 @@ #!/usr/bin/env nextflow /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - nf-core/PATHOGENDX + nf-core/PATHOGENSURVEILLANCE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Github : https://github.com/nf-core/PATHOGENDX - - Website: https://nf-co.re/PATHOGENDX - Slack : https://nfcore.slack.com/channels/PATHOGENDX + Github : https://github.com/nf-core/pathogensurveillance + Website: https://nf-co.re/pathogensurveillance + Slack : https://nfcore.slack.com/channels/pathogensurveillance ---------------------------------------------------------------------------------------- */ -nextflow.enable.dsl = 2 - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - GENOME PARAMETER VALUES + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -// Not needed since fasta is provided by samplesheet -// params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta') - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - VALIDATE & PRINT PARAMETER SUMMARY -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ +include { PATHOGENSURVEILLANCE } from './workflows/pathogensurveillance' +include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_pathogensurveillance_pipeline' +include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_pathogensurveillance_pipeline' -WorkflowMain.initialise(workflow, params, log) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - NAMED WORKFLOW FOR PIPELINE + RUN MAIN WORKFLOW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { PATHOGENSURVEILLANCE } from './workflows/pathogensurveillance' +workflow { -// -// WORKFLOW: Run main nf-core/PATHOGENDX analysis pipeline -// -//workflow NFCORE_PATHOGENSURVEILLANCE { -// PATHOGENSURVEILLANCE () -//} -// -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - RUN ALL WORKFLOWS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ + main: + // + // SUBWORKFLOW: Run initialisation tasks + // + PIPELINE_INITIALISATION ( + params.version, + params.validate_params, + params.monochrome_logs, + args, + params.outdir, + params.sample_data, + params.reference_data + ) -// -// WORKFLOW: Execute a single named workflow for the pipeline -// See: https://github.com/nf-core/rnaseq/issues/619 -// -workflow { - PATHOGENSURVEILLANCE () + // + // WORKFLOW: Run main workflow + // + PATHOGENSURVEILLANCE ( + PIPELINE_INITIALISATION.out.sample_data_csv, + PIPELINE_INITIALISATION.out.reference_data_csv + ) + + // + // SUBWORKFLOW: Run completion tasks + // + PIPELINE_COMPLETION ( + params.email, + params.email_on_fail, + params.plaintext_email, + params.outdir, + params.monochrome_logs, + params.hook_url, + PATHOGENSURVEILLANCE.out.multiqc_report + ) } /* diff --git a/modules.json b/modules.json index ff2b7a99..eaf5ac7b 100644 --- a/modules.json +++ b/modules.json @@ -166,6 +166,25 @@ "installed_by": ["modules"] } } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "3aa0aec1d52d492fe241919f0c6100ebf0074082", + "installed_by": ["subworkflows"] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "1b6b9a3338d011367137808b49b923515080e3ba", + "installed_by": ["subworkflows"] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "bbd5a41f4535a8defafe6080e00ea74c45f4f96c", + "installed_by": ["subworkflows"] + } + } } } } diff --git a/modules/local/assign_context_references.nf b/modules/local/assign_context_references.nf index 68347e60..966fdb8c 100644 --- a/modules/local/assign_context_references.nf +++ b/modules/local/assign_context_references.nf @@ -10,6 +10,7 @@ process ASSIGN_CONTEXT_REFERENCES { input: tuple val(group_meta), path(ani_matrix), path(samp_ref_pairs) val n_ref_closest + val n_ref_closest_named val n_ref_context output: @@ -23,7 +24,7 @@ process ASSIGN_CONTEXT_REFERENCES { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${group_meta.id}" """ - assign_context_references.R ${ani_matrix} ${samp_ref_pairs} ${n_ref_closest} ${n_ref_context} ${prefix}_context_refs.csv + assign_context_references.R ${ani_matrix} ${samp_ref_pairs} ${n_ref_closest} ${n_ref_closest_named} ${n_ref_context} ${prefix}_context_refs.csv cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/download_assemblies.nf b/modules/local/download_assemblies.nf index fe5e69c9..7359be19 100644 --- a/modules/local/download_assemblies.nf +++ b/modules/local/download_assemblies.nf @@ -1,10 +1,6 @@ process DOWNLOAD_ASSEMBLIES { tag "${ref_meta.id}" label 'process_single' - maxForks 5 - errorStrategy { return task.attempt > 2 ? 'ignore' : 'retry' } - maxRetries 6 - maxErrors 15 conda "conda-forge::ncbi-datasets-cli=15.11.0 bioconda::samtools=1.18 unzip" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/local/pick_assemblies.nf b/modules/local/pick_assemblies.nf index a5eacfda..b0b7a2ed 100644 --- a/modules/local/pick_assemblies.nf +++ b/modules/local/pick_assemblies.nf @@ -13,6 +13,7 @@ process PICK_ASSEMBLIES { val n_ref_strains val n_ref_species val n_ref_genera + val only_latin_binomial_refs output: tuple val(meta), path("${prefix}.tsv"), emit: stats @@ -27,7 +28,7 @@ process PICK_ASSEMBLIES { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" """ - pick_assemblies.R ${families} ${genera} ${species} ${n_ref_strains} ${n_ref_species} ${n_ref_genera} ${prefix}.tsv ${assem_data_tsvs} + pick_assemblies.R ${families} ${genera} ${species} ${n_ref_strains} ${n_ref_species} ${n_ref_genera} ${only_latin_binomial_refs} ${prefix}.tsv ${assem_data_tsvs} COUNT=\$(cat ${prefix}.tsv | wc -l) cat <<-END_VERSIONS > versions.yml diff --git a/modules/local/read2tree/main.nf b/modules/local/read2tree/main.nf index e3b5b27f..035c7fb8 100644 --- a/modules/local/read2tree/main.nf +++ b/modules/local/read2tree/main.nf @@ -34,73 +34,73 @@ process READ2TREE { --output_path ${prefix}_read2tree cat <<-END_VERSIONS > versions.yml - "${task.process}": - read2tree: \$(echo \$(read2tree --version)) - END_VERSIONS + "${task.process}": + read2tree: \$(echo \$(read2tree --version)) + END_VERSIONS """ } else { // Otherwise, use multiple species mode - """ - # This creates the reference folder - read2tree --standalone_path ${markers}/ --dna_reference ${dna_ref} --output_path ${prefix}_read2tree --reference + """ + # This creates the reference folder + read2tree --standalone_path ${markers}/ --dna_reference ${dna_ref} --output_path ${prefix}_read2tree --reference - # Add each paired end shortread sample + # Add each paired end shortread sample FORWARD=(${paired_1}) REVERSE=(${paired_2}) IDS=(${pair_meta.collect{it.id}.join(' ')}) - for i in \${!FORWARD[@]}; do - read2tree \\ + for i in \${!FORWARD[@]}; do + read2tree \\ ${args} \\ --threads $task.cpus \\ - --standalone_path ${markers}/ \\ + --standalone_path ${markers}/ \\ --dna_reference ${dna_ref} \\ - --output_path ${prefix}_read2tree \\ - --reads \${FORWARD[\$i]} \${REVERSE[\$i]} \\ + --output_path ${prefix}_read2tree \\ + --reads \${FORWARD[\$i]} \${REVERSE[\$i]} \\ --species_name \${IDS[\$i]} - done + done - # Add each single end shortread sample + # Add each single end shortread sample SINGLE=(${single}) IDS=(${single_meta.collect{it.id}.join(' ')}) - for i in \${!SINGLE[@]}; do - read2tree \\ + for i in \${!SINGLE[@]}; do + read2tree \\ ${args} \\ --threads $task.cpus \\ - --standalone_path ${markers}/ \\ + --standalone_path ${markers}/ \\ --dna_reference ${dna_ref} \\ - --output_path ${prefix}_read2tree \\ - --reads \${SINGLE[\$i]} \\ + --output_path ${prefix}_read2tree \\ + --reads \${SINGLE[\$i]} \\ --species_name \${IDS[\$i]} - done + done - # Add each long read sample + # Add each long read sample LONG=(${long_reads}) IDS=(${long_meta.collect{it.id}.join(' ')}) - for i in \${!LONG[@]}; do - read2tree \\ + for i in \${!LONG[@]}; do + read2tree \\ ${args} \\ --threads $task.cpus \\ - --standalone_path ${markers}/ \\ + --standalone_path ${markers}/ \\ --dna_reference ${dna_ref} \\ - --output_path ${prefix}_read2tree \\ + --output_path ${prefix}_read2tree \\ --read_type long \\ - --reads \${LONG[\$i]} \\ + --reads \${LONG[\$i]} \\ --species_name \${IDS[\$i]} - done + done - # Build tree - read2tree \\ + # Build tree + read2tree \\ ${args} \\ --threads $task.cpus \\ - --standalone_path ${markers}/ \\ + --standalone_path ${markers}/ \\ --dna_reference ${dna_ref} \\ - --output_path ${prefix}_read2tree -\\ - -merge_all_mappings \\ - --tree + --output_path ${prefix}_read2tree -\\ + -merge_all_mappings \\ + --tree - cat <<-END_VERSIONS > versions.yml - "${task.process}": - read2tree: \$(echo \$(read2tree --version)) - END_VERSIONS - """ + cat <<-END_VERSIONS > versions.yml + "${task.process}": + read2tree: \$(echo \$(read2tree --version)) + END_VERSIONS + """ } } diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml deleted file mode 100644 index f0c63f69..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: custom_dumpsoftwareversions -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::multiqc=1.17 diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf deleted file mode 100644 index 7685b33c..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ /dev/null @@ -1,24 +0,0 @@ -process CUSTOM_DUMPSOFTWAREVERSIONS { - label 'process_single' - - // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.17--pyhdfd78af_0' : - 'biocontainers/multiqc:1.17--pyhdfd78af_0' }" - - input: - path versions - - output: - path "software_versions.yml" , emit: yml - path "software_versions_mqc.yml", emit: mqc_yml - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - template 'dumpsoftwareversions.py' -} diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml deleted file mode 100644 index 5f15a5fd..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ /dev/null @@ -1,37 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: custom_dumpsoftwareversions -description: Custom module used to dump software versions within the nf-core pipeline template -keywords: - - custom - - dump - - version -tools: - - custom: - description: Custom module used to dump software versions within the nf-core pipeline template - homepage: https://github.com/nf-core/tools - documentation: https://github.com/nf-core/tools - licence: ["MIT"] -input: - - versions: - type: file - description: YML file containing software versions - pattern: "*.yml" -output: - - yml: - type: file - description: Standard YML file containing software versions - pattern: "software_versions.yml" - - mqc_yml: - type: file - description: MultiQC custom content YML file containing software versions - pattern: "software_versions_mqc.yml" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@grst" -maintainers: - - "@drpatelh" - - "@grst" diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py deleted file mode 100755 index da033408..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env python - - -"""Provide functions to merge multiple versions.yml files.""" - - -import yaml -import platform -from textwrap import dedent - - -def _make_versions_html(versions): - """Generate a tabular HTML output of all versions for MultiQC.""" - html = [ - dedent( - """\\ - - - - - - - - - - """ - ) - ] - for process, tmp_versions in sorted(versions.items()): - html.append("") - for i, (tool, version) in enumerate(sorted(tmp_versions.items())): - html.append( - dedent( - f"""\\ - - - - - - """ - ) - ) - html.append("") - html.append("
    Process Name Software Version
    {process if (i == 0) else ''}{tool}{version}
    ") - return "\\n".join(html) - - -def main(): - """Load all version files and generate merged output.""" - versions_this_module = {} - versions_this_module["${task.process}"] = { - "python": platform.python_version(), - "yaml": yaml.__version__, - } - - with open("$versions") as f: - versions_by_process = yaml.load(f, Loader=yaml.BaseLoader) | versions_this_module - - # aggregate versions by the module name (derived from fully-qualified process name) - versions_by_module = {} - for process, process_versions in versions_by_process.items(): - module = process.split(":")[-1] - try: - if versions_by_module[module] != process_versions: - raise AssertionError( - "We assume that software versions are the same between all modules. " - "If you see this error-message it means you discovered an edge-case " - "and should open an issue in nf-core/tools. " - ) - except KeyError: - versions_by_module[module] = process_versions - - versions_by_module["Workflow"] = { - "Nextflow": "$workflow.nextflow.version", - "$workflow.manifest.name": "$workflow.manifest.version", - } - - versions_mqc = { - "id": "software_versions", - "section_name": "${workflow.manifest.name} Software Versions", - "section_href": "https://github.com/${workflow.manifest.name}", - "plot_type": "html", - "description": "are collected at run time from the software output.", - "data": _make_versions_html(versions_by_module), - } - - with open("software_versions.yml", "w") as f: - yaml.dump(versions_by_module, f, default_flow_style=False) - with open("software_versions_mqc.yml", "w") as f: - yaml.dump(versions_mqc, f, default_flow_style=False) - - with open("versions.yml", "w") as f: - yaml.dump(versions_this_module, f, default_flow_style=False) - - -if __name__ == "__main__": - main() diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test deleted file mode 100644 index eec1db10..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test +++ /dev/null @@ -1,38 +0,0 @@ -nextflow_process { - - name "Test Process CUSTOM_DUMPSOFTWAREVERSIONS" - script "../main.nf" - process "CUSTOM_DUMPSOFTWAREVERSIONS" - tag "modules" - tag "modules_nfcore" - tag "custom" - tag "dumpsoftwareversions" - tag "custom/dumpsoftwareversions" - - test("Should run without failures") { - when { - process { - """ - def tool1_version = ''' - TOOL1: - tool1: 0.11.9 - '''.stripIndent() - - def tool2_version = ''' - TOOL2: - tool2: 1.9 - '''.stripIndent() - - input[0] = Channel.of(tool1_version, tool2_version).collectFile() - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap deleted file mode 100644 index 4274ed57..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap +++ /dev/null @@ -1,27 +0,0 @@ -{ - "Should run without failures": { - "content": [ - { - "0": [ - "software_versions.yml:md5,1c851188476409cda5752ce971b20b58" - ], - "1": [ - "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d" - ], - "2": [ - "versions.yml:md5,3843ac526e762117eedf8825b40683df" - ], - "mqc_yml": [ - "software_versions_mqc.yml:md5,2570f4ba271ad08357b0d3d32a9cf84d" - ], - "versions": [ - "versions.yml:md5,3843ac526e762117eedf8825b40683df" - ], - "yml": [ - "software_versions.yml:md5,1c851188476409cda5752ce971b20b58" - ] - } - ], - "timestamp": "2023-11-03T14:43:22.157011" - } -} diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml b/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml deleted file mode 100644 index 405aa24a..00000000 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -custom/dumpsoftwareversions: - - modules/nf-core/custom/dumpsoftwareversions/** diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml index 1787b38a..691d4c76 100644 --- a/modules/nf-core/fastqc/environment.yml +++ b/modules/nf-core/fastqc/environment.yml @@ -1,7 +1,5 @@ -name: fastqc channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 9e19a74c..d8989f48 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -25,6 +25,14 @@ process FASTQC { def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } def rename_to = old_new_pairs*.join(' ').join(' ') def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ') + + // The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory) + // https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222 + // Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label + def memory_in_mb = MemoryUnit.of("${task.memory}").toUnit('MB') / task.cpus + // FastQC memory value allowed range (100 - 10000) + def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb) + """ printf "%s %s\\n" $rename_to | while read old_name new_name; do [ -f "\${new_name}" ] || ln -s \$old_name \$new_name @@ -33,6 +41,7 @@ process FASTQC { fastqc \\ $args \\ --threads $task.cpus \\ + --memory $fastqc_memory \\ $renamed_files cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml index ee5507e0..4827da7a 100644 --- a/modules/nf-core/fastqc/meta.yml +++ b/modules/nf-core/fastqc/meta.yml @@ -16,35 +16,44 @@ tools: homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ licence: ["GPL-2.0-only"] + identifier: biotools:fastqc input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: FastQC report + pattern: "*_{fastqc.html}" - zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.zip": + type: file + description: FastQC report archive + pattern: "*_{fastqc.zip}" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@drpatelh" - "@grst" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index b9e8f926..e9d79a07 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -3,107 +3,307 @@ nextflow_process { name "Test Process FASTQC" script "../main.nf" process "FASTQC" + tag "modules" tag "modules_nfcore" tag "fastqc" - test("Single-Read") { + test("sarscov2 single-end [fastq]") { when { - params { - outdir = "$outputDir" + process { + """ + 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) ] + ]) + """ } + } + + then { + assertAll ( + { assert process.success }, + // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. + // looks like this:
    Mon 2 Oct 2023
    test.gz
    + // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 + { 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 typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 paired-end [fastq]") { + + when { process { """ - input[0] = [ + 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) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 interleaved [fastq]") { + + when { + process { + """ + 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) + ]) + """ + } + } + + 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 typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + 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 typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 multiple [fastq]") { + + when { + process { + """ + 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) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, + { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, + { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 custom_prefix") { + + when { + process { + """ + 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) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 single-end [fastq] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ [ id: 'test', single_end:true ], - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) - ] - ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 paired-end [fastq] - stub") { + + options "-stub" + when { + process { + """ + 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) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 interleaved [fastq] - stub") { + + options "-stub" + when { + process { + """ + 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) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 paired-end [bam] - stub") { + + options "-stub" + 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 snapshot(process.out).match() } + ) + } + } + + test("sarscov2 multiple [fastq] - stub") { + + options "-stub" + when { + process { + """ + 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) ] + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 custom_prefix - stub") { + + options "-stub" + when { + process { + """ + 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) + ]) """ } } then { assertAll ( - { assert process.success }, - // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. - // looks like this:
    Mon 2 Oct 2023
    test.gz
    - // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 - { assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" }, - { assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match("versions") }, - { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" } + { assert process.success }, + { assert snapshot(process.out).match() } ) } } -// TODO -// // -// // Test with paired-end data -// // -// workflow test_fastqc_paired_end { -// input = [ -// [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) -// ] -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with interleaved data -// // -// workflow test_fastqc_interleaved { -// input = [ -// [id: 'test', single_end: false], // meta map -// file(params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], checkIfExists: true) -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with bam data -// // -// workflow test_fastqc_bam { -// input = [ -// [id: 'test', single_end: false], // meta map -// file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with multiple samples -// // -// workflow test_fastqc_multiple { -// input = [ -// [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) -// ] -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with custom prefix -// // -// workflow test_fastqc_custom_prefix { -// input = [ -// [ id:'mysample', single_end:true ], // meta map -// file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) -// ] - -// FASTQC ( input ) -// } } diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap index 636a32ce..280f9a45 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -1,10 +1,392 @@ { - "versions": { + "sarscov2 custom_prefix": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], - "timestamp": "2023-10-09T23:40:54+0000" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:16.374038" + }, + "sarscov2 single-end [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:24.993809" + }, + "sarscov2 custom_prefix - stub": { + "content": [ + { + "0": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:03:10.93942" + }, + "sarscov2 interleaved [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:42.355718" + }, + "sarscov2 paired-end [bam]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:53.276274" + }, + "sarscov2 multiple [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:05.527626" + }, + "sarscov2 paired-end [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:31.188871" + }, + "sarscov2 paired-end [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:34.273566" + }, + "sarscov2 multiple [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:03:02.304411" + }, + "sarscov2 single-end [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:19.095607" + }, + "sarscov2 interleaved [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:44.640184" + }, + "sarscov2 paired-end [bam] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:53.550742" } -} \ No newline at end of file +} diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index bc0bdb5b..6f5b867b 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -1,7 +1,5 @@ -name: multiqc channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::multiqc=1.18 + - bioconda::multiqc=1.25.1 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 97d9f5ff..9595afb2 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -4,20 +4,22 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.18--pyhdfd78af_0' : - 'biocontainers/multiqc:1.23--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : + 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" input: tuple val(meta), path(multiqc_files, stageAs: "?/*") path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) + path(replace_names) + path(sample_names) output: tuple val(meta), path("${prefix}_multiqc"), emit: outdir - //tuple val(meta), path("*multiqc_report.html"), emit: report - //tuple val(meta), path("*_data") , emit: data - //tuple val(meta), path("*_plots") , optional:true, emit: plots + tuple val(meta), path("*multiqc_report.html"), emit: report + tuple val(meta), path("*_data") , emit: data + tuple val(meta), path("*_plots") , optional:true, emit: plots path "versions.yml" , emit: versions when: @@ -25,18 +27,23 @@ process MULTIQC { script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' def config = multiqc_config ? "--config $multiqc_config" : '' def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' - def logo = multiqc_logo ? /--cl-config 'custom_logo: "${multiqc_logo}"'/ : '' - prefix = task.ext.prefix ?: "${meta.id}" + def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' + def replace = replace_names ? "--replace-names ${replace_names}" : '' + def samples = sample_names ? "--sample-names ${sample_names}" : '' """ multiqc \\ --force \\ --outdir ${prefix}_multiqc \\ $args \\ $config \\ + $prefix \\ $extra_config \\ $logo \\ + $replace \\ + $samples \\ . cat <<-END_VERSIONS > versions.yml @@ -47,8 +54,8 @@ process MULTIQC { stub: """ - touch multiqc_data - touch multiqc_plots + mkdir multiqc_data + mkdir multiqc_plots touch multiqc_report.html cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index f1aa660e..b16c1879 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,6 +1,6 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: multiqc -description: Aggregate results from bioinformatics analyses across many samples into a single report +description: Aggregate results from bioinformatics analyses across many samples into + a single report keywords: - QC - bioinformatics tools @@ -13,40 +13,59 @@ tools: homepage: https://multiqc.info/ documentation: https://multiqc.info/docs/ licence: ["GPL-3.0-or-later"] + identifier: biotools:multiqc input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" + - - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + - - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. + pattern: "*.{yml,yaml}" + - - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + - - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + - - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" output: - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" + - "*multiqc_report.html": + type: file + description: MultiQC report file + pattern: "multiqc_report.html" - data: - type: directory - description: MultiQC data dir - pattern: "multiqc_data" + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" + - "*_plots": + type: file + description: Plots created by MultiQC + pattern: "*_data" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index c2dad217..33316a7d 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -3,22 +3,24 @@ nextflow_process { name "Test Process MULTIQC" script "../main.nf" process "MULTIQC" + tag "modules" tag "modules_nfcore" tag "multiqc" - test("MULTIQC: FASTQC") { + config "./nextflow.config" + + test("sarscov2 single-end [fastqc]") { when { - params { - outdir = "$outputDir" - } process { """ - input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_fastqc_zip'], checkIfExists: true)]) + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) input[1] = [] input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] """ } } @@ -26,26 +28,52 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert path(process.out.report.get(0)).exists() }, - { assert path(process.out.data.get(0)).exists() }, - { assert path(process.out.versions.get(0)).getText().contains("multiqc") } + { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, + { assert process.out.data[0] ==~ ".*/multiqc_data" }, + { assert snapshot(process.out.versions).match("multiqc_versions_single") } ) } } - test("MULTIQC: FASTQC and a config file") { + test("sarscov2 single-end [fastqc] [config]") { when { - params { - outdir = "$outputDir" - } process { """ - input[0] = Channel.of([file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz_fastqc_zip'], checkIfExists: true)]) + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true)) input[2] = [] input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, + { assert process.out.data[0] ==~ ".*/multiqc_data" }, + { assert snapshot(process.out.versions).match("multiqc_versions_config") } + ) + } + } + + test("sarscov2 single-end [fastqc] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) + input[1] = [] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] """ } } @@ -53,9 +81,10 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert path(process.out.report.get(0)).exists() }, - { assert path(process.out.data.get(0)).exists() }, - { assert path(process.out.versions.get(0)).getText().contains("multiqc") } + { assert snapshot(process.out.report.collect { file(it).getName() } + + process.out.data.collect { file(it).getName() } + + process.out.plots.collect { file(it).getName() } + + process.out.versions ).match("multiqc_stub") } ) } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap new file mode 100644 index 00000000..2fcbb5ff --- /dev/null +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -0,0 +1,41 @@ +{ + "multiqc_versions_single": { + "content": [ + [ + "versions.yml:md5,41f391dcedce7f93ca188f3a3ffa0916" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-02T17:51:46.317523" + }, + "multiqc_stub": { + "content": [ + [ + "multiqc_report.html", + "multiqc_data", + "multiqc_plots", + "versions.yml:md5,41f391dcedce7f93ca188f3a3ffa0916" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-02T17:52:20.680978" + }, + "multiqc_versions_config": { + "content": [ + [ + "versions.yml:md5,41f391dcedce7f93ca188f3a3ffa0916" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-02T17:52:09.185842" + } +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/tests/nextflow.config b/modules/nf-core/multiqc/tests/nextflow.config new file mode 100644 index 00000000..c537a6a3 --- /dev/null +++ b/modules/nf-core/multiqc/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = null + } +} diff --git a/nextflow.config b/nextflow.config index 91460151..fe33a081 100644 --- a/nextflow.config +++ b/nextflow.config @@ -11,52 +11,59 @@ params { // Input options - sample_data = null - reference_data = null - bakta_db = null - temp_dir = null - data_dir = 'path_surveil_data' - download_bakta_db = false - max_depth = 100 - n_ref_strains = 30 - n_ref_species = 20 - n_ref_genera = 10 - n_ref_closest = 3 - n_ref_context = 5 - ref_min_ani = 0.8 - phylo_min_genes = 10 - phylo_max_genes = 100 - bakta_db_type = 'light' - cache_type = 'true' + sample_data = null + reference_data = null + bakta_db = null + temp_dir = null + data_dir = 'path_surveil_data' + download_bakta_db = true + max_depth = 100 + only_latin_binomial_refs = false + n_ref_strains = 30 + n_ref_species = 20 + n_ref_genera = 10 + n_ref_closest = 3 + n_ref_closest_named = 2 + n_ref_context = 7 + ref_min_ani = 0.85 + phylo_min_genes = 10 + phylo_max_genes = 200 + bakta_db_type = 'light' + cache_type = 'true' // MultiQC options - multiqc_config = null - multiqc_title = null - multiqc_logo = null - max_multiqc_email_size = '25.MB' - multiqc_methods_description = null + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null // Boilerplate options - out_dir = null - trace_dir = "${params.out_dir}/pipeline_info" - publish_dir_mode = 'copy' - copymode = 'medium' - email = null - email_on_fail = null - plaintext_email = false - monochrome_logs = false - hook_url = null - help = false - validate_params = true - show_hidden_params = false - schema_ignore_params = 'genomes' - enable_conda = false - hpc_queue = null + outdir = null + trace_dir = null + publish_dir_mode = 'copy' + copymode = 'medium' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = null + help = false + help_full = false + validate_params = true + show_hidden_params = false + enable_conda = false + hpc_queue = null + show_hidden = false + version = false + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' // 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 @@ -70,93 +77,116 @@ params { max_total_memory = null max_total_cpus = null max_total_jobs = null + + // Schema validation default options + validate_params = true } // Load base.config by default for all pipelines includeConfig 'conf/base.config' -// Load nf-core custom profiles from different Institutions -try { - includeConfig "${params.custom_config_base}/nfcore_custom.config" -} catch (Exception e) { - System.err.println("WARNING: Could not load nf-core/config profiles: ${params.custom_config_base}/nfcore_custom.config") -} - -// Load nf-core/plantpathsurveil custom profiles from different institutions. -// Warning: Uncomment only if a pipeline-specific instititutional config already exists on nf-core/configs! -// try { -// includeConfig "${params.custom_config_base}/pipeline/plantpathsurveil.config" -// } catch (Exception e) { -// System.err.println("WARNING: Could not load nf-core/config/plantpathsurveil profiles: ${params.custom_config_base}/pipeline/plantpathsurveil.config") -// } - executor.cpus = params.max_total_cpus executor.memory = params.max_total_memory executor.queueSize = params.max_total_jobs profiles { - debug { process.beforeScript = 'echo $HOSTNAME' } + debug { + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false + nextflow.enable.configProcessNamesValidation = true + } conda { - conda.enabled = true - params.enable_conda = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda'] + apptainer.enabled = false } mamba { - conda.enabled = true - params.enable_conda = true - conda.useMamba = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + conda.enabled = true + conda.useMamba = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } docker { - docker.registry = 'quay.io' - docker.enabled = true - docker.runOptions = '-u $(id -u):$(id -g)' // replaces the depreciated 'docker.userEmulation' option - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + docker.enabled = true + conda.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + docker.runOptions = '-u $(id -u):$(id -g)' + } + arm { + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { - singularity.enabled = true - singularity.autoMounts = true - docker.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + singularity.enabled = true + singularity.autoMounts = true + conda.enabled = false + docker.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } podman { - podman.enabled = true - docker.enabled = false - singularity.enabled = false - shifter.enabled = false - charliecloud.enabled = false + podman.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } shifter { - shifter.enabled = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - charliecloud.enabled = false + shifter.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } charliecloud { - charliecloud.enabled = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false + charliecloud.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + apptainer.enabled = false + } + apptainer { + apptainer.enabled = true + apptainer.autoMounts = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + } + wave { + apptainer.ociAutoPull = true + singularity.ociAutoPull = true + wave.enabled = true + wave.freeze = true + wave.strategy = 'conda,container' } gitpod { - executor.name = 'local' - executor.cpus = 16 - executor.memory = 60.GB + executor.name = 'local' + executor.cpus = 4 + executor.memory = 8.GB } slurm { executor.name = 'slurm' // Use SLURM for job scheduling @@ -186,6 +216,22 @@ profiles { cqls { includeConfig 'conf/cqls.config' } } +// Load nf-core custom profiles from different Institutions +includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" + +// Load nf-core/plantpathsurveil custom profiles from different institutions. +// TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs +// includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/plantpathsurveil.config" : "/dev/null" + +// Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile +// Will not be used unless Apptainer / Docker / Podman / Charliecloud / 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' +charliecloud.registry = 'quay.io' + // 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. @@ -197,10 +243,23 @@ env { JULIA_DEPOT_PATH = "/usr/local/share/julia" } -// Capture exit codes from upstream processes when piping -process.shell = ['/bin/bash', '-euo', 'pipefail'] +// Set bash options +process.shell = """\ +bash + +set -e # Exit if a tool returns a non-zero status/exit code +set -u # Treat unset variables and parameters as an error +set -o pipefail # Returns the status of the last command to exit with a non-zero status or zero if all successfully execute +set -C # No clobber - prevent output redirection from overwriting files. +""" + +// Disable process selector warnings by default. Use debug profile to enable warnings. +nextflow.enable.configProcessNamesValidation = false def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') +if (! params.trace_dir) { + arams.trace_dir = "${params.outdir}/pipeline_info" +} timeline { enabled = true file = "${params.trace_dir}/execution_timeline_${trace_timestamp}.html" @@ -220,48 +279,48 @@ dag { manifest { name = 'nf-core/plantpathsurveil' - author = 'Zachary S.L. Foster, Martha Sudermann, Nicholas C. Cauldron, Fernanda I. Bocardo, Hung Phan, Jeff H. Chang, Niklaus J. Grünwald' + author = """Zachary S.L. Foster, Martha Sudermann, Nicholas C. Cauldron, Fernanda I. Bocardo, Hung Phan, Jeff H. Chang, Niklaus J. Grünwald""" homePage = 'https://github.com/nf-core/plantpathsurveil' - description = 'Surveillance of plant pathogens using high-throughput sequencing' + description = """Surveillance of plant pathogens using high-throughput sequencing""" mainScript = 'main.nf' - nextflowVersion = '!>=21.10.3' + nextflowVersion = '!>=24.04.2' version = '1.0dev' doi = '' } -// Load modules.config for DSL2 module specific options -includeConfig 'conf/modules.config' +// Nextflow plugins +plugins { + id 'nf-schema@2.1.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet +} + +validation { + defaultIgnoreParams = ["genomes"] + help { + enabled = true + command = "nextflow run $manifest.name -profile --input samplesheet.csv --outdir " + fullParameter = "help_full" + showHiddenParameter = "show_hidden" + beforeText = """ +-\033[2m----------------------------------------------------\033[0m- + \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m +\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m +\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m +\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m + \033[0;32m`._,._,\'\033[0m +\033[0;35m ${manifest.name} ${manifest.version}\033[0m +-\033[2m----------------------------------------------------\033[0m- +""" + afterText = """${manifest.doi ? "* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${manifest.doi ? "\n" : ""} +* The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x -// Function to ensure that resource requirements don't go beyond -// a maximum limit -def check_max(obj, type) { - if (type == 'memory') { - try { - if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1) - return params.max_memory as nextflow.util.MemoryUnit - else - return obj - } catch (all) { - println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj" - return obj - } - } else if (type == 'time') { - try { - if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1) - return params.max_time as nextflow.util.Duration - else - return obj - } catch (all) { - println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj" - return obj - } - } else if (type == 'cpus') { - try { - return Math.min( obj, params.max_cpus as int ) - } catch (all) { - println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj" - return obj - } +* Software dependencies + https://github.com/${manifest.name}/blob/master/CITATIONS.md +""" + } + summary { + beforeText = validation.help.beforeText + afterText = validation.help.afterText } } @@ -274,3 +333,6 @@ def check_prio(copymode_level, copy_priority) { return 'symlink' } } + +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' diff --git a/nextflow_schema.json b/nextflow_schema.json index 244a69ae..ccea39f9 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,23 +1,24 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/nf-core/pathogensurveillance/master/nextflow_schema.json", - "title": "nf-core/pathogensurveillance pipeline parameters", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/nf-core/plantpathsurveil/master/nextflow_schema.json", + "title": "nf-core/plantpathsurveil pipeline parameters", "description": "Surveillance of pathogens using high-throughput sequencing", "type": "object", - "definitions": { + "$defs": { "input_output_options": { "title": "Input/output options", "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["sample_data", "out_dir"], + "required": ["sample_data", "outdir"], "properties": { "sample_data": { "type": "string", "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", "mimetype": "text/csv", "pattern": "^\\S+\\.[ct]sv$", - "schema": "assets/schema_input.json", "description": "Path to comma-separated file containing information about samples.", "help_text": "This CSV has one row per samples and contains information such as the location of input files, sample ID, labels, etc. Use this parameter to specify its location. See [the documentaion](https://github.com/grunwaldlab/pathogensurveillance?tab=readme-ov-file#input-format) for details on formatting this file.", "fa_icon": "fas fa-file-csv" @@ -32,7 +33,7 @@ "help_text": "This CSV has one row per reference and contains information such as the location of input files, reference ID, labels, etc. Use this parameter to specify its location. See [the documentaion](https://github.com/grunwaldlab/pathogensurveillance?tab=readme-ov-file#input-format) for details on formatting this file.", "fa_icon": "fas fa-file-csv" }, - "out_dir": { + "outdir": { "type": "string", "format": "directory-path", "description": "The output directory where the results will be saved. You have to use absolute paths to storage if running on Cloud infrastructure.", @@ -100,6 +101,12 @@ "description": "Maximum depth of reads to be used for all analses. Samples with more reads are subsampled to this depth.", "fa_icon": "fas fa-align-center" }, + "only_latin_binomial_refs": { + "type": "boolean", + "description": "When selecting references automatically, only consider references with names that appear to be standard latin bionomials (i.e. no numbers or symbols in the first two words).", + "fa_icon": "fas fa-download", + "default": false + }, "n_ref_strains": { "type": "number", "default": 30, @@ -124,9 +131,15 @@ "description": "The number of references most similar to each sample based on estimated ANI to include in phyogenetic anlyses.", "fa_icon": "fas fa-download" }, + "n_ref_closest_named": { + "type": "number", + "default": 2, + "description": "Same as the 'n_ref_closest' option except that it only applies to referneces with what apppear to be standard latin binomaial names (i.e. two words with no numbers or symbols). This is intended to ensure that a refernece with an informative name is present even if it is not the most similar.", + "fa_icon": "fas fa-download" + }, "n_ref_context": { "type": "number", - "default": 5, + "default": 7, "description": "The number of references representing the entire range of ANI relative to each sample. These are meant to provide context for more similar references. For a group of samples, the fewest total references will be selected that satisify this count for each sample.", "fa_icon": "fas fa-download" }, @@ -138,13 +151,13 @@ }, "phylo_max_genes": { "type": "number", - "default": 100, + "default": 200, "description": "The maximum number of genes used to conduct a core gene phylogeny.", "fa_icon": "fas fa-align-center" }, "ref_min_ani": { "type": "number", - "default": 0.8, + "default": 0.85, "description": "The minimum ANI between a sample and potential reference for that reference to be used for mapping reads from that sample. To force all the samples in a report group to use the same reference, set this value very low.", "fa_icon": "fas fa-align-center" } @@ -262,9 +275,9 @@ "description": "Less common options for the pipeline, typically set in a config file.", "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", "properties": { - "help": { + "version": { "type": "boolean", - "description": "Display help text.", + "description": "Display version and exit.", "fa_icon": "fas fa-question-circle", "hidden": true }, @@ -318,11 +331,12 @@ "type": "string", "description": "Incoming hook URL for messaging service", "fa_icon": "fas fa-people-group", - "help_text": "Incoming hook URL for messaging service. Currently, only MS Teams is supported.", + "help_text": "Incoming hook URL for messaging service. Currently, MS Teams and Slack are supported.", "hidden": true }, "multiqc_config": { "type": "string", + "format": "file-path", "description": "Custom config file to supply to MultiQC.", "fa_icon": "fas fa-cog", "hidden": true @@ -341,7 +355,7 @@ "trace_dir": { "type": "string", "description": "Directory to keep pipeline Nextflow logs and reports.", - "default": "${params.out_dir}/pipeline_info", + "default": "${params.outdir}/pipeline_info", "fa_icon": "fas fa-cogs", "hidden": true }, @@ -371,25 +385,26 @@ "description": "Name of queue in HPC environment to run jobs.", "hidden": true, "fa_icon": "fas fa-cogs" + }, + "pipelines_testdata_base_path": { + "type": "string", + "fa_icon": "far fa-check-circle", + "description": "Base URL or local path to location of pipeline test dataset files", + "default": "https://raw.githubusercontent.com/nf-core/test-datasets/", + "hidden": true } } } }, "allOf": [ { - "$ref": "#/definitions/input_output_options" - }, - { - "$ref": "#/definitions/analysis_parameters" - }, - { - "$ref": "#/definitions/institutional_config_options" + "$ref": "#/$defs/input_output_options" }, { - "$ref": "#/definitions/max_job_request_options" + "$ref": "#/$defs/institutional_config_options" }, { - "$ref": "#/definitions/generic_options" + "$ref": "#/$defs/generic_options" } ] } diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 0d62beb6..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,10 +0,0 @@ -# Config file for Python. Mostly used to configure linting of bin/check_samplesheet.py with Black. -# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. -[tool.black] -line-length = 120 -target_version = ["py37", "py38", "py39", "py310"] - -[tool.isort] -profile = "black" -known_first_party = ["nf_core"] -multi_line_output = 3 diff --git a/scripts/rm_nonzero_cache_dirs.R b/scripts/rm_nonzero_cache_dirs.R index ab12909a..ed5207f3 100644 --- a/scripts/rm_nonzero_cache_dirs.R +++ b/scripts/rm_nonzero_cache_dirs.R @@ -1,4 +1,4 @@ -# Deletes all task working directories in the "work" directory that had a non-zero exit code. +# Creates bash code to delete all task working directories in the "work" directory that had a non-zero exit code. # Check that work directory exists @@ -22,7 +22,7 @@ exitcodes <- vapply(exitcode_paths, function(p) { # Filter for non-zero exit codes non_zero_exitcodes <- exitcodes[is.na(exitcodes) | exitcodes != "0"] -# Delete directories with non-zero exit codes +# Create code to delete directories with non-zero exit codes for (path in names(non_zero_exitcodes)) { cat(paste0('rm -rf ', dirname(path), '\n')) } diff --git a/subworkflows/local/busco_phylogeny.nf b/subworkflows/local/busco_phylogeny.nf index 72b73580..429671eb 100644 --- a/subworkflows/local/busco_phylogeny.nf +++ b/subworkflows/local/busco_phylogeny.nf @@ -24,13 +24,14 @@ workflow BUSCO_PHYLOGENY { // Make file with sample IDs and user-defined references or NA for each group samp_ref_pairs = sample_data - .map{ [[id: it.sample_id], [id: it.report_group_ids], it.ref_metas] } + .map{ [it.sample_id, it.report_group_ids, it.ref_metas] } .transpose(by: 2) - .map{ sample_meta, report_meta, ref_meta -> - [sample_meta, report_meta, [id: ref_meta.ref_id], ref_meta.ref_path, ref_meta.ref_primary_usage] + .map{ sample_id, report_group_id, ref_meta -> + [sample_id, report_group_id, ref_meta.ref_id, ref_meta.ref_name, ref_meta.ref_description, ref_meta.ref_path, ref_meta.ref_primary_usage] } - .collectFile() { sample_meta, report_meta, ref_id, ref_path, usage -> - [ "${report_meta.id}.csv", "${sample_meta.id},${ref_id.id},${usage}\n" ] + .unique() + .collectFile() { sample_id, report_group_id, ref_id, ref_name, ref_desc, ref_path, usage -> + [ "${report_group_id}.csv", "${sample_id},${ref_id},${ref_name},${ref_desc},${usage}\n" ] } .map {[[id: it.getSimpleName()], it]} @@ -38,6 +39,7 @@ workflow BUSCO_PHYLOGENY { ASSIGN_CONTEXT_REFERENCES ( ani_matrix.combine(samp_ref_pairs, by: 0), params.n_ref_closest, + params.n_ref_closest_named, params.n_ref_context ) versions = versions.mix(ASSIGN_CONTEXT_REFERENCES.out.versions) diff --git a/subworkflows/local/core_genome_phylogeny.nf b/subworkflows/local/core_genome_phylogeny.nf index 6c7a56e6..5a0c191b 100644 --- a/subworkflows/local/core_genome_phylogeny.nf +++ b/subworkflows/local/core_genome_phylogeny.nf @@ -31,13 +31,14 @@ workflow CORE_GENOME_PHYLOGENY { // Make file with sample IDs and user-defined references or NA for each group samp_ref_pairs = sample_data - .map{ [[id: it.sample_id], [id: it.report_group_ids], it.ref_metas] } + .map{ [it.sample_id, it.report_group_ids, it.ref_metas] } .transpose(by: 2) - .map{ sample_meta, report_meta, ref_meta -> - [sample_meta, report_meta, [id: ref_meta.ref_id], ref_meta.ref_path, ref_meta.ref_primary_usage] + .map{ sample_id, report_group_id, ref_meta -> + [sample_id, report_group_id, ref_meta.ref_id, ref_meta.ref_name, ref_meta.ref_description, ref_meta.ref_path, ref_meta.ref_primary_usage] } - .collectFile() { sample_meta, report_meta, ref_id, ref_path, usage -> - [ "${report_meta.id}.csv", "${sample_meta.id},${ref_id.id},${usage}\n" ] + .unique() + .collectFile() { sample_id, report_group_id, ref_id, ref_name, ref_desc, ref_path, usage -> + [ "${report_group_id}.csv", "${sample_id},${ref_id},${ref_name},${ref_desc},${usage}\n" ] } .map {[[id: it.getSimpleName()], it]} @@ -45,6 +46,7 @@ workflow CORE_GENOME_PHYLOGENY { ASSIGN_CONTEXT_REFERENCES ( ani_matrix.combine(samp_ref_pairs, by: 0), params.n_ref_closest, + params.n_ref_closest_named, params.n_ref_context ) @@ -102,7 +104,11 @@ workflow CORE_GENOME_PHYLOGENY { all_assem_data = ref_assem_data .mix(sample_assem_data) BAKTA_BAKTA ( - all_assem_data.map { ref_meta, report_meta, assem_path -> [ref_meta, assem_path] }, + all_assem_data + .map { ref_meta, report_meta, assem_path -> + [ref_meta, assem_path] + } + .unique(), bakta_db, // Bakta database [], // proteins (optional) [] // prodigal_tf (optional) diff --git a/subworkflows/local/genome_assembly.nf b/subworkflows/local/genome_assembly.nf index acd38887..13c35516 100644 --- a/subworkflows/local/genome_assembly.nf +++ b/subworkflows/local/genome_assembly.nf @@ -15,15 +15,30 @@ workflow GENOME_ASSEMBLY { versions = Channel.empty() messages = Channel.empty() - filtered_input = sample_data - .filter {it.kingdom == "Bacteria"} - .map{ [[id: it.sample_id, single_end: it.single_end], it.paths, it.sequence_type] } + sample_data + .map{ [[id: it.sample_id, single_end: it.single_end], it.paths, it.sequence_type, it.kingdom] } .unique() + .branch { meta, paths, type, kingdom -> + short_prokaryote: (type == "illumina" || type == "bgiseq") && kingdom == "Bacteria" + return [meta, paths] + nanopore_prokaryote: type == "nanopore" && kingdom == "Bacteria" + return [meta, paths] + pacbio_prokaryote: type == "pacbio" && kingdom == "Bacteria" + return [meta, paths] + short_eukaryote: (type == "illumina" || type == "bgiseq") && kingdom != "Bacteria" + return [meta, paths] + nanopore_eukaryote: type == "nanopore" && kingdom != "Bacteria" + return [meta, paths] + pacbio_eukaryote: type == "pacbio" && kingdom != "Bacteria" + return [meta, paths] + other: true + return [meta, paths] + } + .set { filtered_input } - shortreads = filtered_input - .filter{ sample_meta, read_paths, seq_type -> seq_type == "illumina" || seq_type == "bgiseq" } - .map{ sample_meta, read_paths, seq_type -> [sample_meta, read_paths] } - FASTP( shortreads, [], false, false ) + spades_input = filtered_input.short_prokaryote + .mix(filtered_input.short_eukaryote) + FASTP( spades_input, [], false, false ) versions = versions.mix(FASTP.out.versions) SPADES( @@ -33,20 +48,25 @@ workflow GENOME_ASSEMBLY { ) versions = versions.mix(SPADES.out.versions) - nanopore = filtered_input - .filter{ sample_meta, read_paths, seq_type -> seq_type == "nanopore"} - .map{ sample_meta, read_paths, seq_type -> [sample_meta, read_paths] } + // Warn about any failed Spades assemblies + spades_warnings = spades_input + .join(SPADES.out.scaffolds, remainder: true) + .filter { sample_meta, read_paths, scaffolds -> + ! scaffolds + } + .combine(sample_data.map{ [[id: it.sample_id, single_end: it.single_end], [id: it.report_group_ids]] }, by: 0) + .map { sample_meta, read_paths, scaffolds, report_meta -> + [sample_meta, report_meta, null, "GENOME_ASSEMBLY", "WARNING", "Sample could not be assebled, possibly due to short read lengh or low quality. Check Spades' logs for more details."] + } + FLYE_NANOPORE ( - nanopore, + filtered_input.nanopore_prokaryote.mix(filtered_input.nanopore_eukaryote), "--nano-hq" ) - pacbio = filtered_input - .filter{ sample_meta, read_paths, seq_type -> seq_type == "pacbio"} - .map{ sample_meta, read_paths, seq_type -> [sample_meta, read_paths] } FLYE_PACBIO ( - pacbio, - "--pacbio-hifi" + filtered_input.pacbio_prokaryote.mix(filtered_input.pacbio_eukaryote), + "--pacbio-raw" ) FILTER_ASSEMBLY ( @@ -69,6 +89,15 @@ workflow GENOME_ASSEMBLY { ) versions = versions.mix(QUAST.out.versions) + // Warn if a sample was not assembled + not_assembled_warnings = sample_data + .map { [[id: it.sample_id], it] } + .combine(filtered_input.other, by: 0) + .map{ sample_meta, sample_data, paths -> + [sample_meta, [id: sample_data.report_group_ids], null, "GENOME_ASSEMBLY", "WARNING", "Sample not assembled because no assemblier was configured to handle this combination of taxon and sequencing technology"] + } + messages = messages.mix(not_assembled_warnings) + emit: reads = FASTP.out.reads // channel: [ val(meta), [reads] ] scaffolds = filtered_assembly diff --git a/subworkflows/local/prepare_input.nf b/subworkflows/local/prepare_input.nf index 0f5d81a9..ea880c1d 100644 --- a/subworkflows/local/prepare_input.nf +++ b/subworkflows/local/prepare_input.nf @@ -124,7 +124,8 @@ workflow PREPARE_INPUT { .toSortedList(), params.n_ref_strains, params.n_ref_species, - params.n_ref_genera + params.n_ref_genera, + params.only_latin_binomial_refs ) no_assemblies_found = PICK_ASSEMBLIES.out.line_count .filter { sample_id, line_count -> @@ -185,6 +186,7 @@ workflow PREPARE_INPUT { [sample_meta, ref_meta] } .mix(local_references) + .unique() .groupTuple(by: 0, sort: 'hash') // Add reference metadata list to the sample metadata @@ -260,7 +262,7 @@ def create_sample_metadata_channel(LinkedHashMap sample_meta) { } sample_meta = sample_meta.collectEntries { key, value -> [(key): value ?: null] } sample_meta.ref_ids = sample_meta.ref_ids ? sample_meta.ref_ids.split(";") as ArrayList : [] - sample_meta.single_end = sample_meta.path_2 == '' + sample_meta.single_end = ! sample_meta.path_2 def paths = null if (sample_meta.path) { paths = [file(sample_meta.path)] diff --git a/subworkflows/local/sketch_comparison.nf b/subworkflows/local/sketch_comparison.nf index cbde6db3..8ee2a971 100644 --- a/subworkflows/local/sketch_comparison.nf +++ b/subworkflows/local/sketch_comparison.nf @@ -8,45 +8,64 @@ workflow SKETCH_COMPARISON { take: sample_data + assemblies main: versions = Channel.empty() messages = Channel.empty() - // Trim rare k-mers from raw reads + // Combine sample data with reads and assemblies to idenify which samples were not assembled + sample_data + .map { [[id: it.sample_id], it.paths] } + .unique() + .join(assemblies, remainder: true) + .branch { sample_meta, read_paths, assembly -> + reads: ! assembly + return [sample_meta, read_paths] + assemblies: assembly + return [sample_meta, assembly] + } + .set { input } + + // Trim rare k-mers from raw reads and sketch TRIM_AND_SKETCH ( - sample_data - .map { [[id: it.sample_id], it.paths] } - .unique(), + input.reads ) versions = versions.mix(TRIM_AND_SKETCH.out.versions) // Create signature for each reference genome - references = sample_data + assemblies_to_sketch = sample_data .map{ [it.ref_metas] } .transpose(by: 0) .map{ ref_meta -> [[id: ref_meta[0].ref_id], ref_meta[0].ref_path] } .unique() + .mix(input.assemblies) SOURMASH_SKETCH ( - references + assemblies_to_sketch ) versions = versions.mix(SOURMASH_SKETCH.out.versions) // Compare all genomes/samples to eachother to create an ANI matrix - grouped_sample_sigs = sample_data + read_sigs = sample_data .map { [[id: it.sample_id], [id: it.report_group_ids]] } .combine(TRIM_AND_SKETCH.out.signatures, by:0) .map { sample_id, report_group_id, signature -> [report_group_id, signature]} .unique() - grouped_ref_sigs = sample_data + ref_sigs = sample_data .map{ [it.ref_metas, [id: it.report_group_ids]] } .transpose(by: 0) .map{ ref_meta, report_group_id -> [[id: ref_meta.ref_id], report_group_id] } .combine(SOURMASH_SKETCH.out.signatures, by: 0) .map{ ref_id, report_group_id, signature -> [report_group_id, signature]} .unique() - grouped_sigs = grouped_sample_sigs - .mix(grouped_ref_sigs) + assem_sigs = sample_data + .map { [[id: it.sample_id], [id: it.report_group_ids]] } + .combine(SOURMASH_SKETCH.out.signatures, by: 0) + .map{ sample_id, report_group_id, signature -> [report_group_id, signature]} + .unique() + grouped_sigs = read_sigs + .mix(ref_sigs) + .mix(assem_sigs) .groupTuple(by: 0, sort: 'hash') SOURMASH_COMPARE ( grouped_sigs, diff --git a/subworkflows/local/utils_nfcore_pathogensurveillance_pipeline/main.nf b/subworkflows/local/utils_nfcore_pathogensurveillance_pipeline/main.nf new file mode 100644 index 00000000..28a1aa2b --- /dev/null +++ b/subworkflows/local/utils_nfcore_pathogensurveillance_pipeline/main.nf @@ -0,0 +1,263 @@ +// +// Subworkflow with functionality specific to the nf-core/plantpathsurveil pipeline +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW TO INITIALISE PIPELINE +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PIPELINE_INITIALISATION { + + take: + version // boolean: Display version and exit + validate_params // boolean: Boolean whether to validate parameters against the schema at runtime + monochrome_logs // boolean: Do not use coloured log outputs + nextflow_cli_args // array: List of positional nextflow CLI args + outdir // string: The output directory where the results will be saved + sample_data_csv // string: Path to input sample data table + reference_data_csv // string: Path to reference data table + + main: + + versions = Channel.empty() + + // + // Print version and exit if required and dump pipeline parameters to JSON file + // + UTILS_NEXTFLOW_PIPELINE ( + version, + true, + outdir, + workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 + ) + + // + // Validate parameters and generate parameter summary to stdout + // + UTILS_NFSCHEMA_PLUGIN ( + workflow, + validate_params, + null + ) + + // + // Check config provided to the pipeline + // + UTILS_NFCORE_PIPELINE ( + nextflow_cli_args + ) + + // + // Custom validation for pipeline parameters + // + + // Check input path parameters to see if they exist + def checkPathParamList = [ + params.sample_data, + params.reference_data, + params.multiqc_config, + params.bakta_db + ] + for (param in checkPathParamList) { + if (param) { file(param, checkIfExists: true) } + } + + // Check mandatory parameters + if (params.sample_data) { + sample_data_csv = file(params.sample_data) + } else { + exit 1, 'Sample metadata CSV not specified.' + } + if (params.reference_data) { + reference_data_csv = file(params.reference_data) + } else { + reference_data_csv = [] + } + + emit: + sample_data_csv = sample_data_csv + reference_data_csv = reference_data_csv + versions = versions +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW FOR PIPELINE COMPLETION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PIPELINE_COMPLETION { + + take: + email // string: email address + email_on_fail // string: email address sent on pipeline failure + plaintext_email // boolean: Send plain-text email instead of HTML + outdir // path: Path to output directory where results will be published + monochrome_logs // boolean: Disable ANSI colour codes in log output + hook_url // string: hook URL for notifications + multiqc_report // string: Path to MultiQC report + + main: + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + + // + // Completion email and summary + // + workflow.onComplete { + if (email || email_on_fail) { + completionEmail( + summary_params, + email, + email_on_fail, + plaintext_email, + outdir, + monochrome_logs, + multiqc_report.toList() + ) + } + + completionSummary(monochrome_logs) + if (hook_url) { + imNotification(summary_params, hook_url) + } + } + + workflow.onError { + log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + } +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ +// +// Check and validate pipeline parameters +// +def validateInputParameters() { + genomeExistsError() +} + +// +// Validate channels from input samplesheet +// +def validateInputSamplesheet(input) { + def (metas, fastqs) = input[1..2] + + // Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end + def endedness_ok = metas.collect{ meta -> meta.single_end }.unique().size == 1 + if (!endedness_ok) { + error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") + } + + return [ metas[0], fastqs ] +} +// +// Get attribute from genome config file e.g. fasta +// +def getGenomeAttribute(attribute) { + if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { + if (params.genomes[ params.genome ].containsKey(attribute)) { + return params.genomes[ params.genome ][ attribute ] + } + } + return null +} + +// +// Exit pipeline if incorrect --genome key provided +// +def genomeExistsError() { + if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + + " Currently, the available genome keys are:\n" + + " ${params.genomes.keySet().join(", ")}\n" + + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + error(error_string) + } +} +// +// Generate methods description for MultiQC +// +def toolCitationText() { + // TODO nf-core: Optionally add in-text citation tools to this list. + // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "", + // Uncomment function in methodsDescriptionText to render in MultiQC report + def citation_text = [ + "Tools used in the workflow included:", + "FastQC (Andrews 2010),", + "MultiQC (Ewels et al. 2016)", + "." + ].join(' ').trim() + + return citation_text +} + +def toolBibliographyText() { + // TODO nf-core: 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 +} + +def methodsDescriptionText(mqc_methods_yaml) { + // 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 = workflow.toMap() + meta["manifest_map"] = workflow.manifest.toMap() + + // Pipeline DOI + if (meta.manifest_map.doi) { + // Using a loop to handle multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + def temp_doi_ref = "" + def manifest_doi = meta.manifest_map.doi.tokenize(",") + manifest_doi.each { doi_ref -> + temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " + } + meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) + } else meta["doi_text"] = "" + 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 nf-core: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled! + // meta["tool_citations"] = toolCitationText().replaceAll(", \\.", ".").replaceAll("\\. \\.", ".").replaceAll(", \\.", ".") + // meta["tool_bibliography"] = toolBibliographyText() + + + def methods_text = mqc_methods_yaml.text + + def engine = new groovy.text.SimpleTemplateEngine() + def description_html = engine.createTemplate(methods_text).make(meta) + + return description_html.toString() +} + diff --git a/subworkflows/local/variant_analysis.nf b/subworkflows/local/variant_analysis.nf index 6ce014f8..0f3ad1e4 100644 --- a/subworkflows/local/variant_analysis.nf +++ b/subworkflows/local/variant_analysis.nf @@ -19,14 +19,15 @@ workflow VARIANT_ANALYSIS { // Make file with sample IDs and user-defined references or NA for each group samp_ref_pairs = sample_data - .map{ [[id: it.sample_id], [id: it.report_group_ids], it.ref_metas] } + .map{ [it.sample_id, it.report_group_ids, it.ref_metas] } .transpose(by: 2) - .map{ sample_meta, report_meta, ref_meta -> - [sample_meta, report_meta, [id: ref_meta.ref_id], ref_meta.ref_path, ref_meta.ref_primary_usage] + .map{ sample_id, report_group_id, ref_meta -> + [sample_id, report_group_id, ref_meta.ref_id, ref_meta.ref_name, ref_meta.ref_description, ref_meta.ref_path, ref_meta.ref_primary_usage] } + .unique() .tap{ references } - .collectFile() { sample_meta, report_meta, ref_id, ref_path, usage -> - [ "${report_meta.id}.csv", "${sample_meta.id},${ref_id.id},${usage}\n" ] + .collectFile() { sample_id, report_group_id, ref_id, ref_name, ref_desc, ref_path, usage -> + [ "${report_group_id}.csv", "${sample_id},${ref_id},${ref_name},${ref_desc},${usage}\n" ] } .map {[[id: it.getSimpleName()], it]} @@ -35,6 +36,11 @@ workflow VARIANT_ANALYSIS { ani_matrix.join(samp_ref_pairs), params.ref_min_ani ) + ref_paths = references + .map {sample_id, report_group_id, ref_id, ref_name, ref_desc, ref_path, usage -> + [[id: sample_id], [id:report_group_id], [id: ref_id], ref_path, usage] + } + .unique() sample_data_with_refs = ASSIGN_MAPPING_REFERENCE.out.samp_ref_pairs .splitText( elem: 1 ) .map { [it[0], it[1].replace('\n', '')] } // remove newline that splitText adds @@ -42,7 +48,7 @@ workflow VARIANT_ANALYSIS { .map { report_meta, csv_contents -> [[id: csv_contents[0]], report_meta, [id: csv_contents[1]]] } - .join(references, by: 0..2) + .join(ref_paths, by: 0..2) .join(sample_data.map{ [[id: it.sample_id], [id: it.report_group_ids], it.paths, it.sequence_type] }, by: 0..1) .branch { // Remove any samples that do not have reference information filtered: it[2] != null diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf new file mode 100644 index 00000000..0fcbf7b3 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -0,0 +1,124 @@ +// +// Subworkflow with functionality that may be useful for any Nextflow pipeline +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW DEFINITION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow UTILS_NEXTFLOW_PIPELINE { + take: + print_version // boolean: print version + dump_parameters // boolean: dump parameters + outdir // path: base directory used to publish pipeline results + check_conda_channels // boolean: check conda channels + + main: + + // + // Print workflow version and exit on --version + // + if (print_version) { + log.info("${workflow.manifest.name} ${getWorkflowVersion()}") + System.exit(0) + } + + // + // Dump pipeline parameters to a JSON file + // + if (dump_parameters && outdir) { + dumpParametersToJSON(outdir) + } + + // + // When running with Conda, warn if channels have not been set-up appropriately + // + if (check_conda_channels) { + checkCondaChannels() + } + + emit: + dummy_emit = true +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// +// Generate version string +// +def getWorkflowVersion() { + def version_string = "" as String + if (workflow.manifest.version) { + def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' + version_string += "${prefix_v}${workflow.manifest.version}" + } + + if (workflow.commitId) { + def git_shortsha = workflow.commitId.substring(0, 7) + version_string += "-g${git_shortsha}" + } + + return version_string +} + +// +// Dump pipeline parameters to a JSON file +// +def dumpParametersToJSON(outdir) { + def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') + def filename = "params_${timestamp}.json" + def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") + def jsonStr = groovy.json.JsonOutput.toJson(params) + temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) + + nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") + temp_pf.delete() +} + +// +// When running with -profile conda, warn if channels have not been set-up appropriately +// +def checkCondaChannels() { + def parser = new org.yaml.snakeyaml.Yaml() + def channels = [] + try { + def config = parser.load("conda config --show channels".execute().text) + channels = config.channels + } + catch (NullPointerException e) { + log.warn("Could not verify conda channel configuration.") + return null + } + catch (IOException e) { + log.warn("Could not verify conda channel configuration.") + return null + } + + // Check that all channels are present + // This channel list is ordered by required channel priority. + def required_channels_in_order = ['conda-forge', 'bioconda'] + def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean + + // Check that they are in the right order + def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } + + if (channels_missing | channel_priority_violation) { + log.warn """\ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + There is a problem with your Conda configuration! + You will need to set-up the conda-forge and bioconda channels correctly. + Please refer to https://bioconda.github.io/ + The observed channel order is + ${channels} + but the following channel order is required: + ${required_channels_in_order} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + """.stripIndent(true) + } +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml new file mode 100644 index 00000000..e5c3a0a8 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "UTILS_NEXTFLOW_PIPELINE" +description: Subworkflow with functionality that may be useful for any Nextflow pipeline +keywords: + - utility + - pipeline + - initialise + - version +components: [] +input: + - print_version: + type: boolean + description: | + Print the version of the pipeline and exit + - dump_parameters: + type: boolean + description: | + Dump the parameters of the pipeline to a JSON file + - output_directory: + type: directory + description: Path to output dir to write JSON file to. + pattern: "results/" + - check_conda_channel: + type: boolean + description: | + Check if the conda channel priority is correct. +output: + - dummy_emit: + type: boolean + description: | + Dummy emit to make nf-core subworkflows lint happy +authors: + - "@adamrtalbot" + - "@drpatelh" +maintainers: + - "@adamrtalbot" + - "@drpatelh" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test new file mode 100644 index 00000000..68718e4f --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test @@ -0,0 +1,54 @@ + +nextflow_function { + + name "Test Functions" + script "subworkflows/nf-core/utils_nextflow_pipeline/main.nf" + config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config" + tag 'subworkflows' + tag 'utils_nextflow_pipeline' + tag 'subworkflows/utils_nextflow_pipeline' + + test("Test Function getWorkflowVersion") { + + function "getWorkflowVersion" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function dumpParametersToJSON") { + + function "dumpParametersToJSON" + + when { + function { + """ + // define inputs of the function here. Example: + input[0] = "$outputDir" + """.stripIndent() + } + } + + then { + assertAll( + { assert function.success } + ) + } + } + + test("Test Function checkCondaChannels") { + + function "checkCondaChannels" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap new file mode 100644 index 00000000..e3f0baf4 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap @@ -0,0 +1,20 @@ +{ + "Test Function getWorkflowVersion": { + "content": [ + "v9.9.9" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:05.308243" + }, + "Test Function checkCondaChannels": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:12.425833" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test new file mode 100644 index 00000000..ca964ce8 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test @@ -0,0 +1,111 @@ +nextflow_workflow { + + name "Test Workflow UTILS_NEXTFLOW_PIPELINE" + script "../main.nf" + config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config" + workflow "UTILS_NEXTFLOW_PIPELINE" + tag 'subworkflows' + tag 'utils_nextflow_pipeline' + tag 'subworkflows/utils_nextflow_pipeline' + + test("Should run no inputs") { + + when { + workflow { + """ + print_version = false + dump_parameters = false + outdir = null + check_conda_channels = false + + input[0] = print_version + input[1] = dump_parameters + input[2] = outdir + input[3] = check_conda_channels + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should print version") { + + when { + workflow { + """ + print_version = true + dump_parameters = false + outdir = null + check_conda_channels = false + + input[0] = print_version + input[1] = dump_parameters + input[2] = outdir + input[3] = check_conda_channels + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert workflow.stdout.contains("nextflow_workflow v9.9.9") } + ) + } + } + + test("Should dump params") { + + when { + workflow { + """ + print_version = false + dump_parameters = true + outdir = 'results' + check_conda_channels = false + + input[0] = false + input[1] = true + input[2] = outdir + input[3] = false + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should not create params JSON if no output directory") { + + when { + workflow { + """ + print_version = false + dump_parameters = true + outdir = null + check_conda_channels = false + + input[0] = false + input[1] = true + input[2] = outdir + input[3] = false + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config new file mode 100644 index 00000000..a09572e5 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config @@ -0,0 +1,9 @@ +manifest { + name = 'nextflow_workflow' + author = """nf-core""" + homePage = 'https://127.0.0.1' + description = """Dummy pipeline""" + nextflowVersion = '!>=23.04.0' + version = '9.9.9' + doi = 'https://doi.org/10.5281/zenodo.5070524' +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml b/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml new file mode 100644 index 00000000..f8476112 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml @@ -0,0 +1,2 @@ +subworkflows/utils_nextflow_pipeline: + - subworkflows/nf-core/utils_nextflow_pipeline/** diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf new file mode 100644 index 00000000..5cb7bafe --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -0,0 +1,462 @@ +// +// Subworkflow with utility functions specific to the nf-core pipeline template +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW DEFINITION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow UTILS_NFCORE_PIPELINE { + take: + nextflow_cli_args + + main: + valid_config = checkConfigProvided() + checkProfileProvided(nextflow_cli_args) + + emit: + valid_config +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// +// Warn if a -profile or Nextflow config has not been provided to run the pipeline +// +def checkConfigProvided() { + def valid_config = true as Boolean + if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { + log.warn( + "[${workflow.manifest.name}] You are attempting to run the pipeline without any custom configuration!\n\n" + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + "Please refer to the quick start section and usage docs for the pipeline.\n " + ) + valid_config = false + } + return valid_config +} + +// +// Exit pipeline if --profile contains spaces +// +def checkProfileProvided(nextflow_cli_args) { + if (workflow.profile.endsWith(',')) { + error( + "The `-profile` option cannot end with a trailing comma, please remove it and re-run the pipeline!\n" + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + ) + } + if (nextflow_cli_args[0]) { + log.warn( + "nf-core pipelines do not accept positional arguments. The positional argument `${nextflow_cli_args[0]}` has been detected.\n" + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + ) + } +} + +// +// Citation string for pipeline +// +def workflowCitation() { + def temp_doi_ref = "" + def manifest_doi = workflow.manifest.doi.tokenize(",") + // Handling multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + manifest_doi.each { doi_ref -> + temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" + } + return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + temp_doi_ref + "\n" + "* The nf-core framework\n" + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + "* Software dependencies\n" + " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md" +} + +// +// Generate workflow version string +// +def getWorkflowVersion() { + def version_string = "" as String + if (workflow.manifest.version) { + def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' + version_string += "${prefix_v}${workflow.manifest.version}" + } + + if (workflow.commitId) { + def git_shortsha = workflow.commitId.substring(0, 7) + version_string += "-g${git_shortsha}" + } + + return version_string +} + +// +// Get software versions for pipeline +// +def processVersionsFromYAML(yaml_file) { + def yaml = new org.yaml.snakeyaml.Yaml() + def versions = yaml.load(yaml_file).collectEntries { k, v -> [k.tokenize(':')[-1], v] } + return yaml.dumpAsMap(versions).trim() +} + +// +// Get workflow version for pipeline +// +def workflowVersionToYAML() { + return """ + Workflow: + ${workflow.manifest.name}: ${getWorkflowVersion()} + Nextflow: ${workflow.nextflow.version} + """.stripIndent().trim() +} + +// +// Get channel of software versions used in pipeline in YAML format +// +def softwareVersionsToYAML(ch_versions) { + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) +} + +// +// Get workflow summary for MultiQC +// +def paramsSummaryMultiqc(summary_params) { + def summary_section = '' + summary_params + .keySet() + .each { group -> + def group_params = summary_params.get(group) + // This gets the parameters of that particular group + if (group_params) { + summary_section += "

    ${group}

    \n" + summary_section += "
    \n" + group_params + .keySet() + .sort() + .each { param -> + summary_section += "
    ${param}
    ${group_params.get(param) ?: 'N/A'}
    \n" + } + summary_section += "
    \n" + } + } + + def yaml_file_text = "id: '${workflow.manifest.name.replace('/', '-')}-summary'\n" as String + yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" + yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" + yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" + yaml_file_text += "plot_type: 'html'\n" + yaml_file_text += "data: |\n" + yaml_file_text += "${summary_section}" + + return yaml_file_text +} + +// +// nf-core logo +// +def nfCoreLogo(monochrome_logs=true) { + def colors = logColours(monochrome_logs) as Map + String.format( + """\n + ${dashedLine(monochrome_logs)} + ${colors.green},--.${colors.black}/${colors.green},-.${colors.reset} + ${colors.blue} ___ __ __ __ ___ ${colors.green}/,-._.--~\'${colors.reset} + ${colors.blue} |\\ | |__ __ / ` / \\ |__) |__ ${colors.yellow}} {${colors.reset} + ${colors.blue} | \\| | \\__, \\__/ | \\ |___ ${colors.green}\\`-._,-`-,${colors.reset} + ${colors.green}`._,._,\'${colors.reset} + ${colors.purple} ${workflow.manifest.name} ${getWorkflowVersion()}${colors.reset} + ${dashedLine(monochrome_logs)} + """.stripIndent() + ) +} + +// +// Return dashed line +// +def dashedLine(monochrome_logs=true) { + def colors = logColours(monochrome_logs) as Map + return "-${colors.dim}----------------------------------------------------${colors.reset}-" +} + +// +// ANSII colours used for terminal logging +// +def logColours(monochrome_logs=true) { + def colorcodes = [:] as Map + + // Reset / Meta + colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" + colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" + colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" + colorcodes['underlined'] = monochrome_logs ? '' : "\033[4m" + colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" + colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" + colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" + + // Regular Colors + colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" + colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" + colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" + colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" + colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" + colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" + colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" + colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" + + // Bold + colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" + colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" + colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" + colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" + colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" + colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" + colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" + colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" + + // Underline + colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" + colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" + colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" + colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" + colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" + colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" + colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" + colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" + + // High Intensity + colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" + colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" + colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" + colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" + colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" + colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" + colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" + colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" + + // Bold High Intensity + colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" + colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" + colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" + colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" + colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" + colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" + colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" + colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" + + return colorcodes +} + +// +// Attach the multiqc report to email +// +def attachMultiqcReport(multiqc_report) { + def mqc_report = null + try { + if (workflow.success) { + mqc_report = multiqc_report.getVal() + if (mqc_report.getClass() == ArrayList && mqc_report.size() >= 1) { + if (mqc_report.size() > 1) { + log.warn("[${workflow.manifest.name}] Found multiple reports from process 'MULTIQC', will use only one") + } + mqc_report = mqc_report[0] + } + } + } + catch (Exception all) { + if (multiqc_report) { + log.warn("[${workflow.manifest.name}] Could not attach MultiQC report to summary email") + } + } + return mqc_report +} + +// +// Construct and send completion email +// +def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs=true, multiqc_report=null) { + + // Set up the e-mail variables + def subject = "[${workflow.manifest.name}] Successful: ${workflow.runName}" + if (!workflow.success) { + subject = "[${workflow.manifest.name}] FAILED: ${workflow.runName}" + } + + def summary = [:] + summary_params + .keySet() + .sort() + .each { group -> + summary << summary_params[group] + } + + def misc_fields = [:] + misc_fields['Date Started'] = workflow.start + misc_fields['Date Completed'] = workflow.complete + misc_fields['Pipeline script file path'] = workflow.scriptFile + misc_fields['Pipeline script hash ID'] = workflow.scriptId + if (workflow.repository) { + misc_fields['Pipeline repository Git URL'] = workflow.repository + } + if (workflow.commitId) { + misc_fields['Pipeline repository Git Commit'] = workflow.commitId + } + if (workflow.revision) { + misc_fields['Pipeline Git branch/tag'] = workflow.revision + } + misc_fields['Nextflow Version'] = workflow.nextflow.version + misc_fields['Nextflow Build'] = workflow.nextflow.build + misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp + + def email_fields = [:] + email_fields['version'] = getWorkflowVersion() + email_fields['runName'] = workflow.runName + email_fields['success'] = workflow.success + email_fields['dateComplete'] = workflow.complete + email_fields['duration'] = workflow.duration + email_fields['exitStatus'] = workflow.exitStatus + email_fields['errorMessage'] = (workflow.errorMessage ?: 'None') + email_fields['errorReport'] = (workflow.errorReport ?: 'None') + email_fields['commandLine'] = workflow.commandLine + email_fields['projectDir'] = workflow.projectDir + email_fields['summary'] = summary << misc_fields + + // On success try attach the multiqc report + def mqc_report = attachMultiqcReport(multiqc_report) + + // Check if we are only sending emails on failure + def email_address = email + if (!email && email_on_fail && !workflow.success) { + email_address = email_on_fail + } + + // Render the TXT template + def engine = new groovy.text.GStringTemplateEngine() + def tf = new File("${workflow.projectDir}/assets/email_template.txt") + def txt_template = engine.createTemplate(tf).make(email_fields) + def email_txt = txt_template.toString() + + // Render the HTML template + def hf = new File("${workflow.projectDir}/assets/email_template.html") + def html_template = engine.createTemplate(hf).make(email_fields) + def email_html = html_template.toString() + + // Render the sendmail template + 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: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] + def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") + def sendmail_template = engine.createTemplate(sf).make(smail_fields) + def sendmail_html = sendmail_template.toString() + + // Send the HTML e-mail + def colors = logColours(monochrome_logs) as Map + if (email_address) { + try { + if (plaintext_email) { +new org.codehaus.groovy.GroovyException('Send plaintext e-mail, not HTML') } + // Try to send HTML e-mail using sendmail + def sendmail_tf = new File(workflow.launchDir.toString(), ".sendmail_tmp.html") + sendmail_tf.withWriter { w -> w << sendmail_html } + ['sendmail', '-t'].execute() << sendmail_html + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (sendmail)-") + } + catch (Exception all) { + // Catch failures and try with plaintext + def mail_cmd = ['mail', '-s', subject, '--content-type=text/html', email_address] + mail_cmd.execute() << email_html + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (mail)-") + } + } + + // Write summary e-mail HTML to a file + def output_hf = new File(workflow.launchDir.toString(), ".pipeline_report.html") + output_hf.withWriter { w -> w << email_html } + nextflow.extension.FilesEx.copyTo(output_hf.toPath(), "${outdir}/pipeline_info/pipeline_report.html") + output_hf.delete() + + // Write summary e-mail TXT to a file + def output_tf = new File(workflow.launchDir.toString(), ".pipeline_report.txt") + output_tf.withWriter { w -> w << email_txt } + nextflow.extension.FilesEx.copyTo(output_tf.toPath(), "${outdir}/pipeline_info/pipeline_report.txt") + output_tf.delete() +} + +// +// Print pipeline summary on completion +// +def completionSummary(monochrome_logs=true) { + def colors = logColours(monochrome_logs) as Map + if (workflow.success) { + if (workflow.stats.ignoredCount == 0) { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Pipeline completed successfully${colors.reset}-") + } + else { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.yellow} Pipeline completed successfully, but with errored process(es) ${colors.reset}-") + } + } + else { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.red} Pipeline completed with errors${colors.reset}-") + } +} + +// +// Construct and send a notification to a web server as JSON e.g. Microsoft Teams and Slack +// +def imNotification(summary_params, hook_url) { + def summary = [:] + summary_params + .keySet() + .sort() + .each { group -> + summary << summary_params[group] + } + + def misc_fields = [:] + misc_fields['start'] = workflow.start + misc_fields['complete'] = workflow.complete + misc_fields['scriptfile'] = workflow.scriptFile + misc_fields['scriptid'] = workflow.scriptId + if (workflow.repository) { + misc_fields['repository'] = workflow.repository + } + if (workflow.commitId) { + misc_fields['commitid'] = workflow.commitId + } + if (workflow.revision) { + misc_fields['revision'] = workflow.revision + } + misc_fields['nxf_version'] = workflow.nextflow.version + misc_fields['nxf_build'] = workflow.nextflow.build + misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp + + def msg_fields = [:] + msg_fields['version'] = getWorkflowVersion() + msg_fields['runName'] = workflow.runName + msg_fields['success'] = workflow.success + msg_fields['dateComplete'] = workflow.complete + msg_fields['duration'] = workflow.duration + msg_fields['exitStatus'] = workflow.exitStatus + msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None') + msg_fields['errorReport'] = (workflow.errorReport ?: 'None') + msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") + msg_fields['projectDir'] = workflow.projectDir + msg_fields['summary'] = summary << misc_fields + + // Render the JSON template + def engine = new groovy.text.GStringTemplateEngine() + // Different JSON depending on the service provider + // Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format + def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" + def hf = new File("${workflow.projectDir}/assets/${json_path}") + def json_template = engine.createTemplate(hf).make(msg_fields) + def json_message = json_template.toString() + + // POST + def post = new URL(hook_url).openConnection() + post.setRequestMethod("POST") + post.setDoOutput(true) + post.setRequestProperty("Content-Type", "application/json") + post.getOutputStream().write(json_message.getBytes("UTF-8")) + def postRC = post.getResponseCode() + if (!postRC.equals(200)) { + log.warn(post.getErrorStream().getText()) + } +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml new file mode 100644 index 00000000..d08d2434 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "UTILS_NFCORE_PIPELINE" +description: Subworkflow with utility functions specific to the nf-core pipeline template +keywords: + - utility + - pipeline + - initialise + - version +components: [] +input: + - nextflow_cli_args: + type: list + description: | + Nextflow CLI positional arguments +output: + - success: + type: boolean + description: | + Dummy output to indicate success +authors: + - "@adamrtalbot" +maintainers: + - "@adamrtalbot" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test new file mode 100644 index 00000000..1dc317f8 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test @@ -0,0 +1,134 @@ + +nextflow_function { + + name "Test Functions" + script "../main.nf" + config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "utils_nfcore_pipeline" + tag "subworkflows/utils_nfcore_pipeline" + + test("Test Function checkConfigProvided") { + + function "checkConfigProvided" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function checkProfileProvided") { + + function "checkProfileProvided" + + when { + function { + """ + input[0] = [] + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function workflowCitation") { + + function "workflowCitation" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function nfCoreLogo") { + + function "nfCoreLogo" + + when { + function { + """ + input[0] = false + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function dashedLine") { + + function "dashedLine" + + when { + function { + """ + input[0] = false + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function without logColours") { + + function "logColours" + + when { + function { + """ + input[0] = true + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function with logColours") { + function "logColours" + + when { + function { + """ + input[0] = false + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap new file mode 100644 index 00000000..1037232c --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap @@ -0,0 +1,166 @@ +{ + "Test Function checkProfileProvided": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:03.360873" + }, + "Test Function checkConfigProvided": { + "content": [ + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:59.729647" + }, + "Test Function nfCoreLogo": { + "content": [ + "\n\n-\u001b[2m----------------------------------------------------\u001b[0m-\n \u001b[0;32m,--.\u001b[0;30m/\u001b[0;32m,-.\u001b[0m\n\u001b[0;34m ___ __ __ __ ___ \u001b[0;32m/,-._.--~'\u001b[0m\n\u001b[0;34m |\\ | |__ __ / ` / \\ |__) |__ \u001b[0;33m} {\u001b[0m\n\u001b[0;34m | \\| | \\__, \\__/ | \\ |___ \u001b[0;32m\\`-._,-`-,\u001b[0m\n \u001b[0;32m`._,._,'\u001b[0m\n\u001b[0;35m nextflow_workflow v9.9.9\u001b[0m\n-\u001b[2m----------------------------------------------------\u001b[0m-\n" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:10.562934" + }, + "Test Function workflowCitation": { + "content": [ + "If you use nextflow_workflow for your analysis please cite:\n\n* The pipeline\n https://doi.org/10.5281/zenodo.5070524\n\n* The nf-core framework\n https://doi.org/10.1038/s41587-020-0439-x\n\n* Software dependencies\n https://github.com/nextflow_workflow/blob/master/CITATIONS.md" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:07.019761" + }, + "Test Function without logColours": { + "content": [ + { + "reset": "", + "bold": "", + "dim": "", + "underlined": "", + "blink": "", + "reverse": "", + "hidden": "", + "black": "", + "red": "", + "green": "", + "yellow": "", + "blue": "", + "purple": "", + "cyan": "", + "white": "", + "bblack": "", + "bred": "", + "bgreen": "", + "byellow": "", + "bblue": "", + "bpurple": "", + "bcyan": "", + "bwhite": "", + "ublack": "", + "ured": "", + "ugreen": "", + "uyellow": "", + "ublue": "", + "upurple": "", + "ucyan": "", + "uwhite": "", + "iblack": "", + "ired": "", + "igreen": "", + "iyellow": "", + "iblue": "", + "ipurple": "", + "icyan": "", + "iwhite": "", + "biblack": "", + "bired": "", + "bigreen": "", + "biyellow": "", + "biblue": "", + "bipurple": "", + "bicyan": "", + "biwhite": "" + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:17.969323" + }, + "Test Function dashedLine": { + "content": [ + "-\u001b[2m----------------------------------------------------\u001b[0m-" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:14.366181" + }, + "Test Function with logColours": { + "content": [ + { + "reset": "\u001b[0m", + "bold": "\u001b[1m", + "dim": "\u001b[2m", + "underlined": "\u001b[4m", + "blink": "\u001b[5m", + "reverse": "\u001b[7m", + "hidden": "\u001b[8m", + "black": "\u001b[0;30m", + "red": "\u001b[0;31m", + "green": "\u001b[0;32m", + "yellow": "\u001b[0;33m", + "blue": "\u001b[0;34m", + "purple": "\u001b[0;35m", + "cyan": "\u001b[0;36m", + "white": "\u001b[0;37m", + "bblack": "\u001b[1;30m", + "bred": "\u001b[1;31m", + "bgreen": "\u001b[1;32m", + "byellow": "\u001b[1;33m", + "bblue": "\u001b[1;34m", + "bpurple": "\u001b[1;35m", + "bcyan": "\u001b[1;36m", + "bwhite": "\u001b[1;37m", + "ublack": "\u001b[4;30m", + "ured": "\u001b[4;31m", + "ugreen": "\u001b[4;32m", + "uyellow": "\u001b[4;33m", + "ublue": "\u001b[4;34m", + "upurple": "\u001b[4;35m", + "ucyan": "\u001b[4;36m", + "uwhite": "\u001b[4;37m", + "iblack": "\u001b[0;90m", + "ired": "\u001b[0;91m", + "igreen": "\u001b[0;92m", + "iyellow": "\u001b[0;93m", + "iblue": "\u001b[0;94m", + "ipurple": "\u001b[0;95m", + "icyan": "\u001b[0;96m", + "iwhite": "\u001b[0;97m", + "biblack": "\u001b[1;90m", + "bired": "\u001b[1;91m", + "bigreen": "\u001b[1;92m", + "biyellow": "\u001b[1;93m", + "biblue": "\u001b[1;94m", + "bipurple": "\u001b[1;95m", + "bicyan": "\u001b[1;96m", + "biwhite": "\u001b[1;97m" + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:21.714424" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test new file mode 100644 index 00000000..8940d32d --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test @@ -0,0 +1,29 @@ +nextflow_workflow { + + name "Test Workflow UTILS_NFCORE_PIPELINE" + script "../main.nf" + config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" + workflow "UTILS_NFCORE_PIPELINE" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "utils_nfcore_pipeline" + tag "subworkflows/utils_nfcore_pipeline" + + test("Should run without failures") { + + when { + workflow { + """ + input[0] = [] + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match() } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap new file mode 100644 index 00000000..859d1030 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap @@ -0,0 +1,19 @@ +{ + "Should run without failures": { + "content": [ + { + "0": [ + true + ], + "valid_config": [ + true + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:25.726491" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config new file mode 100644 index 00000000..d0a926bf --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config @@ -0,0 +1,9 @@ +manifest { + name = 'nextflow_workflow' + author = """nf-core""" + homePage = 'https://127.0.0.1' + description = """Dummy pipeline""" + nextflowVersion = '!>=23.04.0' + version = '9.9.9' + doi = 'https://doi.org/10.5281/zenodo.5070524' +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml b/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml new file mode 100644 index 00000000..ac8523c9 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml @@ -0,0 +1,2 @@ +subworkflows/utils_nfcore_pipeline: + - subworkflows/nf-core/utils_nfcore_pipeline/** diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf new file mode 100644 index 00000000..4994303e --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -0,0 +1,46 @@ +// +// Subworkflow that uses the nf-schema plugin to validate parameters and render the parameter summary +// + +include { paramsSummaryLog } from 'plugin/nf-schema' +include { validateParameters } from 'plugin/nf-schema' + +workflow UTILS_NFSCHEMA_PLUGIN { + + take: + input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow + validate_params // boolean: validate the parameters + parameters_schema // string: path to the parameters JSON schema. + // this has to be the same as the schema given to `validation.parametersSchema` + // when this input is empty it will automatically use the configured schema or + // "${projectDir}/nextflow_schema.json" as default. This input should not be empty + // for meta pipelines + + main: + + // + // Print parameter summary to stdout. This will display the parameters + // that differ from the default given in the JSON schema + // + if(parameters_schema) { + log.info paramsSummaryLog(input_workflow, parameters_schema:parameters_schema) + } else { + log.info paramsSummaryLog(input_workflow) + } + + // + // Validate the parameters using nextflow_schema.json or the schema + // given via the validation.parametersSchema configuration option + // + if(validate_params) { + if(parameters_schema) { + validateParameters(parameters_schema:parameters_schema) + } else { + validateParameters() + } + } + + emit: + dummy_emit = true +} + diff --git a/subworkflows/nf-core/utils_nfschema_plugin/meta.yml b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml new file mode 100644 index 00000000..f7d9f028 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "utils_nfschema_plugin" +description: Run nf-schema to validate parameters and create a summary of changed parameters +keywords: + - validation + - JSON schema + - plugin + - parameters + - summary +components: [] +input: + - input_workflow: + type: object + description: | + The workflow object of the used pipeline. + This object contains meta data used to create the params summary log + - validate_params: + type: boolean + description: Validate the parameters and error if invalid. + - parameters_schema: + type: string + description: | + Path to the parameters JSON schema. + This has to be the same as the schema given to the `validation.parametersSchema` config + option. When this input is empty it will automatically use the configured schema or + "${projectDir}/nextflow_schema.json" as default. The schema should not be given in this way + for meta pipelines. +output: + - dummy_emit: + type: boolean + description: Dummy emit to make nf-core subworkflows lint happy +authors: + - "@nvnieuwk" +maintainers: + - "@nvnieuwk" diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test new file mode 100644 index 00000000..842dc432 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test @@ -0,0 +1,117 @@ +nextflow_workflow { + + name "Test Subworkflow UTILS_NFSCHEMA_PLUGIN" + script "../main.nf" + workflow "UTILS_NFSCHEMA_PLUGIN" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/utils_nfschema_plugin" + tag "plugin/nf-schema" + + config "./nextflow.config" + + test("Should run nothing") { + + when { + + params { + test_data = '' + } + + workflow { + """ + validate_params = false + input[0] = workflow + input[1] = validate_params + input[2] = "" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should validate params") { + + when { + + params { + test_data = '' + outdir = 1 + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "" + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ Validation of pipeline parameters failed!') } } + ) + } + } + + test("Should run nothing - custom schema") { + + when { + + params { + test_data = '' + } + + workflow { + """ + validate_params = false + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should validate params - custom schema") { + + when { + + params { + test_data = '' + outdir = 1 + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ Validation of pipeline parameters failed!') } } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config new file mode 100644 index 00000000..0907ac58 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -0,0 +1,8 @@ +plugins { + id "nf-schema@2.1.0" +} + +validation { + parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + monochromeLogs = true +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json new file mode 100644 index 00000000..331e0d2f --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json", + "title": ". pipeline parameters", + "description": "", + "type": "object", + "$defs": { + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["outdir"], + "properties": { + "validate_params": { + "type": "boolean", + "description": "Validate parameters?", + "default": true, + "hidden": true + }, + "outdir": { + "type": "string", + "format": "directory-path", + "description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.", + "fa_icon": "fas fa-folder-open" + }, + "test_data_base": { + "type": "string", + "default": "https://raw.githubusercontent.com/nf-core/test-datasets/modules", + "description": "Base for test data directory", + "hidden": true + }, + "test_data": { + "type": "string", + "description": "Fake test data param", + "hidden": true + } + } + }, + "generic_options": { + "title": "Generic options", + "type": "object", + "fa_icon": "fas fa-file-import", + "description": "Less common options for the pipeline, typically set in a config file.", + "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", + "properties": { + "help": { + "type": "boolean", + "description": "Display help text.", + "fa_icon": "fas fa-question-circle", + "hidden": true + }, + "version": { + "type": "boolean", + "description": "Display version and exit.", + "fa_icon": "fas fa-question-circle", + "hidden": true + }, + "logo": { + "type": "boolean", + "default": true, + "description": "Display nf-core logo in console output.", + "fa_icon": "fas fa-image", + "hidden": true + }, + "singularity_pull_docker_container": { + "type": "boolean", + "description": "Pull Singularity container from Docker?", + "hidden": true + }, + "publish_dir_mode": { + "type": "string", + "default": "copy", + "description": "Method used to save pipeline results to output directory.", + "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", + "fa_icon": "fas fa-copy", + "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "hidden": true + }, + "monochrome_logs": { + "type": "boolean", + "description": "Use monochrome_logs", + "hidden": true + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/input_output_options" + }, + { + "$ref": "#/$defs/generic_options" + } + ] +} diff --git a/test/data/metadata/complex.csv b/test/data/metadata/complex.csv index e42f5e77..2455f2a1 100644 --- a/test/data/metadata/complex.csv +++ b/test/data/metadata/complex.csv @@ -1,289 +1,289 @@ -ncbi_accession,sequence_type,taxonomic_classification,category,bioproject,ref,Strain,Host,Collection_date,Location_collection,US_State,Client_MAS,Submission_ID_MAS,report_groups_ids,Field #,Farm,Transplant facility,Cultivar,Seed producer,Operation,County,Region,Class_of oncogenic_plasmid,Opine_Type,virD2,, -ERR2612748,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTJP4-1,wheat,2016,Bangladesh,,Client1,,magn_or;mixed,mixed,fungi,,,,,,,,,,, -ERR2612749,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,FR13,wheat,1998,USA,,Client1,,magn_or,mixed,fungi,,,,,,,,,,, -ERR2612750,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,US71,wheat,1998,France,,Client1,,magn_or,fungi,,,,,,,,,,,, -ERR2612751,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BR32,wheat,1990,Brazil,,Client1,,magn_or,fungi,,,,,,,,,,,, -ERR2612752,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,CD156,wheat,1989,Ivory_Coast,,Client1,,magn_or,fungi,,,,,,,,,,,, -ERR2612753,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTMP13-1 T,wheat,2016,Bangladesh,,Client1,,magn_or,fungi,,,,,,,,,,,, -ERR2612754,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTGP1-b,wheat,2017,Bangladesh,,Client1,,magn_or,fungi,,,,,,,,,,,, -ERR2612755,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTGP6-f,wheat,2017,Bangladesh,,Client1,,magn_or,fungi,,,,,,,,,,,, -SRR12888961,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-8,JK1-1,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,1,dd,ZZ,9,D,AA,c,CW,,, -SRR12888960,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-9,JK1-2,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,1,dd,ZZ,9,D,AA,c,CW,,, -SRR12888760,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-10,JK1-3,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,1,dd,ZZ,9,D,AA,c,CW,,, -SRR12888854,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-17,JK2-1,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,2,dd,ZZ,9,D,AA,c,CW,,, -SRR12888959,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-18,JK2-2,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,2,dd,ZZ,9,D,AA,c,CW,,, -SRR12888948,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-19,JK2-3,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,2,dd,ZZ,9,D,AA,c,CW,,, -SRR12888782,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-26,JK3-1,tomato,2021,USA,FL,Client2,,xan_FL,mixed,bact,3,dd,ZZ,9,D,AA,c,CW,,, -SRR12888710,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-35,JK3-10,tomato,2021,USA,FL,Client2,,xan_FL,bact,3,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888811,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-36,JK3-11,tomato,2021,USA,FL,Client2,,xan_FL,bact,3,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888807,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-38,JK4-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,4,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888806,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-39,JK4-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,4,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888798,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-47,JK4-10,tomato,2021,USA,FL,Client2,,xan_FL,bact,4,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888796,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-48,JK5-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,5,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888795,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-49,JK5-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,5,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888794,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-50,JK5-3,tomato,2021,USA,FL,Client2,,xan_FL,bact,5,dd,ZZ,9,D,AA,c,CW,,,, -SRR12888904,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-57,JK6-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,6,cc,ZZ,12,C,AA,g,CW,,,, -SRR12888902,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-58,JK6-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,6,cc,ZZ,12,C,AA,g,CW,,,, -SRR12888901,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-59,JK6-3,tomato,2021,USA,FL,Client2,,xan_FL,bact,6,cc,ZZ,12,C,AA,g,CW,,,, -SRR12888895,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-65,JK7-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,7,cc,ZZ,12,C,AA,g,CW,,,, -SRR12888894,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-66,JK7-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,7,cc,ZZ,12,C,AA,g,CW,,,, -SRR12888885,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-74,JK7-10,tomato,2021,USA,FL,Client2,,xan_FL,bact,7,cc,ZZ,12,C,AA,g,CW,,,, -SRR12888884,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-75,JK8-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,8,vv,ZZ,10,B,OO,g,CW,,,, -SRR12888883,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-76,JK8-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,8,vv,ZZ,10,B,OO,g,CW,,,, -SRR12888882,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-77,JK8-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,8,vv,ZZ,10,B,OO,g,CW,,,, -SRR12888873,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-80,JK9-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,9,vv,ZZ,9,D,OO,g,CW,,,, -SRR12888872,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-81,JK9-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,9,vv,ZZ,9,D,OO,g,CW,,,, -SRR12888871,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-82,JK9-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,9,vv,ZZ,9,D,OO,g,CW,,,, -SRR12888869,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-84,JK10-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,10,vv,ZZ,12,C,OO,g,CW,,,, -SRR12888868,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-85,JK10-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,10,vv,ZZ,12,C,OO,g,CW,,,, -SRR12888867,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-86,JK10-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,10,vv,ZZ,12,C,OO,g,CW,,,, -SRR12888864,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-88,JK11-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,11,vv,ZZ,10,B,OO,g,CW,,,, -SRR12888863,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-89,JK11-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,11,vv,ZZ,10,B,OO,g,CW,,,, -SRR12888855,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-97,JK11-10,tomato,2021,USA,FL,Client3,,xan_FL,bact,11,vv,ZZ,10,B,OO,g,CW,,,, -SRR12888853,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-98,JK12-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,12,vv,ZZ,12,C,OO,g,CW,,,, -SRR12888852,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-99,JK12-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,12,vv,ZZ,12,C,OO,g,CW,,,, -SRR12888851,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-100,JK12-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,12,vv,ZZ,12,C,OO,g,CW,,,, -SRR12888880,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-104,JK14-1,tomato,2021,USA,FL,Client4,,xan_FL,bact,14,aa,YY,10,B,JJ,f,CW,,,, -SRR12888879,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-105,JK14-2,tomato,2021,USA,FL,Client4,,xan_FL,bact,14,aa,YY,10,B,JJ,f,CW,,,, -SRR12888878,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-106,JK14-3,tomato,2021,USA,FL,Client4,,xan_FL,bact,14,aa,YY,10,B,JJ,f,CW,,,, -SRR12888956,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-110,JK22-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,22,ll,TT,10,B,HH,a,SW,,,, -SRR12888955,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-111,JK22-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,22,ll,TT,10,B,HH,a,SW,,,, -SRR12888946,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-119,JK22-10,tomato,2021,USA,FL,Client5,,xan_FL,bact,22,ll,TT,10,B,HH,a,SW,,,, -SRR12888945,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-120,JK23-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,23,ll,TT,10,B,HH,a,SW,,,, -SRR12888944,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-121,JK23-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,23,ll,TT,10,B,HH,a,SW,,,, -SRR12888943,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-122,JK23-3,tomato,2021,USA,FL,Client5,,xan_FL,bact,23,ll,TT,10,B,HH,a,SW,,,, -SRR12888936,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-128,JK26-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,26,nn,ZZ,4,A,HH,g,CW,,,, -SRR12888935,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-129,JK26-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,26,nn,ZZ,4,A,HH,g,CW,,,, -SRR12888934,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-130,JK26-3,tomato,2021,USA,FL,Client5,,xan_FL,bact,26,nn,ZZ,4,A,HH,g,CW,,,, -SRR12888927,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-137,JK32-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,32,nn,SS,4,A,HH,g,CW,,,, -SRR12888925,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-138,JK32-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,32,nn,SS,4,A,HH,g,CW,,,, -SRR12888924,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-139,JK32-3,tomato,2021,USA,FL,Client5,,xan_FL,bact,32,nn,SS,4,A,HH,g,CW,,,, -SRR12888920,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-143,JK36-1,tomato,2021,USA,FL,Client6,,xan_FL,bact,36,tt,WW,9,D,MM,g,CW,,,, -SRR12888919,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-144,JK36-2,tomato,2021,USA,FL,Client6,,xan_FL,bact,36,tt,WW,9,D,MM,g,CW,,,, -SRR12888918,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-145,JK36-3,tomato,2021,USA,FL,Client6,,xan_FL,bact,36,tt,WW,9,D,MM,g,CW,,,, -SRR12888911,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-151,JK37-1,tomato,2021,USA,FL,Client6,,xan_FL,bact,37,tt,WW,10,B,MM,g,CW,,,, -SRR12888910,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-152,JK37-2,tomato,2021,USA,FL,Client6,,xan_FL,bact,37,tt,WW,10,B,MM,g,CW,,,, -SRR12888848,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-153,JK37-3,tomato,2021,USA,FL,Client6,,xan_FL,bact,37,tt,WW,10,B,MM,g,CW,,,, -SRR12888841,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-159,JK38-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,38,ff,YY,10,B,CC,g,CW,,,, -SRR12888840,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-160,JK38-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,38,ff,YY,10,B,CC,g,CW,,,, -SRR12888839,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-161,JK38-3,tomato,2021,USA,FL,Client7,,xan_FL,bact,38,ff,YY,10,B,CC,g,CW,,,, -SRR12888834,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-166,JK39-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,39,ff,YY,10,B,CC,g,CW,,,, -SRR12888833,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-167,JK39-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,39,ff,YY,10,B,CC,g,CW,,,, -SRR12888831,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-168,JK39-3,tomato,2021,USA,FL,Client7,,xan_FL,bact,39,ff,YY,10,B,CC,g,CW,,,, -SRR12888824,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-175,JK40-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,40,ff,YY,10,B,CC,g,CW,,,, -SRR12888823,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-176,JK40-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,40,ff,YY,10,B,CC,g,CW,,,, -SRR12888786,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-184,JK40-10,tomato,2021,USA,FL,Client7,,xan_FL,bact,40,ff,YY,10,B,CC,g,CW,,,, -SRR12888785,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-185,JK41-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,41,ff,YY,10,B,CC,g,CW,,,, -SRR12888784,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-186,JK41-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,41,ff,YY,10,B,CC,g,CW,,,, -SRR12888783,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-187,JK41-3,tomato,2021,USA,FL,Client7,,xan_FL,bact,41,ff,YY,10,B,CC,g,CW,,,, -SRR12888775,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-194,JK42-1,tomato,2021,USA,FL,Client8,,xan_FL,bact,42,oo,VV,16,D,II,b,NW,,,, -SRR12888774,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-195,JK42-2,tomato,2021,USA,FL,Client8,,xan_FL,bact,42,oo,VV,16,D,II,b,NW,,,, -SRR12888773,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-196,JK42-3,tomato,2021,USA,FL,Client8,,xan_FL,bact,42,oo,VV,16,D,II,b,NW,,,, -SRR12888767,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-201,JK43-1,tomato,2021,USA,FL,Client8,,xan_FL,bact,43,oo,VV,16,D,II,b,NW,,,, -SRR12888766,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-202,JK43-2,tomato,2021,USA,FL,Client8,,xan_FL,bact,43,oo,VV,16,D,II,b,NW,,,, -SRR12888765,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-203,JK43-3,tomato,2021,USA,FL,Client8,,xan_FL,bact,43,oo,VV,16,D,II,b,NW,,,, -SRR12888761,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-207,JK44-1,tomato,2021,USA,FL,Client8,,xan_FL,bact,44,oo,VV,16,D,II,b,NW,,,, -SRR12888758,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-208,JK44-2,tomato,2021,USA,FL,Client8,,xan_FL,bact,44,oo,VV,16,D,II,b,NW,,,, -SRR12888757,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-209,JK44-3,tomato,2021,USA,FL,Client8,,xan_FL,bact,44,oo,VV,16,D,II,b,NW,,,, -SRR12888753,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-213,JK45-1,tomato,2021,USA,FL,Client9,,xan_FL,bact,45,gg,VV,16,D,DD,d,NW,,,, -SRR12888752,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-214,JK45-2,tomato,2021,USA,FL,Client9,,xan_FL,bact,45,gg,VV,16,D,DD,d,NW,,,, -SRR12888751,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-215,JK45-3,tomato,2021,USA,FL,Client9,,xan_FL,bact,45,gg,VV,16,D,DD,d,NW,,,, -SRR12888746,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-219,JK46-1,tomato,2021,USA,FL,Client10,,xan_FL,bact,46,kk,VV,16,D,GG,b,NW,,,, -SRR12888745,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-220,JK46-2,tomato,2021,USA,FL,Client10,,xan_FL,bact,46,kk,VV,16,D,GG,b,NW,,,, -SRR12888744,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-221,JK46-3,tomato,2021,USA,FL,Client10,,xan_FL,bact,46,kk,VV,16,D,GG,b,NW,,,, -SRR12888743,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-222,JK52-1,tomato,2021,USA,FL,Client11,,xan_FL,bact,52,bb,TT,12,C,AA,h,SE,,,, -SRR12888742,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-223,JK52-2,tomato,2021,USA,FL,Client11,,xan_FL,bact,52,bb,TT,12,C,AA,h,SE,,,, -SRR12888705,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-231,JK52-10,tomato,2021,USA,FL,Client11,,xan_FL,bact,52,bb,TT,12,C,AA,h,SE,,,, -SRR12888704,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-232,JK54-1,tomato,2021,USA,FL,Client12,,xan_FL,bact,54,uu,XX,10,B,NN,a,SW,,,, -SRR12888703,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-233,JK54-2,tomato,2021,USA,FL,Client12,,xan_FL,bact,54,uu,XX,10,B,NN,a,SW,,,, -SRR12888702,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-234,JK54-3,tomato,2021,USA,FL,Client12,,xan_FL,bact,54,uu,XX,10,B,NN,a,SW,,,, -SRR12888696,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-239,JK56-1,tomato,2021,USA,FL,Client13,,xan_FL,bact,56,ll,ZZ,4,A,HH,a,SW,,,, -SRR12888695,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-240,JK56-2,tomato,2021,USA,FL,Client13,,xan_FL,bact,56,ll,ZZ,4,A,HH,a,SW,,,, -SRR12888686,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-248,JK56-10,tomato,2021,USA,FL,Client13,,xan_FL,bact,56,ll,ZZ,4,A,HH,a,SW,,,, -SRR12888685,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-249,JK62-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,62,jj,UU,4,A,FF,e,SW,,,, -SRR12888684,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-250,JK62-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,62,jj,UU,4,A,FF,e,SW,,,, -SRR12888731,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-258,JK62-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,62,jj,UU,4,A,FF,e,SW,,,, -SRR12888730,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-259,JK63-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,63,jj,UU,4,A,FF,e,SW,,,, -SRR12888729,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-260,JK63-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,63,jj,UU,4,A,FF,e,SW,,,, -SRR12888720,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-268,JK63-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,63,jj,UU,4,A,FF,e,SW,,,, -SRR12888719,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-269,JK65-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,65,jj,UU,4,A,FF,e,SW,,,, -SRR12888718,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-270,JK65-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,65,jj,UU,4,A,FF,e,SW,,,, -SRR12888709,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-278,JK65-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,65,jj,UU,4,A,FF,e,SW,,,, -SRR12888820,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-279,JK68-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,68,ii,UU,4,A,FF,a,SW,,,, -SRR12888819,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-280,JK68-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,68,ii,UU,4,A,FF,a,SW,,,, -SRR12888810,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-288,JK68-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,68,ii,UU,4,A,FF,a,SW,,,, -SRR21509025,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,COM,watermelon,2021,USA,TX,Client15,,fusarium;mixed,mixed,fungi,,,,,,,,,,, -SRR21509024,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,PRU,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,,,,, -SRR21509023,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,W2,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,,,,, -SRR21509022,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,HAR,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,,,,, -SRR21509021,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,STO,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,,,,, -ERR3489204,pacbio,bemisia_tabaci,insect,PRJEB28507,10.1186/s12864-023-09474-3,SSA1-SG1_Nigeria_F8,cassava,2015,Nigeria,,Client16,,bemisia;mixed,mixed,insect,,,,,,,,,,, -SRR27897033,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba525,LMG_305,Stonecrop (Sedum),1958,,,,,agro;mixed,mixed,bact,,,,,,,,,Ti,Nopaline, -SRR11174029,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba526,R_10.1,Peach,2009,,,,,agro;mixed,mixed,bact,,,,,,,,,Ti,Nopaline, -SRR11174116,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba527,PVM_1.5,Peach,2008,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174105,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba528,P86/93,Grape,1993,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174094,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba529,T268/95,Grape,1995,,,,,agro;mixed,mixed,bact,,,,,,,,,Ti,Vitopine/Nopaline, -SRR11174089,illumina,Neorhizobium sp. AL 9.2.2,bacteria,PRJNA607555,10.1126/science.aba530,AL_9.2.2,Plum,2008,,,,,agro;mixed,mixed,bact,,,,,,,,,NA,, -SRR11174078,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba531,PVM_10.5,Peach,2009,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174066,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba532,T60/94,Grape,1994,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174055,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba533,U167/95,Grape,1995,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174051,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba534,RO_10.5,Rose,2009,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174048,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba535,R_1.1,Peach,2008,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174043,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba536,W_1.1,Plum,2008,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174041,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba537,T267/94,Grape,1994,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174038,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba538,W_1.4,Plum,2008,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174037,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba539,T393/94,Grape,1994,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174036,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba540,IL30,Rose,NA,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174033,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba541,LMG_232,Beet,1963,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174032,illumina,Allorhizobium ampelinum,bacteria,PRJNA607555,10.1126/science.aba542,V80/94,Grape,1994,,,,,agro,mixed,bact,,,,,,,,,Ti,Vitopine/Nopaline, -SRR11174151,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba543,W9/94,Walnut,1994,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174150,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba544,RO_2.2,Rose,2009,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174149,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba545,LMG_267,Tomato,1935,,,,,agro,bact,,,,,,,,,Ti,Octopine/Agropine,, -SRR11174147,illumina,Agrobacterium larrymoorei,bacteria,PRJNA607555,10.1126/science.aba546,FPH-AR2,Blanket flower (Gaillardia),2014,,,,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,, -SRR11174145,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba547,RO_11.4,Rose,2010,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174143,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba548,LMG_292,Lettuce,1974,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174140,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba549,IL15,Rose,NA,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174139,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba550,J3/75,Apple,1975,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174137,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba551,AS2A7,,,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR23117879,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba552,2788,,,,,,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,, -SRR11174134,illumina,Rhizobium lusitanum,bacteria,PRJNA607555,10.1126/science.aba553,AF27/95,Lilac,,,,,,agro;mixed,mixed,bact,,,,,,,,,Ti,Octopine/Agropine, -SRR11174132,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba554,K224,Chrysanthemum,,,,,,agro,bact,,,,,,,,,Ti,Succinamopine/Chrysopine,, -SRR11174131,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba555,N40/94,Raspberry,1994,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174130,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba556,J2/75,Apple,1975,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174129,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba557,Eu3-2NK,Euonymous,,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174127,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba558,T155/95,Grape,,,,,,agro,bact,,,,,,,,,Ri,Cucumopine,, -SRR11174126,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba559,Eu2-1RS,Euonymous,,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174125,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba560,Eu2-1NK,Euonymous,,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174123,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba561,Eu3-2RS,Euonymous,,,,,,agro;mixed,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174026,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba562,S32/96,Almond,,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174018,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba563,1D1609,Alfalfa,NA,,,,,agro,bact,,,,,,,,,Ti,Octopine/Agropine,, -SRR11174016,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba564,1D132,Cherry,NA,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174013,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba565,CG678,Grape,NA,,,,,agro,bact,,,,,,,,,Ti,Vitopine/Nopaline,, -SRR11174012,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba566,CG78,Grape,NA,,,,,agro,bact,,,,,,,,,Ti,Vitopine/Nopaline,, -SRR11174011,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba567,F2/5,Grape,NA,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174009,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba568,12D13,,NA,,,,,agro;mixed,mixed,bact,,,,,,,,,NA,, -SRR11174008,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba569,A6,Raspberry,NA,,,,,agro,bact,,,,,,,,,Ti,Octopine/Agropine,, -SRR11174007,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba570,GC1A3,Lobelia,,,,,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,, -SRR11174004,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba571,A19/93,Euonymus,1993,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174002,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba572,P22/94,Aspen,1994,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174001,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba573,W10/94,Walnut,1994,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174000,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba574,N33/94,Raspberry,1994,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11173999,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba575,Z4/95,Apricot,1995,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174119,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba576,Y79/96,Rhododendron,1996,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174028,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba577,T5/73,Rose,1973,,,,,agro,bact,,,,,,,,,Ri,Succinamopine-like,, -SRR11174208,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba578,H25/79,Rose,1979,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174207,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba579,P23/94,Aspen,1994,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Other,, -SRR11174206,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba580,O16/94,Blueberry,1994,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174204,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba581,T90/95,Grape,1995,,,,,agro,bact,,,,,,,,,NA,,, -SRR11174202,illumina,Rhizobium skierniewicense,bacteria,PRJNA607555,10.1126/science.aba582,Di1472,Shasta Daisy,NA,,,,,agro;mixed,bact,,,,,,,,,Ti,Succinamopine/Chrysopine,, -SRR11174201,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba583,Di1525a,Peony,NA,,,,,agro,mixed,bact,,,,,,,,,Ti,Octopine/Agropine, -SRR24424782,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba584,O54/95,Cherry,1995,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174198,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba585,X1/95,Peach,1995,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174191,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba586,G9/79,Poplar,1979,,,,,agro,bact,,,,,,,,,Ti,Agrocinopine/Agropine,, -SRR11174187,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba587,K196/80,Chrysanthemum,1980,,,,,agro,bact,,,,,,,,,Ti,Succinamopine/Chrysopine,, -SRR11174185,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba588,M56/79,Cottonwood,1979,,,,,agro,bact,,,,,,,,,Ti,Nopaline,, -SRR11174184,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba589,P1/75,Dahlia,1975,,,,,agro,bact,,,,,,,,,Ti,Octopine/Agropine,, -SRR11174183,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba590,Y2/73,Dahlia,1973,,,,,agro,bact,,,,,,,,,Ti,Succinamopine/Agropine,, -SRR11174115,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba591,YO0101,Aster,2002,,,,,agro,bact,,,,,,,,,Ti,Octopine/Agropine,, -SRR11174109,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba592,K599,Cucumber,1974,,,,,agro;mixed,bact,,,,,,,,,Ri,Cucumopine,, -SRR11174107,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba593,NCPPB_2655,Cucumber,1974,,,,,agro,bact,,,,,,,,,Ri,Cucumopine,, -SRR11174106,illumina,Agrobacterium salinitolerans,bacteria,PRJNA607555,10.1126/science.aba594,NCPPB_2657,Cucumber,1974,,,,,agro;mixed,bact,,,,,,,,,Ri,Cucumopine,, -SRR11174104,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1344a,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174103,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1344b,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174102,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1347a,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174101,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1347b,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174100,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1345-1a,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174099,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1345-1b,Marguerite daisy,2017,S9_N48,,Client17,,agro,mixed,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive -SRR11174098,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1346-1b,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174097,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1a,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174096,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1b,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174095,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1c,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174093,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1d,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174092,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1e,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174180,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474ai,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174179,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474aii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174178,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474bi,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174177,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474bii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174176,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474ci,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174175,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474cii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174174,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474di,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174173,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474dii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174171,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474ei,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174170,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1802-1a,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174169,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1802-1b,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174168,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1803-1b,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174167,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1804-1a,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174166,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1853-1a,Shasta daisy,2017,S9_N47,,Client20,,agro,bact,,,,,,,,,Ti,Succinamopine/Agropine,positive, -SRR11174165,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1853-1b,Shasta daisy,2017,S9_N47,,Client20,,agro,bact,,,,,,,,,Ti,Succinamopine/Agropine,positive, -SRR11174164,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1853-1c,Shasta daisy,2017,S9_N47,,Client20,,agro,bact,,,,,,,,,Ti,Succinamopine/Agropine,positive, -SRR11174163,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-2069-2b,Blackberry,2017,S6_N23,,Client21,,agro,bact,,,,,,,,,Ti,Nopaline,positive, -SRR11174162,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-2069-2c,Blackberry,2017,S6_N23,,Client21,,agro,bact,,,,,,,,,Ti,Nopaline,positive, -SRR11174160,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-642-1b,Impatiens,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174159,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-642-2b,Impatiens,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174158,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ia,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174157,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ib,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174156,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ic,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174155,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1id,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174154,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ie,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174153,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1if,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174091,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ig,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174090,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1iv,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174088,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-lik,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174087,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-lii,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174086,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1iii,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174085,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174084,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(a),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174083,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(b),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174082,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(c),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174081,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(d),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174080,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(e),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174079,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(f),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174077,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712a-1ii,African daisy,2017,C7_N18,,Client22,,agro,mixed,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive -SRR11174076,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712b-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174075,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712c-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174074,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712d-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174073,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712e-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174072,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712g-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174071,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712h-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -SRR11174070,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1007,Lantana,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,NA,,negative, -SRR11174069,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1008,Lantana,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,NA,,negative, -SRR11174068,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1009,Pentas,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,NA,,negative, -SRR11174065,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850-1cii,Tarragon,2017,C10_N49,,Client23,,agro,bact,,,,,,,,,NA,,negative, -SRR11174064,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850-1d,Tarragon,2017,C10_N49,,Client23,,agro,bact,,,,,,,,,NA,,negative, -SRR11174063,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850B-1a,Tarragon,2017,C10_N49,,Client23,,agro,bact,,,,,,,,,NA,,negative, -SRR11174062,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850B-1b,Tarragon,2017,C10_N49,,Client23,,agro;mixed,bact,,,,,,,,,NA,,negative, -SRR11174061,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,16-1607-1A,Blueberry,2016,S6_N50,,Client24,,agro;mixed,bact,,,,,,,,,NA,,negative, -SRR11175555,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474eii,Shasta daisy,2017,S8_N32,,Client25,,agro;mixed,bact,,,,,,,,,Ti,Nopaline/Chrysopine,positive, -ERR3842627,illumina,Meloidogyne enterolobii,nematode,PRJEB36431,,,,2020,,,Client26,,meloidegyne;mixed,mixed,nematode,,,,,,,,,,, -SRR9644798,illumina,Heterodera glycines,nematode,PRJNA535374,,X12,,2018,,,,,heterodera,mixed,nematode,,,,,,,,,,, -SRR14552458,pacbio,Aphis_gossypii,insect,PRJNA719918,10.1111/1755-0998.13521,cma_hap1,cotton,,,,Client27,,aphid;mixed,mixed,insect,,,,,,,,,,, -SRR14552461,nanopore,Aphis_gossypii,insect,PRJNA719918,10.1111/1755-0998.13521,cma_hap3,cucumber,,,,Client27,,aphid,mixed,insect,,,,,,,,,,, -SRR19847339,illumina,Heterodera glycines,nematode,PRJNA852516,,MM26,,,,,,,heterodera;mixed,mixed,nematode,,,,,,,,,,, -SRR20231390,pacbio,Heterodera glycines,nematode,PRJNA852521,,PA3,,,,,,,heterodera,mixed,nematode,,,,,,,,,,, -SRR23381582,pacbio,Pratylenchus scribneri,nematode,PRJNA932437,,ND,,,,,,,pratylenchus,mixed,nematode,,,,,,,,,,, -SRR19529320,pacbio,Ustilago loliicola,fungi,PRJNA698760,10.1128/spectrum.00349-22,Ustilago_loliicola,,,,,,,ustilago,mixed,fungi,,,,,,,,,,, -SRR19529321,pacbio,Ustilago tritici,fungi,PRJNA698760,10.1128/spectrum.00349-23,Ustilago_tritici,,,,,,,ustilago;mixed,mixed,fungi,,,,,,,,,,, -SRR19529322,pacbio,Ustilago nuda,fungi,PRJNA698760,10.1128/spectrum.00349-24,Ustilago_nuda,,,,,,,ustilago;mixed,mixed,fungi,,,,,,,,,,, -SRR18189816,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-25,WGS_Uh1278,,,,,Client28,,ustilago;mixed,fungi,,,,,,,,,,,, -SRR18189817,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-26,WGS_Uh1273,,,,,Client28,,ustilago,fungi,,,,,,,,,,,, -SRR18189818,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-27,WGS_Uh818,,,,,Client28,,ustilago;mixed,fungi,,,,,,,,,,,, -SRR18189819,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-28,WGS_Uh811,,,,,Client28,,ustilago,fungi,,,,,,,,,,,, -SRR18189820,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-29,WGS_Uh805,,,,,Client28,,ustilago,fungi,,,,,,,,,,,, -SRR18189821,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-30,WGS_Uh359,,,,,Client28,,ustilago,fungi,,,,,,,,,,,, -SRR11527076,illumina,Botrytis fabae,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,B_fabae,Vicia_faba,,Tunisa,,Client29,,botrytis;mixed,fungi,,,,,,,,,,,, -SRR11527080,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Rf1,Rubus_fruticosus,2005-2007,Champagne_Foissy-sur-Vanne,,Client29,,botrytis,mixed,fungi,,,,,,,,,,, -SRR11527077,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Hm1,Hydrangea_macrophylla,,Angers,,Client29,,botrytis,mixed,fungi,,,,,,,,,,, -SRR11527081,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl13,S_lycopersicum,2005-2007,Champagne_Courceroy,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR11527079,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Vv4,V_vinifera,2005-2007,Champagne_Hautvilliers,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR11527083,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl11,S_lycopersicum,2009,Occitanie_Alenya,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR11527082,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl12,S_lycopersicum,2009,Occitanie_Alenya,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR11527092,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl3,S_lycopersicum,2005-2007,Champagne_Courceroy,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR11527094,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl1,S_lycopersicum,2005-2007,Champagne_Foissy-sur-Vanne,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR11527084,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl10,S_lycopersicum,2009,Occitanie_Alenya,,Client29,,botrytis,fungi,,,,,,,,,,,, -SRR29399310,illumina,Pythium insidiosum,oomycete,PRJNA1123314,,,,,,,,,oomycetes;mixed,mixed,,,,,,,,,,,, -SRR30484503,illumina,Pythium cedri,oomycete,PRJNA1010138,,,,,,,,,oomycetes;mixed,,,,,,,,,,,,, -SRR22586156,pacbio,Pythium oligandrum,oomycete,PRJNA910369,,,,,,,,,oomycetes,mixed,,,,,,,,,,,, -SRR15309484 ,illumina,Pythium spinosum,oomycete,PRJNA601986,,CBS 275.67,,,,,,,oomycetes,,,,,,,,,,,,, -SRR29814928,illumina,Phytophthora infestans,oomycete,PRJNA1135328,,,,,,,,,oomycetes,,,,,,,,,,,,, -SRR26197583,pacbio,Phytophthora cinnamomi,oomycete,PRJNA1019754,,Pc2109,,,,,,,oomycetes;mixed,mixed,,,,,,,,,,,, -SRR16542347,illumina,Pernospora effusa,oomycete,PRJNA772192,,,spinach,,,,,,oomycetes,mixed,,,,,,,,,,,, \ No newline at end of file +ncbi_accession,sequence_type,taxonomic_classification,category,bioproject,ref,Strain,Host,Collection_date,Location_collection,US_State,Client_MAS,Submission_ID_MAS,report_groups_ids,Field #,Farm,Transplant facility,Cultivar,Seed producer,Operation,County,Region,Class_of oncogenic_plasmid,Opine_Type +ERR2612748,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTJP4-1,wheat,2016,Bangladesh,,Client1,,magn_or;mixed,mixed,fungi,,,,,,,, +ERR2612749,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,FR13,wheat,1998,USA,,Client1,,magn_or,mixed,fungi,,,,,,,, +ERR2612750,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,US71,wheat,1998,France,,Client1,,magn_or,fungi,,,,,,,,, +ERR2612751,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BR32,wheat,1990,Brazil,,Client1,,magn_or,fungi,,,,,,,,, +ERR2612752,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,CD156,wheat,1989,Ivory_Coast,,Client1,,magn_or,fungi,,,,,,,,, +ERR2612753,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTMP13-1 T,wheat,2016,Bangladesh,,Client1,,magn_or,fungi,,,,,,,,, +ERR2612754,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTGP1-b,wheat,2017,Bangladesh,,Client1,,magn_or,fungi,,,,,,,,, +ERR2612755,nanopore,magnaporthe_oryzae,fungi,PRJEB27137,,BTGP6-f,wheat,2017,Bangladesh,,Client1,,magn_or,fungi,,,,,,,,, +SRR12888961,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-8,JK1-1,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,1,dd,ZZ,9,D,AA,c,CW +SRR12888960,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-9,JK1-2,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,1,dd,ZZ,9,D,AA,c,CW +SRR12888760,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-10,JK1-3,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,1,dd,ZZ,9,D,AA,c,CW +SRR12888854,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-17,JK2-1,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,2,dd,ZZ,9,D,AA,c,CW +SRR12888959,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-18,JK2-2,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,2,dd,ZZ,9,D,AA,c,CW +SRR12888948,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-19,JK2-3,tomato,2021,USA,FL,Client2,,xan_FL;mixed,mixed,bact,2,dd,ZZ,9,D,AA,c,CW +SRR12888782,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-26,JK3-1,tomato,2021,USA,FL,Client2,,xan_FL,mixed,bact,3,dd,ZZ,9,D,AA,c,CW +SRR12888710,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-35,JK3-10,tomato,2021,USA,FL,Client2,,xan_FL,bact,3,dd,ZZ,9,D,AA,c,CW, +SRR12888811,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-36,JK3-11,tomato,2021,USA,FL,Client2,,xan_FL,bact,3,dd,ZZ,9,D,AA,c,CW, +SRR12888807,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-38,JK4-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,4,dd,ZZ,9,D,AA,c,CW, +SRR12888806,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-39,JK4-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,4,dd,ZZ,9,D,AA,c,CW, +SRR12888798,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-47,JK4-10,tomato,2021,USA,FL,Client2,,xan_FL,bact,4,dd,ZZ,9,D,AA,c,CW, +SRR12888796,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-48,JK5-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,5,dd,ZZ,9,D,AA,c,CW, +SRR12888795,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-49,JK5-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,5,dd,ZZ,9,D,AA,c,CW, +SRR12888794,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-50,JK5-3,tomato,2021,USA,FL,Client2,,xan_FL,bact,5,dd,ZZ,9,D,AA,c,CW, +SRR12888904,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-57,JK6-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,6,cc,ZZ,12,C,AA,g,CW, +SRR12888902,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-58,JK6-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,6,cc,ZZ,12,C,AA,g,CW, +SRR12888901,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-59,JK6-3,tomato,2021,USA,FL,Client2,,xan_FL,bact,6,cc,ZZ,12,C,AA,g,CW, +SRR12888895,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-65,JK7-1,tomato,2021,USA,FL,Client2,,xan_FL,bact,7,cc,ZZ,12,C,AA,g,CW, +SRR12888894,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-66,JK7-2,tomato,2021,USA,FL,Client2,,xan_FL,bact,7,cc,ZZ,12,C,AA,g,CW, +SRR12888885,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-74,JK7-10,tomato,2021,USA,FL,Client2,,xan_FL,bact,7,cc,ZZ,12,C,AA,g,CW, +SRR12888884,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-75,JK8-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,8,vv,ZZ,10,B,OO,g,CW, +SRR12888883,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-76,JK8-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,8,vv,ZZ,10,B,OO,g,CW, +SRR12888882,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-77,JK8-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,8,vv,ZZ,10,B,OO,g,CW, +SRR12888873,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-80,JK9-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,9,vv,ZZ,9,D,OO,g,CW, +SRR12888872,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-81,JK9-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,9,vv,ZZ,9,D,OO,g,CW, +SRR12888871,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-82,JK9-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,9,vv,ZZ,9,D,OO,g,CW, +SRR12888869,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-84,JK10-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,10,vv,ZZ,12,C,OO,g,CW, +SRR12888868,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-85,JK10-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,10,vv,ZZ,12,C,OO,g,CW, +SRR12888867,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-86,JK10-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,10,vv,ZZ,12,C,OO,g,CW, +SRR12888864,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-88,JK11-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,11,vv,ZZ,10,B,OO,g,CW, +SRR12888863,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-89,JK11-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,11,vv,ZZ,10,B,OO,g,CW, +SRR12888855,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-97,JK11-10,tomato,2021,USA,FL,Client3,,xan_FL,bact,11,vv,ZZ,10,B,OO,g,CW, +SRR12888853,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-98,JK12-1,tomato,2021,USA,FL,Client3,,xan_FL,bact,12,vv,ZZ,12,C,OO,g,CW, +SRR12888852,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-99,JK12-2,tomato,2021,USA,FL,Client3,,xan_FL,bact,12,vv,ZZ,12,C,OO,g,CW, +SRR12888851,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-100,JK12-3,tomato,2021,USA,FL,Client3,,xan_FL,bact,12,vv,ZZ,12,C,OO,g,CW, +SRR12888880,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-104,JK14-1,tomato,2021,USA,FL,Client4,,xan_FL,bact,14,aa,YY,10,B,JJ,f,CW, +SRR12888879,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-105,JK14-2,tomato,2021,USA,FL,Client4,,xan_FL,bact,14,aa,YY,10,B,JJ,f,CW, +SRR12888878,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-106,JK14-3,tomato,2021,USA,FL,Client4,,xan_FL,bact,14,aa,YY,10,B,JJ,f,CW, +SRR12888956,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-110,JK22-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,22,ll,TT,10,B,HH,a,SW, +SRR12888955,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-111,JK22-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,22,ll,TT,10,B,HH,a,SW, +SRR12888946,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-119,JK22-10,tomato,2021,USA,FL,Client5,,xan_FL,bact,22,ll,TT,10,B,HH,a,SW, +SRR12888945,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-120,JK23-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,23,ll,TT,10,B,HH,a,SW, +SRR12888944,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-121,JK23-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,23,ll,TT,10,B,HH,a,SW, +SRR12888943,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-122,JK23-3,tomato,2021,USA,FL,Client5,,xan_FL,bact,23,ll,TT,10,B,HH,a,SW, +SRR12888936,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-128,JK26-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,26,nn,ZZ,4,A,HH,g,CW, +SRR12888935,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-129,JK26-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,26,nn,ZZ,4,A,HH,g,CW, +SRR12888934,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-130,JK26-3,tomato,2021,USA,FL,Client5,,xan_FL,bact,26,nn,ZZ,4,A,HH,g,CW, +SRR12888927,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-137,JK32-1,tomato,2021,USA,FL,Client5,,xan_FL,bact,32,nn,SS,4,A,HH,g,CW, +SRR12888925,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-138,JK32-2,tomato,2021,USA,FL,Client5,,xan_FL,bact,32,nn,SS,4,A,HH,g,CW, +SRR12888924,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-139,JK32-3,tomato,2021,USA,FL,Client5,,xan_FL,bact,32,nn,SS,4,A,HH,g,CW, +SRR12888920,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-143,JK36-1,tomato,2021,USA,FL,Client6,,xan_FL,bact,36,tt,WW,9,D,MM,g,CW, +SRR12888919,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-144,JK36-2,tomato,2021,USA,FL,Client6,,xan_FL,bact,36,tt,WW,9,D,MM,g,CW, +SRR12888918,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-145,JK36-3,tomato,2021,USA,FL,Client6,,xan_FL,bact,36,tt,WW,9,D,MM,g,CW, +SRR12888911,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-151,JK37-1,tomato,2021,USA,FL,Client6,,xan_FL,bact,37,tt,WW,10,B,MM,g,CW, +SRR12888910,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-152,JK37-2,tomato,2021,USA,FL,Client6,,xan_FL,bact,37,tt,WW,10,B,MM,g,CW, +SRR12888848,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-153,JK37-3,tomato,2021,USA,FL,Client6,,xan_FL,bact,37,tt,WW,10,B,MM,g,CW, +SRR12888841,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-159,JK38-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,38,ff,YY,10,B,CC,g,CW, +SRR12888840,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-160,JK38-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,38,ff,YY,10,B,CC,g,CW, +SRR12888839,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-161,JK38-3,tomato,2021,USA,FL,Client7,,xan_FL,bact,38,ff,YY,10,B,CC,g,CW, +SRR12888834,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-166,JK39-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,39,ff,YY,10,B,CC,g,CW, +SRR12888833,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-167,JK39-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,39,ff,YY,10,B,CC,g,CW, +SRR12888831,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-168,JK39-3,tomato,2021,USA,FL,Client7,,xan_FL,bact,39,ff,YY,10,B,CC,g,CW, +SRR12888824,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-175,JK40-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,40,ff,YY,10,B,CC,g,CW, +SRR12888823,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-176,JK40-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,40,ff,YY,10,B,CC,g,CW, +SRR12888786,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-184,JK40-10,tomato,2021,USA,FL,Client7,,xan_FL,bact,40,ff,YY,10,B,CC,g,CW, +SRR12888785,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-185,JK41-1,tomato,2021,USA,FL,Client7,,xan_FL,bact,41,ff,YY,10,B,CC,g,CW, +SRR12888784,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-186,JK41-2,tomato,2021,USA,FL,Client7,,xan_FL,bact,41,ff,YY,10,B,CC,g,CW, +SRR12888783,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-187,JK41-3,tomato,2021,USA,FL,Client7,,xan_FL,bact,41,ff,YY,10,B,CC,g,CW, +SRR12888775,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-194,JK42-1,tomato,2021,USA,FL,Client8,,xan_FL,bact,42,oo,VV,16,D,II,b,NW, +SRR12888774,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-195,JK42-2,tomato,2021,USA,FL,Client8,,xan_FL,bact,42,oo,VV,16,D,II,b,NW, +SRR12888773,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-196,JK42-3,tomato,2021,USA,FL,Client8,,xan_FL,bact,42,oo,VV,16,D,II,b,NW, +SRR12888767,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-201,JK43-1,tomato,2021,USA,FL,Client8,,xan_FL,bact,43,oo,VV,16,D,II,b,NW, +SRR12888766,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-202,JK43-2,tomato,2021,USA,FL,Client8,,xan_FL,bact,43,oo,VV,16,D,II,b,NW, +SRR12888765,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-203,JK43-3,tomato,2021,USA,FL,Client8,,xan_FL,bact,43,oo,VV,16,D,II,b,NW, +SRR12888761,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-207,JK44-1,tomato,2021,USA,FL,Client8,,xan_FL,bact,44,oo,VV,16,D,II,b,NW, +SRR12888758,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-208,JK44-2,tomato,2021,USA,FL,Client8,,xan_FL,bact,44,oo,VV,16,D,II,b,NW, +SRR12888757,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-209,JK44-3,tomato,2021,USA,FL,Client8,,xan_FL,bact,44,oo,VV,16,D,II,b,NW, +SRR12888753,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-213,JK45-1,tomato,2021,USA,FL,Client9,,xan_FL,bact,45,gg,VV,16,D,DD,d,NW, +SRR12888752,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-214,JK45-2,tomato,2021,USA,FL,Client9,,xan_FL,bact,45,gg,VV,16,D,DD,d,NW, +SRR12888751,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-215,JK45-3,tomato,2021,USA,FL,Client9,,xan_FL,bact,45,gg,VV,16,D,DD,d,NW, +SRR12888746,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-219,JK46-1,tomato,2021,USA,FL,Client10,,xan_FL,bact,46,kk,VV,16,D,GG,b,NW, +SRR12888745,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-220,JK46-2,tomato,2021,USA,FL,Client10,,xan_FL,bact,46,kk,VV,16,D,GG,b,NW, +SRR12888744,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-221,JK46-3,tomato,2021,USA,FL,Client10,,xan_FL,bact,46,kk,VV,16,D,GG,b,NW, +SRR12888743,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-222,JK52-1,tomato,2021,USA,FL,Client11,,xan_FL,bact,52,bb,TT,12,C,AA,h,SE, +SRR12888742,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-223,JK52-2,tomato,2021,USA,FL,Client11,,xan_FL,bact,52,bb,TT,12,C,AA,h,SE, +SRR12888705,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-231,JK52-10,tomato,2021,USA,FL,Client11,,xan_FL,bact,52,bb,TT,12,C,AA,h,SE, +SRR12888704,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-232,JK54-1,tomato,2021,USA,FL,Client12,,xan_FL,bact,54,uu,XX,10,B,NN,a,SW, +SRR12888703,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-233,JK54-2,tomato,2021,USA,FL,Client12,,xan_FL,bact,54,uu,XX,10,B,NN,a,SW, +SRR12888702,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-234,JK54-3,tomato,2021,USA,FL,Client12,,xan_FL,bact,54,uu,XX,10,B,NN,a,SW, +SRR12888696,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-239,JK56-1,tomato,2021,USA,FL,Client13,,xan_FL,bact,56,ll,ZZ,4,A,HH,a,SW, +SRR12888695,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-240,JK56-2,tomato,2021,USA,FL,Client13,,xan_FL,bact,56,ll,ZZ,4,A,HH,a,SW, +SRR12888686,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-248,JK56-10,tomato,2021,USA,FL,Client13,,xan_FL,bact,56,ll,ZZ,4,A,HH,a,SW, +SRR12888685,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-249,JK62-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,62,jj,UU,4,A,FF,e,SW, +SRR12888684,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-250,JK62-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,62,jj,UU,4,A,FF,e,SW, +SRR12888731,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-258,JK62-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,62,jj,UU,4,A,FF,e,SW, +SRR12888730,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-259,JK63-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,63,jj,UU,4,A,FF,e,SW, +SRR12888729,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-260,JK63-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,63,jj,UU,4,A,FF,e,SW, +SRR12888720,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-268,JK63-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,63,jj,UU,4,A,FF,e,SW, +SRR12888719,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-269,JK65-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,65,jj,UU,4,A,FF,e,SW, +SRR12888718,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-270,JK65-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,65,jj,UU,4,A,FF,e,SW, +SRR12888709,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-278,JK65-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,65,jj,UU,4,A,FF,e,SW, +SRR12888820,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-279,JK68-1,tomato,2021,USA,FL,Client14,,xan_FL,bact,68,ii,UU,4,A,FF,a,SW, +SRR12888819,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-280,JK68-2,tomato,2021,USA,FL,Client14,,xan_FL,bact,68,ii,UU,4,A,FF,a,SW, +SRR12888810,illumina,xanthomonas_perforans,bacteria,PRJNA668343,10.1038/s41396-021-01104-288,JK68-10,tomato,2021,USA,FL,Client14,,xan_FL,bact,68,ii,UU,4,A,FF,a,SW, +SRR21509025,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,COM,watermelon,2021,USA,TX,Client15,,fusarium;mixed,mixed,fungi,,,,,,,, +SRR21509024,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,PRU,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,, +SRR21509023,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,W2,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,, +SRR21509022,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,HAR,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,, +SRR21509021,illumina,fusarium_oxysporum_fsp_niveum,fungi,PRJNA878477,10.1094/PHYTOFR-11-22-0134-A,STO,watermelon,2021,USA,TX,Client15,,fusarium,fungi,,,,,,,,, +ERR3489204,pacbio,bemisia_tabaci,insect,PRJEB28507,10.1186/s12864-023-09474-3,SSA1-SG1_Nigeria_F8,cassava,2015,Nigeria,,Client16,,bemisia;mixed,mixed,insect,,,,,,,, +SRR27897033,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba525,LMG_305,Stonecrop (Sedum),1958,,,,,agro;mixed,mixed,bact,,,,,,,, +SRR11174029,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba526,R_10.1,Peach,2009,,,,,agro;mixed,mixed,bact,,,,,,,, +SRR11174116,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba527,PVM_1.5,Peach,2008,,,,,agro,bact,,,,,,,,,Ti +SRR11174105,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba528,P86/93,Grape,1993,,,,,agro,bact,,,,,,,,,Ti +SRR11174094,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba529,T268/95,Grape,1995,,,,,agro;mixed,mixed,bact,,,,,,,, +SRR11174089,illumina,Neorhizobium sp. AL 9.2.2,bacteria,PRJNA607555,10.1126/science.aba530,AL_9.2.2,Plum,2008,,,,,agro;mixed,mixed,bact,,,,,,,, +SRR11174078,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba531,PVM_10.5,Peach,2009,,,,,agro,bact,,,,,,,,,Ti +SRR11174066,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba532,T60/94,Grape,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174055,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba533,U167/95,Grape,1995,,,,,agro,bact,,,,,,,,,NA +SRR11174051,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba534,RO_10.5,Rose,2009,,,,,agro,bact,,,,,,,,,Ti +SRR11174048,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba535,R_1.1,Peach,2008,,,,,agro,bact,,,,,,,,,Ti +SRR11174043,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba536,W_1.1,Plum,2008,,,,,agro,bact,,,,,,,,,Ti +SRR11174041,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba537,T267/94,Grape,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174038,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba538,W_1.4,Plum,2008,,,,,agro,bact,,,,,,,,,Ti +SRR11174037,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba539,T393/94,Grape,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174036,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba540,IL30,Rose,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174033,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba541,LMG_232,Beet,1963,,,,,agro,bact,,,,,,,,,NA +SRR11174032,illumina,Allorhizobium ampelinum,bacteria,PRJNA607555,10.1126/science.aba542,V80/94,Grape,1994,,,,,agro,mixed,bact,,,,,,,, +SRR11174151,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba543,W9/94,Walnut,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174150,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba544,RO_2.2,Rose,2009,,,,,agro,bact,,,,,,,,,Ti +SRR11174149,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba545,LMG_267,Tomato,1935,,,,,agro,bact,,,,,,,,,Ti +SRR11174147,illumina,Agrobacterium larrymoorei,bacteria,PRJNA607555,10.1126/science.aba546,FPH-AR2,Blanket flower (Gaillardia),2014,,,,,agro,bact,,,,,,,,,Ti +SRR11174145,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba547,RO_11.4,Rose,2010,,,,,agro,bact,,,,,,,,,Ti +SRR11174143,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba548,LMG_292,Lettuce,1974,,,,,agro,bact,,,,,,,,,NA +SRR11174140,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba549,IL15,Rose,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174139,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba550,J3/75,Apple,1975,,,,,agro,bact,,,,,,,,,Ti +SRR11174137,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba551,AS2A7,,,,,,,agro,bact,,,,,,,,,Ti +SRR23117879,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba552,2788,,,,,,,agro,bact,,,,,,,,,Ti +SRR11174134,illumina,Rhizobium lusitanum,bacteria,PRJNA607555,10.1126/science.aba553,AF27/95,Lilac,,,,,,agro;mixed,mixed,bact,,,,,,,, +SRR11174132,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba554,K224,Chrysanthemum,,,,,,agro,bact,,,,,,,,,Ti +SRR11174131,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba555,N40/94,Raspberry,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174130,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba556,J2/75,Apple,1975,,,,,agro,bact,,,,,,,,,Ti +SRR11174129,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba557,Eu3-2NK,Euonymous,,,,,,agro,bact,,,,,,,,,Ti +SRR11174127,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba558,T155/95,Grape,,,,,,agro,bact,,,,,,,,,Ri +SRR11174126,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba559,Eu2-1RS,Euonymous,,,,,,agro,bact,,,,,,,,,Ti +SRR11174125,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba560,Eu2-1NK,Euonymous,,,,,,agro,bact,,,,,,,,,Ti +SRR11174123,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba561,Eu3-2RS,Euonymous,,,,,,agro;mixed,bact,,,,,,,,,Ti +SRR11174026,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba562,S32/96,Almond,,,,,,agro,bact,,,,,,,,,Ti +SRR11174018,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba563,1D1609,Alfalfa,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174016,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba564,1D132,Cherry,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174013,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba565,CG678,Grape,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174012,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba566,CG78,Grape,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174011,illumina,Agrobacterium vitis,bacteria,PRJNA607555,10.1126/science.aba567,F2/5,Grape,NA,,,,,agro,bact,,,,,,,,,NA +SRR11174009,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba568,12D13,,NA,,,,,agro;mixed,mixed,bact,,,,,,,, +SRR11174008,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba569,A6,Raspberry,NA,,,,,agro,bact,,,,,,,,,Ti +SRR11174007,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba570,GC1A3,Lobelia,,,,,,agro,bact,,,,,,,,,Ti +SRR11174004,illumina,Agrobacterium rubi,bacteria,PRJNA607555,10.1126/science.aba571,A19/93,Euonymus,1993,,,,,agro,bact,,,,,,,,,Ti +SRR11174002,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba572,P22/94,Aspen,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174001,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba573,W10/94,Walnut,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174000,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba574,N33/94,Raspberry,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11173999,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba575,Z4/95,Apricot,1995,,,,,agro,bact,,,,,,,,,Ti +SRR11174119,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba576,Y79/96,Rhododendron,1996,,,,,agro,bact,,,,,,,,,NA +SRR11174028,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba577,T5/73,Rose,1973,,,,,agro,bact,,,,,,,,,Ri +SRR11174208,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba578,H25/79,Rose,1979,,,,,agro,bact,,,,,,,,,Ti +SRR11174207,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba579,P23/94,Aspen,1994,,,,,agro,bact,,,,,,,,,Ti +SRR11174206,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba580,O16/94,Blueberry,1994,,,,,agro,bact,,,,,,,,,NA +SRR11174204,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba581,T90/95,Grape,1995,,,,,agro,bact,,,,,,,,,NA +SRR11174202,illumina,Rhizobium skierniewicense,bacteria,PRJNA607555,10.1126/science.aba582,Di1472,Shasta Daisy,NA,,,,,agro;mixed,bact,,,,,,,,,Ti +SRR11174201,illumina,Agrobacterium fabrum,bacteria,PRJNA607555,10.1126/science.aba583,Di1525a,Peony,NA,,,,,agro,mixed,bact,,,,,,,, +SRR24424782,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba584,O54/95,Cherry,1995,,,,,agro,bact,,,,,,,,,Ti +SRR11174198,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba585,X1/95,Peach,1995,,,,,agro,bact,,,,,,,,,Ti +SRR11174191,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba586,G9/79,Poplar,1979,,,,,agro,bact,,,,,,,,,Ti +SRR11174187,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba587,K196/80,Chrysanthemum,1980,,,,,agro,bact,,,,,,,,,Ti +SRR11174185,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba588,M56/79,Cottonwood,1979,,,,,agro,bact,,,,,,,,,Ti +SRR11174184,illumina,Rhizobium rhizogenes,bacteria,PRJNA607555,10.1126/science.aba589,P1/75,Dahlia,1975,,,,,agro,bact,,,,,,,,,Ti +SRR11174183,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba590,Y2/73,Dahlia,1973,,,,,agro,bact,,,,,,,,,Ti +SRR11174115,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba591,YO0101,Aster,2002,,,,,agro,bact,,,,,,,,,Ti +SRR11174109,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba592,K599,Cucumber,1974,,,,,agro;mixed,bact,,,,,,,,,Ri +SRR11174107,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba593,NCPPB_2655,Cucumber,1974,,,,,agro,bact,,,,,,,,,Ri +SRR11174106,illumina,Agrobacterium salinitolerans,bacteria,PRJNA607555,10.1126/science.aba594,NCPPB_2657,Cucumber,1974,,,,,agro;mixed,bact,,,,,,,,,Ri +SRR11174104,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1344a,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti +SRR11174103,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1344b,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti +SRR11174102,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1347a,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti +SRR11174101,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1347b,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti +SRR11174100,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1345-1a,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti +SRR11174099,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1345-1b,Marguerite daisy,2017,S9_N48,,Client17,,agro,mixed,bact,,,,,,,, +SRR11174098,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1346-1b,Marguerite daisy,2017,S9_N48,,Client17,,agro,bact,,,,,,,,,Ti +SRR11174097,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1a,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174096,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1b,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174095,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1c,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174093,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1d,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174092,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474-1e,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174180,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474ai,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174179,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474aii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174178,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474bi,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174177,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474bii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174176,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474ci,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174175,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474cii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174174,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474di,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174173,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474dii,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174171,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474ei,Shasta daisy,2017,S8_N32,,Client18,,agro,bact,,,,,,,,,Ti +SRR11174170,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1802-1a,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti +SRR11174169,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1802-1b,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti +SRR11174168,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1803-1b,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti +SRR11174167,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1804-1a,Shasta daisy,2017,S4_N15,,Client19,,agro,bact,,,,,,,,,Ti +SRR11174166,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1853-1a,Shasta daisy,2017,S9_N47,,Client20,,agro,bact,,,,,,,,,Ti +SRR11174165,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1853-1b,Shasta daisy,2017,S9_N47,,Client20,,agro,bact,,,,,,,,,Ti +SRR11174164,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1853-1c,Shasta daisy,2017,S9_N47,,Client20,,agro,bact,,,,,,,,,Ti +SRR11174163,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-2069-2b,Blackberry,2017,S6_N23,,Client21,,agro,bact,,,,,,,,,Ti +SRR11174162,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-2069-2c,Blackberry,2017,S6_N23,,Client21,,agro,bact,,,,,,,,,Ti +SRR11174160,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-642-1b,Impatiens,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174159,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-642-2b,Impatiens,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174158,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ia,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174157,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ib,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174156,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ic,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174155,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1id,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174154,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ie,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174153,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1if,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174091,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1ig,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174090,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1iv,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174088,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-lik,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174087,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-lii,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174086,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-713-1iii,Lobelia,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174085,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174084,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(a),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174083,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(b),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174082,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(c),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174081,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(d),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174080,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(e),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174079,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712-1iv_(f),African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174077,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712a-1ii,African daisy,2017,C7_N18,,Client22,,agro,mixed,bact,,,,,,,, +SRR11174076,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712b-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174075,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712c-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174074,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712d-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174073,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712e-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174072,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712g-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174071,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-712h-1ii,African daisy,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,Ti +SRR11174070,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1007,Lantana,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,NA +SRR11174069,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1008,Lantana,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,NA +SRR11174068,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1009,Pentas,2017,C7_N18,,Client22,,agro,bact,,,,,,,,,NA +SRR11174065,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850-1cii,Tarragon,2017,C10_N49,,Client23,,agro,bact,,,,,,,,,NA +SRR11174064,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850-1d,Tarragon,2017,C10_N49,,Client23,,agro,bact,,,,,,,,,NA +SRR11174063,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850B-1a,Tarragon,2017,C10_N49,,Client23,,agro,bact,,,,,,,,,NA +SRR11174062,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1850B-1b,Tarragon,2017,C10_N49,,Client23,,agro;mixed,bact,,,,,,,,,NA +SRR11174061,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,16-1607-1A,Blueberry,2016,S6_N50,,Client24,,agro;mixed,bact,,,,,,,,,NA +SRR11175555,illumina,Agrobacterium tumefaciens,bacteria,PRJNA607555,10.1126/science.aba594,17-1474eii,Shasta daisy,2017,S8_N32,,Client25,,agro;mixed,bact,,,,,,,,,Ti +ERR3842627,illumina,Meloidogyne enterolobii,nematode,PRJEB36431,,,,2020,,,Client26,,meloidegyne;mixed,mixed,nematode,,,,,,,, +SRR9644798,illumina,Heterodera glycines,nematode,PRJNA535374,,X12,,2018,,,,,heterodera,mixed,nematode,,,,,,,, +SRR14552458,pacbio,Aphis_gossypii,insect,PRJNA719918,10.1111/1755-0998.13521,cma_hap1,cotton,,,,Client27,,aphid;mixed,mixed,insect,,,,,,,, +SRR14552461,nanopore,Aphis_gossypii,insect,PRJNA719918,10.1111/1755-0998.13521,cma_hap3,cucumber,,,,Client27,,aphid,mixed,insect,,,,,,,, +SRR19847339,illumina,Heterodera glycines,nematode,PRJNA852516,,MM26,,,,,,,heterodera;mixed,mixed,nematode,,,,,,,, +SRR20231390,pacbio,Heterodera glycines,nematode,PRJNA852521,,PA3,,,,,,,heterodera,mixed,nematode,,,,,,,, +SRR23381582,pacbio,Pratylenchus scribneri,nematode,PRJNA932437,,ND,,,,,,,pratylenchus,mixed,nematode,,,,,,,, +SRR19529320,pacbio,Ustilago loliicola,fungi,PRJNA698760,10.1128/spectrum.00349-22,Ustilago_loliicola,,,,,,,ustilago,mixed,fungi,,,,,,,, +SRR19529321,pacbio,Ustilago tritici,fungi,PRJNA698760,10.1128/spectrum.00349-23,Ustilago_tritici,,,,,,,ustilago;mixed,mixed,fungi,,,,,,,, +SRR19529322,pacbio,Ustilago nuda,fungi,PRJNA698760,10.1128/spectrum.00349-24,Ustilago_nuda,,,,,,,ustilago;mixed,mixed,fungi,,,,,,,, +SRR18189816,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-25,WGS_Uh1278,,,,,Client28,,ustilago;mixed,fungi,,,,,,,,, +SRR18189817,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-26,WGS_Uh1273,,,,,Client28,,ustilago,fungi,,,,,,,,, +SRR18189818,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-27,WGS_Uh818,,,,,Client28,,ustilago;mixed,fungi,,,,,,,,, +SRR18189819,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-28,WGS_Uh811,,,,,Client28,,ustilago,fungi,,,,,,,,, +SRR18189820,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-29,WGS_Uh805,,,,,Client28,,ustilago,fungi,,,,,,,,, +SRR18189821,illumina,Ustilago hordei,fungi,PRJNA698760,10.1128/spectrum.00349-30,WGS_Uh359,,,,,Client28,,ustilago,fungi,,,,,,,,, +SRR11527076,illumina,Botrytis fabae,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,B_fabae,Vicia_faba,,Tunisa,,Client29,,botrytis;mixed,fungi,,,,,,,,, +SRR11527080,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Rf1,Rubus_fruticosus,2005-2007,Champagne_Foissy-sur-Vanne,,Client29,,botrytis,mixed,fungi,,,,,,,, +SRR11527077,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Hm1,Hydrangea_macrophylla,,Angers,,Client29,,botrytis,mixed,fungi,,,,,,,, +SRR11527081,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl13,S_lycopersicum,2005-2007,Champagne_Courceroy,,Client29,,botrytis,fungi,,,,,,,,, +SRR11527079,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Vv4,V_vinifera,2005-2007,Champagne_Hautvilliers,,Client29,,botrytis,fungi,,,,,,,,, +SRR11527083,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl11,S_lycopersicum,2009,Occitanie_Alenya,,Client29,,botrytis,fungi,,,,,,,,, +SRR11527082,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl12,S_lycopersicum,2009,Occitanie_Alenya,,Client29,,botrytis,fungi,,,,,,,,, +SRR11527092,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl3,S_lycopersicum,2005-2007,Champagne_Courceroy,,Client29,,botrytis,fungi,,,,,,,,, +SRR11527094,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl1,S_lycopersicum,2005-2007,Champagne_Foissy-sur-Vanne,,Client29,,botrytis,fungi,,,,,,,,, +SRR11527084,illumina,Botrytis cinerea,fungi,PRJNA624742,10.1094/PHYTO-07-20-0302-FI,Sl10,S_lycopersicum,2009,Occitanie_Alenya,,Client29,,botrytis,fungi,,,,,,,,, +SRR29399310,illumina,Pythium insidiosum,oomycete,PRJNA1123314,,,,,,,,,oomycetes;mixed,mixed,,,,,,,,, +SRR30484503,illumina,Pythium cedri,oomycete,PRJNA1010138,,,,,,,,,oomycetes;mixed,,,,,,,,,, +SRR22586156,pacbio,Pythium oligandrum,oomycete,PRJNA910369,,,,,,,,,oomycetes,mixed,,,,,,,,, +SRR15309484 ,illumina,Pythium spinosum,oomycete,PRJNA601986,,CBS 275.67,,,,,,,oomycetes,,,,,,,,,, +SRR29814928,illumina,Phytophthora infestans,oomycete,PRJNA1135328,,,,,,,,,oomycetes,,,,,,,,,, +SRR26197583,pacbio,Phytophthora cinnamomi,oomycete,PRJNA1019754,,Pc2109,,,,,,,oomycetes;mixed,mixed,,,,,,,,, +SRR16542347,illumina,Pernospora effusa,oomycete,PRJNA772192,,,spinach,,,,,,oomycetes,mixed,,,,,,,,, diff --git a/test/data/metadata/mixed.csv b/test/data/metadata/mixed.csv index ff205bd6..6105a566 100644 --- a/test/data/metadata/mixed.csv +++ b/test/data/metadata/mixed.csv @@ -1,5 +1,14 @@ -sample_id,ncbi_accession,sequence_type,color_by,organism_group,kingdom,report_group_ids -PHW726_fox_matthiolae,SRR10432277,illumina,organism_group,fungi,fungi,mixed;fungi -BDM_Pbelbahrii,ERR1578939,illumina,organism_group,oomycete,sar,mixed;oomycete -HoneyBee_Adorsata,SRR1564144,illumina,organism_group,insect,metazoa,mixed;insect -Rsol_Rsolanacearum,SRR19621834,illumina,organism_group,bacteria,bacteria,mixed;bacteria +sample_id,name,report_group_ids,ref_group_ids,ncbi_accession,path,path_2,sequence_type,ncbi_query,ncbi_query_max +ERR2612748,Pyricularia oryzae (Nanopore),all,p_oryzae_refs,ERR2612748,,,,, +ERR2612749,Pyricularia oryzae (Nanopore),all,p_oryzae_refs,ERR2612749,,,,, +ERR2612750,Pyricularia oryzae (Nanopore),all,p_oryzae_refs,ERR2612750,,,,, +SRR12888961,Xanthomonas perforans (Illumina PE),all;unknown,,SRR12888961,,,,, +SRR12888960,Xanthomonas perforans (Illumina PE),all;unknown,,SRR12888960,,,,, +SRR12888760,Xanthomonas perforans (Illumina PE),all;unknown,,SRR12888760,,,,, +SRR27897033,Agrobacterium tumefaciens (Illumina SE),all;unknown,,,path_surveil_data/reads/SRR27897033.fastq.gz,,Illumina,, +SRR11174105,Agrobacterium vitis (Illumina PE),all;unknown,,,path_surveil_data/reads/SRR11174105_1.fastq.gz,path_surveil_data/reads/SRR11174105_2.fastq.gz,Illumina,, +SRR11174149,Agrobacterium tumefaciens (Pacbio),all;unknown,,,path_surveil_data/reads/SRR29384764.fastq.gz,,Pacbio,, +SRR27897033,Agrobacterium radiobacter (Nanopore),all;unknown,,,path_surveil_data/reads/SRR27897033.fastq.gz,,Nanopore,, +SRR14836075 ,Phytophthora ramorum (Pacbio),all;unknown,,SRR14836075,,,,, +,Phytophthora NCBI query: ,all;unknown,,,,,,"""Phytophthora""[Organism] AND ""wgs""[Strategy] ",3 +,Escherichia coli query: ,all;e_coli,e_coli_refs,,,,,PRJEB71359[BioProject],3 diff --git a/test/data/metadata/mixed_references.csv b/test/data/metadata/mixed_references.csv new file mode 100644 index 00000000..c41ad6f1 --- /dev/null +++ b/test/data/metadata/mixed_references.csv @@ -0,0 +1,5 @@ +ref_group_ids,ref_id,ref_name,ref_primary_usage,ref_contextual_usage,ref_ncbi_accession,ref_path,ref_ncbi_query,ref_ncbi_query_max +p_oryzae_refs,GCF_000002495.2,Pyricularia oryzae 70-15,exclusive,required,GCF_000002495.2,,, +p_oryzae_refs,,Pyricularia grisea PgNI,excluded,required,,path_surveil_data/assemblies/GCF_004355905.1.fasta.gz,, +p_oryzae_refs,,,excluded,optional,,,"""Pyricularia oryzae""[Organism]",5 +e_coli_refs,,,required,optional,GCF_000005845.2,,, diff --git a/tower.yml b/tower.yml index 779ce49f..4969a21f 100644 --- a/tower.yml +++ b/tower.yml @@ -4,4 +4,4 @@ reports: mimeType: text/html "**/reports/*_pathsurveil_report.pdf": display: Main reports in PDF format - mimeType: application/pdf \ No newline at end of file + mimeType: application/pdf diff --git a/workflows/pathogensurveillance.nf b/workflows/pathogensurveillance.nf index 0c2d5fb0..e7ede3a8 100644 --- a/workflows/pathogensurveillance.nf +++ b/workflows/pathogensurveillance.nf @@ -1,86 +1,24 @@ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - VALIDATE INPUTS + IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) - -// Validate input parameters -WorkflowPathogensurveillance.initialise(params, log) - -// Check input path parameters to see if they exist -def checkPathParamList = [ - params.sample_data, - params.reference_data, - params.multiqc_config -] -for (param in checkPathParamList) { - if (param) { file(param, checkIfExists: true) } -} - -// Check mandatory parameters -if (params.sample_data) { - sample_data_csv = file(params.sample_data) -} else { - exit 1, 'Sample metadata CSV not specified.' -} -if (params.reference_data) { - reference_data_csv = file(params.reference_data) -} else { - reference_data_csv = [] -} -if (!params.bakta_db && !params.download_bakta_db ) { - exit 1, "No bakta database specified. Use either '--bakta_db' to point to a local bakta database or use '--download_bakta_db true' to download the Bakta database." -} - - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - CONFIG FILES -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) -multiqc_custom_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config, checkIfExists: true ) : Channel.empty() -multiqc_logo = params.multiqc_logo ? Channel.fromPath( params.multiqc_logo, checkIfExists: true ) : Channel.empty() -multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - IMPORT LOCAL MODULES/SUBWORKFLOWS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -// -// SUBWORKFLOW: Consisting of a mix of local and nf-core/modules -// -include { PREPARE_INPUT } from '../subworkflows/local/prepare_input' -include { COARSE_SAMPLE_TAXONOMY } from '../subworkflows/local/coarse_sample_taxonomy' -include { CORE_GENOME_PHYLOGENY } from '../subworkflows/local/core_genome_phylogeny' -include { VARIANT_ANALYSIS } from '../subworkflows/local/variant_analysis' -include { DOWNLOAD_REFERENCES } from '../subworkflows/local/download_references' -include { SKETCH_COMPARISON } from '../subworkflows/local/sketch_comparison' -include { GENOME_ASSEMBLY } from '../subworkflows/local/genome_assembly' -include { BUSCO_PHYLOGENY } from '../subworkflows/local/busco_phylogeny' -include { INITIAL_QC_CHECKS } from '../subworkflows/local/initial_qc_checks' - - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - IMPORT NF-CORE MODULES/SUBWORKFLOWS -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -// -// MODULE: Installed directly from nf-core/modules -// include { MULTIQC } from '../modules/nf-core/multiqc/main' -include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' +include { PREPARE_INPUT } from '../subworkflows/local/prepare_input' +include { COARSE_SAMPLE_TAXONOMY } from '../subworkflows/local/coarse_sample_taxonomy' +include { CORE_GENOME_PHYLOGENY } from '../subworkflows/local/core_genome_phylogeny' +include { VARIANT_ANALYSIS } from '../subworkflows/local/variant_analysis' +include { DOWNLOAD_REFERENCES } from '../subworkflows/local/download_references' +include { SKETCH_COMPARISON } from '../subworkflows/local/sketch_comparison' +include { GENOME_ASSEMBLY } from '../subworkflows/local/genome_assembly' +include { BUSCO_PHYLOGENY } from '../subworkflows/local/busco_phylogeny' +include { INITIAL_QC_CHECKS } from '../subworkflows/local/initial_qc_checks' include { MAIN_REPORT } from '../modules/local/main_report' include { RECORD_MESSAGES } from '../modules/local/record_messages' include { DOWNLOAD_ASSEMBLIES } from '../modules/local/download_assemblies' include { PREPARE_REPORT_INPUT } from '../modules/local/prepare_report_input' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -88,11 +26,15 @@ include { PREPARE_REPORT_INPUT } from '../modules/local/prepare_report_in ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -// Info required for completion email and summary -def multiqc_report = [] - workflow PATHOGENSURVEILLANCE { + take: + sample_data_csv + reference_data_csv + + main: + + // Initalize channel to accumulate information about software versions used versions = Channel.empty() messages = Channel.empty() @@ -102,8 +44,18 @@ workflow PATHOGENSURVEILLANCE { versions = versions.mix(PREPARE_INPUT.out.versions) messages = messages.mix(PREPARE_INPUT.out.messages) + // Assemble and annotate genomes + GENOME_ASSEMBLY ( + PREPARE_INPUT.out.sample_data + ) + versions = versions.mix(GENOME_ASSEMBLY.out.versions) + messages = messages.mix(GENOME_ASSEMBLY.out.messages) + // Initial quick analysis of sequences and references based on sketchs - SKETCH_COMPARISON ( PREPARE_INPUT.out.sample_data ) + SKETCH_COMPARISON ( + PREPARE_INPUT.out.sample_data, + GENOME_ASSEMBLY.out.scaffolds + ) versions = versions.mix(SKETCH_COMPARISON.out.versions) messages = messages.mix(SKETCH_COMPARISON.out.messages) @@ -120,13 +72,6 @@ workflow PATHOGENSURVEILLANCE { versions = versions.mix(VARIANT_ANALYSIS.out.versions) messages = messages.mix(VARIANT_ANALYSIS.out.messages) - // Assemble and annotate bacterial genomes - GENOME_ASSEMBLY ( - PREPARE_INPUT.out.sample_data - ) - versions = versions.mix(GENOME_ASSEMBLY.out.versions) - messages = messages.mix(GENOME_ASSEMBLY.out.messages) - // Create core gene phylogeny for bacterial samples CORE_GENOME_PHYLOGENY ( PREPARE_INPUT.out.sample_data, @@ -144,14 +89,20 @@ workflow PATHOGENSURVEILLANCE { versions = versions.mix(BUSCO_PHYLOGENY.out.versions) messages = messages.mix(BUSCO_PHYLOGENY.out.messages) - // Save version info - CUSTOM_DUMPSOFTWAREVERSIONS ( - versions - .unique() - .collectFile(name: 'collated_versions.yml') - ) + // Collate and save software versions + softwareVersionsToYAML(versions) + .collectFile( + storeDir: "${params.outdir}/pipeline_info", + name: 'nf_core_' + 'pipeline_software_' + 'mqc_' + 'versions.yml', + sort: true, + newLine: true + ).set { collated_versions } // MultiQC + multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) + multiqc_custom_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config, checkIfExists: true ) : Channel.empty() + multiqc_logo = params.multiqc_logo ? Channel.fromPath( params.multiqc_logo, checkIfExists: true ) : Channel.empty() + multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) fastqc_results = PREPARE_INPUT.out.sample_data .map{ [[id: it.sample_id], [id: it.report_group_ids]] } .combine(INITIAL_QC_CHECKS.out.fastqc_zip, by: 0) @@ -173,7 +124,7 @@ workflow PATHOGENSURVEILLANCE { multiqc_files = fastqc_results .join(nanoplot_results, remainder: true) .join(quast_results, remainder: true) - .combine(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect(sort: true)) + .combine(collated_versions) .map { report_meta, fastqc, nanoplot, quast, versions -> files = fastqc ?: [] + nanoplot ?: [] + quast ?: [] + [versions] [report_meta, files.flatten()] @@ -182,7 +133,9 @@ workflow PATHOGENSURVEILLANCE { multiqc_files, multiqc_config.collect(sort: true).ifEmpty([]), multiqc_custom_config.collect(sort: true).ifEmpty([]), - multiqc_logo.collect(sort: true).ifEmpty([]) + multiqc_logo.collect(sort: true).ifEmpty([]), + [], + [] ) versions = versions.mix(MULTIQC.out.versions) @@ -191,6 +144,7 @@ workflow PATHOGENSURVEILLANCE { .map{ sample_meta -> [[id: sample_meta.report_group_ids], sample_meta.findAll {it.key != 'paths' && it.key != 'ref_metas' && it.key != 'ref_ids'}] } + .unique() .collectFile(keepHeader: true, skip: 1) { report_meta, sample_meta -> [ "${report_meta.id}_sample_data.csv", sample_meta.keySet().collect{'"' + it + '"'}.join(',') + "\n" + sample_meta.values().collect{'"' + it + '"'}.join(',') + "\n" ] } @@ -205,6 +159,7 @@ workflow PATHOGENSURVEILLANCE { .map { report_meta, ref_meta -> [report_meta, ref_meta.findAll {it.key != 'ref_path' && it.key != 'gff'}] } + .unique() .collectFile(keepHeader: true, skip: 1) { report_meta, ref_meta -> [ "${report_meta.id}_reference_data.csv", ref_meta.keySet().collect{'"' + it + '"'}.join(',') + "\n" + ref_meta.values().collect{'"' + it + '"'}.join(',') + "\n" ] } @@ -252,6 +207,7 @@ workflow PATHOGENSURVEILLANCE { // Gather status messages for each group group_messages = messages + .unique() .collectFile(keepHeader: true, skip: 1) { sample_meta, report_meta, ref_meta, workflow, level, message -> [ "${report_meta.id}.csv", "\"sample_id\",\"reference_id\",\"workflow\",\"level\",\"message\"\n\"${sample_meta ? sample_meta.id : 'NA'}\",\"${ref_meta ? ref_meta.id : 'NA'}\",\"${workflow}\",\"${level}\",\"${message}\"\n" ] } @@ -276,13 +232,13 @@ workflow PATHOGENSURVEILLANCE { .join(BUSCO_PHYLOGENY.out.r2t_ref_meta, remainder: true) .join(MULTIQC.out.outdir, remainder: true) .join(group_messages, remainder: true) - .filter{it[0] != null} // remove extra item if messages is empty - .map{ it.size() == 17 ? it + [null] : it } // adds placeholder if messages is empty + .filter{it[0] != null} // remove extra item if messages is empty + .map{ it.size() == 17 ? it + [null] : it } // adds placeholder if messages is empty .map{ it.collect{ it ?: [] } } //replace nulls with empty lists PREPARE_REPORT_INPUT ( report_inputs, - CUSTOM_DUMPSOFTWAREVERSIONS.out.yml.first() // .first converts it to a value channel so it can be reused for multiple reports. + collated_versions.first() // .first converts it to a value channel so it can be reused for multiple reports. ) MAIN_REPORT ( @@ -290,35 +246,6 @@ workflow PATHOGENSURVEILLANCE { Channel.fromPath("${projectDir}/assets/main_report", checkIfExists: true).first() // .first converts it to a value channel so it can be reused for multiple reports. ) + emit: + multiqc_report = MULTIQC.out.report } - - - - - - - - - - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - COMPLETION EMAIL AND SUMMARY -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -workflow.onComplete { - if (params.email || params.email_on_fail) { - NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report) - } - NfcoreTemplate.summary(workflow, params, log) - if (params.hook_url) { - NfcoreTemplate.adaptivecard(workflow, params, summary_params, projectDir, log) - } -} - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - THE END -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ diff --git a/workflows/plantpathsurveil.nf b/workflows/plantpathsurveil.nf new file mode 100644 index 00000000..bb4d7165 --- /dev/null +++ b/workflows/plantpathsurveil.nf @@ -0,0 +1,97 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ +include { FASTQC } from '../modules/nf-core/fastqc/main' +include { MULTIQC } from '../modules/nf-core/multiqc/main' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_pathogensurveillance_pipeline' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RUN MAIN WORKFLOW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PLANTPATHSURVEIL { + + take: + ch_samplesheet // channel: samplesheet read in from --input + main: + + ch_versions = Channel.empty() + ch_multiqc_files = Channel.empty() + // + // MODULE: Run FastQC + // + FASTQC ( + ch_samplesheet + ) + ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}) + ch_versions = ch_versions.mix(FASTQC.out.versions.first()) + + // + // Collate and save software versions + // + softwareVersionsToYAML(ch_versions) + .collectFile( + storeDir: "${params.outdir}/pipeline_info", + name: 'nf_core_' + 'pipeline_software_' + 'mqc_' + 'versions.yml', + sort: true, + newLine: true + ).set { ch_collated_versions } + + + // + // MODULE: MultiQC + // + 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() + + summary_params = paramsSummaryMap( + workflow, parameters_schema: "nextflow_schema.json") + ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) + ch_multiqc_files = ch_multiqc_files.mix( + ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + 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) + ch_methods_description = Channel.value( + methodsDescriptionText(ch_multiqc_custom_methods_description)) + + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) + ch_multiqc_files = ch_multiqc_files.mix( + ch_methods_description.collectFile( + name: 'methods_description_mqc.yaml', + sort: true + ) + ) + + MULTIQC ( + ch_multiqc_files.collect(), + ch_multiqc_config.toList(), + ch_multiqc_custom_config.toList(), + ch_multiqc_logo.toList(), + [], + [] + ) + + emit:multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html + versions = ch_versions // channel: [ path(versions.yml) ] + +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + THE END +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/