diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..b290e09 --- /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 e1c9da2..72dda28 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,52 +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 -indent_size = unset - -# These files are edited and tested upstream in pfr/modules -[/modules/gallvp/**] -charset = unset -end_of_line = unset -insert_final_newline = unset -trim_trailing_whitespace = unset -indent_style = unset -indent_size = unset - -[/subworkflows/gallvp/**] -charset = unset -end_of_line = unset -insert_final_newline = unset -trim_trailing_whitespace = unset -indent_style = unset -indent_size = unset [/assets/email*] indent_size = unset -# ignore Readme -[README.md] -indent_style = unset - -# ignore python -[*.{py}] +# ignore python and markdown +[*.{py,md}] indent_style = unset - -# ignore perl -[*.{pl,pm}] -indent_size = unset - -# ignore drawio -[*.drawio] -indent_size = unset - -# ignore LICENSE -[LICENSE] -indent_size = unset diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7a2dabc --- /dev/null +++ b/.gitattributes @@ -0,0 +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/.dockstore.yml b/.github/.dockstore.yml new file mode 100644 index 0000000..191fabd --- /dev/null +++ b/.github/.dockstore.yml @@ -0,0 +1,6 @@ +# Dockstore config version, not pipeline version +version: 1.2 +workflows: + - subclass: nfl + primaryDescriptorPath: /nextflow.config + publish: True diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..e28c02c --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,118 @@ +# PlantandFoodResearch/genepal: Contributing Guidelines + +Hi there! +Many thanks for taking an interest in improving PlantandFoodResearch/genepal. + +We try to manage the required tasks for PlantandFoodResearch/genepal using GitHub issues, you probably came to this page when creating one. +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 ;) + +## Contribution workflow + +If you'd like to write some code for PlantandFoodResearch/genepal, the standard workflow is as follows: + +1. Check that there isn't already an issue about your idea in the [PlantandFoodResearch/genepal issues](https://github.com/PlantandFoodResearch/genepal/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 [PlantandFoodResearch/genepal repository](https://github.com/PlantandFoodResearch/genepal) 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). +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. + +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. + +If any failures or warnings are encountered, please follow the listed URL for more documentation. + +### Pipeline tests + +Each `nf-core` pipeline should be set up with a minimal set of test-data. +`GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully. +If there are any failures then the automated tests fail. +These tests are run both with the latest available version of `Nextflow` and also the minimum required version that is stated in the pipeline code. + +## Patch + +:warning: Only in the unlikely and regretful event of a release happening with a bug. + +- On your own fork, make a new branch `patch` based on `upstream/master`. +- Fix the bug, and bump version (X.Y.Z+1). +- A PR should be made on `master` from patch to directly this particular bug. + +## Pipeline contribution conventions + +To make the PlantandFoodResearch/genepal code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written. + +### Adding a new step + +If you wish to contribute a new step, please use the following coding standards: + +1. Define the corresponding input channel into your new process from the expected previous process channel +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). +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`. +9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module. +10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`. + +### Default values + +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`. + +### 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. + +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 + +Please use the following naming schemes, to make it easy to understand what is going where. + +- initial process channel: `ch_output_from_` +- intermediate and terminal channels: `ch__for_` + +### 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]` + +### 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/PlantandFoodResearch/genepal/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 new file mode 100644 index 0000000..5366891 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,54 @@ +name: Bug report +description: Report something that is broken or incorrect +labels: bug +body: + - type: textarea + id: description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + id: command_used + attributes: + label: Command used and terminal output + description: Steps to reproduce the behaviour. Please paste the command you used + to launch the pipeline and the output from your terminal. + render: console + placeholder: "$ nextflow run ... + + + Some output where something broke + + " + - type: textarea + id: files + attributes: + label: Relevant files + description: "Please drag and drop the relevant files here. Create a `.zip` archive + if the extension is not allowed. + + Your verbose log file `.nextflow.log` is often useful _(this is a hidden file + in the directory where you launched the pipeline)_ as well as custom Nextflow + configuration files. + + " + - type: textarea + id: system + attributes: + label: System information + description: "* Nextflow version _(eg. 23.04.0)_ + + * Hardware _(eg. HPC, Desktop, Cloud)_ + + * Executor _(eg. slurm, local, awsbatch)_ + + * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, + or Apptainer)_ + + * OS _(eg. CentOS Linux, macOS, Linux Mint)_ + + * Version of PlantandFoodResearch/genepal _(eg. 1.1, 1.5, 1.8.2)_ + + " diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..2f4df30 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,11 @@ +name: Feature request +description: Suggest an idea for the PlantandFoodResearch/genepal pipeline +labels: enhancement +body: + - type: textarea + id: description + attributes: + label: Description of feature + description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered. + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..9dfdfb4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ + + +## PR checklist + +- [ ] 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/PlantandFoodResearch/genepal/tree/master/.github/CONTRIBUTING.md) +- [ ] Make sure your code lints (`nf-core lint`). +- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). +- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). +- [ ] Usage Documentation in `docs/usage.md` is updated. +- [ ] Output Documentation in `docs/output.md` is updated. +- [ ] `CHANGELOG.md` is updated. +- [ ] `README.md` is updated (including new tool citations and authors/contributors). diff --git a/.github/check_module_versions.py b/.github/check_module_versions.py deleted file mode 100755 index f1266a2..0000000 --- a/.github/check_module_versions.py +++ /dev/null @@ -1,320 +0,0 @@ -#!/usr/bin/env python3 - -import colorlog -from urllib.parse import quote_plus -from functools import cmp_to_key -from pathlib import Path - -import subprocess -import argparse -import requests -import logging -import semver -import json -import re -import os - -PIPELINE_REPO = "PlantandFoodResearch/genepal" - -def get_logger(): - formatter = colorlog.ColoredFormatter( - "%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s", - datefmt=None, - reset=True, - log_colors={ - "DEBUG": "cyan", - "INFO": "green", - "WARNING": "yellow", - "ERROR": "red", - "CRITICAL": "red,bg_white", - }, - secondary_log_colors={}, - style="%", - ) - - handler = colorlog.StreamHandler() - handler.setFormatter(formatter) - - logger = colorlog.getLogger("") - logger.addHandler(handler) - return logger - - -LOGGER = get_logger() - - -def first(from_list): - if from_list == []: - return None - - return from_list[0] - - -def extract_semvar(from_version_str): - version_numbers = first( - re.findall(r"^[vV]?(\d+)\.?(\d*)\.?(\d*)$", from_version_str) - ) - if version_numbers == None: - return None - - major_ver = int(version_numbers[0]) - minor_ver = int(f"{version_numbers[1]}") if version_numbers[1] != "" else 0 - patch_ver = int(f"{version_numbers[2]}") if version_numbers[2] != "" else 0 - - return f"{major_ver}.{minor_ver}.{patch_ver}" - - -def check_version_status(git_repo_from_meta): - - host = git_repo_from_meta["host"] - org = git_repo_from_meta["org"] - repo = git_repo_from_meta["repo"] - current_ver = git_repo_from_meta["semver"] - - sem_versions = [] - if host == "github": - r = subprocess.run( - " ".join( - [ - "gh api", - '-H "Accept: application/vnd.github+json"', - '-H "X-GitHub-Api-Version: 2022-11-28"', - f"/repos/{org}/{repo}/tags", - ] - ), - shell=True, - capture_output=True, - text=True, - ) - - if r.returncode != 0: - LOGGER.warning(f"Failed to get tags for {org}/{repo}: {r.stderr}") - return None - - response_data = json.loads(r.stdout) - - elif host == "gitlab": - encoded = quote_plus(f"{org}/{repo}") - r = requests.get( - f"https://gitlab.com/api/v4/projects/{encoded}/repository/tags" - ) - - if r.status_code != 200: - LOGGER.warning(f"Failed to get tags for {org}/{repo}: {r.json()}") - return None - response_data = r.json() - - else: - raise f"{host} is not supported!" - - available_versions = [x["name"] for x in response_data] - - if available_versions == []: - LOGGER.warning(f"No versions available for {host}/{org}/{repo}") - return None - - LOGGER.debug(f"Available versions for {host}/{org}/{repo}: {available_versions}") - - sem_versions = [extract_semvar(x["name"]) for x in response_data] - sem_versions = [v for v in sem_versions if v != None] - if sem_versions == []: - LOGGER.warning(f"{host}/{org}/{repo} versions do not conform to semver") - return None - - newer_vers = [v for v in sem_versions if semver.compare(v, current_ver) > 0] - - if newer_vers == []: - LOGGER.info( - f"{host}/{org}/{repo} does not have a new version compared to {current_ver}, first/last {available_versions[0]}/{available_versions[-1]}" - ) - return None - - latest_version = max(newer_vers, key=cmp_to_key(semver.compare)) - - LOGGER.info( - f"{host}/{org}/{repo} has a new version {latest_version} compared to {current_ver}" - ) - - return {**git_repo_from_meta, "latest_version": latest_version} - - -def get_new_versions_from_meta_paths(): - - module_meta_paths = ( - subprocess.run( - "find ./modules -name meta.yml", - shell=True, - capture_output=True, - text=True, - ) - .stdout.strip() - .split("\n") - ) - - git_repos_from_meta = [] - for meta_path in module_meta_paths: - meta_text = Path(meta_path).read_text() - main_path = f"{os.path.dirname(meta_path)}/main.nf" - main_text = Path(main_path).read_text() - repo = first( - re.findall( - r"\s+tool_dev_url:\s+\"?https://(github|gitlab).com/([\w-]+)/([\w-]+)\"?", - meta_text, - ) - ) - - if repo == None: - LOGGER.warning(f"No repo found in {meta_path}") - continue - - LOGGER.debug(f"{meta_path} repo: {repo}") - - if "mulled-v2" in main_text: - LOGGER.warning(f"Mulled container found in {main_path}") - continue - - version = first(re.findall(rf".*/([\w-]+):v?([\.0-9]+)", main_text)) - - if version == None: - LOGGER.warning(f"No version found in {main_path}") - continue - - LOGGER.debug(f"{main_path} version: {version}") - - semver_version = extract_semvar(version[1]) - - if semver_version == None: - LOGGER.warning( - f"Version {version} from {main_path} does not conform to semver" - ) - continue - - repo_data = { - "meta.yml": meta_path, - "main.nf": main_path, - "host": repo[0], - "org": repo[1], - "repo": repo[2], - "tool": version[0], - "semver": semver_version, - } - - LOGGER.debug(f"{meta_path} version data: {repo_data}") - - git_repos_from_meta.append(repo_data) - - with_latest = [check_version_status(r) for r in git_repos_from_meta] - filtered = [v for v in with_latest if v != None] - grouped = {} - - for v in filtered: - key = f"{v['host']}/{v['org']}/{v['repo']}" - if key not in grouped.keys(): - grouped[key] = {} - grouped[key]["latest_version"] = v["latest_version"] - grouped[key]["modules"] = [] - grouped[key]["modules"].append(v) - continue - - grouped[key]["modules"].append(v) - grouped[key]["latest_version"] = semver.max_ver( - grouped[key]["latest_version"], v["latest_version"] - ) - - return grouped - - -def get_repo_issue_titles(repo): - r = subprocess.run( - " ".join( - [ - "gh api", - '-H "Accept: application/vnd.github+json"', - '-H "X-GitHub-Api-Version: 2022-11-28"', - f"/repos/{repo}/issues", - ] - ), - shell=True, - capture_output=True, - text=True, - ) - - if r.returncode != 0: - LOGGER.error(f"Failed to get issues for {repo}: {r.stderr}") - exit(1) - - response_data = json.loads(r.stdout) - - update_issues = [ - x["title"] for x in response_data if x["title"].startswith("[UPDATE]") - ] - - return update_issues - - -def register_issue(host_repo_name, issue_title, tool_data): - - first_module = tool_data["modules"][0] - host, org, repo = (first_module["host"], first_module["org"], first_module["repo"]) - - module_paths = "\n".join( - [f"- {module['main.nf']}" for module in tool_data["modules"]] - ) - - issue_data = [ - "gh api", - "--method POST", - '-H "Accept: application/vnd.github+json"', - '-H "X-GitHub-Api-Version: 2022-11-28"', - f"/repos/{host_repo_name}/issues", - f'-f "title={issue_title}"', - f'-f "body=- https://{host}.com/{org}/{repo}\n{module_paths}"', - '-f "labels[]=enhancement"', - ] - - issue_post = subprocess.run( - " ".join(issue_data), - shell=True, - capture_output=True, - text=True, - ) - - if issue_post.returncode == 0: - LOGGER.info(f"Submitted issue: {issue_title}") - else: - LOGGER.warning(f"Failed to submitted issue: {issue_title}: {issue_post.stderr}") - - -if __name__ == "__main__": - - parser = argparse.ArgumentParser() - - parser.add_argument( - "-v", "--verbose", action="store_true", help="Enable verbose mode" - ) - parser.add_argument( - "-d", "--dry-run", action="store_true", help="Enable dry-run mode" - ) - args = parser.parse_args() - - if args.verbose: - LOGGER.setLevel(level=logging.DEBUG) - else: - LOGGER.setLevel(level=logging.INFO) - - git_repos_from_meta = get_new_versions_from_meta_paths() - update_issue_titles = get_repo_issue_titles(PIPELINE_REPO) - - for key, tool_data in git_repos_from_meta.items(): - - new_issue_title = f"[UPDATE] {key.upper()} -> {tool_data['latest_version']}" - - if new_issue_title in update_issue_titles: - LOGGER.info(f"{new_issue_title} has already been raised!") - continue - - if args.dry_run: - LOGGER.info(f"Dry run new issue: {new_issue_title}") - continue - - register_issue(PIPELINE_REPO, new_issue_title, tool_data) diff --git a/.github/contributors.sh b/.github/contributors.sh deleted file mode 100755 index e694e49..0000000 --- a/.github/contributors.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -module_authors=$(find ./modules -name meta.yml | xargs -I {} grep -A20 'authors:' {} | grep '\- ' | tr -d '"' | tr '[:upper:]' '[:lower:]' | awk '{print $2}') -workflow_authors=$(find ./subworkflows -name meta.yml | xargs -I {} grep -A20 'authors:' {} | grep '\- ' | tr -d '"' | tr '[:upper:]' '[:lower:]' | awk '{print $2}') -echo -e "${module_authors}\n${workflow_authors}" | sort -V | uniq -c | sort -k1,1 -r | awk '{print $2}' | sed -n 's|@\(.*\)||p' diff --git a/.github/version_checks.sh b/.github/version_checks.sh deleted file mode 100755 index 29b89ad..0000000 --- a/.github/version_checks.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -config_version=$(sed -n "s/.*version.*= '\(.*\)'.*/\1/p" nextflow.config) - -# Check CHANGELOG version - -head -n 10 CHANGELOG.md | grep "## $config_version - " >/dev/null \ - || (echo 'Failed to match CHANGELOG version'; exit 1) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml new file mode 100644 index 0000000..07fa928 --- /dev/null +++ b/.github/workflows/branch.yml @@ -0,0 +1,44 @@ +name: nf-core branch protection +# This workflow is triggered on PRs to master branch on the repository +# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev` +on: + pull_request_target: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + # PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches + - name: Check PRs + if: github.repository == 'PlantandFoodResearch/genepal' + run: | + { [[ ${{github.event.pull_request.head.repo.full_name }} == PlantandFoodResearch/genepal ]] && [[ $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@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 + with: + message: | + ## This PR is against the `master` branch :x: + + * Do not close this PR + * Click _Edit_ and change the `base` to `dev` + * This CI test will remain failed until you push a new commit + + --- + + Hi @${{ github.event.pull_request.user.login }}, + + It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `master` branch. + The `master` branch on nf-core repositories should always contain code from the latest release. + Because of this, PRs to `master` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch. + + You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page. + Note that even after this, the test will continue to show as failing until you push a new commit. + + Thanks again for your contribution! + repo-token: ${{ secrets.GITHUB_TOKEN }} + allow-repeats: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0d3ab09 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: nf-core CI +# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors +on: + push: + branches: + - dev + pull_request: + release: + types: [published] + +env: + NXF_ANSI_LOG: false + +concurrency: + group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Run pipeline with test data + # 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 == 'PlantandFoodResearch/genepal') }}" + runs-on: ubuntu-latest + strategy: + matrix: + NXF_VER: + - "23.04.0" + - "latest-everything" + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ matrix.NXF_VER }}" + + - name: Disk space cleanup + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - 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 + run: | + nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml new file mode 100644 index 0000000..0b6b1f2 --- /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 0000000..2d20d64 --- /dev/null +++ b/.github/workflows/download_pipeline.yml @@ -0,0 +1,86 @@ +name: Test successful pipeline download with 'nf-core download' + +# Run the workflow when: +# - dispatched manually +# - when a PR is opened or reopened to master branch +# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev. +on: + workflow_dispatch: + inputs: + testbranch: + description: "The specific branch you wish to utilize for the test execution of nf-core 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" + - uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7 + with: + singularity-version: 3.8.3 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install git+https://github.com/nf-core/tools.git@dev + + - name: Get the repository name and current branch set as environment variable + run: | + echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} + echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} + + - name: Download the pipeline + env: + NXF_SINGULARITY_CACHEDIR: ./ + run: | + nf-core download ${{ env.REPO_LOWERCASE }} \ + --revision ${{ env.REPO_BRANCH }} \ + --outdir ./${{ env.REPOTITLE_LOWERCASE }} \ + --compress "none" \ + --container-system 'singularity' \ + --container-library "quay.io" -l "docker.io" -l "ghcr.io" \ + --container-cache-utilisation 'amend' \ + --download-configuration + + - name: Inspect download + run: tree ./${{ env.REPOTITLE_LOWERCASE }} + + - name: Run the downloaded pipeline (stub) + id: stub_run_pipeline + continue-on-error: true + env: + NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + - name: Run the downloaded pipeline (stub run not supported) + id: run_pipeline + if: ${{ job.steps.stub_run_pipeline.status == failure() }} + env: + NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml new file mode 100644 index 0000000..326861d --- /dev/null +++ b/.github/workflows/fix-linting.yml @@ -0,0 +1,89 @@ +name: Fix linting from a comment +on: + issue_comment: + types: [created] + +jobs: + 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/') && + contains(github.event.comment.body, '@nf-core-bot fix linting') && + github.repository == 'PlantandFoodResearch/genepal' + runs-on: ubuntu-latest + steps: + # Use the @nf-core-bot token to check out so we can push later + - 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 + run: gh pr checkout ${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} + + # Install and run pre-commit + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 + with: + python-version: "3.12" + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + id: pre-commit + run: pre-commit run --all-files + continue-on-error: true + + # 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 + 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 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/PlantandFoodResearch/genepal/actions/runs/${{ github.run_id }}) for more details. diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..1fcafe8 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,68 @@ +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 +# that the code meets the nf-core guidelines. +on: + push: + branches: + - dev + pull_request: + release: + types: [published] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 + with: + python-version: "3.12" + + - name: Install pre-commit + run: pip install pre-commit + + - 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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 + with: + python-version: "3.12" + architecture: "x64" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nf-core + + - name: Run nf-core lint + 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 + + - name: Save PR number + if: ${{ always() }} + run: echo ${{ github.event.pull_request.number }} > PR_number.txt + + - name: Upload linting log file artifact + if: ${{ always() }} + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 + with: + name: linting-logs + path: | + lint_log.txt + lint_results.md + PR_number.txt diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml new file mode 100644 index 0000000..40acc23 --- /dev/null +++ b/.github/workflows/linting_comment.yml @@ -0,0 +1,28 @@ +name: nf-core linting comment +# This workflow is triggered after the linting action is complete +# It posts an automated comment to the PR, even if the PR is coming from a fork + +on: + workflow_run: + workflows: ["nf-core linting"] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Download lint results + uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3 + with: + workflow: linting.yml + workflow_conclusion: completed + + - name: Get PR number + id: pr_number + run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT + + - name: Post PR comment + uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.pr_number.outputs.pr_number }} + path: linting-logs/lint_results.md diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml new file mode 100644 index 0000000..03ecfcf --- /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' ' ')" >> $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/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 66e6122..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,74 +0,0 @@ -# Adopted from https://github.com/nf-core/modules/blob/master/.github/workflows/test.yml - -name: CI tests -on: - push: - branches: - - dev - pull_request: - -# Cancel if a newer run is started -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: 3.11 - cache: "pip" - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit - run: pre-commit run --all-files - - test: - runs-on: ubuntu-latest - name: Run stub test with docker - env: - NXF_ANSI_LOG: false - - steps: - - uses: actions/checkout@v4 - - - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 - with: - version: "23.04.4" - - - name: Disk space cleanup - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - - name: Run stub-test - run: | - nextflow run \ - main.nf \ - -profile docker \ - -stub \ - -params-file tests/stub/params.json - - confirm-pass: - runs-on: ubuntu-latest - needs: [pre-commit, test] - if: always() - steps: - - name: All tests ok - if: ${{ success() || !contains(needs.*.result, 'failure') }} - run: exit 0 - - name: One or more tests failed - if: ${{ contains(needs.*.result, 'failure') }} - run: exit 1 - - - name: debug-print - if: always() - run: | - echo "toJSON(needs) = ${{ toJSON(needs) }}" - echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" diff --git a/.gitignore b/.gitignore index e141945..5124c9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,8 @@ .nextflow* work/ +data/ results/ .DS_Store -*.code-workspace -.screenrc -.*.sw? -__pycache__ -*.pyo +testing/ +testing* *.pyc - -*.stdout -*.stderr diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..105a182 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,20 @@ +image: nfcore/gitpod:latest +tasks: + - name: Update Nextflow and setup pre-commit + command: | + pre-commit install --install-hooks + nextflow self-update + - name: unset JAVA_TOOL_OPTIONS + command: | + unset JAVA_TOOL_OPTIONS + +vscode: + extensions: # based on nf-core.nf-core-extensionpack + - 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 + - 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 3805dc8..610776e 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1 +1,27 @@ +lint: + files_exist: + - CODE_OF_CONDUCT.md + - assets/nf-core-genepal_logo_light.png + - docs/images/nf-core-genepal_logo_light.png + - docs/images/nf-core-genepal_logo_dark.png + - .github/ISSUE_TEMPLATE/config.yml + - .github/workflows/awstest.yml + - .github/workflows/awsfulltest.yml + - conf/igenomes.config + files_unchanged: + - CODE_OF_CONDUCT.md + - assets/nf-core-genepal_logo_light.png + - docs/images/nf-core-genepal_logo_light.png + - docs/images/nf-core-genepal_logo_dark.png + - .github/ISSUE_TEMPLATE/bug_report.yml + multiqc_config: + - report_comment + nextflow_config: + - manifest.name + - manifest.homePage +nf_core_version: 2.14.1 repository_type: pipeline +template: + prefix: PlantandFoodResearch + skip: + - igenomes diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c51dd9..4dc0f1d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,22 +1,13 @@ repos: - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v4.0.0-alpha.8" + rev: "v3.1.0" hooks: - id: prettier additional_dependencies: - prettier@3.2.5 + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: "2.7.3" hooks: - id: editorconfig-checker alias: ec - - repo: local - hooks: - - id: version_checks - name: Version checks - language: system - entry: > - .github/version_checks.sh - always_run: true - fail_fast: true - pass_filenames: false diff --git a/.prettierignore b/.prettierignore index 8d22eff..437d763 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,16 +1,12 @@ -includes/Maven_Pro/ - -# gitignore +email_template.html +adaptivecard.json +slackreport.json .nextflow* work/ +data/ results/ .DS_Store -*.code-workspace -.screenrc -.*.sw? -__pycache__ -*.pyo +testing/ +testing* *.pyc - -*.stdout -*.stderr +bin/ diff --git a/CHANGELOG.md b/CHANGELOG.md index a83f65e..3ca4ebf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,162 +3,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 0.4.0+dev - [19-Aug-2024] +## v1.0dev - [date] -### `Added` - -1. Added `orthofinder_annotations` param -2. Added `FASTA_GFF_ORTHOFINDER` sub-workflow -3. Added evaluation by BUSCO [#41](https://github.com/PlantandFoodResearch/genepal/issues/41) -4. Included common tax ids for eggnog mapper [#27](https://github.com/PlantandFoodResearch/genepal/issues/27) -5. Implemented hierarchical naming scheme: geneI.tJ, geneI.tJ.exonK, geneI.tJ.cdsK [#19](https://github.com/PlantandFoodResearch/genepal/issues/19), [#34](https://github.com/PlantandFoodResearch/genepal/issues/34) -6. Now sorting list of bam and list of fastq before cat to avoid resume cache misses -7. Allowed BAM files for RNA evidence [#3](https://github.com/PlantandFoodResearch/genepal/issues/3) -8. Added `GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES` sub-workflow for splice type statistics [#11](https://github.com/PlantandFoodResearch/genepal/issues/11) -9. Changed `orthofinder_annotations` from FASTA/GFF to protein FASTA [#43](https://github.com/PlantandFoodResearch/genepal/issues/43) -10. Added param `enforce_full_intron_support` to turn on/off strict model purging by TSEBRA [#21](https://github.com/PlantandFoodResearch/genepal/issues/21) -11. Added param `filter_liftoff_by_hints` to evaluate liftoff models with TSEBRA to make sure they have the same level of evidence as BRAKER [#28](ttps://github.com/PlantandFoodResearch/genepal/issues/28) -12. Added a script to automatically check module version updates -13. Updated modules: `AGAT/CONVERTSPGFF2GTF`, `CAT_FASTQ`, `CUSTOM/DUMPSOFTWAREVERSIONS`, `EGGNOGMAPPER`, `FASTP`, `GFFREAD`, `SAMTOOLS/CAT`, `CUSTOM/RESTOREGFFIDS`, `CUSTOM/SHORTENFASTAIDS`, `EDTA/EDTA`, `CAT/CAT`, `FASTQC`, `GUNZIP`, `LIFTOFF`, `STAR/ALIGN`, `STAR/GENOMEGENERATE`, `UMITOOLS/EXTRACT`, -14. Updated sub-workflows: `FASTQ_FASTQC_UMITOOLS_FASTP` and `FASTA_EDTA_LAI` -15. Reduced `BRAKER3` threads to 8 [#55](https://github.com/PlantandFoodResearch/genepal/issues/55) -16. Now the final annotations are stored in the `annotations` folder [#53](https://github.com/PlantandFoodResearch/genepal/issues/53) -17. Added `-gff` flag to `REPEATMASKER` to save the gff file [#54](https://github.com/PlantandFoodResearch/genepal/issues/54) -18. Now a single `fasta` file can be directly specified for `protein_evidence` -19. `eggnogmapper_db_dir` is not a required parameter anymore -20. `eggnogmapper_tax_scope` is now set to 1 (root div) by default -21. Added a `test` profile based on public data - -### `Fixed` - -1. Fixed BRAKER spellings [#36](https://github.com/PlantandFoodResearch/genepal/issues/36) -2. Fixed liftoff failure when lifting off from a single reference [#40](https://github.com/PlantandFoodResearch/genepal/issues/40) -3. Added versions from GFF_STORE sub-workflows [#33](https://github.com/PlantandFoodResearch/genepal/issues/33) - -### `Dependencies` - -1. NextFlow!>=23.04.4 -2. nf-validation=1.1.3 - -### `Deprecated` - -1. Renamed `external_protein_fastas` param to `protein_evidence` -2. Renamed `fastq` param to `rna_evidence` -3. Renamed `braker_allow_isoforms` param to `allow_isoforms` -4. Moved liftoffID from gene level to mRNA/transcript level -5. Moved `version_check.sh` to `.github/version_checks.sh` -6. Removed dependency on for `BRAKER3` and `REPEATMASKER` modules which are now installed from -7. Removed dependency on -8. Now the final annotations are not stored in the `final` folder -9. Now BRAKER3 outputs are not saved by default [#53](https://github.com/PlantandFoodResearch/genepal/issues/53) and saved under `etc` folder when enabled -10. Removed `local` profile. Local executor is the default when no executor is specified. Therefore, the `local` profile was not needed. - -## 0.3.3 - [18-Jun-2024] +Initial release of PlantandFoodResearch/genepal, created with the [nf-core](https://nf-co.re/) template. ### `Added` -1. Added a stub test to evaluate the case where an assembly is soft masked but has no annotations - ### `Fixed` -1. Fixed a bug where `is_masked` was ignored by the pipeline -2. Fixed a bug in param validation which allowed specification of `braker_hints` without `braker_gff3` - -### `Dependencies` - -1. NextFlow!>=23.04.4 -2. nf-validation=1.1.3 - -### `Deprecated` - -## 0.3.2 - [13-May-2024] - -### `Added` - -### `Fixed` - -1. Increased time limit for REPEATMODELER_REPEATMODELER to 5 days -2. Now removing comments from fasta file before feeding it to BRAKER added tests for the perl one liner -3. Fixed CHANGELOG version check failure in `version_check.sh` -4. Increased the SLURM job time limit to 14 days - ### `Dependencies` -1. NextFlow!>=23.04.4 -2. nf-validation=1.1.3 - -### `Deprecated` - -## 0.3.1 - [10-May-2024] - -### `Added` - -### `Fixed` - -1. Increased time limit for REPEATMODELER_REPEATMODELER to 3 days, REPEATMASKER to 2 days, EDTA_EDTA to 7 days, BRAKER3 to 7 days and EGGNOGMAPPER to 1 day - -### `Dependencies` - -1. NextFlow!>=23.04.4 -2. nf-validation=1.1.3 - -### `Deprecated` - -## 0.3.0 - [30-April-2024] - -### `Added` - -1. Added changelog and semantic versioning -2. Changed license to MIT -3. Updated `.editorconfig` -4. Moved .literature to test/ branch -5. Renamed `genepal_local` to `local_genepal` -6. Renamed `genepal_pfr` to `pfr_genepal` -7. Added versioning checking -8. Updated github workflow to use pre-commit instead of prettier and editorconfig check -9. Added central singularity cache dir for pfr config -10. Added `SORTMERNA_INDEX` before `SORTMERNA` -11. Fixed sample contamination bug introduced by `file.simpleName` -12. Now using empty files for stub testing in CI -13. Now BRAKER can be skipped by including BRAKER outputs from previous runs in the `target_assemblies` param -14. Added `gffcompare` to merge liftoff annotations -15. Renamed `samplesheet` param to `fastq` -16. Now using assemblysheet in combination with nf-validation for assembly input -17. Added nextflow_schema.json -18. Now using nf-validation to validate fastqsheet provided by params.fastq -19. Moved `manifest.config` and `reporting_defaults.config` content to `nextflow.config` -20. Now using a txt file for `params.external_protein_fastas` -21. Now using nf-validation for `params.liftoff_annotations` -22. Now using nf-validation for all the parameters -23. Added `PURGE_BRAKER_MODELS` sub-workflow -24. Added `GFF_EGGNOGMAPPER` sub-workflow -25. Now using a custom version of `GFFREAD` which supports `meta` and `fasta` -26. Now using TSEBRA to purge models which do not have full intron support from BRAKER hints -27. Added params `eggnogmapper_evalue` and `eggnogmapper_pident` -28. Added `PURGE_NOHIT_BRAKER_MODELS` sub-workflow -29. Now merging BRAKER and liftoff models before running eggnogmapper -30. Added `GFF_MERGE_CLEANUP` sub-workflow -31. Now using `description` field to store notes and textual annotations in the gff files -32. Now using `mRNA` in place of `transcript` in gff files -33. Now `eggnogmapper_purge_nohits` is set to `false` by default -34. Added `GFF_STORE` sub workflow -35. `external_protein_fastas` and `eggnogmapper_db_dir` are not mandatory parameters -36. Added contributors -37. Add a document for the pipeline parameters -38. Updated `pfr_genepal` and `pfr/profile.config` -39. Now using local tests/stub files for GitHub CI -40. Now removing iso-forms left by TSEBRA using `AGAT_SPFILTERFEATUREFROMKILLLIST` -41. Added `pyproject.toml` -42. Now using PFAMs from eggnog if description is '-' - -### `Fixed` - -1. Removed liftoff models with `valid_ORF=False` -2. Updated license text to include 'Copyright (c) 2024 The New Zealand Institute for Plant and Food Research Limited' - -### `Dependencies` - -1. NextFlow!>=23.04.4 -2. nf-validation=1.1.3 - ### `Deprecated` diff --git a/CITATIONS.md b/CITATIONS.md new file mode 100644 index 0000000..9e64d35 --- /dev/null +++ b/CITATIONS.md @@ -0,0 +1,41 @@ +# PlantandFoodResearch/genepal: Citations + +## [nf-core](https://pubmed.ncbi.nlm.nih.gov/32055031/) + +> Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031. + +## [Nextflow](https://pubmed.ncbi.nlm.nih.gov/28398311/) + +> Di Tommaso P, Chatzou M, Floden EW, Barja PP, Palumbo E, Notredame C. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017 Apr 11;35(4):316-319. doi: 10.1038/nbt.3820. PubMed PMID: 28398311. + +## Pipeline tools + +- [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. + +## Software packaging/containerisation tools + +- [Anaconda](https://anaconda.com) + + > Anaconda Software Distribution. Computer software. Vers. 2-2.4.0. Anaconda, Nov. 2016. Web. + +- [Bioconda](https://pubmed.ncbi.nlm.nih.gov/29967506/) + + > Grüning B, Dale R, Sjödin A, Chapman BA, Rowe J, Tomkins-Tinch CH, Valieris R, Köster J; Bioconda Team. Bioconda: sustainable and comprehensive software distribution for the life sciences. Nat Methods. 2018 Jul;15(7):475-476. doi: 10.1038/s41592-018-0046-7. PubMed PMID: 29967506. + +- [BioContainers](https://pubmed.ncbi.nlm.nih.gov/28379341/) + + > da Veiga Leprevost F, Grüning B, Aflitos SA, Röst HL, Uszkoreit J, Barsnes H, Vaudel M, Moreno P, Gatto L, Weber J, Bai M, Jimenez RC, Sachsenberg T, Pfeuffer J, Alvarez RV, Griss J, Nesvizhskii AI, Perez-Riverol Y. BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics. 2017 Aug 15;33(16):2580-2582. doi: 10.1093/bioinformatics/btx192. PubMed PMID: 28379341; PubMed Central PMCID: PMC5870671. + +- [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/LICENSE b/LICENSE index 2ef2204..9106c5a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 The New Zealand Institute for Plant and Food Research Limited +Copyright (c) Usman Rashid, Jason Shiller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 712a5d1..676f47c 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,87 @@ -# GENEPAL +[![GitHub Actions CI Status](https://github.com/PlantandFoodResearch/genepal/actions/workflows/ci.yml/badge.svg)](https://github.com/PlantandFoodResearch/genepal/actions/workflows/ci.yml) +[![GitHub Actions Linting Status](https://github.com/PlantandFoodResearch/genepal/actions/workflows/linting.yml/badge.svg)](https://github.com/PlantandFoodResearch/genepal/actions/workflows/linting.yml)[![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) -[![Lint/stub on Linux/Docker](https://github.com/PlantandFoodResearch/genepal/actions/workflows/test.yml/badge.svg)](https://github.com/PlantandFoodResearch/genepal/actions/workflows/test.yml) +[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/) +[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) +[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) +[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) +[![Launch on 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/PlantandFoodResearch/genepal) -A NextFlow pipeline for single genome and pan-genome annotation. +## Introduction -## Flowchart +**PlantandFoodResearch/genepal** is a bioinformatics pipeline that ... -

+ -## Alpha Release + + -This release is not fully documented and under alpha testing by the Bioinformatics Team. There are several [outstanding issues](https://github.com/PlantandFoodResearch/genepal/issues) which will be addressed before a general release. +1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)) +2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)) -## Plant&Food Users +## Usage -Download the pipeline to your `/workspace/$USER` folder. Change the parameters defined in the [pfr/params.json](./pfr/params.json) file. Submit the pipeline to SLURM for execution. For a description of the parameters, see [parameters.md](./docs/parameters.md). +> [!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. + + + +Now, you can run the pipeline using: + + ```bash -sbatch ./pfr_genepal +nextflow run PlantandFoodResearch/genepal \ + -profile \ + --input samplesheet.csv \ + --outdir ``` +> [!WARNING] +> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; +> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files). + ## Credits -plantandfoodresearch/genepal workflows were originally scripted by Jason Shiller ([@jasonshiller](https://github.com/jasonshiller)). Usman Rashid ([@gallvp](https://github.com/gallvp)) wrote the NextFLow pipeline. +PlantandFoodResearch/genepal was originally written by Usman Rashid, Jason Shiller. We thank the following people for their extensive assistance in the development of this pipeline: -- Cecilia Deng [@CeciliaDeng](https://github.com/CeciliaDeng) -- Charles David [@charlesdavid](https://github.com/charlesdavid) -- Chen Wu [@christinawu2008](https://github.com/christinawu2008) -- Leonardo Salgado [@leorippel](https://github.com/leorippel) -- Ross Crowhurst [@rosscrowhurst](https://github.com/rosscrowhurst) -- Susan Thomson [@cflsjt](https://github.com/cflsjt) -- Ting-Hsuan Chen [@ting-hsuan-chen](https://github.com/ting-hsuan-chen) - -The pipeline uses nf-core modules contributed by following authors: - - - - - - - - - - - - - - - - - - - - - - - - - + + +## Contributions and Support + +If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md). ## Citations + + + + + +An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file. + This pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE). > **The nf-core framework for community-curated bioinformatics pipelines.** diff --git a/assets/adaptivecard.json b/assets/adaptivecard.json new file mode 100644 index 0000000..b356d9d --- /dev/null +++ b/assets/adaptivecard.json @@ -0,0 +1,67 @@ +{ + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.adaptive", + "contentUrl": null, + "content": { + "\$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "msteams": { + "width": "Full" + }, + "type": "AdaptiveCard", + "version": "1.2", + "body": [ + { + "type": "TextBlock", + "size": "Large", + "weight": "Bolder", + "color": "<% if (success) { %>Good<% } else { %>Attention<%} %>", + "text": "PlantandFoodResearch/genepal v${version} - ${runName}", + "wrap": true + }, + { + "type": "TextBlock", + "spacing": "None", + "text": "Completed at ${dateComplete} (duration: ${duration})", + "isSubtle": true, + "wrap": true + }, + { + "type": "TextBlock", + "text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors. The full error message was: ${errorReport}.<% } %>", + "wrap": true + }, + { + "type": "TextBlock", + "text": "The command used to launch the workflow was as follows:", + "wrap": true + }, + { + "type": "TextBlock", + "text": "${commandLine}", + "isSubtle": true, + "wrap": true + } + ], + "actions": [ + { + "type": "Action.ShowCard", + "title": "Pipeline Configuration", + "card": { + "type": "AdaptiveCard", + "\$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "body": [ + { + "type": "FactSet", + "facts": [<% out << summary.collect{ k,v -> "{\"title\": \"$k\", \"value\" : \"$v\"}"}.join(",\n") %> + ] + } + ] + } + } + ] + } + } + ] +} diff --git a/assets/email_template.html b/assets/email_template.html new file mode 100644 index 0000000..aa507c5 --- /dev/null +++ b/assets/email_template.html @@ -0,0 +1,53 @@ + + + + + + + + PlantandFoodResearch/genepal Pipeline Report + + +
+ + + +

PlantandFoodResearch/genepal ${version}

+

Run Name: $runName

+ +<% if (!success){ + out << """ +
+

PlantandFoodResearch/genepal execution completed unsuccessfully!

+

The exit status of the task that caused the workflow execution to fail was: $exitStatus.

+

The full error message was:

+
${errorReport}
+
+ """ +} else { + out << """ +
+ PlantandFoodResearch/genepal execution completed successfully! +
+ """ +} +%> + +

The workflow was completed at $dateComplete (duration: $duration)

+

The command used to launch the workflow was as follows:

+
$commandLine
+ +

Pipeline Configuration:

+ + + <% out << summary.collect{ k,v -> "" }.join("\n") %> + +
$k
$v
+ +

PlantandFoodResearch/genepal

+

https://github.com/PlantandFoodResearch/genepal

+ +
+ + + diff --git a/assets/email_template.txt b/assets/email_template.txt new file mode 100644 index 0000000..735bcac --- /dev/null +++ b/assets/email_template.txt @@ -0,0 +1,31 @@ +Run Name: $runName + +<% if (success){ + out << "## PlantandFoodResearch/genepal execution completed successfully! ##" +} else { + out << """#################################################### +## PlantandFoodResearch/genepal execution completed unsuccessfully! ## +#################################################### +The exit status of the task that caused the workflow execution to fail was: $exitStatus. +The full error message was: + +${errorReport} +""" +} %> + + +The workflow was completed at $dateComplete (duration: $duration) + +The command used to launch the workflow was as follows: + + $commandLine + + + +Pipeline Configuration: +----------------------- +<% out << summary.collect{ k,v -> " - $k: $v" }.join("\n") %> + +-- +PlantandFoodResearch/genepal +https://github.com/PlantandFoodResearch/genepal diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml new file mode 100644 index 0000000..a456ef1 --- /dev/null +++ b/assets/methods_description_template.yml @@ -0,0 +1,29 @@ +id: "PlantandFoodResearch-genepal-methods-description" +description: "Suggested text and references to use when describing pipeline usage within the methods section of a publication." +section_name: "PlantandFoodResearch/genepal Methods Description" +section_href: "https://github.com/PlantandFoodResearch/genepal" +plot_type: "html" +## 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 PlantandFoodResearch/genepal 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. 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:
+
    + ${nodoi_text} +
  • The command above does not include parameters contained in any configs or profiles that may have been used. Ensure the config file is also uploaded with your publication!
  • +
  • You should also cite all software used within this run. Check the "Software Versions" of this report to get version information.
  • +
+
diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml new file mode 100644 index 0000000..6165596 --- /dev/null +++ b/assets/multiqc_config.yml @@ -0,0 +1,14 @@ +report_comment: > + This report has been generated by the PlantandFoodResearch/genepal + analysis pipeline. +report_section_order: + "PlantandFoodResearch-genepal-methods-description": + order: -1000 + software_versions: + order: -1001 + "PlantandFoodResearch-genepal-summary": + order: -1002 + +export_plots: true + +disable_version_detection: true diff --git a/assets/rrna-db-defaults.txt b/assets/rrna-db-defaults.txt deleted file mode 100644 index 4223356..0000000 --- a/assets/rrna-db-defaults.txt +++ /dev/null @@ -1,8 +0,0 @@ -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/rfam-5.8s-database-id98.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/rfam-5s-database-id98.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-arc-16s-id95.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-arc-23s-id98.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-bac-16s-id90.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-bac-23s-id98.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-euk-18s-id95.fasta -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-euk-28s-id98.fasta diff --git a/assets/rrna-db-test.txt b/assets/rrna-db-test.txt deleted file mode 100644 index 20116f9..0000000 --- a/assets/rrna-db-test.txt +++ /dev/null @@ -1 +0,0 @@ -https://raw.githubusercontent.com/biocore/sortmerna/v4.3.4/data/rRNA_databases/silva-euk-28s-id98.fasta diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv new file mode 100644 index 0000000..5f653ab --- /dev/null +++ b/assets/samplesheet.csv @@ -0,0 +1,3 @@ +sample,fastq_1,fastq_2 +SAMPLE_PAIRED_END,/path/to/fastq/files/AEG588A1_S1_L002_R1_001.fastq.gz,/path/to/fastq/files/AEG588A1_S1_L002_R2_001.fastq.gz +SAMPLE_SINGLE_END,/path/to/fastq/files/AEG588A4_S4_L003_R1_001.fastq.gz, diff --git a/assets/schema_input.json b/assets/schema_input.json index 1da6b87..34b65a4 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -1,70 +1,33 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/plantandfoodresearch/genepal/master/assets/schema_input.json", - "title": "plantandfoodresearch/genepal pipeline - params.input schema", + "$id": "https://raw.githubusercontent.com/PlantandFoodResearch/genepal/master/assets/schema_input.json", + "title": "PlantandFoodResearch/genepal pipeline - params.input schema", "description": "Schema for the file provided with params.input", "type": "array", "items": { "type": "object", "properties": { - "tag": { + "sample": { "type": "string", - "pattern": "^\\w+$", - "errorMessage": "Assembly tags must be provided and can only contain alphanumeric characters including '_'", - "unique": true + "pattern": "^\\S+$", + "errorMessage": "Sample name must be provided and cannot contain spaces", + "meta": ["id"] }, - "fasta": { + "fastq_1": { "type": "string", - "pattern": "^\\S+\\.f(a|asta|as|sa|na)(\\.gz)?$", - "errorMessage": "FASTA file path cannot contain spaces and must have extension '.f(a|asta|as|sa|na)' or '.f(a|asta|as|sa|na).gz'" + "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'" }, - "is_masked": { + "fastq_2": { "type": "string", - "pattern": "^(yes|no)$", - "errorMessage": "Masking information must be provided as 'yes' or 'no'" - }, - "te_lib": { - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.f(a|asta|as|sa|na)(\\.gz)?$" - }, - { - "type": "string", - "maxLength": 0 - } - ], - "errorMessage": "TE library FASTA file path cannot contain spaces and must have extension '.f(a|asta|as|sa|na)' or '.f(a|asta|as|sa|na).gz'" - }, - "braker_gff3": { - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.gff(3)?(\\.gz)?$" - }, - { - "type": "string", - "maxLength": 0 - } - ], - "errorMessage": "BRAKER GFF3 file path cannot contain spaces and must have extension '.gff.gz', '.gff3.gz', '.gff' or '.gff3'", - "dependentRequired": ["braker_hints"] - }, - "braker_hints": { - "anyOf": [ - { - "type": "string", - "pattern": "^\\S+\\.gff(3)?(\\.gz)?$" - }, - { - "type": "string", - "maxLength": 0 - } - ], - "errorMessage": "BRAKER hints GFF/GFF3 file path cannot contain spaces and must have extension '.gff.gz', '.gff3.gz', '.gff' or '.gff3'", - "dependentRequired": ["braker_gff3"] + "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'" } }, - "required": ["tag", "fasta", "is_masked"] + "required": ["sample", "fastq_1"] } } diff --git a/assets/schema_liftoff.json b/assets/schema_liftoff.json deleted file mode 100644 index fc7046f..0000000 --- a/assets/schema_liftoff.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/plantandfoodresearch/genepal/master/assets/schema_liftoff.json", - "title": "plantandfoodresearch/genepal pipeline - params.liftoff_annotations schema", - "description": "Schema for the file provided with params.liftoff_annotations", - "type": "array", - "items": { - "type": "object", - "properties": { - "fasta": { - "type": "string", - "pattern": "^\\S+\\.f(a|asta|as|sa|na)(\\.gz)?$", - "errorMessage": "FASTA file path cannot contain spaces and must have extension '.f(a|asta|as|sa|na)' or '.f(a|asta|as|sa|na).gz'", - "unique": true - }, - "gff3": { - "type": "string", - "pattern": "^\\S+\\.gff(3)?(\\.gz)?$", - "errorMessage": "Annotation GFF3 file path cannot contain spaces and must have extension '.gff.gz', '.gff3.gz', '.gff' or '.gff3'", - "unique": true - } - }, - "required": ["fasta", "gff3"] - } -} diff --git a/assets/schema_orthofinder.json b/assets/schema_orthofinder.json deleted file mode 100644 index 68486bd..0000000 --- a/assets/schema_orthofinder.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/plantandfoodresearch/genepal/master/assets/schema_orthofinder.json", - "title": "plantandfoodresearch/genepal pipeline - params.orthofinder_annotations schema", - "description": "Schema for the file provided with params.orthofinder_annotations", - "type": "array", - "items": { - "type": "object", - "properties": { - "tag": { - "type": "string", - "pattern": "^\\w+$", - "errorMessage": "Annotation tags must be provided and can only contain alphanumeric characters including '_'", - "unique": true - }, - "fasta": { - "type": "string", - "pattern": "^\\S+\\.(fa|fas|pep|faa|fasta)(\\.gz)?$", - "errorMessage": "Proteins FASTA file path cannot contain spaces and must have extension '.(fa|fas|pep|faa|fasta)' or '.(fa|fas|pep|faa|fasta).gz'. Orthofinder does not allow 'fna' extension", - "unique": true - } - }, - "required": ["tag", "fasta"] - } -} diff --git a/assets/schema_rna.json b/assets/schema_rna.json deleted file mode 100644 index 89c646d..0000000 --- a/assets/schema_rna.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/plantandfoodresearch/genepal/master/assets/schema_rna.json", - "title": "plantandfoodresearch/genepal pipeline - params.rna_evidence schema", - "description": "Schema for the file provided with params.rna_evidence", - "type": "array", - "items": { - "type": "object", - "properties": { - "sample": { - "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Sample name must be provided and cannot contain spaces", - "meta": ["id"] - }, - "file_1": { - "type": "string", - "pattern": "^\\S+\\.(f(ast)?q\\.gz|bam)$", - "errorMessage": "FASTQ file for reads 1 or BAM file containing mapped reads must be provided, cannot contain spaces and must have extension '.fq.gz', '.fastq.gz' or '.bam'", - "unique": true - }, - "file_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 - } - ], - "dependentRequired": ["file_1"], - "unique": true - }, - "target_assemblies": { - "type": "string", - "pattern": "^(\\w+;)*\\w+$", - "errorMessage": "One or more target assemblies must be specified by their tags from params.input sheet. Multiple tags should be separated by ';'", - "meta": ["target_assemblies"] - } - }, - "required": ["sample", "file_1", "target_assemblies"] - } -} diff --git a/assets/sendmail_template.txt b/assets/sendmail_template.txt new file mode 100644 index 0000000..402fcfb --- /dev/null +++ b/assets/sendmail_template.txt @@ -0,0 +1,53 @@ +To: $email +Subject: $subject +Mime-Version: 1.0 +Content-Type: multipart/related;boundary="nfcoremimeboundary" + +--nfcoremimeboundary +Content-Type: text/html; charset=utf-8 + +$email_html + +--nfcoremimeboundary +Content-Type: image/png;name="PlantandFoodResearch-genepal_logo.png" +Content-Transfer-Encoding: base64 +Content-ID: +Content-Disposition: inline; filename="PlantandFoodResearch-genepal_logo_light.png" + +<% out << new File("$projectDir/assets/PlantandFoodResearch-genepal_logo_light.png"). + bytes. + encodeBase64(). + toString(). + tokenize( '\n' )*. + toList()*. + collate( 76 )*. + collect { it.join() }. + flatten(). + join( '\n' ) %> + +<% +if (mqcFile){ +def mqcFileObj = new File("$mqcFile") +if (mqcFileObj.length() < mqcMaxSize){ +out << """ +--nfcoremimeboundary +Content-Type: text/html; name=\"multiqc_report\" +Content-Transfer-Encoding: base64 +Content-ID: +Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\" + +${mqcFileObj. + bytes. + encodeBase64(). + toString(). + tokenize( '\n' )*. + toList()*. + collate( 76 )*. + collect { it.join() }. + flatten(). + join( '\n' )} +""" +}} +%> + +--nfcoremimeboundary-- diff --git a/assets/slackreport.json b/assets/slackreport.json new file mode 100644 index 0000000..00aa237 --- /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": "PlantandFoodResearch/genepal ${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/assets/tsebra-template.cfg b/assets/tsebra-template.cfg deleted file mode 100644 index fa06c50..0000000 --- a/assets/tsebra-template.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# Weight for each hint source -# Values have to be >= 0 -P 1 -E 20 -C 1 -M 1 -# Required fraction of supported introns or supported start/stop-codons for a transcript -# Values have to be in [0,1] -intron_support PARAM_INTRON_SUPPORT -stasto_support 2 -# Allowed difference for each feature -# Values have to be in [0,1] -e_1 PARAM_E1 -e_2 PARAM_E2 -e_3 PARAM_E3 -e_4 PARAM_E4 diff --git a/cleanNXF.sh b/cleanNXF.sh deleted file mode 100755 index 8c64a3e..0000000 --- a/cleanNXF.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -rm -rf .nextflow* -echo "Cleaned .nextflow..." -rm -rf .nextflow.pid -echo "Cleaned .nextflow.pid..." -for i in $(ls work | grep -v "conda"); -do - rm -rf "work/$i" -done -echo "Cleaned work..." diff --git a/conf/base.config b/conf/base.config index bfc2d88..f7e395a 100644 --- a/conf/base.config +++ b/conf/base.config @@ -1,88 +1,62 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + PlantandFoodResearch/genepal Nextflow base config file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + A 'blank slate' config file, appropriate for general use on most high performance + compute environments. Assumes that all software is installed and available on + the PATH. Runs in `local` mode - all jobs will be run on the logged in environment. +---------------------------------------------------------------------------------------- +*/ + process { - cpus = { check_max( 1 * task.attempt, 'cpus' ) } - memory = { check_max( 6.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + // TODO nf-core: Check the defaults for all processes + cpus = { check_max( 1 * task.attempt, 'cpus' ) } + memory = { check_max( 6.GB * task.attempt, 'memory' ) } + time = { check_max( 4.h * task.attempt, 'time' ) } - errorStrategy = { task.exitStatus in [140,143,137,104,134,139] ? 'retry' : 'finish' } - maxRetries = 1 - maxErrors = '-1' + 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. + // These labels are used and recognised by default in DSL2 files hosted on nf-core/modules. + // If possible, it would be nice to keep the same label naming convention when + // adding in your local modules too. + // 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( 6.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + cpus = { check_max( 1 , 'cpus' ) } + memory = { check_max( 6.GB * task.attempt, 'memory' ) } + time = { check_max( 4.h * task.attempt, 'time' ) } } withLabel:process_low { - cpus = { check_max( 2 * task.attempt, 'cpus' ) } - memory = { check_max( 12.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + cpus = { check_max( 2 * task.attempt, 'cpus' ) } + memory = { check_max( 12.GB * task.attempt, 'memory' ) } + time = { check_max( 4.h * task.attempt, 'time' ) } } withLabel:process_medium { - cpus = { check_max( 6 * task.attempt, 'cpus' ) } - memory = { check_max( 36.GB * task.attempt, 'memory' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } + cpus = { check_max( 6 * task.attempt, 'cpus' ) } + memory = { check_max( 36.GB * task.attempt, 'memory' ) } + time = { check_max( 8.h * task.attempt, 'time' ) } } withLabel:process_high { - cpus = { check_max( 12 * task.attempt, 'cpus' ) } - memory = { check_max( 72.GB * task.attempt, 'memory' ) } - time = { check_max( 16.h * task.attempt, 'time' ) } + cpus = { check_max( 12 * task.attempt, 'cpus' ) } + memory = { check_max( 72.GB * task.attempt, 'memory' ) } + time = { check_max( 16.h * task.attempt, 'time' ) } } withLabel:process_long { - time = { check_max( 20.h * task.attempt, 'time' ) } + time = { check_max( 20.h * task.attempt, 'time' ) } } withLabel:process_high_memory { - memory = { check_max( 200.GB * task.attempt, 'memory' ) } - } - - withName:EGGNOGMAPPER { - time = { check_max( 1.day * task.attempt, 'time' ) } - } - withName:REPEATMASKER_REPEATMASKER { - time = { check_max( 2.days * task.attempt, 'time' ) } - } - withName:REPEATMODELER_REPEATMODELER { - time = { check_max( 5.days * task.attempt, 'time' ) } + memory = { check_max( 200.GB * task.attempt, 'memory' ) } } - withName:EDTA_EDTA { - time = { check_max( 7.days * task.attempt, 'time' ) } + withLabel:error_ignore { + errorStrategy = 'ignore' } - withName:BRAKER3 { - cpus = { check_max( 8 * task.attempt, 'cpus' ) } - time = { check_max( 7.days * task.attempt, 'time' ) } - } - withName:CUSTOM_DUMPSOFTWAREVERSIONS { - cache = false - } -} - -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 - } + withLabel:error_retry { + errorStrategy = 'retry' + maxRetries = 2 } } diff --git a/conf/modules.config b/conf/modules.config index 1f9f08b..d203d2b 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1,352 +1,34 @@ -process { // SUBWORKFLOW: PREPARE_ASSEMBLY - withName: '.*:PREPARE_ASSEMBLY:FASTA_EDTA_LAI:EDTA_EDTA' { - ext.args = [ - params.edta_is_sensitive ? "--sensitive 1" : "--sensitive 0", - "--anno 0", - "--force 1" - ].join(' ').trim() +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Config file for defining DSL2 per module options and publishing paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Available keys to override module options: + ext.args = Additional arguments appended to command in module. + ext.args2 = Second set of arguments appended to command in module (multi-tool modules). + ext.args3 = Third set of arguments appended to command in module (multi-tool modules). + ext.prefix = File name prefix for output files. +---------------------------------------------------------------------------------------- +*/ - publishDir = [ - path: { "${params.outdir}/edta" }, - mode: "copy", - pattern: '*.EDTA.TElib.fa', - enabled: params.save_annotated_te_lib - ] - } - - withName: '.*:PREPARE_ASSEMBLY:REPEATMODELER_REPEATMODELER' { - ext.args = '-LTRStruct' - - publishDir = [ - path: { "${params.outdir}/repeatmodeler" }, - mode: "copy", - pattern: '*.fa', - enabled: params.save_annotated_te_lib - ] - } - - withName: '.*:PREPARE_ASSEMBLY:REPEATMASKER_REPEATMASKER' { - ext.args = [ - "-no_is", - "-xsmall", - "-gff", - ].join(' ').trim() - - publishDir = [ - path: { "${params.outdir}/repeatmasker" }, - mode: "copy", - saveAs: { filename -> filename.equals("versions.yml") ? null : filename }, - enabled: params.repeatmasker_save_outputs - ] - } -} - -process { // SUBWORKFLOW: PREPROCESS_RNASEQ - if(!params.skip_fastqc) { - withName: '.*:PREPROCESS_RNASEQ:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { - ext.args = '--quiet' - } - - withName: '.*:PREPROCESS_RNASEQ:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { - ext.args = '--quiet' - publishDir = [ - path: { "${params.outdir}/fastp/fastqc" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] - } - } - - if(!params.skip_fastp) { - withName: '.*:PREPROCESS_RNASEQ:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { - ext.args = params.extra_fastp_args ?: '' - publishDir = [ - [ - path: { "${params.outdir}/fastp/html" }, - mode: "copy", - pattern: "*.{html}" - ], - [ - path: { "${params.outdir}/fastp/json" }, - mode: "copy", - pattern: "*.{json}" - ], - [ - path: { "${params.outdir}/fastp/log" }, - mode: "copy", - pattern: "*.log" - ], - [ - path: { "${params.outdir}/fastp" }, - mode: "copy", - pattern: "*.fastq.gz", - enabled: params.save_trimmed - ] - ] - } - } - - if (params.remove_ribo_rna) { - withName: '.*:PREPROCESS_RNASEQ:SORTMERNA_INDEX' { - ext.args = '--index 1' - } - - withName: '.*:PREPROCESS_RNASEQ:SORTMERNA_READS' { - ext.args = '--index 0 --num_alignments 1 -v' - publishDir = [ - [ - path: { "${params.outdir}/sortmerna" }, - mode: "copy", - pattern: "*.log" - ], - [ - path: { "${params.outdir}/sortmerna" }, - mode: "copy", - pattern: "*.fastq.gz", - enabled: params.save_non_ribo_reads - ] - ] - } - } -} - -process { // SUBWORKFLOW: ALIGN_RNASEQ - withName: '.*:ALIGN_RNASEQ:STAR_ALIGN' { - ext.args = [ - "--outSAMstrandField intronMotif", - "--outSAMtype BAM SortedByCoordinate", - "--readFilesCommand gunzip -c", - "--alignIntronMax ${params.star_max_intron_length}", - params.star_align_extra_args ? params.star_align_extra_args.split("\\s(?=--)") : '' - ].flatten().unique(false).join(' ').trim() - ext.prefix = { "${meta.id}" } - publishDir = [ - path: { "${params.outdir}/star/alignment" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - enabled: params.star_save_outputs - ] - } - - withName: '.*:ALIGN_RNASEQ:SAMTOOLS_CAT' { - publishDir = [ - path: { "${params.outdir}/star/cat_bam" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - enabled: params.save_cat_bam - ] - } -} - -process { // SUBWORKFLOW: FASTA_BRAKER3 - withName: '.*:FASTA_BRAKER3:BRAKER3' { - ext.args = [ - "--gff3", - params.braker_extra_args ? params.braker_extra_args.split("\\s(?=--)") : '' - ].flatten().unique(false).join(' ').trim() - ext.prefix = { "${meta.id}" } - publishDir = [ - path: { "${params.outdir}/etc/braker/" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - enabled: params.braker_save_outputs - ] - } -} - -process { // SUBWORKFLOW: FASTA_LIFTOFF - withName: '.*:FASTA_LIFTOFF:LIFTOFF' { - ext.args = [ - '-exclude_partial', - '-copies', - '-polish', - "-a $params.liftoff_coverage", - "-s $params.liftoff_identity" - ].join(' ').trim() - } - - withName: '.*:FASTA_LIFTOFF:GFFREAD_BEFORE_LIFTOFF' { - ext.args = '--no-pseudo --keep-genes' - } - - withName: '.*:FASTA_LIFTOFF:MERGE_LIFTOFF_ANNOTATIONS' { - ext.prefix = { "${meta.id}.merged.liftoffs" } - } - - withName: '.*:FASTA_LIFTOFF:AGAT_SPFILTERFEATUREFROMKILLLIST' { - ext.prefix = { "${meta.id}.invalid.orf.purged" } - } - - withName: '.*:FASTA_LIFTOFF:GFFREAD_AFTER_LIFTOFF' { - ext.prefix = { "${meta.id}.liftoff" } - ext.args = '--keep-genes' - } - - withName: '.*:FASTA_LIFTOFF:GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST:AGAT_CONVERTSPGFF2GTF' { - ext.args = '--gtf_version relax' - } - - withName: '.*:FASTA_LIFTOFF:GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST:KILL_TSEBRA_ISOFORMS' { - ext.prefix = { "${meta.id}.liftoff.1form" } - } -} - -process { // SUBWORKFLOW: PURGE_BRAKER_MODELS - - withName: '.*:PURGE_BRAKER_MODELS:GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST:AGAT_CONVERTSPGFF2GTF' { - ext.args = '--gtf_version relax' - } - - withName: '.*:PURGE_BRAKER_MODELS:GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST:KILL_TSEBRA_ISOFORMS' { - ext.prefix = { "${meta.id}.1form" } - } -} +process { -process { // SUBWORKFLOW: GFF_MERGE_CLEANUP - withName: '.*:GFF_MERGE_CLEANUP:AGAT_SPMERGEANNOTATIONS' { - ext.prefix = { "${meta.id}.liftoff.braker" } - } - - withName: '.*:GFF_MERGE_CLEANUP:GT_GFF3' { - ext.args = '-tidy -retainids -sort' - } -} - -process { // SUBWORKFLOW: GFF_EGGNOGMAPPER - withName: '.*:GFF_EGGNOGMAPPER:GFF2FASTA_FOR_EGGNOGMAPPER' { - ext.args = '-y' - } - - withName: '.*:GFF_EGGNOGMAPPER:EGGNOGMAPPER' { - ext.args = [ - "--evalue $params.eggnogmapper_evalue", - "--pident $params.eggnogmapper_pident", - params.eggnogmapper_tax_scope ? "--tax_scope $params.eggnogmapper_tax_scope" : '', - '--mp_start_method fork', - "--itype proteins", - '--go_evidence all' - ].join(' ').trim() - - publishDir = [ - path: { "${params.outdir}/annotations/$meta.id" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] - } -} - -process { // SUBWORKFLOW: PURGE_NOHIT_MODELS - withName: '.*:PURGE_NOHIT_MODELS:AGAT_SPFILTERFEATUREFROMKILLLIST' { - ext.prefix = { "${meta.id}.nohits.purged" } - } -} - -process { // SUBWORKFLOW: GFF_STORE - withName: '.*:GFF_STORE:FINAL_GFF_CHECK' { - ext.args = '-tidy -retainids -sort' - - publishDir = [ - path: { "${params.outdir}/annotations/$meta.id" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] - } - - withName: '.*:GFF_STORE:EXTRACT_PROTEINS' { - ext.args = '-y' - ext.prefix = { "${meta.id}.pep" } - - publishDir = [ - path: { "${params.outdir}/annotations/$meta.id" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] - } -} - -process { // SUBWORKFLOW: FASTA_ORTHOFINDER - withName: '.*:FASTA_ORTHOFINDER:FASTA_GUNZIP:GUNZIP' { - ext.prefix = { "${meta.id}.pep" } - } - - withName: '.*:FASTA_ORTHOFINDER:ORTHOFINDER' { - publishDir = [ - path: { "${params.outdir}/orthofinder" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] - } -} + publishDir = [ + path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] -process { // SUBWORKFLOW: FASTA_GXF_BUSCO_PLOT - withName: '.*:FASTA_GXF_BUSCO_PLOT:BUSCO_ASSEMBLY' { - ext.args = '--metaeuk' - publishDir = [ - path: { "${params.outdir}/busco/fasta" }, - mode: "copy", - pattern: 'short_summary.*.txt', - saveAs: { filename -> "short_summary.specific.${meta.id}.${lineage}.txt" } - ] + withName: FASTQC { + ext.args = '--quiet' } - withName: '.*:FASTA_GXF_BUSCO_PLOT:PLOT_ASSEMBLY' { - ext.prefix = 'busco_figure' + withName: 'MULTIQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } publishDir = [ - path: { "${params.outdir}/busco/fasta" }, - mode: "copy", - saveAs: { filename -> filename.equals("versions.yml") ? null : filename } + path: { "${params.outdir}/multiqc" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } - withName: '.*:FASTA_GXF_BUSCO_PLOT:EXTRACT_PROTEINS' { - ext.args = '-y' - } - - withName: '.*:FASTA_GXF_BUSCO_PLOT:BUSCO_ANNOTATION' { - ext.args = '--metaeuk' - publishDir = [ - path: { "${params.outdir}/busco/gff" }, - mode: "copy", - pattern: 'short_summary.*.txt', - saveAs: { filename -> "short_summary.specific.${meta.id}.${lineage}.txt" } - ] - } - - withName: '.*:FASTA_GXF_BUSCO_PLOT:PLOT_ANNOTATION' { - ext.prefix = 'busco_figure' - publishDir = [ - path: { "${params.outdir}/busco/gff" }, - mode: "copy", - saveAs: { filename -> filename.equals("versions.yml") ? null : filename } - ] - } -} - -process { // SUBWORKFLOW: GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES - withName: '.*:GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES:AGAT_SPEXTRACTSEQUENCES' { - ext.args = '-t intron' - } -} - -process { // Universal - withName: AGAT_SPFILTERFEATUREFROMKILLLIST { - ext.prefix = { "${meta.id}.purged" } - } - - withName: SAVE_MARKED_GFF3 { - publishDir = [ - path: { "${params.outdir}/etc/splicing_marked" }, - mode: "copy", - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] - } - - withName: CUSTOM_DUMPSOFTWAREVERSIONS { - publishDir = [ - path: "$params.outdir/pipeline_info", - pattern: "software_versions.yml", - mode: "copy", - enabled: true - ] - } } diff --git a/conf/test.config b/conf/test.config index 98293d9..2c4fabb 100644 --- a/conf/test.config +++ b/conf/test.config @@ -1,7 +1,28 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 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 PlantandFoodResearch/genepal -profile test, --outdir + +---------------------------------------------------------------------------------------- +*/ + params { - input = "${projectDir}/tests/minimal/assemblysheet.csv" - protein_evidence = 'https://raw.githubusercontent.com/Gaius-Augustus/BRAKER/f58479fe5bb13a9e51c3ca09cb9e137cab3b8471/example/proteins.fa' + config_profile_name = 'Test profile' + config_profile_description = 'Minimal test dataset to check pipeline function' + + // Limit resources so that this can run on GitHub Actions + max_cpus = 2 + max_memory = '6.GB' + max_time = '6.h' + + // 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' - braker_extra_args = '--gm_max_intergenic 10000 --skipOptimize' // Added for faster test execution! Do not use with actual data! - busco_lineage_datasets = 'eudicots_odb10' + } diff --git a/conf/test_full.config b/conf/test_full.config new file mode 100644 index 0000000..1df9d55 --- /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 PlantandFoodResearch/genepal -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' + + // Fasta references + fasta = params.pipelines_testdata_base_path + 'viralrecon/genome/NC_045512.2/GCF_009858895.2_ASM985889v3_genomic.200409.fna.gz' +} diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..5114ee0 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +# PlantandFoodResearch/genepal: Documentation + +The PlantandFoodResearch/genepal documentation is split into the following pages: + +- [Usage](usage.md) + - An overview of how the pipeline works, how to run it and a description of all of the different command-line flags. +- [Output](output.md) + - An overview of the different results produced by the pipeline and how to interpret them. diff --git a/docs/images/mqc_fastqc_adapter.png b/docs/images/mqc_fastqc_adapter.png new file mode 100755 index 0000000..361d0e4 Binary files /dev/null and b/docs/images/mqc_fastqc_adapter.png differ diff --git a/docs/images/mqc_fastqc_counts.png b/docs/images/mqc_fastqc_counts.png new file mode 100755 index 0000000..cb39ebb Binary files /dev/null and b/docs/images/mqc_fastqc_counts.png differ diff --git a/docs/images/mqc_fastqc_quality.png b/docs/images/mqc_fastqc_quality.png new file mode 100755 index 0000000..a4b89bf Binary files /dev/null and b/docs/images/mqc_fastqc_quality.png differ diff --git a/docs/img/genepal.drawio b/docs/img/genepal.drawio deleted file mode 100644 index 38446e4..0000000 --- a/docs/img/genepal.drawio +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/img/genepal.png b/docs/img/genepal.png deleted file mode 100644 index 679f214..0000000 Binary files a/docs/img/genepal.png and /dev/null differ diff --git a/docs/output.md b/docs/output.md new file mode 100644 index 0000000..0e53212 --- /dev/null +++ b/docs/output.md @@ -0,0 +1,71 @@ +# PlantandFoodResearch/genepal: Output + +## Introduction + +This document describes the output produced by the pipeline. Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline. + +The directories listed below will be created in the results directory after the pipeline has finished. All paths are relative to the top-level results directory. + + + +## Pipeline overview + +The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes data using the following steps: + +- [FastQC](#fastqc) - Raw read QC +- [MultiQC](#multiqc) - Aggregate report describing results and QC from the whole pipeline +- [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution + +### FastQC + +
+Output files + +- `fastqc/` + - `*_fastqc.html`: FastQC report containing quality metrics. + - `*_fastqc.zip`: Zip archive containing the FastQC report, tab-delimited data file and plot images. + +
+ +[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) + +:::note +The FastQC plots displayed in the MultiQC report shows _untrimmed_ reads. They may contain adapter sequence and potentially regions with low quality. +::: + +### MultiQC + +
+Output files + +- `multiqc/` + - `multiqc_report.html`: a standalone HTML file that can be viewed in your web browser. + - `multiqc_data/`: directory containing parsed statistics from the different tools used in the pipeline. + - `multiqc_plots/`: directory containing static images from the report in various formats. + +
+ +[MultiQC](http://multiqc.info) is a visualization tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in the report data directory. + +Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see . + +### Pipeline information + +
+Output files + +- `pipeline_info/` + - 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`. + +
+ +[Nextflow](https://www.nextflow.io/docs/latest/tracing.html) provides excellent functionality for generating various reports relevant to the running and execution of the pipeline. This will allow you to troubleshoot errors with the running of the pipeline, and also provide you with other information such as launch commands, run times and resource usage. diff --git a/docs/parameters.md b/docs/parameters.md deleted file mode 100644 index a4638c5..0000000 --- a/docs/parameters.md +++ /dev/null @@ -1,86 +0,0 @@ -# plantandfoodresearch/genepal pipeline parameters - -A NextFlow pipeline for single genome and pan-genome annotation - -## Input/output options - -| Parameter | Description | Type | Default | Required | Hidden | -| ------------------------- | -------------------------------------------------------------------------------------------------------- | --------- | --------- | -------- | ------ | -| `input` | Target assemblies listed in a CSV sheet | `string` | | True | | -| `protein_evidence` | Protein evidence provided as a fasta file or multiple fasta files listed in a plain txt file | `string` | | True | | -| `eggnogmapper_db_dir` | Eggnogmapper database directory | `string` | | | | -| `eggnogmapper_tax_scope` | Eggnogmapper taxonomy scopre. Eukaryota: 2759, Viridiplantae: 33090, Archaea: 2157, Bacteria: 2, root: 1 | `integer` | 1 | | | -| `rna_evidence` | FASTQ/BAM samples listed in a CSV sheet | `string` | | | | -| `liftoff_annotations` | Reference annotations listed in a CSV sheet | `string` | | | | -| `orthofinder_annotations` | Additional annotations for orthology listed in a CSV sheet | `string` | | | | -| `outdir` | The output directory where the results will be saved | `string` | ./results | True | | - -## Repeat annotation options - -| Parameter | Description | Type | Default | Required | Hidden | -| --------------------------- | ------------------------------------------ | --------- | ------------- | -------- | ------ | -| `repeat_annotator` | 'edta' or 'repeatmodeler' | `string` | repeatmodeler | | | -| `save_annotated_te_lib` | Save annotated TE library or not? | `boolean` | | | | -| `edta_is_sensitive` | Use '--sensitive 1' flag with EDTA or not? | `boolean` | | | | -| `repeatmasker_save_outputs` | Save the repeat-masked genome or not? | `boolean` | | | | - -## RNASeq pre-processing options - -| Parameter | Description | Type | Default | Required | Hidden | -| ------------------------ | ------------------------------------------------------------------ | --------- | ----------------------------------------- | -------- | ------ | -| `skip_fastqc` | Skip FASTQC or not? | `boolean` | | | | -| `skip_fastp` | Skip trimming by FASTQP or not? | `boolean` | | | | -| `min_trimmed_reads` | Exclude a sample if its reads after trimming are below this number | `integer` | 10000 | | | -| `extra_fastp_args` | Extra FASTP arguments | `string` | | | | -| `save_trimmed` | Save FASTQ files after trimming or not? | `boolean` | | | | -| `remove_ribo_rna` | Remove Ribosomal RNA or not? | `boolean` | | | | -| `save_non_ribo_reads` | Save FASTQ files after Ribosomal RNA removal or not? | `boolean` | | | | -| `ribo_database_manifest` | Ribosomal RNA fastas listed in a text sheet | `string` | ${projectDir}/assets/rrna-db-defaults.txt | | | - -## RNAseq alignment options - -| Parameter | Description | Type | Default | Required | Hidden | -| ------------------------ | ------------------------------------------------- | --------- | ------- | -------- | ------ | -| `star_max_intron_length` | Maximum intron length for STAR alignment | `integer` | 16000 | | | -| `star_align_extra_args` | EXTRA arguments for STAR | `string` | | | | -| `star_save_outputs` | Save BAM files from STAR or not? | `boolean` | | | | -| `save_cat_bam` | SAVE a concatenated BAM file per assembly or not? | `boolean` | | | | - -## Annotation options - -| Parameter | Description | Type | Default | Required | Hidden | -| ----------------------------- | --------------------------------------------------------------------------------- | --------- | ------- | -------- | ------ | -| `braker_extra_args` | Extra arguments for BRAKER | `string` | | | | -| `braker_save_outputs` | Save BRAKER files | `boolean` | | | | -| `liftoff_coverage` | Liftoff coverage parameter | `number` | 0.9 | | | -| `liftoff_identity` | Liftoff identity parameter | `number` | 0.9 | | | -| `allow_isoforms` | Allow multiple isoforms for gene models | `boolean` | True | | | -| `enforce_full_intron_support` | Require every model to have external evidence for all its introns | `boolean` | True | | | -| `filter_liftoff_by_hints` | Use BRAKER hints to filter Liftoff models | `boolean` | True | | | -| `eggnogmapper_evalue` | Only report alignments below or equal the e-value threshold | `number` | 1e-05 | | | -| `eggnogmapper_pident` | Only report alignments above or equal to the given percentage of identity (0-100) | `integer` | 35 | | | -| `eggnogmapper_purge_nohits` | Purge transcripts which do not have a hit against eggnog | `boolean` | | | | - -## Evaluation options - -| Parameter | Description | Type | Default | Required | Hidden | -| ------------------------ | --------------------------------------------------------------------------- | --------- | --------------- | -------- | ------ | -| `busco_skip` | Skip evaluation by BUSCO | `boolean` | | | | -| `busco_lineage_datasets` | BUSCO lineages as a space-separated list: 'fungi_odb10 microsporidia_odb10' | `string` | eukaryota_odb10 | | | - -## Max job request options - -Set the top limit for requested resources for any single job. - -| Parameter | Description | Type | Default | Required | Hidden | -| ------------ | ------------------------------------------------------------------ | --------- | ------- | -------- | ------ | -| `max_cpus` | Maximum number of CPUs that can be requested for any single job. | `integer` | 12 | | True | -| `max_memory` | Maximum amount of memory that can be requested for any single job. | `string` | 72.GB | | True | -| `max_time` | Maximum amount of time that can be requested for any single job. | `string` | 7.day | | True | - -## Infrastructure options - -| Parameter | Description | Type | Default | Required | Hidden | -| ------------------------------ | ----------- | --------- | ------- | -------- | ------ | -| `validationSkipDuplicateCheck` | | `boolean` | True | | True | -| `validationS3PathCheck` | | `boolean` | True | | True | diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 0000000..03d9ed6 --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,224 @@ +# PlantandFoodResearch/genepal: Usage + +> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ + +## Introduction + + + +## Samplesheet input + +You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row as shown in the examples below. + +```bash +--input '[path to samplesheet file]' +``` + +### Multiple runs of the same sample + +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: + +```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 +CONTROL_REP1,AEG588A1_S1_L004_R1_001.fastq.gz,AEG588A1_S1_L004_R2_001.fastq.gz +``` + +### Full samplesheet + +The pipeline will auto-detect whether a sample is single- or paired-end using the information provided in the samplesheet. The samplesheet can have as many columns as you desire, however, there is a strict requirement for the first 3 columns to match those defined in the table below. + +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. + +```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 +CONTROL_REP3,AEG588A3_S3_L002_R1_001.fastq.gz,AEG588A3_S3_L002_R2_001.fastq.gz +TREATMENT_REP1,AEG588A4_S4_L003_R1_001.fastq.gz, +TREATMENT_REP2,AEG588A5_S5_L003_R1_001.fastq.gz, +TREATMENT_REP3,AEG588A6_S6_L003_R1_001.fastq.gz, +TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz, +``` + +| Column | Description | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sample` | Custom sample name. This entry will be identical for multiple sequencing libraries/runs from the same sample. Spaces in sample names are automatically converted to underscores (`_`). | +| `fastq_1` | Full path to FastQ file for Illumina short reads 1. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | +| `fastq_2` | Full path to FastQ file for Illumina short reads 2. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | + +An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. + +## Running the pipeline + +The typical command for running the pipeline is as follows: + +```bash +nextflow run PlantandFoodResearch/genepal --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. + +Note that the pipeline will create the following files in your working directory: + +```bash +work # Directory containing the nextflow working files + # Finished results in specified location (defined with --outdir) +.nextflow_log # Log file from Nextflow +# 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 PlantandFoodResearch/genepal -profile docker -params-file params.yaml +``` + +with `params.yaml` containing: + +```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: + +```bash +nextflow pull PlantandFoodResearch/genepal +``` + +### Reproducibility + +It is a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since. + +First, go to the [PlantandFoodResearch/genepal releases page](https://github.com/PlantandFoodResearch/genepal/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. + +:::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 + +:::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, Apptainer, Conda) - see below. + +:::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, 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` + - A generic configuration profile to be used with [Singularity](https://sylabs.io/docs/) +- `podman` + - A generic configuration profile to be used with [Podman](https://podman.io/) +- `shifter` + - 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, Charliecloud, or Apptainer. + +### `-resume` + +Specify this when restarting a pipeline. Nextflow will use cached results from any pipeline steps where the inputs are the same, continuing from where it got to previously. For input to be considered the same, not only the names must be identical but the files' contents as well. For more info about this parameter, see [this blog post](https://www.nextflow.io/blog/2019/demystifying-nextflow-resume.html). + +You can also supply a run name to resume a specific run: `-resume [run-name]`. Use the `nextflow log` command to show previous run names. + +### `-c` + +Specify the path to a specific config file (this is a core Nextflow command). See the [nf-core website documentation](https://nf-co.re/usage/configuration) for more information. + +## Custom configuration + +### Resource requests + +Whilst the default requirements set within the pipeline will hopefully work for most people and with most input data, you may find that you want to customise the compute resources that the pipeline requests. Each step in the pipeline has a default set of requirements for number of CPUs, memory and time. For most of the steps in the pipeline, if the job exits with any of the error codes specified [here](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L18) it will automatically be resubmitted with higher requests (2 x original, then 3 x original). If it still fails after the third attempt then the pipeline execution is stopped. + +To change the resource requests, please see the [max resources](https://nf-co.re/docs/usage/configuration#max-resources) and [tuning workflow resources](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources) section of the nf-core website. + +### Custom Containers + +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. + +To use a different container from the default container or conda environment specified in a pipeline, please see the [updating tool versions](https://nf-co.re/docs/usage/configuration#updating-tool-versions) section of the nf-core website. + +### Custom Tool Arguments + +A pipeline might not always support every possible argument or option of a particular tool used in pipeline. Fortunately, nf-core pipelines provide some freedom to users to insert additional parameters that the pipeline does not include by default. + +To learn how to provide additional arguments to a particular tool of the pipeline, please see the [customising tool arguments](https://nf-co.re/docs/usage/configuration#customising-tool-arguments) section of the nf-core website. + +### nf-core/configs + +In most cases, you will only need to create a custom config as a one-off but if you and others within your organisation are likely to be running nf-core pipelines regularly and need to use the same settings regularly it may be a good idea to request that your custom config file is uploaded to the `nf-core/configs` git repository. Before you do this please can you test that the config file works with your pipeline of choice using the `-c` parameter. You can then create a pull request to the `nf-core/configs` repository with the addition of your config file, associated documentation file (see examples in [`nf-core/configs/docs`](https://github.com/nf-core/configs/tree/master/docs)), and amending [`nfcore_custom.config`](https://github.com/nf-core/configs/blob/master/nfcore_custom.config) to include your custom profile. + +See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more information about creating your own configuration files. + +If you have any questions or issues please send us a message on [Slack](https://nf-co.re/join/slack) on the [`#configs` channel](https://nfcore.slack.com/channels/configs). + +## 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. + +The Nextflow `-bg` flag launches Nextflow in the background, detached from your terminal so that the workflow does not stop if you log out of your session. The logs are saved to a file. + +Alternatively, you can use `screen` / `tmux` or similar tool to create a detached session which you can log back into at a later time. +Some HPC setups also allow you to run nextflow within a cluster job submitted your job scheduler (from where it submits more jobs). + +## Nextflow memory requirements + +In some cases, the Nextflow Java virtual machines can start to request a large amount of memory. +We recommend adding the following line to your environment to limit this (typically in `~/.bashrc` or `~./bash_profile`): + +```bash +NXF_OPTS='-Xms1g -Xmx4g' +``` diff --git a/local_genepal b/local_genepal deleted file mode 100755 index 6f287b1..0000000 --- a/local_genepal +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -NO_FORMAT="\033[0m" -C_RED="\033[38;5;9m" -F_BOLD="\033[1m" - -[[ $1 == '-stub' ]] \ - && stub='-stub' \ - || stub='' - -[[ $1 == '-stub' ]] \ - && echo 'Executing with -stub' \ - || echo -e "${C_RED}${F_BOLD}Executing without -stub${NO_FORMAT}" - -nextflow run \ - main.nf \ - -profile docker,test \ - -resume \ - $stub \ - --max_cpus 8 \ - --max_memory '32.GB' \ - --eggnogmapper_tax_scope 33090 \ - --eggnogmapper_db_dir ../dbs/emapperdb/5.0.2 diff --git a/main.nf b/main.nf old mode 100755 new mode 100644 index 5e4d042..c075551 --- a/main.nf +++ b/main.nf @@ -1,17 +1,97 @@ #!/usr/bin/env nextflow +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + PlantandFoodResearch/genepal +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Github : https://github.com/PlantandFoodResearch/genepal +---------------------------------------------------------------------------------------- +*/ -nextflow.enable.dsl=2 +nextflow.enable.dsl = 2 -include { validateParameters } from 'plugin/nf-validation' +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ -validateParameters() +include { GENEPAL } from './workflows/genepal' +include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_genepal_pipeline' +include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_genepal_pipeline' -include { GENEPAL } from './workflows/genepal.nf' +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + NAMED WORKFLOWS FOR PIPELINE +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// +// WORKFLOW: Run main analysis pipeline depending on type of input +// +workflow PLANTANDFOODRESEARCH_GENEPAL { + + take: + samplesheet // channel: samplesheet read in from --input + + main: + + // + // WORKFLOW: Run pipeline + // + GENEPAL ( + samplesheet + ) + + emit: + multiqc_report = GENEPAL.out.multiqc_report // channel: /path/to/multiqc_report.html -workflow { - PFR_GENEPAL() } +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RUN MAIN WORKFLOW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ -workflow PFR_GENEPAL { - GENEPAL() +workflow { + + main: + + // + // SUBWORKFLOW: Run initialisation tasks + // + PIPELINE_INITIALISATION ( + params.version, + params.help, + params.validate_params, + params.monochrome_logs, + args, + params.outdir, + params.input + ) + + // + // WORKFLOW: Run main workflow + // + PLANTANDFOODRESEARCH_GENEPAL ( + PIPELINE_INITIALISATION.out.samplesheet + ) + + // + // SUBWORKFLOW: Run completion tasks + // + PIPELINE_COMPLETION ( + params.email, + params.email_on_fail, + params.plaintext_email, + params.outdir, + params.monochrome_logs, + params.hook_url, + PLANTANDFOODRESEARCH_GENEPAL.out.multiqc_report + ) } + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + THE END +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ diff --git a/modules.json b/modules.json index 9736949..6f8944f 100644 --- a/modules.json +++ b/modules.json @@ -2,222 +2,36 @@ "name": "PlantandFoodResearch/genepal", "homePage": "https://github.com/PlantandFoodResearch/genepal", "repos": { - "https://github.com/GallVp/nxf-components.git": { - "modules": { - "gallvp": { - "agat/spaddintrons": { - "branch": "main", - "git_sha": "7bf6fbca23edc94490ffa6709f52b2f71c6fb130", - "installed_by": ["gxf_fasta_agat_spaddintrons_spextractsequences"] - }, - "agat/spextractsequences": { - "branch": "main", - "git_sha": "7bf6fbca23edc94490ffa6709f52b2f71c6fb130", - "installed_by": ["gxf_fasta_agat_spaddintrons_spextractsequences"] - }, - "braker3": { - "branch": "main", - "git_sha": "be636e1e7d50b12ee1f50ed0bb9b21b0fade7cfd", - "installed_by": ["modules"] - }, - "busco/busco": { - "branch": "main", - "git_sha": "ab92c438688c1f4a3753b65914bfd2e6319cebb2", - "installed_by": ["fasta_gxf_busco_plot"] - }, - "busco/generateplot": { - "branch": "main", - "git_sha": "ab92c438688c1f4a3753b65914bfd2e6319cebb2", - "installed_by": ["fasta_gxf_busco_plot"] - }, - "custom/restoregffids": { - "branch": "main", - "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", - "installed_by": ["fasta_edta_lai"] - }, - "custom/shortenfastaids": { - "branch": "main", - "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", - "installed_by": ["fasta_edta_lai"] - }, - "edta/edta": { - "branch": "main", - "git_sha": "7bf6fbca23edc94490ffa6709f52b2f71c6fb130", - "installed_by": ["fasta_edta_lai"] - }, - "gffread": { - "branch": "main", - "git_sha": "c04bf39d67027e044a6eaed0b7b0439fd8866fc7", - "installed_by": ["fasta_gxf_busco_plot"] - }, - "ltrretriever/lai": { - "branch": "main", - "git_sha": "490f8ab54c632d84f99edd6f208305ac5e283ab3", - "installed_by": ["fasta_edta_lai"] - }, - "repeatmasker/repeatmasker": { - "branch": "main", - "git_sha": "07c6fda11aff03d2d7fc68224e7fd96866fc6a8f", - "installed_by": ["modules"] - } - } - }, - "subworkflows": { - "gallvp": { - "fasta_edta_lai": { - "branch": "main", - "git_sha": "7bf6fbca23edc94490ffa6709f52b2f71c6fb130", - "installed_by": ["subworkflows"] - }, - "fasta_gxf_busco_plot": { - "branch": "main", - "git_sha": "7bf6fbca23edc94490ffa6709f52b2f71c6fb130", - "installed_by": ["subworkflows"] - }, - "gxf_fasta_agat_spaddintrons_spextractsequences": { - "branch": "main", - "git_sha": "7bf6fbca23edc94490ffa6709f52b2f71c6fb130", - "installed_by": ["subworkflows"] - } - } - } - }, "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { - "agat/convertspgff2gtf": { - "branch": "master", - "git_sha": "0a0b723d114e502207072603479b635dfbc2bf59", - "installed_by": ["modules"] - }, - "agat/convertspgxf2gxf": { - "branch": "master", - "git_sha": "0a0b723d114e502207072603479b635dfbc2bf59", - "installed_by": ["modules"] - }, - "agat/spfilterfeaturefromkilllist": { - "branch": "master", - "git_sha": "d1535889747781d919bc81da2344952f4bfa2be4", - "installed_by": ["modules"] - }, - "agat/spmergeannotations": { - "branch": "master", - "git_sha": "8e30f5d09155b45ddafc2d1357fc5f447f1aaa03", - "installed_by": ["modules"] - }, - "cat/cat": { - "branch": "master", - "git_sha": "5bb8ca085e17549e185e1823495ab8d20727a805", - "installed_by": ["modules"] - }, - "cat/fastq": { - "branch": "master", - "git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7", - "installed_by": ["modules"] - }, - "custom/dumpsoftwareversions": { - "branch": "master", - "git_sha": "82024cf6325d2ee194e7f056d841ecad2f6856e9", - "installed_by": ["modules"] - }, - "eggnogmapper": { - "branch": "master", - "git_sha": "b34fb117e397e72a070cde8adf21b758670c90f5", - "installed_by": ["modules"] - }, - "fastavalidator": { - "branch": "master", - "git_sha": "90dad5491658049282ceb287a3d7732c1ce39837", - "installed_by": ["modules"] - }, - "fastp": { - "branch": "master", - "git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7", - "installed_by": ["fastq_fastqc_umitools_fastp"] - }, "fastqc": { "branch": "master", - "git_sha": "46eca555142d6e597729fcb682adcc791796f514", - "installed_by": ["fastq_fastqc_umitools_fastp", "modules"] - }, - "gffcompare": { - "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"] - }, - "gffread": { - "branch": "master", - "git_sha": "6c996d7fbe0816dcbb68ce587ad5f873313682a1", - "installed_by": ["modules"] - }, - "gt/gff3": { - "branch": "master", - "git_sha": "9a8bba5910982ae637dedb8664e3121db77e173f", - "installed_by": ["modules"] - }, - "gunzip": { - "branch": "master", - "git_sha": "4e5f4687318f24ba944a13609d3ea6ebd890737d", - "installed_by": ["modules"], - "patch": "modules/nf-core/gunzip/gunzip.diff" - }, - "liftoff": { - "branch": "master", - "git_sha": "b34fb117e397e72a070cde8adf21b758670c90f5", - "installed_by": ["modules"] - }, - "orthofinder": { - "branch": "master", - "git_sha": "07f10f34d88408af7c71f13227d11f23b7f53b50", - "installed_by": ["modules"] - }, - "repeatmodeler/builddatabase": { - "branch": "master", - "git_sha": "1cbb5551b917aa423e414dcd69898d01520a309d", - "installed_by": ["modules"] - }, - "repeatmodeler/repeatmodeler": { - "branch": "master", - "git_sha": "84efd2f87d07deb22ee9378f065a9aa5f1434161", - "installed_by": ["modules"] - }, - "samtools/cat": { - "branch": "master", - "git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519", - "installed_by": ["modules"] - }, - "sortmerna": { - "branch": "master", - "git_sha": "df05c8db5195867c0bc7b92c1788115b66f0d17d", - "installed_by": ["modules"] - }, - "star/align": { - "branch": "master", - "git_sha": "46eca555142d6e597729fcb682adcc791796f514", - "installed_by": ["modules"] - }, - "star/genomegenerate": { - "branch": "master", - "git_sha": "46eca555142d6e597729fcb682adcc791796f514", + "git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd", "installed_by": ["modules"] }, - "tsebra": { + "multiqc": { "branch": "master", - "git_sha": "0995f9cd0cc5e4eb60f7870280b75ecdb5ab0db2", + "git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a", "installed_by": ["modules"] - }, - "umitools/extract": { - "branch": "master", - "git_sha": "b4919e9a2b4d8b71061e601633db4600a3858fa1", - "installed_by": ["fastq_fastqc_umitools_fastp"] } } }, "subworkflows": { "nf-core": { - "fastq_fastqc_umitools_fastp": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "installed_by": ["subworkflows"] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", + "installed_by": ["subworkflows"] + }, + "utils_nfvalidation_plugin": { "branch": "master", - "git_sha": "46eca555142d6e597729fcb682adcc791796f514", + "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", "installed_by": ["subworkflows"] } } diff --git a/modules/gallvp/agat/spaddintrons/environment.yml b/modules/gallvp/agat/spaddintrons/environment.yml deleted file mode 100644 index 854ee35..0000000 --- a/modules/gallvp/agat/spaddintrons/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "agat_spaddintrons" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::agat=1.4.0" diff --git a/modules/gallvp/agat/spaddintrons/main.nf b/modules/gallvp/agat/spaddintrons/main.nf deleted file mode 100644 index 164b3d3..0000000 --- a/modules/gallvp/agat/spaddintrons/main.nf +++ /dev/null @@ -1,50 +0,0 @@ -process AGAT_SPADDINTRONS { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/agat:1.4.0--pl5321hdfd78af_0' : - 'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(gxf) - path config - - output: - tuple val(meta), path("*.gff") , emit: gff - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def config_arg = config ? "-c $config" : '' - if( "$gxf" == "${prefix}.gff" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - agat_sp_add_introns.pl \\ - $args \\ - -g $gxf \\ - $config_arg \\ - -o ${prefix}.gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_add_introns.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - if( "$gxf" == "${prefix}.gff" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - touch ${prefix}.gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_add_introns.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/gallvp/agat/spaddintrons/meta.yml b/modules/gallvp/agat/spaddintrons/meta.yml deleted file mode 100644 index c05c924..0000000 --- a/modules/gallvp/agat/spaddintrons/meta.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "agat_spaddintrons" -description: | - The script aims to add intron features to gtf/gff file without intron features. -keywords: - - genomics - - gff - - gtf - - add - - intron - - feature -tools: - - "agat": - description: "Another Gff Analysis Toolkit (AGAT). Suite of tools to handle gene annotations in any GTF/GFF format." - homepage: "https://agat.readthedocs.io/en/latest/" - documentation: "https://agat.readthedocs.io/en/latest/tools/agat_sp_add_introns.html" - tool_dev_url: "https://github.com/NBISweden/AGAT" - doi: "10.5281/zenodo.3552717" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - gxf: - type: file - description: Input GFF3/GTF file - pattern: "*.{gff,gff3,gtf}" - - config: - type: file - description: | - Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any, otherwise it takes the orignal agat_config.yaml shipped with AGAT. To get the agat_config.yaml locally type: "agat config --expose". The --config option gives you the possibility to use your own AGAT config file (located elsewhere or named differently). - pattern: "*.yaml" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - gff: - type: file - description: Output GFF file. - pattern: "*.gff" - -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/agat/spaddintrons/tests/main.nf.test b/modules/gallvp/agat/spaddintrons/tests/main.nf.test deleted file mode 100644 index 6c4bd03..0000000 --- a/modules/gallvp/agat/spaddintrons/tests/main.nf.test +++ /dev/null @@ -1,61 +0,0 @@ -nextflow_process { - - name "Test Process AGAT_SPADDINTRONS" - script "../main.nf" - process "AGAT_SPADDINTRONS" - - tag "modules" - tag "modules_gallvp" - tag "agat" - tag "agat/spaddintrons" - - test("homo_sapiens - genome - gtf") { - - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr1/genome.gtf', checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("homo_sapiens - genome - gtf - stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr1/genome.gtf', checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/gallvp/agat/spaddintrons/tests/main.nf.test.snap b/modules/gallvp/agat/spaddintrons/tests/main.nf.test.snap deleted file mode 100644 index 6947711..0000000 --- a/modules/gallvp/agat/spaddintrons/tests/main.nf.test.snap +++ /dev/null @@ -1,72 +0,0 @@ -{ - "homo_sapiens - genome - gtf - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,480dfe983a8b4469c1dff8b7a08d855d" - ], - "gff": [ - [ - { - "id": "test", - "single_end": false - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,480dfe983a8b4469c1dff8b7a08d855d" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-24T16:22:13.888389" - }, - "homo_sapiens - genome - gtf": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.gff:md5,a798830c6ad0a27b1564b98e1a1fc3aa" - ] - ], - "1": [ - "versions.yml:md5,480dfe983a8b4469c1dff8b7a08d855d" - ], - "gff": [ - [ - { - "id": "test", - "single_end": false - }, - "test.gff:md5,a798830c6ad0a27b1564b98e1a1fc3aa" - ] - ], - "versions": [ - "versions.yml:md5,480dfe983a8b4469c1dff8b7a08d855d" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-24T15:21:51.693488" - } -} \ No newline at end of file diff --git a/modules/gallvp/agat/spextractsequences/environment.yml b/modules/gallvp/agat/spextractsequences/environment.yml deleted file mode 100644 index be40401..0000000 --- a/modules/gallvp/agat/spextractsequences/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "agat_spextractsequences" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::agat=1.4.0 diff --git a/modules/gallvp/agat/spextractsequences/main.nf b/modules/gallvp/agat/spextractsequences/main.nf deleted file mode 100644 index ccf4b4d..0000000 --- a/modules/gallvp/agat/spextractsequences/main.nf +++ /dev/null @@ -1,52 +0,0 @@ -process AGAT_SPEXTRACTSEQUENCES { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/agat:1.4.0--pl5321hdfd78af_0' : - 'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(gxf) - path fasta - path config - - output: - tuple val(meta), path("*.fasta") , emit: fasta - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def config_arg = config ? "-c $config" : '' - if( "$fasta" == "${prefix}.fasta" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - agat_sp_extract_sequences.pl \\ - $args \\ - -g $gxf \\ - -f $fasta \\ - $config_arg \\ - -o ${prefix}.fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_extract_sequences.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - if( "$fasta" == "${prefix}.fasta" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - touch ${prefix}.fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_extract_sequences.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/gallvp/agat/spextractsequences/meta.yml b/modules/gallvp/agat/spextractsequences/meta.yml deleted file mode 100644 index 611af62..0000000 --- a/modules/gallvp/agat/spextractsequences/meta.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "agat_spextractsequences" -description: | - This script extracts sequences in fasta format according to features described - in a gff file. -keywords: - - genomics - - gff - - extract - - fasta - - sequence - - feature -tools: - - "agat": - description: "Another Gff Analysis Toolkit (AGAT). Suite of tools to handle gene annotations in any GTF/GFF format." - homepage: "https://agat.readthedocs.io/en/latest/" - documentation: "https://agat.readthedocs.io/en/latest/tools/agat_sp_extract_sequences.html" - tool_dev_url: "https://github.com/NBISweden/AGAT" - doi: "10.5281/zenodo.3552717" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - gxf: - type: file - description: Input GFF3/GTF file - pattern: "*.{gff,gff3,gtf}" - - fasta: - type: file - description: Input FASTA file - pattern: "*.{fa,fsa,faa,fasta}" - - config: - type: file - description: | - Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any, otherwise it takes the orignal agat_config.yaml shipped with AGAT. To get the agat_config.yaml locally type: "agat config --expose". The --config option gives you the possibility to use your own AGAT config file (located elsewhere or named differently). - pattern: "*.yaml" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - fasta: - type: file - description: Output FASTA file. - pattern: "*.fasta" - -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/agat/spextractsequences/tests/main.nf.test b/modules/gallvp/agat/spextractsequences/tests/main.nf.test deleted file mode 100644 index 72b5f99..0000000 --- a/modules/gallvp/agat/spextractsequences/tests/main.nf.test +++ /dev/null @@ -1,62 +0,0 @@ -nextflow_process { - - name "Test Process AGAT_SPEXTRACTSEQUENCES" - script "../main.nf" - process "AGAT_SPEXTRACTSEQUENCES" - - tag "modules" - tag "modules_gallvp" - tag "agat" - tag "agat/spextractsequences" - - test("sarscov2 - gff - fasta") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - input[2] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - gff - fasta - stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - input[2] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/gallvp/agat/spextractsequences/tests/main.nf.test.snap b/modules/gallvp/agat/spextractsequences/tests/main.nf.test.snap deleted file mode 100644 index 4ee76fe..0000000 --- a/modules/gallvp/agat/spextractsequences/tests/main.nf.test.snap +++ /dev/null @@ -1,72 +0,0 @@ -{ - "sarscov2 - gff - fasta": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fasta:md5,e4a8c6c1d2b33c92240e9d2ba07aecc2" - ] - ], - "1": [ - "versions.yml:md5,b31a3d3961871a1e453919bc3b45bf2f" - ], - "fasta": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fasta:md5,e4a8c6c1d2b33c92240e9d2ba07aecc2" - ] - ], - "versions": [ - "versions.yml:md5,b31a3d3961871a1e453919bc3b45bf2f" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-21T16:20:58.856035" - }, - "sarscov2 - gff - fasta - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,b31a3d3961871a1e453919bc3b45bf2f" - ], - "fasta": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,b31a3d3961871a1e453919bc3b45bf2f" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-21T16:21:04.022292" - } -} \ No newline at end of file diff --git a/modules/gallvp/braker3/main.nf b/modules/gallvp/braker3/main.nf deleted file mode 100644 index c856216..0000000 --- a/modules/gallvp/braker3/main.nf +++ /dev/null @@ -1,93 +0,0 @@ -process BRAKER3 { - tag "${meta.id}" - label 'process_high' - - container "docker.io/teambraker/braker3:v3.0.7.5" - - input: - tuple val(meta), path(fasta) - path bam - path rnaseq_sets_dirs - path rnaseq_sets_ids - path proteins - path hintsfile - - output: - tuple val(meta), path("$prefix/braker.gtf") , emit: gtf - tuple val(meta), path("$prefix/braker.codingseq") , emit: cds - tuple val(meta), path("$prefix/braker.aa") , emit: aa - tuple val(meta), path("$prefix/braker.log") , emit: log - tuple val(meta), path("$prefix/hintsfile.gff") , emit: hintsfile , optional: true - tuple val(meta), path("$prefix/braker.gff3") , emit: gff3 , optional: true - tuple val(meta), path("$prefix/what-to-cite.txt") , emit: citations - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def rna_ids = rnaseq_sets_ids ? "--rnaseq_sets_ids=$rnaseq_sets_ids" : '' - def rna_dirs = rnaseq_sets_dirs ? "--rnaseq_sets_dirs=$rnaseq_sets_dirs" : '' - def bam = bam ? "--bam=$bam" : '' - def proteins = proteins ? "--prot_seq=$proteins" : '' - def hints = hintsfile ? "--hints=$hintsfile" : '' - def new_species = args.contains('--species')? '' : '--species new_species' - """ - cp -r \$AUGUSTUS_CONFIG_PATH \\ - augustus_config - - perl -p -e 's/^(>\\S+).*\$/\$1/' \\ - $fasta \\ - > ${prefix}.name.only.genome.masked.fasta - - braker.pl \\ - --genome ${prefix}.name.only.genome.masked.fasta \\ - $new_species \\ - --workingdir $prefix \\ - --AUGUSTUS_CONFIG_PATH "\$(pwd)/augustus_config" \\ - --threads $task.cpus \\ - $rna_ids \\ - $rna_dirs \\ - $bam \\ - $proteins \\ - $hints \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - braker3: \$(braker.pl --version 2>/dev/null | sed 's/braker.pl version //') - augustus: \$(augustus --version |& sed -n 's/AUGUSTUS (\\(.*\\)) is a gene .*/\\1/p') - genemark-etp: \$(echo "\$(gmetp.pl || echo '')" | sed -n 's/ETP version \\(.*\\)/\\1/p') - prothint: \$(prothint.py --version | sed 's/prothint.py //1') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def rna_ids = rnaseq_sets_ids ? "--rnaseq_sets_ids=$rnaseq_sets_ids" : '' - def hints = hintsfile ? "--hints=$hintsfile" : '' - def touch_hints = (rna_ids || bam || proteins || hints) ? "touch $prefix/hintsfile.gff" : '' - def touch_gff = args.contains('--gff3') ? "touch $prefix/braker.gff3" : '' - """ - mkdir "$prefix" - - touch "$prefix/braker.gtf" - touch "$prefix/braker.codingseq" - touch "$prefix/braker.aa" - $touch_hints - touch "$prefix/braker.log" - touch "$prefix/what-to-cite.txt" - $touch_gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - braker3: \$(braker.pl --version 2>/dev/null | sed 's/braker.pl version //') - augustus: \$(augustus --version |& sed -n 's/AUGUSTUS (\\(.*\\)) is a gene .*/\\1/p') - genemark-etp: \$(echo "\$(gmetp.pl || echo '')" | sed -n 's/ETP version \\(.*\\)/\\1/p') - prothint: \$(prothint.py --version | sed 's/prothint.py //1') - END_VERSIONS - """ -} diff --git a/modules/gallvp/braker3/meta.yml b/modules/gallvp/braker3/meta.yml deleted file mode 100644 index bfb8211..0000000 --- a/modules/gallvp/braker3/meta.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: braker3 -description: | - Gene prediction in novel genomes using RNA-seq and protein homology information -keywords: - - genome - - annotation - - braker - - gff - - gtf -tools: - - braker3: - description: "BRAKER3 is a pipeline for fully automated prediction of - protein coding gene structures using protein and RNA-seq and protein homology - information" - homepage: https://github.com/Gaius-Augustus/BRAKER - documentation: https://github.com/Gaius-Augustus/BRAKER - tool_dev_url: https://github.com/Gaius-Augustus/BRAKER - doi: "10.13140/RG.2.2.20047.36004" - licence: ["Artistic-1.0"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - fasta: - type: file - description: Genome assembly fasta - pattern: "*.{fasta,fa,fas,faa,fna}" - - bam: - type: file - description: BAM file of RNA-seq data to be passed to --bam - pattern: "*.bam" - - rnaseq_sets_dirs: - type: file - description: Directories of RNA-seq data sets to be passed to --rnaseq_sets_dirs - - rnaseq_sets_ids: - type: file - description: IDs of RNA-seq data sets to be passed to --rnaseq_sets_ids - - proteins: - type: file - description: Protein evidence to be passed to --proteins - pattern: "*.{fasta,fa,fas,faa}" - - hintsfile: - type: file - description: Hintsfile to be passed to --hintsfile - pattern: "*.{gff, gtf, gff3}" -output: - - gtf: - type: file - description: Gene transfer format file as output by BRAKER3 - pattern: "*.{gtf}" - - cds: - type: file - description: Coding sequence file as output by BRAKER3 - pattern: "*.{codingseq}" - - aa: - type: file - description: Protein sequence file as output by BRAKER3 - pattern: "*.{aa}" - - log: - type: file - description: BRAKER3 log file - pattern: "*.log" - - hintsfile: - type: file - description: Hints file as output by BRAKER3 - pattern: "*hintsfile.{gff}" - - gff3: - type: file - description: GFF3 file as output by BRAKER3 - pattern: "*.{gff3}" - - citations: - type: file - description: BRAKER3 citations - pattern: "what-to-cite.txt" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@kherronism" - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/braker3/tests/main.nf.test b/modules/gallvp/braker3/tests/main.nf.test deleted file mode 100644 index 6302ea2..0000000 --- a/modules/gallvp/braker3/tests/main.nf.test +++ /dev/null @@ -1,77 +0,0 @@ -nextflow_process { - - name "Test Process BRAKER3" - script "../main.nf" - config "./nextflow.config" - process "BRAKER3" - - tag "modules" - tag "modules_gallvp" - tag "braker3" - - test("braker3 - test - 4") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file('https://raw.githubusercontent.com/Gaius-Augustus/BRAKER/f58479fe5bb13a9e51c3ca09cb9e137cab3b8471/example/genome.fa', checkIfExists: true) - ] - input[1] = file('http://topaz.gatech.edu/GeneMark/Braker/RNAseq.bam', checkIfExists: true) - input[2] = [] - input[3] = [] - input[4] = [] - input[5] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.aa, - process.out.cds, - process.out.citations, - process.out.gff3, - process.out.gtf, - process.out.hintsfile, - process.out.versions, - ).match() }, - { assert file(process.out.log[0][1]).text.contains('BRAKER RUN FINISHED') } - ) - } - - } - - test("sarscov2 - fasta - stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - ] - input[1] = [] - input[2] = [] - input[3] = [] - input[4] = [] - input[5] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/gallvp/braker3/tests/main.nf.test.snap b/modules/gallvp/braker3/tests/main.nf.test.snap deleted file mode 100644 index e9dc283..0000000 --- a/modules/gallvp/braker3/tests/main.nf.test.snap +++ /dev/null @@ -1,181 +0,0 @@ -{ - "sarscov2 - fasta - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.codingseq:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.aa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "what-to-cite.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - "versions.yml:md5,465227c41b8b4aae2dea6ec249676935" - ], - "aa": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.aa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "cds": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.codingseq:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "citations": [ - [ - { - "id": "test", - "single_end": false - }, - "what-to-cite.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gff3": [ - - ], - "gtf": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "hintsfile": [ - - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "braker.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,465227c41b8b4aae2dea6ec249676935" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-25T16:01:15.128244" - }, - "braker3 - test - 4": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "braker.aa:md5,56ec6600d2843fe4a7fc9913e6b1448a" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "braker.codingseq:md5,47f7f312e4f5b3854b960a373717a0f7" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "what-to-cite.txt:md5,2ab67eaf09994751a09f5de8de7160a7" - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "braker.gtf:md5,22a968505188b7aa57c37fa85f570295" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "hintsfile.gff:md5,d42b89e12af7ba66ae25fd977146640a" - ] - ], - [ - "versions.yml:md5,465227c41b8b4aae2dea6ec249676935" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-25T16:03:42.343716" - } -} \ No newline at end of file diff --git a/modules/gallvp/braker3/tests/nextflow.config b/modules/gallvp/braker3/tests/nextflow.config deleted file mode 100644 index bf8441b..0000000 --- a/modules/gallvp/braker3/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: BRAKER3 { - ext.args = '--species=arabidopsis --skipAllTraining' // Not required, but significantly cuts the runtime - } -} diff --git a/modules/gallvp/busco/busco/environment.yml b/modules/gallvp/busco/busco/environment.yml deleted file mode 100644 index 06a5d93..0000000 --- a/modules/gallvp/busco/busco/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: busco_busco -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::busco=5.7.1 diff --git a/modules/gallvp/busco/busco/main.nf b/modules/gallvp/busco/busco/main.nf deleted file mode 100644 index f7c1a66..0000000 --- a/modules/gallvp/busco/busco/main.nf +++ /dev/null @@ -1,107 +0,0 @@ -process BUSCO_BUSCO { - tag "$meta.id" - label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/busco:5.7.1--pyhdfd78af_0': - 'biocontainers/busco:5.7.1--pyhdfd78af_0' }" - - input: - tuple val(meta), path(fasta, stageAs:'tmp_input/*') - val mode // Required: One of genome, proteins, or transcriptome - val lineage // Required: lineage to check against, "auto" enables --auto-lineage instead - path busco_lineages_path // Recommended: path to busco lineages - downloads if not set - path config_file // Optional: busco configuration file - - output: - tuple val(meta), path("*-busco.batch_summary.txt") , emit: batch_summary - tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt , optional: true - tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json , optional: true - tuple val(meta), path("*-busco/*/run_*/full_table.tsv") , emit: full_table , optional: true - tuple val(meta), path("*-busco/*/run_*/missing_busco_list.tsv") , emit: missing_busco_list , optional: true - tuple val(meta), path("*-busco/*/run_*/single_copy_proteins.faa") , emit: single_copy_proteins , optional: true - tuple val(meta), path("*-busco/*/run_*/busco_sequences") , emit: seq_dir - tuple val(meta), path("*-busco/*/translated_proteins") , emit: translated_dir , optional: true - tuple val(meta), path("*-busco") , emit: busco_dir - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - if ( mode !in [ 'genome', 'proteins', 'transcriptome' ] ) { - error "Mode must be one of 'genome', 'proteins', or 'transcriptome'." - } - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" - def busco_config = config_file ? "--config $config_file" : '' - def busco_lineage = lineage.equals('auto') ? '--auto-lineage' : "--lineage_dataset ${lineage}" - def busco_lineage_dir = busco_lineages_path ? "--download_path ${busco_lineages_path}" : '' - """ - # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) - # Check for container variable initialisation script and source it. - if [ -f "/usr/local/env-activate.sh" ]; then - set +u # Otherwise, errors out because of various unbound variables - . "/usr/local/env-activate.sh" - set -u - fi - - # If the augustus config directory is not writable, then copy to writeable area - if [ ! -w "\${AUGUSTUS_CONFIG_PATH}" ]; then - # Create writable tmp directory for augustus - AUG_CONF_DIR=\$( mktemp -d -p \$PWD ) - cp -r \$AUGUSTUS_CONFIG_PATH/* \$AUG_CONF_DIR - export AUGUSTUS_CONFIG_PATH=\$AUG_CONF_DIR - echo "New AUGUSTUS_CONFIG_PATH=\${AUGUSTUS_CONFIG_PATH}" - fi - - # Ensure the input is uncompressed - INPUT_SEQS=input_seqs - mkdir "\$INPUT_SEQS" - cd "\$INPUT_SEQS" - for FASTA in ../tmp_input/*; do - if [ "\${FASTA##*.}" == 'gz' ]; then - gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz ) - else - ln -s "\$FASTA" . - fi - done - cd .. - - busco \\ - --cpu $task.cpus \\ - --in "\$INPUT_SEQS" \\ - --out ${prefix}-busco \\ - --mode $mode \\ - $busco_lineage \\ - $busco_lineage_dir \\ - $busco_config \\ - $args - - # clean up - rm -rf "\$INPUT_SEQS" - - # Move files to avoid staging/publishing issues - mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt - mv ${prefix}-busco/*/short_summary.*.{json,txt} . || echo "Short summaries were not available: No genes were found." - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" - def fasta_name = files(fasta).first().name - '.gz' - """ - touch ${prefix}-busco.batch_summary.txt - mkdir -p ${prefix}-busco/$fasta_name/run_${lineage}/busco_sequences - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) - END_VERSIONS - """ -} diff --git a/modules/gallvp/busco/busco/meta.yml b/modules/gallvp/busco/busco/meta.yml deleted file mode 100644 index 29745d2..0000000 --- a/modules/gallvp/busco/busco/meta.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: busco_busco -description: Benchmarking Universal Single Copy Orthologs -keywords: - - quality control - - genome - - transcriptome - - proteome -tools: - - busco: - description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. - homepage: https://busco.ezlab.org/ - documentation: https://busco.ezlab.org/busco_userguide.html - tool_dev_url: https://gitlab.com/ezlab/busco - doi: "10.1007/978-1-4939-9173-0_14" - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Nucleic or amino acid sequence file in FASTA format. - pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" - - mode: - type: string - description: The mode to run Busco in. One of genome, proteins, or transcriptome - pattern: "{genome,proteins,transcriptome}" - - lineage: - type: string - description: The BUSCO lineage to use, or "auto" to automatically select lineage - - busco_lineages_path: - type: directory - description: Path to local BUSCO lineages directory. - - config_file: - type: file - description: Path to BUSCO config file. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - batch_summary: - type: file - description: Summary of all sequence files analyzed - pattern: "*-busco.batch_summary.txt" - - short_summaries_txt: - type: file - description: Short Busco summary in plain text format - pattern: "short_summary.*.txt" - - short_summaries_json: - type: file - description: Short Busco summary in JSON format - pattern: "short_summary.*.json" - - busco_dir: - type: directory - description: BUSCO lineage specific output - pattern: "*-busco" - - full_table: - type: file - description: Full BUSCO results table - pattern: "full_table.tsv" - - missing_busco_list: - type: file - description: List of missing BUSCOs - pattern: "missing_busco_list.tsv" - - single_copy_proteins: - type: file - description: Fasta file of single copy proteins (transcriptome mode) - pattern: "single_copy_proteins.faa" - - seq_dir: - type: directory - description: BUSCO sequence directory - pattern: "busco_sequences" - - translated_dir: - type: directory - description: Six frame translations of each transcript made by the transcriptome mode - pattern: "translated_dir" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@priyanka-surana" - - "@charles-plessy" - - "@mahesh-panchal" - - "@muffato" - - "@jvhagey" - - "@gallvp" -maintainers: - - "@priyanka-surana" - - "@charles-plessy" - - "@mahesh-panchal" - - "@muffato" - - "@jvhagey" - - "@gallvp" diff --git a/modules/gallvp/busco/busco/tests/main.nf.test b/modules/gallvp/busco/busco/tests/main.nf.test deleted file mode 100644 index 829bd28..0000000 --- a/modules/gallvp/busco/busco/tests/main.nf.test +++ /dev/null @@ -1,415 +0,0 @@ -nextflow_process { - - name "Test Process BUSCO_BUSCO" - script "../main.nf" - process "BUSCO_BUSCO" - - tag "modules" - tag "modules_gallvp" - tag "busco" - tag "busco/busco" - - test("test_busco_genome_single_fasta") { - - config './nextflow.config' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) - ] - input[1] = 'genome' - input[2] = 'bacteria_odb10' // Launch with 'auto' to use --auto-lineage, and specified lineages // 'auto' removed from test due to memory issues - input[3] = [] // Download busco lineage - input[4] = [] // No config - """ - } - } - - then { - assert process.success - - with(path(process.out.short_summaries_txt[0][1]).text) { - assert contains('BUSCO version') - assert contains('The lineage dataset is') - assert contains('BUSCO was run in mode') - assert contains('Complete BUSCOs') - assert contains('Missing BUSCOs') - assert contains('Dependencies and versions') - } - - with(path(process.out.short_summaries_json[0][1]).text) { - assert contains('one_line_summary') - assert contains('mode') - assert contains('dataset') - } - - assert snapshot( - process.out.batch_summary[0][1], - process.out.full_table[0][1], - process.out.missing_busco_list[0][1], - process.out.versions[0] - ).match() - - with(file(process.out.seq_dir[0][1]).listFiles().collect { it.name }) { - assert contains('single_copy_busco_sequences.tar.gz') - assert contains('multi_copy_busco_sequences.tar.gz') - assert contains('fragmented_busco_sequences.tar.gz') - } - - with(path("${process.out.busco_dir[0][1]}/logs/busco.log").text) { - assert contains('DEBUG:busco.run_BUSCO') - assert contains('Results from dataset') - assert contains('how to cite BUSCO') - } - - assert process.out.single_copy_proteins == [] - assert process.out.translated_dir == [] - } - } - - test("test_busco_genome_multi_fasta") { - - config './nextflow.config' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/genome.fasta', checkIfExists: true) - ] - ] - input[1] = 'genome' - input[2] = 'bacteria_odb10' - input[3] = [] - input[4] = [] - """ - } - } - - then { - assert process.success - - with(path(process.out.short_summaries_txt[0][1][0]).text) { - assert contains('BUSCO version') - assert contains('The lineage dataset is') - assert contains('BUSCO was run in mode') - assert contains('Complete BUSCOs') - assert contains('Missing BUSCOs') - assert contains('Dependencies and versions') - } - - with(path(process.out.short_summaries_txt[0][1][1]).text) { - assert contains('BUSCO version') - assert contains('The lineage dataset is') - assert contains('BUSCO was run in mode') - assert contains('Complete BUSCOs') - assert contains('Missing BUSCOs') - assert contains('Dependencies and versions') - } - - with(path(process.out.short_summaries_json[0][1][0]).text) { - assert contains('one_line_summary') - assert contains('mode') - assert contains('dataset') - } - - with(path(process.out.short_summaries_json[0][1][1]).text) { - assert contains('one_line_summary') - assert contains('mode') - assert contains('dataset') - } - - assert snapshot( - process.out.batch_summary[0][1], - process.out.full_table[0][1], - process.out.missing_busco_list[0][1], - process.out.versions[0] - ).match() - - with(file(process.out.seq_dir[0][1][0]).listFiles().collect { it.name }) { - assert contains('single_copy_busco_sequences.tar.gz') - assert contains('multi_copy_busco_sequences.tar.gz') - assert contains('fragmented_busco_sequences.tar.gz') - } - - with(file(process.out.seq_dir[0][1][1]).listFiles().collect { it.name }) { - assert contains('single_copy_busco_sequences.tar.gz') - assert contains('multi_copy_busco_sequences.tar.gz') - assert contains('fragmented_busco_sequences.tar.gz') - } - - with(path("${process.out.busco_dir[0][1]}/logs/busco.log").text) { - assert contains('DEBUG:busco.run_BUSCO') - assert contains('Results from dataset') - assert contains('how to cite BUSCO') - } - - assert process.out.single_copy_proteins == [] - assert process.out.translated_dir == [] - } - - } - - test("test_busco_eukaryote_metaeuk") { - - config './nextflow.metaeuk.config' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[1] = 'genome' - input[2] = 'eukaryota_odb10' - input[3] = [] - input[4] = [] - """ - } - } - - then { - assert process.success - - with(path(process.out.short_summaries_txt[0][1]).text) { - assert contains('BUSCO version') - assert contains('The lineage dataset is') - assert contains('BUSCO was run in mode') - assert contains('Complete BUSCOs') - assert contains('Missing BUSCOs') - assert contains('Dependencies and versions') - } - - with(path(process.out.short_summaries_json[0][1]).text) { - assert contains('one_line_summary') - assert contains('mode') - assert contains('dataset') - } - - assert snapshot( - process.out.batch_summary[0][1], - process.out.full_table[0][1], - process.out.missing_busco_list[0][1], - process.out.versions[0] - ).match() - - with(file(process.out.seq_dir[0][1]).listFiles().collect { it.name }) { - assert contains('single_copy_busco_sequences.tar.gz') - assert contains('multi_copy_busco_sequences.tar.gz') - assert contains('fragmented_busco_sequences.tar.gz') - } - - with(path("${process.out.busco_dir[0][1]}/logs/busco.log").text) { - assert contains('DEBUG:busco.run_BUSCO') - assert contains('Results from dataset') - assert contains('how to cite BUSCO') - - } - - assert process.out.single_copy_proteins == [] - assert process.out.translated_dir == [] - } - - } - - test("test_busco_eukaryote_augustus") { - - config './nextflow.augustus.config' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[1] = 'genome' - input[2] = 'eukaryota_odb10' - input[3] = [] - input[4] = [] - """ - } - } - - then { - assert process.success - - assert snapshot( - process.out.batch_summary[0][1], - process.out.versions[0] - ).match() - - with(path("${process.out.busco_dir[0][1]}/logs/busco.log").text) { - assert contains('DEBUG:busco.run_BUSCO') - assert contains('Augustus did not recognize any genes') - - } - - assert process.out.short_summaries_json == [] - assert process.out.short_summaries_txt == [] - assert process.out.missing_busco_list == [] - assert process.out.full_table == [] - assert process.out.single_copy_proteins == [] - assert process.out.translated_dir == [] - } - - } - - test("test_busco_protein") { - - config './nextflow.config' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/proteome.fasta', checkIfExists: true) - ] - input[1] = 'proteins' - input[2] = 'bacteria_odb10' - input[3] = [] - input[4] = [] - """ - } - } - - then { - assert process.success - - with(path(process.out.short_summaries_txt[0][1]).text) { - assert contains('BUSCO version') - assert contains('The lineage dataset is') - assert contains('BUSCO was run in mode') - assert contains('Complete BUSCOs') - assert contains('Missing BUSCOs') - assert contains('Dependencies and versions') - } - - with(path(process.out.short_summaries_json[0][1]).text) { - assert contains('one_line_summary') - assert contains('mode') - assert contains('dataset') - } - - assert snapshot( - process.out.batch_summary[0][1], - process.out.full_table[0][1], - process.out.missing_busco_list[0][1], - process.out.versions[0] - ).match() - - with(file(process.out.seq_dir[0][1]).listFiles().collect { it.name }) { - assert contains('single_copy_busco_sequences.tar.gz') - assert contains('multi_copy_busco_sequences.tar.gz') - assert contains('fragmented_busco_sequences.tar.gz') - } - - with(path("${process.out.busco_dir[0][1]}/logs/busco.log").text) { - assert contains('DEBUG:busco.run_BUSCO') - assert contains('Results from dataset') - assert contains('how to cite BUSCO') - } - - assert process.out.single_copy_proteins == [] - assert process.out.translated_dir == [] - } - - } - - test("test_busco_transcriptome") { - - config './nextflow.config' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true) - ] - input[1] = 'transcriptome' - input[2] = 'bacteria_odb10' - input[3] = [] - input[4] = [] - """ - } - } - - then { - assert process.success - - with(path(process.out.short_summaries_txt[0][1]).text) { - assert contains('BUSCO version') - assert contains('The lineage dataset is') - assert contains('BUSCO was run in mode') - assert contains('Complete BUSCOs') - assert contains('Missing BUSCOs') - assert contains('Dependencies and versions') - } - - with(path(process.out.short_summaries_json[0][1]).text) { - assert contains('one_line_summary') - assert contains('mode') - assert contains('dataset') - } - - assert snapshot( - process.out.batch_summary[0][1], - process.out.full_table[0][1], - process.out.missing_busco_list[0][1], - process.out.translated_dir[0][1], - process.out.single_copy_proteins[0][1], - process.out.versions[0] - ).match() - - with(file(process.out.seq_dir[0][1]).listFiles().collect { it.name }) { - assert contains('single_copy_busco_sequences.tar.gz') - assert contains('multi_copy_busco_sequences.tar.gz') - assert contains('fragmented_busco_sequences.tar.gz') - } - - with(path("${process.out.busco_dir[0][1]}/logs/busco.log").text) { - assert contains('DEBUG:busco.run_BUSCO') - assert contains('Results from dataset') - assert contains('how to cite BUSCO') - } - } - - } - - test("minimal-stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) - ] - input[1] = 'genome' - input[2] = 'bacteria_odb10' - input[3] = [] - input[4] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - -} diff --git a/modules/gallvp/busco/busco/tests/main.nf.test.snap b/modules/gallvp/busco/busco/tests/main.nf.test.snap deleted file mode 100644 index 1b6411b..0000000 --- a/modules/gallvp/busco/busco/tests/main.nf.test.snap +++ /dev/null @@ -1,230 +0,0 @@ -{ - "minimal-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - [ - { - "id": "test" - }, - [ - - ] - ] - ], - "7": [ - - ], - "8": [ - [ - { - "id": "test" - }, - [ - [ - [ - [ - - ] - ] - ] - ] - ] - ], - "9": [ - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "batch_summary": [ - [ - { - "id": "test" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "busco_dir": [ - [ - { - "id": "test" - }, - [ - [ - [ - [ - - ] - ] - ] - ] - ] - ], - "full_table": [ - - ], - "missing_busco_list": [ - - ], - "seq_dir": [ - [ - { - "id": "test" - }, - [ - - ] - ] - ], - "short_summaries_json": [ - - ], - "short_summaries_txt": [ - - ], - "single_copy_proteins": [ - - ], - "translated_dir": [ - - ], - "versions": [ - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:28:04.451297" - }, - "test_busco_eukaryote_augustus": { - "content": [ - "test-eukaryota_odb10-busco.batch_summary.txt:md5,3ea3bdc423a461dae514d816bdc61c89", - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:26:36.974986" - }, - "test_busco_genome_single_fasta": { - "content": [ - "test-bacteria_odb10-busco.batch_summary.txt:md5,21b3fb771cf36be917cc451540d999be", - "full_table.tsv:md5,638fe7590f442c57361554dae330eca1", - "missing_busco_list.tsv:md5,1530af4fe7673a6d001349537bcd410a", - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:22:45.07816" - }, - "test_busco_genome_multi_fasta": { - "content": [ - "test-bacteria_odb10-busco.batch_summary.txt:md5,fcd3c208913e8abda3d6742c43fec5fa", - [ - "full_table.tsv:md5,c657edcc7d0de0175869717551df6e83", - "full_table.tsv:md5,638fe7590f442c57361554dae330eca1" - ], - [ - "missing_busco_list.tsv:md5,aceb66e347a353cb7fca8e2a725f9112", - "missing_busco_list.tsv:md5,1530af4fe7673a6d001349537bcd410a" - ], - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:23:50.255602" - }, - "test_busco_eukaryote_metaeuk": { - "content": [ - "test-eukaryota_odb10-busco.batch_summary.txt:md5,ff6d8277e452a83ce9456bbee666feb6", - "full_table.tsv:md5,92b1b1d5cb5ea0e2093d16f00187e8c7", - "missing_busco_list.tsv:md5,0352e563de290bf804c708323c35a9e3", - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:25:38.159041" - }, - "test_busco_transcriptome": { - "content": [ - "test-bacteria_odb10-busco.batch_summary.txt:md5,8734b3f379c4c0928e5dd4ea1873dc64", - "full_table.tsv:md5,1b2ce808fdafa744c56b5f781551272d", - "missing_busco_list.tsv:md5,a6931b6470262b997b8b99ea0f1d14a4", - [ - "1024388at2.faa:md5,797d603d262a6595a112e25b73e878b0", - "1054741at2.faa:md5,cd4b928cba6b19b4437746ba507e7195", - "1093223at2.faa:md5,df9549708e5ffcfaee6a74dd70a0e5dc", - "1151822at2.faa:md5,12726afc1cdc40c13392e1596e93df3a", - "143460at2.faa:md5,d887431fd988a5556a523440f02d9594", - "1491686at2.faa:md5,d03362d19979b27306c192f1c74a84e5", - "1504821at2.faa:md5,4f5f6e5c57bac0092c1d85ded73d7e67", - "1574817at2.faa:md5,1153e55998c2929eacad2aed7d08d248", - "1592033at2.faa:md5,bb7a59e5f3a57ba12d10dabf4c77ab57", - "1623045at2.faa:md5,8fe38155feb1802beb97ef7714837bf5", - "1661836at2.faa:md5,6c6d592c2fbb0d7a4e5e1f47a15644f0", - "1674344at2.faa:md5,bb41b44e53565a54cadf0b780532fe08", - "1698718at2.faa:md5,f233860000028eb00329aa85236c71e5", - "1990650at2.faa:md5,34a2d29c5f8b6253159ddb7a43fa1829", - "223233at2.faa:md5,dec6705c7846c989296e73942f953cbc", - "402899at2.faa:md5,acc0f271f9a586d2ce1ee41669b22999", - "505485at2.faa:md5,aa0391f8fa5d9bd19b30d844d5a99845", - "665824at2.faa:md5,47f8ad43b6a6078206feb48c2e552793", - "776861at2.faa:md5,f8b90c13f7c6be828dea3bb920195e3d", - "874197at2.faa:md5,8d22a35a768debe6f376fc695d233a69", - "932854at2.faa:md5,2eff2de1ab83b22f3234a529a44e22bb", - "95696at2.faa:md5,247bfd1aef432f7b5456307768e9149c" - ], - "single_copy_proteins.faa:md5,73e2c5d6a9b0f01f2deea3cc5f21b764", - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:27:53.992893" - }, - "test_busco_protein": { - "content": [ - "test-bacteria_odb10-busco.batch_summary.txt:md5,f5a782378f9f94a748aa907381fdef91", - "full_table.tsv:md5,812ab6a0496fccab774643cf40c4f2a8", - "missing_busco_list.tsv:md5,aceb66e347a353cb7fca8e2a725f9112", - "versions.yml:md5,3fc94714b95c2dc15399a4229d9dd1d9" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T13:27:12.724862" - } -} \ No newline at end of file diff --git a/modules/gallvp/busco/busco/tests/nextflow.augustus.config b/modules/gallvp/busco/busco/tests/nextflow.augustus.config deleted file mode 100644 index 84daa69..0000000 --- a/modules/gallvp/busco/busco/tests/nextflow.augustus.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: 'BUSCO_BUSCO' { - ext.args = '--tar --augustus' - } -} diff --git a/modules/gallvp/busco/busco/tests/nextflow.config b/modules/gallvp/busco/busco/tests/nextflow.config deleted file mode 100644 index 1ec3fec..0000000 --- a/modules/gallvp/busco/busco/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: 'BUSCO_BUSCO' { - ext.args = '--tar' - } -} diff --git a/modules/gallvp/busco/busco/tests/nextflow.metaeuk.config b/modules/gallvp/busco/busco/tests/nextflow.metaeuk.config deleted file mode 100644 index c141844..0000000 --- a/modules/gallvp/busco/busco/tests/nextflow.metaeuk.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: 'BUSCO_BUSCO' { - ext.args = '--tar --metaeuk' - } -} diff --git a/modules/gallvp/busco/busco/tests/old_test.yml b/modules/gallvp/busco/busco/tests/old_test.yml deleted file mode 100644 index 75177f5..0000000 --- a/modules/gallvp/busco/busco/tests/old_test.yml +++ /dev/null @@ -1,624 +0,0 @@ -- name: busco test_busco_genome_single_fasta - command: nextflow run ./tests/modules/nf-core/busco -entry test_busco_genome_single_fasta -c ./tests/config/nextflow.config - tags: - - busco - files: - - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt - md5sum: bc2440f8a68d7fbf931ff911c1c3fdfa - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/bbtools_err.log - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/bbtools_out.log - md5sum: 9caf1a1434414c78562eb0bbb9c0e53f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/hmmsearch_err.log - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/hmmsearch_out.log - contains: - - "# hmmsearch :: search profile(s) against a sequence database" - - "# target sequence database:" - - "Internal pipeline statistics summary:" - - "[ok]" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/prodigal_err.log - md5sum: 538510cfc7483498210f01e53fe035ad - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/prodigal_out.log - md5sum: 61050b0706addc9498b2088a2d6efa9a - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/.checkpoint - contains: - - "Tool: prodigal" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/predicted.faa - md5sum: 836e9a80d33d8b89168f07ddc13ee991 - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/predicted.fna - md5sum: 20eeb75f86842e6e136f02bca8b73a9f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11.faa - md5sum: 836e9a80d33d8b89168f07ddc13ee991 - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11.fna - md5sum: 20eeb75f86842e6e136f02bca8b73a9f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11_err.log - md5sum: 538510cfc7483498210f01e53fe035ad - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11_out.log - md5sum: 61050b0706addc9498b2088a2d6efa9a - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/.bbtools_output/.checkpoint - contains: - - "Tool: bbtools" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/full_table.tsv - md5sum: c56edab1dc1522e993c25ae2b730799f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/hmmer_output.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/missing_busco_list.tsv - md5sum: b533ef30270f27160acce85a22d01bf5 - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "lineage_dataset" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/test-bacteria_odb10-busco/logs/busco.log - contains: - - "DEBUG:busco.run_BUSCO" - - "Results from dataset" - - "how to cite BUSCO" - - path: output/busco/versions.yml - -- name: busco test_busco_genome_multi_fasta - command: nextflow run ./tests/modules/nf-core/busco -entry test_busco_genome_multi_fasta -c ./tests/config/nextflow.config - tags: - - busco - files: - - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt - md5sum: 8c64c1a28b086ef2ee444f99cbed5f7d - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/logs/bbtools_err.log - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/logs/bbtools_out.log - md5sum: 8f047bdb33264d22a83920bc2c63f29a - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/logs/hmmsearch_err.log - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/logs/hmmsearch_out.log - contains: - - "# hmmsearch :: search profile(s) against a sequence database" - - "# target sequence database:" - - "Internal pipeline statistics summary:" - - "[ok]" - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/logs/prodigal_err.log - md5sum: c1fdc6977332f53dfe7f632733bb4585 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/logs/prodigal_out.log - md5sum: 50752acb1c5a20be886bfdfc06635bcb - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/.checkpoint - contains: - - "Tool: prodigal" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/predicted.faa - md5sum: 8166471fc5f08c82fd5643ab42327f9d - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/predicted.fna - md5sum: ddc508a18f60e7f3314534df50cdf8ca - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11.faa - md5sum: 8166471fc5f08c82fd5643ab42327f9d - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11.fna - md5sum: ddc508a18f60e7f3314534df50cdf8ca - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11_err.log - md5sum: c1fdc6977332f53dfe7f632733bb4585 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11_out.log - md5sum: 50752acb1c5a20be886bfdfc06635bcb - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_4.faa - md5sum: e56fd59c38248dc21ac94355dca98121 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_4.fna - md5sum: b365f84bf99c68357952e0b98ed7ce42 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_4_err.log - md5sum: e5f14d7925ba14a0f9850542f3739894 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_4_out.log - md5sum: d41971bfc1b621d4ffd2633bc47017ea - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/.bbtools_output/.checkpoint - contains: - - "Tool: bbtools" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/full_table.tsv - md5sum: c9651b88b10871abc260ee655898e828 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/hmmer_output.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/missing_busco_list.tsv - md5sum: 9939309df2da5419de88c32d1435c779 - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/test-bacteria_odb10-busco/genome.fasta/run_bacteria_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/bbtools_err.log - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/bbtools_out.log - md5sum: 9caf1a1434414c78562eb0bbb9c0e53f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/hmmsearch_err.log - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/hmmsearch_out.log - contains: - - "# hmmsearch :: search profile(s) against a sequence database" - - "# target sequence database:" - - "Internal pipeline statistics summary:" - - "[ok]" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/prodigal_err.log - md5sum: 538510cfc7483498210f01e53fe035ad - - path: output/busco/test-bacteria_odb10-busco/genome.fna/logs/prodigal_out.log - md5sum: 61050b0706addc9498b2088a2d6efa9a - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/.checkpoint - contains: - - "Tool: prodigal" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/predicted.faa - md5sum: 836e9a80d33d8b89168f07ddc13ee991 - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/predicted.fna - md5sum: 20eeb75f86842e6e136f02bca8b73a9f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11.faa - md5sum: 836e9a80d33d8b89168f07ddc13ee991 - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11.fna - md5sum: 20eeb75f86842e6e136f02bca8b73a9f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11_err.log - md5sum: 538510cfc7483498210f01e53fe035ad - - path: output/busco/test-bacteria_odb10-busco/genome.fna/prodigal_output/predicted_genes/tmp/prodigal_mode_single_code_11_out.log - md5sum: 61050b0706addc9498b2088a2d6efa9a - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/.bbtools_output/.checkpoint - contains: - - "Tool: bbtools" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/full_table.tsv - md5sum: c56edab1dc1522e993c25ae2b730799f - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/hmmer_output.tar.gz - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/missing_busco_list.tsv - md5sum: b533ef30270f27160acce85a22d01bf5 - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/test-bacteria_odb10-busco/genome.fna/run_bacteria_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/test-bacteria_odb10-busco/logs/busco.log - contains: - - "DEBUG:busco.run_BUSCO" - - "Results from dataset" - - "how to cite BUSCO" - - path: output/busco/versions.yml - -- name: busco test_busco_eukaryote_metaeuk - command: nextflow run ./tests/modules/nf-core/busco -entry test_busco_eukaryote_metaeuk -c ./tests/config/nextflow.config - tags: - - busco - files: - - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt - md5sum: ff6d8277e452a83ce9456bbee666feb6 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/bbtools_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/bbtools_out.log - md5sum: e63debaa653f18f7405d936050abc093 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/hmmsearch_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/hmmsearch_out.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run1_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run1_out.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run2_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run2_out.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/.bbtools_output/.checkpoint - contains: - - "Tool: bbtools" - - "Completed" - - "jobs" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/full_table.tsv - md5sum: bd880e90b9e5620a58943a3e0f9ff16b - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/hmmer_output.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/.checkpoint - contains: - - "Tool: metaeuk" - - "Completed" - - "jobs" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/combined_pred_proteins.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.codon.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.gff - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.headersMap.tsv - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/refseq_db_rerun.faa - md5sum: d80b8fa4cb5ed0d47d63d6aa93635bc2 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.codon.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.gff - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.headersMap.tsv - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/missing_busco_list.tsv - md5sum: 1e8e79c540fd2e69ba0d2659d9eb2988 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/test-eukaryota_odb10-busco/logs/busco.log - contains: - - "DEBUG:busco.run_BUSCO" - - "Results from dataset" - - "how to cite BUSCO" - - path: output/busco/versions.yml - -- name: busco test_busco_eukaryote_augustus - command: nextflow run ./tests/modules/nf-core/busco -entry test_busco_eukaryote_augustus -c ./tests/config/nextflow.config - tags: - - busco - files: - - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt - md5sum: ff6d8277e452a83ce9456bbee666feb6 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/bbtools_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/bbtools_out.log - md5sum: e63debaa653f18f7405d936050abc093 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/hmmsearch_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/hmmsearch_out.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run1_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run1_out.log - contains: - - "metaeuk" - - "easy-predict" - - "Compute score and coverage" - - "Time for processing:" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run2_err.log - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/logs/metaeuk_run2_out.log - contains: - - "metaeuk" - - "easy-predict" - - "Compute score and coverage" - - "Time for processing:" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/.bbtools_output/.checkpoint - contains: - - "Tool: bbtools" - - "Completed" - - "jobs" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/full_table.tsv - md5sum: bd880e90b9e5620a58943a3e0f9ff16b - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/hmmer_output.tar.gz - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/.checkpoint - contains: - - "Tool: metaeuk" - - "Completed" - - "jobs" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/combined_pred_proteins.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.codon.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.gff - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/initial_results/genome.fasta.headersMap.tsv - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/refseq_db_rerun.faa - md5sum: d80b8fa4cb5ed0d47d63d6aa93635bc2 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.codon.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.fas - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.gff - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/metaeuk_output/rerun_results/genome.fasta.headersMap.tsv - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/missing_busco_list.tsv - md5sum: 1e8e79c540fd2e69ba0d2659d9eb2988 - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/test-eukaryota_odb10-busco/genome.fasta/run_eukaryota_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/test-eukaryota_odb10-busco/logs/busco.log - contains: - - "DEBUG:busco.run_BUSCO" - - "Results from dataset" - - "how to cite BUSCO" - - path: output/busco/versions.yml - -- name: busco test_busco_protein - command: nextflow run ./tests/modules/nf-core/busco -entry test_busco_protein -c ./tests/config/nextflow.config - tags: - - busco - files: - - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt - md5sum: 7a65e6cbb6c56a2ea4e739ae0aa3297d - - path: output/busco/test-bacteria_odb10-busco/logs/busco.log - contains: - - "DEBUG:busco.run_BUSCO" - - "Results from dataset" - - "how to cite BUSCO" - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/logs/hmmsearch_err.log - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/logs/hmmsearch_out.log - contains: - - "# hmmsearch :: search profile(s) against a sequence database" - - "# target sequence database:" - - "Internal pipeline statistics summary:" - - "[ok]" - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/full_table.tsv - md5sum: 0e34f1011cd83ea1d5d5103ec62b8922 - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/hmmer_output.tar.gz - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/missing_busco_list.tsv - md5sum: 9939309df2da5419de88c32d1435c779 - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/test-bacteria_odb10-busco/proteome.fasta/run_bacteria_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/versions.yml - -- name: busco test_busco_transcriptome - command: nextflow run ./tests/modules/nf-core/busco -entry test_busco_transcriptome -c ./tests/config/nextflow.config - tags: - - busco - files: - - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt - md5sum: 46118ecf60d1b87d22b96d80f4f03632 - - path: output/busco/test-bacteria_odb10-busco/logs/busco.log - contains: - - "DEBUG:busco.run_BUSCO" - - "Results from dataset" - - "how to cite BUSCO" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/.checkpoint - contains: - - "Tool: makeblastdb" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.ndb - md5sum: 3788c017fe5e6f0f58224e9cdd21822b - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.nhr - md5sum: 8ecd2ce392bb5e25ddbe1d85f879582e - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.nin - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.njs - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.not - md5sum: 0c340e376c7e85d19f82ec1a833e6a6e - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.nsq - md5sum: 532d5c0a7ea00fe95ca3c97cb3be6198 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.ntf - md5sum: de1250813f0c7affc6d12dac9d0fb6bb - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/blast_db/test1.contigs.fa.nto - md5sum: ff74bd41f9cc9b011c63a32c4f7693bf - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/logs/hmmsearch_err.log - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/logs/hmmsearch_out.log - contains: - - "# hmmsearch :: search profile(s) against a sequence database" - - "# target sequence database:" - - "Internal pipeline statistics summary:" - - "[ok]" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/logs/makeblastdb_err.log - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/logs/makeblastdb_out.log - contains: - - "Building a new DB" - - "Adding sequences from FASTA" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/logs/tblastn_err.log - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/logs/tblastn_out.log - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/.checkpoint - contains: - - "Tool: tblastn" - - "Completed" - - "jobs" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/coordinates.tsv - md5sum: cc30eed321944af293452bdbcfc24292 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_101.temp - md5sum: 73e9c65fc83fedc58f57f09b08f08238 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_119.temp - md5sum: 7fa4cc7955ec0cc36330a221c579b975 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_129.temp - md5sum: 6f1601c875d019e3f6f1f98ed8e988d4 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_138.temp - md5sum: 3f8e034686cd240c2330650d791bcae2 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_143.temp - md5sum: df3dfa8e9ba30ed70cf75b5e7abf2179 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_172.temp - md5sum: 7d463e0e6cf7169bc9077d8dc776dda1 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_178.temp - md5sum: 2288edf7fa4f88f51b4cf4d94086f77e - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_188.temp - md5sum: 029906abbad6d87fc57830dd548cac24 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_195.temp - md5sum: 4937f3b348774a31b1160a00297c29cc - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_210.temp - md5sum: afcb20ba4c466479d6b91c8c62251e1f - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_232.temp - md5sum: 2e1e823ce017345bd998191a39fa9924 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_268.temp - md5sum: 08c2d82c34ecffbe1c638b410349412e - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_29.temp - md5sum: cd9b63cf93524284781535c888313764 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_44.temp - md5sum: d1929b742b24ebe379bf4801ca882dca - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_58.temp - md5sum: 69215765b010c05336538cb322c900b3 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_72.temp - md5sum: 6feaa1cc3b0899a147ea9d466878f3e3 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_80.temp - md5sum: 13625eae14e860a96ce17cd4e37e9d01 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_81.temp - md5sum: e14b2484649b0dbc8926815c207b806d - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_93.temp - md5sum: 6902c93691df00e690faea914c71839e - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/sequences/k141_97.temp - md5sum: 0a0d9d38a83acbd5ad43c29cdf429988 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/blast_output/tblastn.tsv - contains: - - "TBLASTN" - - "BLAST processed" - - "queries" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/busco_sequences/fragmented_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/busco_sequences/multi_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/busco_sequences/single_copy_busco_sequences.tar.gz - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/full_table.tsv - md5sum: 24df25199e13c88bd892fc3e7b541ca0 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/hmmer_output.tar.gz - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/missing_busco_list.tsv - md5sum: e7232e2b8cca4fdfdd9e363b39ebbc81 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/short_summary.json - contains: - - "one_line_summary" - - "mode" - - "dataset" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/short_summary.txt - contains: - - "# BUSCO version is:" - - "Results:" - - "busco:" - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/run_bacteria_odb10/single_copy_proteins.faa - md5sum: e04b9465733577ae6e4bccb7aa01e720 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1024388at2.faa - md5sum: 7333c39a20258f20c7019ea0cd83157c - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1054741at2.faa - md5sum: ebb481e77a824685fbe04d8a2f3a0d7d - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1093223at2.faa - md5sum: 34621c7d499034e8f8e6b92fd4020a93 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1151822at2.faa - md5sum: aa89ca381c1c70c9c4e1380351ca7c2a - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/143460at2.faa - md5sum: f2e91d78b8dd3722840378789f29e8c8 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1491686at2.faa - md5sum: 73c25aef5c9cba7f4151804941b146ea - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1504821at2.faa - md5sum: cda556018d1f84ebe517e89f6fc107d0 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1574817at2.faa - md5sum: a9096c9fb8b25c78a72871ab0463acdc - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1592033at2.faa - md5sum: e463d25ce186c0cebfd749474f3a4c64 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1623045at2.faa - md5sum: f2cfd241590c6d8377286d6135480937 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1661836at2.faa - md5sum: 586569546fb9861502468e3d9ba2775c - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1674344at2.faa - md5sum: 24c658bee14ad84b062d81ad96642eb8 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1698718at2.faa - md5sum: 0b8e26ddf5149bbd8805be7af125208d - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/1990650at2.faa - md5sum: 159320712ee01fb2ccb31a25df44eead - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/223233at2.faa - md5sum: 812629c0b06ac3d18661c2ca78de0c08 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/402899at2.faa - md5sum: f7ff4e1591342d30b77392a2e84b57d9 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/505485at2.faa - md5sum: 7b34a24fc49c540d46fcf96ff5129564 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/665824at2.faa - md5sum: 4cff2df64f6bcaff8bc19c234c8bcccd - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/776861at2.faa - md5sum: 613af7a3fea30ea2bece66f603b9284a - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/874197at2.faa - md5sum: a7cd1b13c9ef91c7ef4e31614166f197 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/932854at2.faa - md5sum: fe313ffd5efdb0fed887a04fba352552 - - path: output/busco/test-bacteria_odb10-busco/test1.contigs.fa/translated_proteins/95696at2.faa - md5sum: 4e1f30a2fea4dfbf9bb7fae2700622a0 - - path: output/busco/versions.yml diff --git a/modules/gallvp/busco/busco/tests/tags.yml b/modules/gallvp/busco/busco/tests/tags.yml deleted file mode 100644 index 7c4d283..0000000 --- a/modules/gallvp/busco/busco/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -busco/busco: - - "modules/nf-core/busco/busco/**" diff --git a/modules/gallvp/busco/generateplot/environment.yml b/modules/gallvp/busco/generateplot/environment.yml deleted file mode 100644 index 1ca5bab..0000000 --- a/modules/gallvp/busco/generateplot/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "busco_generateplot" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::busco=5.7.1 diff --git a/modules/gallvp/busco/generateplot/main.nf b/modules/gallvp/busco/generateplot/main.nf deleted file mode 100644 index 6a4b339..0000000 --- a/modules/gallvp/busco/generateplot/main.nf +++ /dev/null @@ -1,45 +0,0 @@ -process BUSCO_GENERATEPLOT { - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/busco:5.7.1--pyhdfd78af_0': - 'biocontainers/busco:5.7.1--pyhdfd78af_0' }" - - input: - path short_summary_txt, stageAs: 'busco/*' - - output: - path '*.png' , emit: png - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: 'busco_figure' - """ - generate_plot.py \\ - $args \\ - -wd busco - - mv ./busco/busco_figure.png ${prefix}.png - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: 'busco_figure' - """ - touch ${prefix}.png - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) - END_VERSIONS - """ -} diff --git a/modules/gallvp/busco/generateplot/meta.yml b/modules/gallvp/busco/generateplot/meta.yml deleted file mode 100644 index 796f32b..0000000 --- a/modules/gallvp/busco/generateplot/meta.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: "busco_generateplot" -description: BUSCO plot generation tool -keywords: - - genome - - fasta - - annotation - - busco - - transcriptome - - quality control -tools: - - busco: - description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. - homepage: https://busco.ezlab.org/ - documentation: https://busco.ezlab.org/busco_userguide.html - tool_dev_url: https://gitlab.com/ezlab/busco - doi: "10.1007/978-1-4939-9173-0_14" - licence: ["MIT"] -input: - - short_summary_txt: - type: file - description: One or more short summary txt files from BUSCO - pattern: "short_summary.*.txt" -output: - - png: - type: file - description: A summary plot in png format - pattern: "*.png" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/busco/generateplot/tests/main.nf.test b/modules/gallvp/busco/generateplot/tests/main.nf.test deleted file mode 100644 index 6a43fa7..0000000 --- a/modules/gallvp/busco/generateplot/tests/main.nf.test +++ /dev/null @@ -1,72 +0,0 @@ -nextflow_process { - - name "Test Process BUSCO_GENERATEPLOT" - script "../main.nf" - process "BUSCO_GENERATEPLOT" - - tag "modules" - tag "modules_gallvp" - tag "busco" - tag "busco/busco" - tag "busco/generateplot" - - test("bacteroides_fragilis-genome_fna_gz") { - - setup { - run("BUSCO_BUSCO") { - script "../../busco" - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) - ] - input[1] = 'genome' - input[2] = 'bacteria_odb10' - input[3] = [] - input[4] = [] - """ - } - } - } - - when { - process { - """ - input[0] = BUSCO_BUSCO.out.short_summaries_txt.map { meta, summary -> summary } - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.versions).match("versions") }, - { assert process.out.png != null } // PNGs with same data but different meta-data. Not sure how to get around this, yet! - ) - } - - } - - test("stub") { - - options "-stub" - - when { - process { - """ - input[0] = file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/gallvp/busco/generateplot/tests/main.nf.test.snap b/modules/gallvp/busco/generateplot/tests/main.nf.test.snap deleted file mode 100644 index d9773ec..0000000 --- a/modules/gallvp/busco/generateplot/tests/main.nf.test.snap +++ /dev/null @@ -1,37 +0,0 @@ -{ - "versions": { - "content": [ - [ - "versions.yml:md5,726fa3440ea3a0b2e9d032d7e4d25e74" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T15:40:01.523993" - }, - "stub": { - "content": [ - { - "0": [ - "busco_figure.png:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "1": [ - "versions.yml:md5,726fa3440ea3a0b2e9d032d7e4d25e74" - ], - "png": [ - "busco_figure.png:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - "versions": [ - "versions.yml:md5,726fa3440ea3a0b2e9d032d7e4d25e74" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-03T15:40:11.864276" - } -} \ No newline at end of file diff --git a/modules/gallvp/busco/generateplot/tests/tags.yml b/modules/gallvp/busco/generateplot/tests/tags.yml deleted file mode 100644 index b6548a6..0000000 --- a/modules/gallvp/busco/generateplot/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -busco/generateplot: - - "modules/nf-core/busco/generateplot/**" diff --git a/modules/gallvp/custom/restoregffids/environment.yml b/modules/gallvp/custom/restoregffids/environment.yml deleted file mode 100644 index 2450c45..0000000 --- a/modules/gallvp/custom/restoregffids/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "custom_restoregffids" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "python=3.10.2" diff --git a/modules/gallvp/custom/restoregffids/main.nf b/modules/gallvp/custom/restoregffids/main.nf deleted file mode 100644 index 14e2c07..0000000 --- a/modules/gallvp/custom/restoregffids/main.nf +++ /dev/null @@ -1,35 +0,0 @@ -process CUSTOM_RESTOREGFFIDS { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/python:3.10.2': - 'biocontainers/python:3.10.2' }" - - input: - tuple val(meta), path(gff3) - path(ids_tsv) - - output: - tuple val(meta), path("*.restored.ids.gff3") , emit: restored_ids_gff3 - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - prefix = task.ext.prefix ?: "${meta.id}" - template 'restore_gff_ids.py' - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch "${prefix}.restored.ids.gff3" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python --version | cut -d' ' -f2) - END_VERSIONS - """ -} diff --git a/modules/gallvp/custom/restoregffids/meta.yml b/modules/gallvp/custom/restoregffids/meta.yml deleted file mode 100644 index 4e42b82..0000000 --- a/modules/gallvp/custom/restoregffids/meta.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "custom_restoregffids" -description: | - Restores IDs in a gff3 file based on a TSV table - consisting of original (first column) and new IDs (second column). - This module is helpful when some tools like EDTA implicitly shorten - the IDs without producing the ID map, leading to downstream mismatch - in IDs across files. -keywords: - - genome - - gff - - ID - - shorten - - restore -tools: - - "python": - description: | - Python is a programming language that lets you work quickly - and integrate systems more effectively - homepage: "https://www.python.org" - documentation: "https://docs.python.org/3/" - tool_dev_url: "https://github.com/python/cpython" - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - gff3: - type: file - description: Input gff3 file - pattern: "*.{gff,gff3}" - - ids_tsv: - type: file - description: | - A TSV file with original (first column) and new ids (second column) - if id change was required - pattern: "*.tsv" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - restored_ids_gff3: - type: file - description: GFF3 file with restored ids - pattern: "*.restored.ids.gff3" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/custom/restoregffids/templates/restore_gff_ids.py b/modules/gallvp/custom/restoregffids/templates/restore_gff_ids.py deleted file mode 100755 index 2bde7ab..0000000 --- a/modules/gallvp/custom/restoregffids/templates/restore_gff_ids.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python3 - -from platform import python_version - -ids_tsv = "$ids_tsv" -input_gff3 = "$gff3" -output_prefix = "$prefix" - - -def create_name_mapping_from_tsv(file_path): - dictionary = {} - - with open(file_path) as tsv_file: - for line in tsv_file: - columns = line.strip().split("\\t") - if len(columns) != 2: - raise ValueError(f"{file_path} should be a two column TSV file") - - orig_id, new_id = columns[0], columns[1] - dictionary[new_id] = orig_id - - return dictionary - - -def restore_gff3_ids(new_to_orig_ids, file_path, output_file_name): - # Write versions - with open("versions.yml", "w") as f_versions: - f_versions.write('"${task.process}":\\n') - f_versions.write(f" python: {python_version()}\\n") - - with open(file_path) as input_gff3_file: - input_lines = input_gff3_file.readlines() - - with open(output_file_name, "w") as output_gff_file: - for line in input_lines: - if line.startswith("##"): - output_gff_file.write(line) - continue - - new_id = line.split("\\t")[0] - orig_id = new_to_orig_ids[new_id] - output_gff_file.write("\\t".join([orig_id] + line.split("\\t")[1:])) - - -if __name__ == "__main__": - new_to_orig_ids = create_name_mapping_from_tsv(ids_tsv) - restore_gff3_ids(new_to_orig_ids, input_gff3, f"{output_prefix}.restored.ids.gff3") diff --git a/modules/gallvp/custom/restoregffids/tests/main.nf.test b/modules/gallvp/custom/restoregffids/tests/main.nf.test deleted file mode 100644 index 2c248c9..0000000 --- a/modules/gallvp/custom/restoregffids/tests/main.nf.test +++ /dev/null @@ -1,63 +0,0 @@ -nextflow_process { - - name "Test Process CUSTOM_RESTOREGFFIDS" - script "../main.nf" - process "CUSTOM_RESTOREGFFIDS" - - tag "modules" - tag "modules_gallvp" - tag "custom" - tag "custom/restoregffids" - - test("sarscov2-genome_gff3-success") { - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - input[1] = Channel.of('Chr1\tMT192765.1').collectFile(name: 'id_map.tsv', newLine: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert path(process.out.restored_ids_gff3.get(0).get(1)).getText().contains("Chr1") }, - { assert !path(process.out.restored_ids_gff3.get(0).get(1)).getText().contains("MT192765.1") }, - { assert snapshot(process.out.versions).match("versions") } - ) - } - - } - - test("stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - input[1] = Channel.of('Chr1\tMT192765.1').collectFile(name: 'id_map.tsv', newLine: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.restored_ids_gff3 != null }, - { assert snapshot(process.out.versions).match("versions_stub") } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/gallvp/custom/restoregffids/tests/main.nf.test.snap b/modules/gallvp/custom/restoregffids/tests/main.nf.test.snap deleted file mode 100644 index ebe850a..0000000 --- a/modules/gallvp/custom/restoregffids/tests/main.nf.test.snap +++ /dev/null @@ -1,61 +0,0 @@ -{ - "sarscov2-genome_gff3-success": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.restored.ids.gff3:md5,2c294938b9eb4e52d19e14725c1d92a9" - ] - ], - "1": [ - "versions.yml:md5,32d31c4f1da9a3d1be013fd163e5867e" - ], - "restored_ids_gff3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.restored.ids.gff3:md5,2c294938b9eb4e52d19e14725c1d92a9" - ] - ], - "versions": [ - "versions.yml:md5,32d31c4f1da9a3d1be013fd163e5867e" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-07T13:49:30.047425" - }, - "versions_stub": { - "content": [ - [ - "versions.yml:md5,32d31c4f1da9a3d1be013fd163e5867e" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-10T15:26:11.66528" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,32d31c4f1da9a3d1be013fd163e5867e" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-07T13:49:30.071175" - } -} \ No newline at end of file diff --git a/modules/gallvp/custom/shortenfastaids/environment.yml b/modules/gallvp/custom/shortenfastaids/environment.yml deleted file mode 100644 index a64758c..0000000 --- a/modules/gallvp/custom/shortenfastaids/environment.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "custom_shortenfastaids" -channels: - - conda-forge - - bioconda - - defaults - -dependencies: - - biopython==1.75 - - python==3.8.13 diff --git a/modules/gallvp/custom/shortenfastaids/main.nf b/modules/gallvp/custom/shortenfastaids/main.nf deleted file mode 100644 index 3cdaa07..0000000 --- a/modules/gallvp/custom/shortenfastaids/main.nf +++ /dev/null @@ -1,38 +0,0 @@ -process CUSTOM_SHORTENFASTAIDS { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/biopython:1.75': - 'biocontainers/biopython:1.75' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path("*.short.ids.fasta") , emit: short_ids_fasta , optional: true - tuple val(meta), path("*.short.ids.tsv") , emit: short_ids_tsv - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - prefix = task.ext.prefix ?: "${meta.id}" - template 'shorten_fasta_ids.py' - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - echo \\ - 'IDs have acceptable length and character. No change required.' \\ - > ${meta.id}.short.ids.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python --version | cut -d' ' -f2) - biopython: \$(pip list | grep "biopython" | cut -d' ' -f3) - END_VERSIONS - """ -} diff --git a/modules/gallvp/custom/shortenfastaids/meta.yml b/modules/gallvp/custom/shortenfastaids/meta.yml deleted file mode 100644 index 2425810..0000000 --- a/modules/gallvp/custom/shortenfastaids/meta.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "custom_shortenfastaids" -description: | - Shortens fasta IDs and produces a new fasta along with a TSV table - consisting of original (first column) and new IDs (second column). - This module is helpful when some tools like EDTA implicitly shorten - the IDs without producing the ID map, leading to downstream mismatch - in IDs across files. -keywords: - - genome - - fasta - - ID - - shorten -tools: - - "biopython": - description: | - Biopython is a set of freely available tools for biological computation written in Python by - an international team of developers. - homepage: "https://biopython.org" - documentation: "https://biopython.org/wiki/Documentation" - tool_dev_url: "https://github.com/biopython/biopython" - doi: "10.1093/bioinformatics/btp163" - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - fasta: - type: file - description: Input fasta file - pattern: "*.{fsa,fa,fasta}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - short_ids_fasta: - type: file - description: Fasta file with shortened ids if id change is required - pattern: "*.{fsa,fa,fasta}" - - short_ids_tsv: - type: file - description: | - A TSV file with original (first column) and new ids (second column) - if id change is required - pattern: "*.tsv" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/custom/shortenfastaids/templates/shorten_fasta_ids.py b/modules/gallvp/custom/shortenfastaids/templates/shorten_fasta_ids.py deleted file mode 100755 index 9d9c6e1..0000000 --- a/modules/gallvp/custom/shortenfastaids/templates/shorten_fasta_ids.py +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env python3 - -import re -from importlib.metadata import version -from platform import python_version - -from Bio import SeqIO - -# The input fasta file path -fasta_file_path = "$fasta" -output_files_prefix = "$prefix" - - -def extract_fasta_ids_and_descriptions(fasta_file_path): - fasta_file_obj = SeqIO.parse(fasta_file_path, "fasta") - - ids = [] - for record in fasta_file_obj: - ids.append((record.id, record.description)) - return ids - - -def write_fasta_with_new_ids(fasta_file_path, id_mapping, file_prefix): - old_fasta_file_obj = SeqIO.parse(fasta_file_path, "fasta") - id_map = dict(id_mapping) - - replaced_records = [] - for record in old_fasta_file_obj: - old_id = record.id - - new_id = id_map[old_id] - record.id = new_id - record.description = "" - - replaced_records.append(record) - - SeqIO.write(replaced_records, f"{file_prefix}.short.ids.fasta", "fasta") - - -def do_id_need_to_change(id_and_description, silent=False): - id = id_and_description[0] - description = id_and_description[1] - if len(id) > 13: - if not silent: - print(f"{id} has length greater than 13") - return True - - if not re.match(r"^[a-zA-Z0-9_]+\$", id): - if not silent: - print(f"{id} does not match '^[a-zA-Z0-9_]+\$'") - return True - - if description != id and description != "": - if not silent: - print(f"{id} contains a comment: {description.replace(id, '')}") - return True - - if not silent: - print(f"{id} is acceptable") - return False - - -def do_ids_need_to_change(ids_and_descriptions, silent=False): - return any([do_id_need_to_change(id_and_description, silent) for id_and_description in ids_and_descriptions]) - - -def extract_common_patterns(ids): - pattern_counts = {} - for id in ids: - patterns = re.findall(r"[A-Za-z0_]{4,}", id) - for pattern in set(patterns): - pattern_counts[pattern] = pattern_counts.get(pattern, 0) + 1 - - common_patterns = [pattern for pattern, count in pattern_counts.items() if count >= 2] - - if len(common_patterns) < 1: - return {} - - return {pattern: pattern[:3] for pattern in common_patterns} - - -def shorten_ids(input_ids_and_descriptions, patterns_dict): - shortened_ids = [] - - for id_and_description in input_ids_and_descriptions: - id = id_and_description[0] - description = "" # Treat description as absent as it will be removed by write_fasta_with_new_ids - if not do_id_need_to_change((id, description), silent=True): - shortened_ids.append(id) - continue - - shortened_id = shorten_id_by_pattern_replacement(patterns_dict, id) - - if not do_id_need_to_change((shortened_id, description), silent=True): - shortened_ids.append(shortened_id) - continue - - shortened_id = f"Ctg{generate_hash(id)}" - - if not do_id_need_to_change((shortened_id, description), silent=True): - shortened_ids.append(shortened_id) - continue - - raise ValueError(f"Failed to shorten id: {id} ({shortened_id})") - - return shortened_ids - - -def shorten_id_by_pattern_replacement(patterns_dict, id): - if patterns_dict == {}: - return id - - shortened_id = id - matches_for_id = match_substrings(patterns_dict.keys(), shortened_id) - - for pattern in matches_for_id: - shortened_id = re.sub( - rf"({re.escape(pattern)})", - patterns_dict[pattern], - shortened_id, - ) - return shortened_id if shortened_id[len(shortened_id) - 1] != "_" else shortened_id[0 : (len(shortened_id) - 1)] - - -def match_substrings(substrings, target_string): - pattern = "|".join(map(re.escape, substrings)) - matches = re.findall(pattern, target_string) - return matches - - -def generate_hash(string): - import hashlib - - hash_object = hashlib.sha1(string.encode()) - full_hash = hash_object.hexdigest() - short_hash = full_hash[:10] - return short_hash - - -def fail_if_new_ids_not_valid(ids): - if len(ids) != len(set(ids)): - raise ValueError("Th new IDs are not unique") - - -if __name__ == "__main__": - input_ids_and_descriptions = extract_fasta_ids_and_descriptions(fasta_file_path) - input_ids = [x[0] for x in input_ids_and_descriptions] - - # Write versions - with open("versions.yml", "w") as f_versions: - f_versions.write('"${task.process}":\\n') - f_versions.write(f" python: {python_version()}\\n") - f_versions.write(f" biopython: {version('biopython')}\\n") - - if not do_ids_need_to_change(input_ids_and_descriptions): - print("IDs have acceptable length and character. No change required.") - with open(f"{output_files_prefix}.short.ids.tsv", "w") as f: - f.write("IDs have acceptable length and character. No change required.") - exit(0) - - new_ids = shorten_ids(input_ids_and_descriptions, extract_common_patterns(input_ids)) - fail_if_new_ids_not_valid(new_ids) - - with open(f"{output_files_prefix}.short.ids.tsv", "w") as f: - for input_id, new_id in zip(input_ids, new_ids): - f.write(f"{input_id}\\t{new_id}\\n") - - write_fasta_with_new_ids(fasta_file_path, zip(input_ids, new_ids), output_files_prefix) diff --git a/modules/gallvp/custom/shortenfastaids/tests/main.nf.test b/modules/gallvp/custom/shortenfastaids/tests/main.nf.test deleted file mode 100644 index 8eb2099..0000000 --- a/modules/gallvp/custom/shortenfastaids/tests/main.nf.test +++ /dev/null @@ -1,123 +0,0 @@ -nextflow_process { - - name "Test Process CUSTOM_SHORTENFASTAIDS" - script "../main.nf" - process "CUSTOM_SHORTENFASTAIDS" - - tag "modules" - tag "modules_gallvp" - tag "custom" - tag "custom/shortenfastaids" - - test("homo_sapiens-genome_fasta-no_change") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2-genome_fasta-pattern_change") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("homo_sapiens-genome2_fasta-length_change") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome2.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("custom_fasta-comment_change") { - - when { - process { - """ - input[0] = Channel.of('>Chr1 This is a test comment', 'AGCTAGCT') - | collectFile(name: 'sample.fasta', newLine: true) - | map { file -> [ [ id:'test' ], file ] } - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/gallvp/custom/shortenfastaids/tests/main.nf.test.snap b/modules/gallvp/custom/shortenfastaids/tests/main.nf.test.snap deleted file mode 100644 index 2506ebd..0000000 --- a/modules/gallvp/custom/shortenfastaids/tests/main.nf.test.snap +++ /dev/null @@ -1,227 +0,0 @@ -{ - "custom_fasta-comment_change": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.short.ids.fasta:md5,c861b9d46a4d9bdba66953cff572fc5d" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,8762f2bffbdff75c2812bad72ba52bba" - ] - ], - "2": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ], - "short_ids_fasta": [ - [ - { - "id": "test" - }, - "test.short.ids.fasta:md5,c861b9d46a4d9bdba66953cff572fc5d" - ] - ], - "short_ids_tsv": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,8762f2bffbdff75c2812bad72ba52bba" - ] - ], - "versions": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-07T13:33:05.523745" - }, - "stub": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,fcf920d9a7b57a1e3c29a9e88673330f" - ] - ], - "2": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ], - "short_ids_fasta": [ - - ], - "short_ids_tsv": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,fcf920d9a7b57a1e3c29a9e88673330f" - ] - ], - "versions": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-04T13:58:30.161542" - }, - "homo_sapiens-genome_fasta-no_change": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,642382addc4beba37088b1ebe09d38cf" - ] - ], - "2": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ], - "short_ids_fasta": [ - - ], - "short_ids_tsv": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,642382addc4beba37088b1ebe09d38cf" - ] - ], - "versions": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.1" - }, - "timestamp": "2024-06-02T20:54:17.945233" - }, - "homo_sapiens-genome2_fasta-length_change": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.short.ids.fasta:md5,1382acd98d4cd233a8062ef01b2aaa6d" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,99c0f2a529cb595b2d8530024ed2880e" - ] - ], - "2": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ], - "short_ids_fasta": [ - [ - { - "id": "test" - }, - "test.short.ids.fasta:md5,1382acd98d4cd233a8062ef01b2aaa6d" - ] - ], - "short_ids_tsv": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,99c0f2a529cb595b2d8530024ed2880e" - ] - ], - "versions": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-07T13:33:01.924483" - }, - "sarscov2-genome_fasta-pattern_change": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.short.ids.fasta:md5,14d6f587b6d28889c5c0f985e78d602f" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,d7a2af88e8549586e5616bff6a88bd71" - ] - ], - "2": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ], - "short_ids_fasta": [ - [ - { - "id": "test" - }, - "test.short.ids.fasta:md5,14d6f587b6d28889c5c0f985e78d602f" - ] - ], - "short_ids_tsv": [ - [ - { - "id": "test" - }, - "test.short.ids.tsv:md5,d7a2af88e8549586e5616bff6a88bd71" - ] - ], - "versions": [ - "versions.yml:md5,e5704a53ebea373dac3a93ae800d48ba" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-07T13:32:58.12885" - } -} \ No newline at end of file diff --git a/modules/gallvp/edta/edta/main.nf b/modules/gallvp/edta/edta/main.nf deleted file mode 100644 index cddac07..0000000 --- a/modules/gallvp/edta/edta/main.nf +++ /dev/null @@ -1,92 +0,0 @@ -process EDTA_EDTA { - tag "$meta.id" - label 'process_high' - - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/edta:2.1.0--hdfd78af_1': - 'biocontainers/edta:2.1.0--hdfd78af_1' }" - - input: - tuple val(meta), path(fasta) - path cds - path curatedlib - path rmout - path exclude - - output: - tuple val(meta), path('*.log') , emit: log - tuple val(meta), path('*.EDTA.TElib.fa') , emit: te_lib_fasta - tuple val(meta), path('*.EDTA.pass.list') , emit: pass_list , optional: true - tuple val(meta), path('*.EDTA.out') , emit: out_file , optional: true - tuple val(meta), path('*.EDTA.TEanno.gff3') , emit: te_anno_gff3 , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def mod_file_name = "${fasta}.mod" - def cds_file = cds ? "--cds $cds" : '' - def curatedlib_file = curatedlib ? "--curatedlib $curatedlib": '' - def rmout_file = rmout ? "--rmout $rmout" : '' - def exclude_file = exclude ? "--exclude $exclude" : '' - """ - EDTA.pl \\ - --genome $fasta \\ - --threads $task.cpus \\ - $cds_file \\ - $curatedlib_file \\ - $rmout_file \\ - $exclude_file \\ - $args \\ - &> >(tee "${prefix}.log" 2>&1) - - mv \\ - "${mod_file_name}.EDTA.TElib.fa" \\ - "${prefix}.EDTA.TElib.fa" - - [ -f "${mod_file_name}.EDTA.raw/LTR/${mod_file_name}.pass.list" ] \\ - && mv \\ - "${mod_file_name}.EDTA.raw/LTR/${mod_file_name}.pass.list" \\ - "${prefix}.EDTA.pass.list" \\ - || echo "EDTA did not produce a pass.list file" - - [ -f "${mod_file_name}.EDTA.anno/${mod_file_name}.out" ] \\ - && mv \\ - "${mod_file_name}.EDTA.anno/${mod_file_name}.out" \\ - "${prefix}.EDTA.out" \\ - || echo "EDTA did not produce an out file" - - [ -f "${mod_file_name}.EDTA.TEanno.gff3" ] \\ - && mv \\ - "${mod_file_name}.EDTA.TEanno.gff3" \\ - "${prefix}.EDTA.TEanno.gff3" \\ - || echo "EDTA did not produce a TEanno gff3 file" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - EDTA: \$(EDTA.pl -h | awk ' /##### Extensive/ {print \$7}') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def touch_pass_list = args.contains("--anno 1") ? "touch ${prefix}.EDTA.pass.list" : '' - def touch_out_file = args.contains("--anno 1") ? "touch ${prefix}.EDTA.out" : '' - def touch_te_anno = args.contains("--anno 1") ? "touch ${prefix}.EDTA.TEanno.gff3": '' - """ - touch "${prefix}.log" - touch "${prefix}.EDTA.TElib.fa" - $touch_pass_list - $touch_out_file - $touch_te_anno - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - EDTA: \$(EDTA.pl -h | awk ' /##### Extensive/ {print \$7}') - END_VERSIONS - """ -} diff --git a/modules/gallvp/edta/edta/meta.yml b/modules/gallvp/edta/edta/meta.yml deleted file mode 100644 index 52503b8..0000000 --- a/modules/gallvp/edta/edta/meta.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "edta_edta" -description: Extensive de-novo TE Annotator (EDTA) -keywords: - - genome - - repeat - - annotation - - transposable-elements -tools: - - "edta": - description: Extensive de-novo TE Annotator (EDTA) - homepage: "https://github.com/oushujun/EDTA" - documentation: "https://github.com/oushujun/EDTA" - tool_dev_url: "https://github.com/oushujun/EDTA" - doi: "10.1186/s13059-019-1905-y" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - fasta: - type: file - description: Genome fasta file - pattern: "*.{fsa,fa,fasta}" - - cds: - type: file - description: | - A FASTA file containing the coding sequence (no introns, UTRs, nor TEs) - of this genome or its close relative - pattern: "*.{fsa,fa,fasta}" - - curatedlib: - type: file - description: | - A curated library to keep consistent naming and classification for known TEs - pattern: "*.liban" - - rmout: - type: file - description: | - Homology-based TE annotation instead of using the EDTA library for masking in - RepeatMasker .out format - pattern: "*.out" - - exclude: - type: file - description: Exclude regions (bed format) from TE masking in the MAKER.masked output - pattern: "*.bed" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - log: - type: file - description: Log emitted by EDTA - pattern: "*.log" - - te_lib_fasta: - type: file - description: A non-redundant TE library in fasta format - pattern: "*.EDTA.TElib.fa" - - pass_list: - type: file - description: A summary table of intact LTR-RTs with coordinate and structural information - pattern: "*.EDTA.pass.list" - - out_file: - type: file - description: RepeatMasker annotation of all LTR sequences in the genome - pattern: "*.EDTA.out" - - te_anno_gff3: - type: file - description: A gff3 file containing both structurally intact and fragmented TE annotations - pattern: "*.EDTA.TEanno.gff3" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/edta/edta/tests/main.nf.test b/modules/gallvp/edta/edta/tests/main.nf.test deleted file mode 100644 index b3ec30c..0000000 --- a/modules/gallvp/edta/edta/tests/main.nf.test +++ /dev/null @@ -1,84 +0,0 @@ -nextflow_process { - - name "Test Process EDTA_EDTA" - script "../main.nf" - process "EDTA_EDTA" - config "./nextflow.config" - - tag "modules" - tag "modules_gallvp" - tag "edta" - tag "edta/edta" - tag "modules/nf-core/gunzip" - - test("actinidia_chinensis-genome_1_fasta_gz") { - - setup { - run("GUNZIP") { - script "../../../../../modules/nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - """ - } - } - } - - when { - process { - """ - input[0] = GUNZIP.out.gunzip - input[1] = [] - input[2] = [] - input[3] = [] - input[4] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.versions).match("versions") }, - { assert path(process.out.te_lib_fasta[0][1]).text.contains('LTR/Copia') }, - { assert path(process.out.pass_list[0][1]).text.contains('Copia') }, - { assert process.out.out_file == [] }, - { assert process.out.te_anno_gff3 == [] } - ) - } - - } - - test("stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ] - input[1] = [] - input[2] = [] - input[3] = [] - input[4] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/gallvp/edta/edta/tests/main.nf.test.snap b/modules/gallvp/edta/edta/tests/main.nf.test.snap deleted file mode 100644 index d989e01..0000000 --- a/modules/gallvp/edta/edta/tests/main.nf.test.snap +++ /dev/null @@ -1,81 +0,0 @@ -{ - "versions": { - "content": [ - [ - "versions.yml:md5,f9e6b414c1eb81520a9fdbb15f797405" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-10T14:43:10.298103" - }, - "stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.EDTA.TElib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - - ], - "5": [ - "versions.yml:md5,f9e6b414c1eb81520a9fdbb15f797405" - ], - "log": [ - [ - { - "id": "test" - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "out_file": [ - - ], - "pass_list": [ - - ], - "te_anno_gff3": [ - - ], - "te_lib_fasta": [ - [ - { - "id": "test" - }, - "test.EDTA.TElib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,f9e6b414c1eb81520a9fdbb15f797405" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-10T14:43:16.561778" - } -} \ No newline at end of file diff --git a/modules/gallvp/edta/edta/tests/nextflow.config b/modules/gallvp/edta/edta/tests/nextflow.config deleted file mode 100644 index ac46798..0000000 --- a/modules/gallvp/edta/edta/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: EDTA_EDTA { - ext.args = '--anno 0' - } -} diff --git a/modules/gallvp/gffread/environment.yml b/modules/gallvp/gffread/environment.yml deleted file mode 100644 index c6df58a..0000000 --- a/modules/gallvp/gffread/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: gffread -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::gffread=0.12.7 diff --git a/modules/gallvp/gffread/main.nf b/modules/gallvp/gffread/main.nf deleted file mode 100644 index da55cba..0000000 --- a/modules/gallvp/gffread/main.nf +++ /dev/null @@ -1,60 +0,0 @@ -process GFFREAD { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gffread:0.12.7--hdcf5f25_4' : - 'biocontainers/gffread:0.12.7--hdcf5f25_4' }" - - input: - tuple val(meta), path(gff) - path fasta - - output: - tuple val(meta), path("*.gtf") , emit: gtf , optional: true - tuple val(meta), path("*.gff3") , emit: gffread_gff , optional: true - tuple val(meta), path("*.fasta"), emit: gffread_fasta , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { args.contains(it) } ) ? 'fasta' : 'gff3' ) - def fasta_arg = fasta ? "-g $fasta" : '' - def output_name = "${prefix}.${extension}" - def output = extension == "fasta" ? "$output_name" : "-o $output_name" - def args_sorted = args.replaceAll(/(.*)(-[wxy])(.*)/) { all, pre, param, post -> "$pre $post $param" }.trim() - // args_sorted = Move '-w', '-x', and '-y' to the end of the args string as gffread expects the file name after these parameters - if ( "$output_name" in [ "$gff", "$fasta" ] ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - gffread \\ - $gff \\ - $fasta_arg \\ - $args_sorted \\ - $output - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffread: \$(gffread --version 2>&1) - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { args.contains(it) } ) ? 'fasta' : 'gff3' ) - def output_name = "${prefix}.${extension}" - if ( "$output_name" in [ "$gff", "$fasta" ] ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - touch $output_name - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffread: \$(gffread --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/gallvp/gffread/meta.yml b/modules/gallvp/gffread/meta.yml deleted file mode 100644 index c060282..0000000 --- a/modules/gallvp/gffread/meta.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: gffread -description: Validate, filter, convert and perform various other operations on GFF files -keywords: - - gff - - conversion - - validation -tools: - - gffread: - description: GFF/GTF utility providing format conversions, region filtering, FASTA sequence extraction and more. - homepage: http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread - documentation: http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread - tool_dev_url: https://github.com/gpertea/gffread - doi: 10.12688/f1000research.23297.1 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing meta data - e.g. [ id:'test' ] - - gff: - type: file - description: A reference file in either the GFF3, GFF2 or GTF format. - pattern: "*.{gff, gtf}" - - fasta: - type: file - description: A multi-fasta file with the genomic sequences - pattern: "*.{fasta,fa,faa,fas,fsa}" -output: - - meta: - type: map - description: | - Groovy Map containing meta data - e.g. [ id:'test' ] - - gtf: - type: file - description: GTF file resulting from the conversion of the GFF input file if '-T' argument is present - pattern: "*.{gtf}" - - gffread_gff: - type: file - description: GFF3 file resulting from the conversion of the GFF input file if '-T' argument is absent - pattern: "*.gff3" - - gffread_fasta: - type: file - description: Fasta file produced when either of '-w', '-x', '-y' parameters is present - pattern: "*.fasta" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@edmundmiller" -maintainers: - - "@edmundmiller" - - "@gallvp" diff --git a/modules/gallvp/gffread/tests/main.nf.test b/modules/gallvp/gffread/tests/main.nf.test deleted file mode 100644 index 17b2ee6..0000000 --- a/modules/gallvp/gffread/tests/main.nf.test +++ /dev/null @@ -1,223 +0,0 @@ -nextflow_process { - - name "Test Process GFFREAD" - script "../main.nf" - process "GFFREAD" - - tag "gffread" - tag "modules_gallvp" - tag "modules" - - test("sarscov2-gff3-gtf") { - - config "./nextflow.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gffread_gff == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-gtf-stub") { - - options '-stub' - config "./nextflow.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gffread_gff == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-gff3") { - - config "./nextflow-gff3.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-gff3-stub") { - - options '-stub' - config "./nextflow-gff3.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-fasta") { - - config "./nextflow-fasta.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_gff == [] } - ) - } - - } - - test("sarscov2-gff3-fasta-stub") { - - options '-stub' - config "./nextflow-fasta.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_gff == [] } - ) - } - - } - - test("sarscov2-gff3-fasta-fail-catch") { - - options '-stub' - config "./nextflow-fasta.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'genome'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - """ - } - } - - then { - assertAll ( - { assert ! process.success }, - { assert process.stdout.toString().contains("Input and output names are the same") } - ) - } - - } - -} diff --git a/modules/gallvp/gffread/tests/main.nf.test.snap b/modules/gallvp/gffread/tests/main.nf.test.snap deleted file mode 100644 index 1526232..0000000 --- a/modules/gallvp/gffread/tests/main.nf.test.snap +++ /dev/null @@ -1,272 +0,0 @@ -{ - "sarscov2-gff3-gtf": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gtf:md5,1ea0ae98d3388e0576407dc4a24ef428" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - - ], - "gtf": [ - [ - { - "id": "test" - }, - "test.gtf:md5,1ea0ae98d3388e0576407dc4a24ef428" - ] - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T10:48:56.496187" - }, - "sarscov2-gff3-gff3": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,c4e5da6267c6bee5899a2c204ae1ad91" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - [ - { - "id": "test" - }, - "test.gff3:md5,c4e5da6267c6bee5899a2c204ae1ad91" - ] - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T10:49:00.892782" - }, - "sarscov2-gff3-gtf-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - - ], - "gtf": [ - [ - { - "id": "test" - }, - "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T11:11:26.975666" - }, - "sarscov2-gff3-fasta-stub": { - "content": [ - { - "0": [ - - ], - "1": [ - - ], - "2": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gffread_gff": [ - - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T11:11:44.34792" - }, - "sarscov2-gff3-gff3-stub": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T11:11:35.221671" - }, - "sarscov2-gff3-fasta": { - "content": [ - { - "0": [ - - ], - "1": [ - - ], - "2": [ - [ - { - "id": "test" - }, - "test.fasta:md5,5f8108fb51739a0588ccf0a251de919a" - ] - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - [ - { - "id": "test" - }, - "test.fasta:md5,5f8108fb51739a0588ccf0a251de919a" - ] - ], - "gffread_gff": [ - - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T10:54:02.88143" - } -} \ No newline at end of file diff --git a/modules/gallvp/gffread/tests/nextflow-fasta.config b/modules/gallvp/gffread/tests/nextflow-fasta.config deleted file mode 100644 index ac6cb14..0000000 --- a/modules/gallvp/gffread/tests/nextflow-fasta.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GFFREAD { - ext.args = '-w -S' - } -} diff --git a/modules/gallvp/gffread/tests/nextflow-gff3.config b/modules/gallvp/gffread/tests/nextflow-gff3.config deleted file mode 100644 index afe0830..0000000 --- a/modules/gallvp/gffread/tests/nextflow-gff3.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GFFREAD { - ext.args = '' - } -} diff --git a/modules/gallvp/gffread/tests/nextflow.config b/modules/gallvp/gffread/tests/nextflow.config deleted file mode 100644 index 74b2509..0000000 --- a/modules/gallvp/gffread/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GFFREAD { - ext.args = '-T' - } -} diff --git a/modules/gallvp/gffread/tests/tags.yml b/modules/gallvp/gffread/tests/tags.yml deleted file mode 100644 index 0557606..0000000 --- a/modules/gallvp/gffread/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -gffread: - - modules/nf-core/gffread/** diff --git a/modules/gallvp/ltrretriever/lai/environment.yml b/modules/gallvp/ltrretriever/lai/environment.yml deleted file mode 100644 index e0e4968..0000000 --- a/modules/gallvp/ltrretriever/lai/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "ltrretriever_lai" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::LTR_retriever=2.9.9" diff --git a/modules/gallvp/ltrretriever/lai/main.nf b/modules/gallvp/ltrretriever/lai/main.nf deleted file mode 100644 index 464b215..0000000 --- a/modules/gallvp/ltrretriever/lai/main.nf +++ /dev/null @@ -1,71 +0,0 @@ -process LTRRETRIEVER_LAI { - tag "$meta.id" - label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ltr_retriever:2.9.9--hdfd78af_0': - 'biocontainers/ltr_retriever:2.9.9--hdfd78af_0' }" - - input: - tuple val(meta), path(fasta) - path pass_list - path annotation_out - path monoploid_seqs - - output: - tuple val(meta), path("*.LAI.log") , emit: log - tuple val(meta), path("*.LAI.out") , emit: lai_out , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def monoploid_param = monoploid_seqs ? "-mono $monoploid_seqs" : '' - def lai_output_name = monoploid_seqs ? "${annotation_out}.${monoploid_seqs}.out.LAI" : "${annotation_out}.LAI" - def VERSION = 'beta3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - LAI \\ - -genome $fasta \\ - -intact $pass_list \\ - -all $annotation_out \\ - -t $task.cpus \\ - $monoploid_param \\ - $args \\ - > >(tee "${prefix}.LAI.log") \\ - || echo "LAI failed! See ${prefix}.LAI.log" - - mv \\ - $lai_output_name \\ - "${prefix}.LAI.out" \\ - || echo "LAI failed to estimate assembly index. See ${prefix}.LAI.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - lai: $VERSION - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def monoploid_param = monoploid_seqs ? "-mono $monoploid_seqs" : '' - def lai_output_name = monoploid_seqs ? "${annotation_out}.${monoploid_seqs}.out.LAI" : "${annotation_out}.LAI" - def VERSION = 'beta3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - touch "${prefix}.LAI.log" - touch "$lai_output_name" - - mv \\ - $lai_output_name \\ - "${prefix}.LAI.out" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - lai: $VERSION - END_VERSIONS - """ -} diff --git a/modules/gallvp/ltrretriever/lai/meta.yml b/modules/gallvp/ltrretriever/lai/meta.yml deleted file mode 100644 index f84cf6c..0000000 --- a/modules/gallvp/ltrretriever/lai/meta.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "ltrretriever_lai" -description: | - Estimates the mean LTR sequence identity in the genome. The input genome fasta should - have short alphanumeric IDs without comments -keywords: - - genomics - - annotation - - repeat - - long terminal retrotransposon - - retrotransposon - - stats - - qc -tools: - - "lai": - description: Assessing genome assembly quality using the LTR Assembly Index (LAI) - homepage: "https://github.com/oushujun/LTR_retriever" - documentation: "https://github.com/oushujun/LTR_retriever" - tool_dev_url: "https://github.com/oushujun/LTR_retriever" - doi: "10.1093/nar/gky730" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - fasta: - type: file - description: The genome file that is used to generate everything - pattern: "*.{fsa,fa,fasta}" - - pass_list: - type: file - description: A list of intact LTR-RTs generated by LTR_retriever - pattern: "*.pass.list" - - annotation_out: - type: file - description: RepeatMasker annotation of all LTR sequences in the genome - pattern: "*.out" - - monoploid_seqs: - type: file - description: | - This parameter is mainly for ployploid genomes. User provides a list of - sequence names that represent a monoploid (1x). LAI will be calculated only - on these sequences if provided. - pattern: "*.txt" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - log: - type: file - description: Log from LAI - pattern: "*.LAI.log" - - lai_out: - type: file - description: | - Output file from LAI if LAI is able to estimate the index from the inputs - pattern: "*.LAI.out" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/gallvp/ltrretriever/lai/tests/main.nf.test b/modules/gallvp/ltrretriever/lai/tests/main.nf.test deleted file mode 100644 index e428918..0000000 --- a/modules/gallvp/ltrretriever/lai/tests/main.nf.test +++ /dev/null @@ -1,166 +0,0 @@ -nextflow_process { - - name "Test Process LTRRETRIEVER_LAI" - script "../main.nf" - process "LTRRETRIEVER_LAI" - config "./nextflow.config" - - tag "modules" - tag "modules_gallvp" - tag "gunzip" - tag "ltrretriever" - tag "ltrretriever/ltrretriever" - tag "ltrretriever/lai" - tag "ltrharvest" - tag "ltrfinder" - tag "cat/cat" - - test("actinidia_chinensis-genome_21_fasta_gz-success") { - - setup { - - run("GUNZIP") { - script "../../../gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - """ - } - } - - run("LTRHARVEST") { - script "../../../ltrharvest" - - process { - """ - input[0] = GUNZIP.out.gunzip - """ - } - } - - run("LTRFINDER") { - script "../../../ltrfinder" - - process { - """ - input[0] = GUNZIP.out.gunzip - """ - } - } - - run("CAT_CAT") { - script "../../../cat/cat" - - process { - """ - input[0] = LTRHARVEST.out.scn.mix(LTRFINDER.out.scn).groupTuple() - """ - } - } - - run("LTRRETRIEVER_LTRRETRIEVER") { - script "../../ltrretriever" - - process { - """ - input[0] = GUNZIP.out.gunzip - input[1] = CAT_CAT.out.file_out.map { meta, tabout -> tabout } - input[2] = [] - input[3] = [] - input[4] = [] - """ - } - } - } - - when { - process { - """ - input[0] = GUNZIP.out.gunzip - input[1] = LTRRETRIEVER_LTRRETRIEVER.out.pass_list.map { meta, pass_list -> pass_list } - input[2] = LTRRETRIEVER_LTRRETRIEVER.out.annotation_out.map { meta, annotation_out -> annotation_out } - input[3] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.log[0][1]).text.contains("Dependency checking: Passed!") }, - { assert path(process.out.log[0][1]).text.contains("Calculate LAI:") }, - { assert path(process.out.log[0][1]).text.contains("Done!") }, - { assert path(process.out.log[0][1]).text.contains("Result file:") }, - { assert Math.abs(Float.parseFloat(path(process.out.lai_out[0][1]).text.split("\n")[1].split("\t")[6]) - 31.29) <= 1.0 } - ) - } - - } - - test("stub") { - - options '-stub' - - when { - process { - """ - def pass_list = new File('test.pass.list') - def out_file = new File('test.out') - def monoploid_seqs = new File('some_seqs.list.txt') - - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - input[1] = pass_list.toPath() - input[2] = out_file.toPath() - input[3] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("stub_with_monoploid_seqs") { - - options '-stub' - - when { - process { - """ - def pass_list = new File('test.pass.list') - def out_file = new File('test.out') - def monoploid_seqs = new File('some_seqs.list.txt') - - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - input[1] = pass_list.toPath() - input[2] = out_file.toPath() - input[3] = monoploid_seqs.toPath() - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/gallvp/ltrretriever/lai/tests/main.nf.test.snap b/modules/gallvp/ltrretriever/lai/tests/main.nf.test.snap deleted file mode 100644 index e1c8086..0000000 --- a/modules/gallvp/ltrretriever/lai/tests/main.nf.test.snap +++ /dev/null @@ -1,100 +0,0 @@ -{ - "stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e04e27f9408e771795cd44d96518b7cd" - ], - "lai_out": [ - [ - { - "id": "test" - }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test" - }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e04e27f9408e771795cd44d96518b7cd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-22T20:09:00.558021" - }, - "stub_with_monoploid_seqs": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e04e27f9408e771795cd44d96518b7cd" - ], - "lai_out": [ - [ - { - "id": "test" - }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test" - }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e04e27f9408e771795cd44d96518b7cd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-22T20:10:08.213842" - } -} \ No newline at end of file diff --git a/modules/gallvp/ltrretriever/lai/tests/nextflow.config b/modules/gallvp/ltrretriever/lai/tests/nextflow.config deleted file mode 100644 index 75edf1a..0000000 --- a/modules/gallvp/ltrretriever/lai/tests/nextflow.config +++ /dev/null @@ -1,15 +0,0 @@ -process { - - withName: LTRHARVEST { - ext.prefix = { "${meta.id}_ltrharvest" } - } - - withName: LTRFINDER { - ext.args = '-harvest_out -size 1000000 -time 300' - // recommended parameters: https://github.com/oushujun/LTR_retriever#usage - } - - withName: CAT_CAT { - ext.prefix = { "${meta.id}_ltrharvest_ltrfinder.tabout" } - } -} diff --git a/modules/gallvp/ltrretriever/lai/tests/tags.yml b/modules/gallvp/ltrretriever/lai/tests/tags.yml deleted file mode 100644 index 470f468..0000000 --- a/modules/gallvp/ltrretriever/lai/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -ltrretriever/lai: - - "modules/nf-core/ltrretriever/lai/**" diff --git a/modules/gallvp/repeatmasker/repeatmasker/environment.yml b/modules/gallvp/repeatmasker/repeatmasker/environment.yml deleted file mode 100644 index efc290a..0000000 --- a/modules/gallvp/repeatmasker/repeatmasker/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "repeatmasker_repeatmasker" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::repeatmasker=4.1.5" diff --git a/modules/gallvp/repeatmasker/repeatmasker/main.nf b/modules/gallvp/repeatmasker/repeatmasker/main.nf deleted file mode 100644 index 4b17414..0000000 --- a/modules/gallvp/repeatmasker/repeatmasker/main.nf +++ /dev/null @@ -1,62 +0,0 @@ -process REPEATMASKER_REPEATMASKER { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/repeatmasker:4.1.5--pl5321hdfd78af_0': - 'biocontainers/repeatmasker:4.1.5--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(fasta) - path(lib) - - output: - tuple val(meta), path("${prefix}.masked") , emit: masked - tuple val(meta), path("${prefix}.out") , emit: out - tuple val(meta), path("${prefix}.tbl") , emit: tbl - tuple val(meta), path("${prefix}.gff") , emit: gff , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def lib_arg = lib ? "-lib $lib" : '' - """ - RepeatMasker \\ - $lib_arg \\ - -pa ${task.cpus} \\ - -dir ${prefix} \\ - ${args} \\ - ${fasta} - - mv $prefix/${fasta}.masked ${prefix}.masked - mv $prefix/${fasta}.out ${prefix}.out - mv $prefix/${fasta}.tbl ${prefix}.tbl - mv $prefix/${fasta}.out.gff ${prefix}.gff || echo "GFF is not produced" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - repeatmasker: \$(RepeatMasker -v | sed 's/RepeatMasker version //1') - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - def args = task.ext.args ?: '' - def touch_gff = args.contains('-gff') ? "touch ${prefix}.gff" : '' - """ - touch ${prefix}.masked - touch ${prefix}.out - touch ${prefix}.tbl - $touch_gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - repeatmasker: \$(RepeatMasker -v | sed 's/RepeatMasker version //1') - END_VERSIONS - """ -} diff --git a/modules/gallvp/repeatmasker/repeatmasker/meta.yml b/modules/gallvp/repeatmasker/repeatmasker/meta.yml deleted file mode 100644 index 059e225..0000000 --- a/modules/gallvp/repeatmasker/repeatmasker/meta.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: repeatmasker_repeatmasker -description: | - Screening DNA sequences for interspersed repeats and low complexity DNA sequences - -keywords: - - genome - - annotation - - repeat - - mask - -tools: - - repeatmasker: - description: | - RepeatMasker is a program that screens DNA sequences for interspersed - repeats and low complexity DNA sequences - homepage: "https://www.repeatmasker.org/" - documentation: "https://www.repeatmasker.org/webrepeatmaskerhelp.html" - tool_dev_url: "https://github.com/rmhubley/RepeatMasker" - licence: ["Open Software License v. 2.1"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - fasta: - type: file - description: Genome assembly - pattern: "*.{fasta,fa,fas,fsa,faa,fna}" - - lib: - type: file - description: Custom library (e.g. from another species) - pattern: "*.{fasta,fa,fas,fsa,faa,fna}" - -output: - - masked: - type: file - description: Masked fasta - pattern: "*.masked" - - out: - type: file - description: Out file - pattern: "*.out" - - tbl: - type: file - description: tbl file - pattern: "*.tbl" - - gff: - type: file - description: GFF file - pattern: "*.gff" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@kherronism" - - "@gallvp" - -maintainers: - - "@kherronism" - - "@gallvp" diff --git a/modules/gallvp/repeatmasker/repeatmasker/tests/main.nf.test b/modules/gallvp/repeatmasker/repeatmasker/tests/main.nf.test deleted file mode 100644 index d55e5f4..0000000 --- a/modules/gallvp/repeatmasker/repeatmasker/tests/main.nf.test +++ /dev/null @@ -1,68 +0,0 @@ -nextflow_process { - - name "Test Process REPEATMASKER_REPEATMASKER" - script "../main.nf" - process "REPEATMASKER_REPEATMASKER" - - tag "modules" - tag "modules_gallvp" - tag "repeatmasker" - tag "repeatmasker/repeatmasker" - - test("sarscov2 - genome - fasta") { - - config "./nextflow.config" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.masked, - process.out.out, - process.out.gff, - process.out.versions - ).match() }, - { assert file(process.out.tbl[0][1]).text.contains('run with rmblastn') } - ) - } - - } - - test("sarscov2 - genome - fasta - stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/gallvp/repeatmasker/repeatmasker/tests/main.nf.test.snap b/modules/gallvp/repeatmasker/repeatmasker/tests/main.nf.test.snap deleted file mode 100644 index 2e584de..0000000 --- a/modules/gallvp/repeatmasker/repeatmasker/tests/main.nf.test.snap +++ /dev/null @@ -1,118 +0,0 @@ -{ - "sarscov2 - genome - fasta": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.masked:md5,c0eb8dd958ce3b4b1fdc7fcb6b0d5161" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.out:md5,8610cb2b8d87356bf2ab0a895c065752" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.gff:md5,289cdcae609a8c450a20080107ea6351" - ] - ], - [ - "versions.yml:md5,1386abb5112b809c321da8ddc598c573" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-08-07T14:25:15.979032" - }, - "sarscov2 - genome - fasta - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.masked:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tbl:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - "versions.yml:md5,1386abb5112b809c321da8ddc598c573" - ], - "gff": [ - - ], - "masked": [ - [ - { - "id": "test", - "single_end": false - }, - "test.masked:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "out": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tbl": [ - [ - { - "id": "test", - "single_end": false - }, - "test.tbl:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,1386abb5112b809c321da8ddc598c573" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-08-07T13:39:51.365612" - } -} \ No newline at end of file diff --git a/modules/gallvp/repeatmasker/repeatmasker/tests/nextflow.config b/modules/gallvp/repeatmasker/repeatmasker/tests/nextflow.config deleted file mode 100644 index 6e4b600..0000000 --- a/modules/gallvp/repeatmasker/repeatmasker/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: REPEATMASKER_REPEATMASKER { - ext.args = '-no_is -gff' // Not required but significantly cuts the runtime - } -} diff --git a/modules/local/utils.nf b/modules/local/utils.nf deleted file mode 100644 index f6fc82e..0000000 --- a/modules/local/utils.nf +++ /dev/null @@ -1,69 +0,0 @@ -def idFromFileName(fileName) { - - def trial = ( fileName - ).replaceFirst( - /\.f(ast)?q$/, '' - ).replaceFirst( - /\.f(asta|sa|a|as|aa|na)?$/, '' - ).replaceFirst( - /\.gff(3)?$/, '' - ).replaceFirst( - /\.gz$/, '' - ) - - if ( trial == fileName ) { return fileName } - - return idFromFileName ( trial ) -} - -def validateFastqMetadata(metas, fqs, permAssString) { - def permAssList = permAssString.split(",") - - // Check if each listed assembly is permissible - metas.each { meta -> - if ( meta.target_assemblies.any { !permAssList.contains( it ) } ) { - error "Sample ${meta.id} targets ${meta.target_assemblies} which are not in $permAssList" - } - } - - // Check if multiple runs of a sample have the same target assemblies - if ( metas.collect { meta -> meta.target_assemblies }.unique().size() > 1 ) { - error "Multiple runs of sample ${metas.first().id} must target same assemblies" - } - - // Check if multiple runs of a sample have the same endedness - if ( metas.collect { meta -> meta.single_end }.unique().size() > 1 ) { - error "Multiple runs of sample ${metas.first().id} must have same endedness" - } - - [ metas.first(), fqs ] -} - - -def validateBamMetadata(metas, bams, permAssString) { - def permAssList = permAssString.split(",") - - // Check if each listed assembly is permissible - metas.each { meta -> - if ( meta.target_assemblies.any { !permAssList.contains( it ) } ) { - error "Sample ${meta.id} targets ${meta.target_assemblies} which are not in $permAssList" - } - } - - // Check that when the first file is bam then the second file is absent - bams.findAll { files -> - files.first().extension == 'bam' && files.size() != 1 - } - .each { error "Sample ${metas.first().id} contains both bam and fastq pairs. When a bam file is provided as file_1, a fastq for file_2 is not permitted" } - - // Check that a bam file only targets a single assembly - bams.eachWithIndex { files, index -> - if ( files.first().extension == 'bam' && metas[index].target_assemblies.size() > 1 ) { - error "BAM file for sample ${metas.first().id} can only target one assembly: ${metas[index].target_assemblies}" - } - } - - metas.every { it.target_assemblies == metas.first().target_assemblies } - ? [ [ metas.first(), bams.flatten() ] ] - : metas.withIndex().collect { meta, index -> [ meta, bams[index].flatten() ] } -} diff --git a/modules/nf-core/agat/convertspgff2gtf/environment.yml b/modules/nf-core/agat/convertspgff2gtf/environment.yml deleted file mode 100644 index 6747331..0000000 --- a/modules/nf-core/agat/convertspgff2gtf/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: agat_convertspgff2gtf -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::agat=1.4.0 diff --git a/modules/nf-core/agat/convertspgff2gtf/main.nf b/modules/nf-core/agat/convertspgff2gtf/main.nf deleted file mode 100644 index 38af025..0000000 --- a/modules/nf-core/agat/convertspgff2gtf/main.nf +++ /dev/null @@ -1,48 +0,0 @@ -process AGAT_CONVERTSPGFF2GTF { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/agat:1.4.0--pl5321hdfd78af_0' : - 'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(gff) - - output: - tuple val(meta), path("*.agat.gtf"), emit: output_gtf - tuple val(meta), path("*.log"), emit: log - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - agat_convert_sp_gff2gtf.pl \\ - --gff $gff \\ - --output ${prefix}.agat.gtf \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_convert_sp_gff2gtf.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.agat.gtf - touch ${gff}.agat.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_convert_sp_gff2gtf.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/nf-core/agat/convertspgff2gtf/meta.yml b/modules/nf-core/agat/convertspgff2gtf/meta.yml deleted file mode 100644 index ab39f01..0000000 --- a/modules/nf-core/agat/convertspgff2gtf/meta.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: agat_convertspgff2gtf -description: | - Converts a GFF/GTF file into a proper GTF file -keywords: - - genome - - gff - - gtf - - conversion -tools: - - agat: - description: "AGAT is a toolkit for manipulation and getting information from GFF/GTF files" - homepage: "https://github.com/NBISweden/AGAT" - documentation: "https://agat.readthedocs.io/" - tool_dev_url: "https://github.com/NBISweden/AGAT" - doi: "10.5281/zenodo.3552717" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gff: - type: file - description: Annotation file in GFF3/GTF format - pattern: "*.{gff, gtf}" -output: - - output_gtf: - type: file - description: Annotation file in GTF format - pattern: "*.{gtf}" - - log: - type: file - description: Log file of the conversion process - pattern: "*.{log}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@toniher" -maintainers: - - "@toniher" - - "@gallvp" diff --git a/modules/nf-core/agat/convertspgff2gtf/tests/main.nf.test b/modules/nf-core/agat/convertspgff2gtf/tests/main.nf.test deleted file mode 100644 index 401f455..0000000 --- a/modules/nf-core/agat/convertspgff2gtf/tests/main.nf.test +++ /dev/null @@ -1,62 +0,0 @@ -nextflow_process { - - name "Test Process AGAT_CONVERTSPGFF2GTF" - script "../main.nf" - process "AGAT_CONVERTSPGFF2GTF" - - tag "modules" - tag "modules_nfcore" - tag "agat" - tag "agat/convertspgff2gtf" - - test("sarscov2 - genome [gff3]") { - - when { - process { - """ - input[0] = [ - [ id: 'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.output_gtf, - process.out.versions).match() }, - { assert path(process.out.log[0][1]).exists() } - ) - } - - } - - test("sarscov2 - genome [gff3] - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id: 'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.output_gtf.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } + - process.out.versions ).match() } - ) - } - - } - -} diff --git a/modules/nf-core/agat/convertspgff2gtf/tests/main.nf.test.snap b/modules/nf-core/agat/convertspgff2gtf/tests/main.nf.test.snap deleted file mode 100644 index 4088c71..0000000 --- a/modules/nf-core/agat/convertspgff2gtf/tests/main.nf.test.snap +++ /dev/null @@ -1,36 +0,0 @@ -{ - "sarscov2 - genome [gff3] - stub": { - "content": [ - [ - "test.agat.gtf", - "genome.gff3.agat.log", - "versions.yml:md5,dcc621fac77aa683287f6a0d61e10395" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-08T10:05:11.177573" - }, - "sarscov2 - genome [gff3]": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.agat.gtf:md5,be1c396ac00fd5a84dc08a36d84ff8c5" - ] - ], - [ - "versions.yml:md5,dcc621fac77aa683287f6a0d61e10395" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-08T10:05:06.695419" - } -} \ No newline at end of file diff --git a/modules/nf-core/agat/convertspgff2gtf/tests/tags.yml b/modules/nf-core/agat/convertspgff2gtf/tests/tags.yml deleted file mode 100644 index 7a59648..0000000 --- a/modules/nf-core/agat/convertspgff2gtf/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -agat/convertspgff2gtf: - - "modules/nf-core/agat/convertspgff2gtf/**" diff --git a/modules/nf-core/agat/convertspgxf2gxf/environment.yml b/modules/nf-core/agat/convertspgxf2gxf/environment.yml deleted file mode 100644 index 6ed34fa..0000000 --- a/modules/nf-core/agat/convertspgxf2gxf/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: agat_convertspgxf2gxf -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::agat=1.4.0 diff --git a/modules/nf-core/agat/convertspgxf2gxf/main.nf b/modules/nf-core/agat/convertspgxf2gxf/main.nf deleted file mode 100644 index b9a7668..0000000 --- a/modules/nf-core/agat/convertspgxf2gxf/main.nf +++ /dev/null @@ -1,48 +0,0 @@ -process AGAT_CONVERTSPGXF2GXF { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/agat:1.4.0--pl5321hdfd78af_0' : - 'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(gxf) - - output: - tuple val(meta), path("*.agat.gff") , emit: output_gff - tuple val(meta), path("*.log") , emit: log - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - agat_convert_sp_gxf2gxf.pl \\ - --gxf $gxf \\ - --output ${prefix}.agat.gff \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_convert_sp_gxf2gxf.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.agat.gff - touch ${gxf}.agat.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_convert_sp_gxf2gxf.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/nf-core/agat/convertspgxf2gxf/meta.yml b/modules/nf-core/agat/convertspgxf2gxf/meta.yml deleted file mode 100644 index 0ef9881..0000000 --- a/modules/nf-core/agat/convertspgxf2gxf/meta.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: agat_convertspgxf2gxf -description: | - Fixes and standardizes GFF/GTF files and outputs a cleaned GFF/GTF file -keywords: - - genome - - gff - - gtf - - conversion -tools: - - agat: - description: "AGAT is a toolkit for manipulation and getting information from GFF/GTF files" - homepage: "https://github.com/NBISweden/AGAT" - documentation: "https://agat.readthedocs.io/" - tool_dev_url: "https://github.com/NBISweden/AGAT" - doi: "10.5281/zenodo.3552717" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - gxf: - type: file - description: Annotation file in GFF3/GTF format - pattern: "*.{gff, gtf}" -output: - - output_gff: - type: file - description: Cleaned annotation file in GFF3 format - pattern: "*.{gff}" - - log: - type: file - description: Log file of the conversion process - pattern: "*.{log}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@toniher" -maintainers: - - "@toniher" diff --git a/modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test b/modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test deleted file mode 100644 index d8d7bc2..0000000 --- a/modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test +++ /dev/null @@ -1,60 +0,0 @@ -nextflow_process { - - name "Test Process AGAT_CONVERTSPGXF2GXF" - script "../main.nf" - process "AGAT_CONVERTSPGXF2GXF" - - tag "modules" - tag "modules_nfcore" - tag "agat" - tag "agat/convertspgxf2gxf" - - test("sarscov2 genome [gtf]") { - - when { - process { - """ - input[0] = [ - [ id: 'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.output_gff, - process.out.versions).match() }, - { assert path(process.out.log[0][1]).exists() } - ) - } - - } - - test("sarscov2 genome [gtf] - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id: 'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test.snap b/modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test.snap deleted file mode 100644 index e89073f..0000000 --- a/modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test.snap +++ /dev/null @@ -1,71 +0,0 @@ -{ - "sarscov2 genome [gtf] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.agat.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "genome.gtf.agat.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,5ec6166c5c080ec4bc08a8fe55ada486" - ], - "log": [ - [ - { - "id": "test" - }, - "genome.gtf.agat.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "output_gff": [ - [ - { - "id": "test" - }, - "test.agat.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,5ec6166c5c080ec4bc08a8fe55ada486" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-12T12:25:34.583294" - }, - "sarscov2 genome [gtf]": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.agat.gff:md5,7d7e9bcd82a2f0bb7d8a38f85e82f0bc" - ] - ], - [ - "versions.yml:md5,5ec6166c5c080ec4bc08a8fe55ada486" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-12T12:21:21.310464" - } -} \ No newline at end of file diff --git a/modules/nf-core/agat/convertspgxf2gxf/tests/tags.yml b/modules/nf-core/agat/convertspgxf2gxf/tests/tags.yml deleted file mode 100644 index 85c7000..0000000 --- a/modules/nf-core/agat/convertspgxf2gxf/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -agat/convertspgxf2gxf: - - "modules/nf-core/agat/convertspgxf2gxf/**" diff --git a/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml b/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml deleted file mode 100644 index fb2df48..0000000 --- a/modules/nf-core/agat/spfilterfeaturefromkilllist/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "agat_spfilterfeaturefromkilllist" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::agat=1.4.0" diff --git a/modules/nf-core/agat/spfilterfeaturefromkilllist/main.nf b/modules/nf-core/agat/spfilterfeaturefromkilllist/main.nf deleted file mode 100644 index 4918ed7..0000000 --- a/modules/nf-core/agat/spfilterfeaturefromkilllist/main.nf +++ /dev/null @@ -1,53 +0,0 @@ -process AGAT_SPFILTERFEATUREFROMKILLLIST { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/agat:1.4.0--pl5321hdfd78af_0': - 'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(gff) - path kill_list - path config - - output: - tuple val(meta), path("*.gff"), emit: gff - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def config_param = config ? "--config $config" : '' - if( "$gff" == "${prefix}.gff" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - agat_sp_filter_feature_from_kill_list.pl \\ - --gff $gff \\ - --kill_list $kill_list \\ - $config_param \\ - $args \\ - --output "${prefix}.gff" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_filter_feature_from_kill_list.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - if( "$gff" == "${prefix}.gff" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - touch "${prefix}.gff" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_filter_feature_from_kill_list.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/nf-core/agat/spfilterfeaturefromkilllist/meta.yml b/modules/nf-core/agat/spfilterfeaturefromkilllist/meta.yml deleted file mode 100644 index d408fe7..0000000 --- a/modules/nf-core/agat/spfilterfeaturefromkilllist/meta.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "agat_spfilterfeaturefromkilllist" -description: | - The script aims to remove features based on a kill list. The default behaviour is to look at the features's ID. - If the feature has an ID (case insensitive) listed among the kill list it will be removed. /!\ Removing a level1 - or level2 feature will automatically remove all linked subfeatures, and removing all children of a feature will - automatically remove this feature too. -keywords: - - genomics - - gff - - remove - - feature -tools: - - "agat": - description: "Another Gff Analysis Toolkit (AGAT). Suite of tools to handle gene annotations in any GTF/GFF format." - homepage: "https://agat.readthedocs.io/en/latest/" - documentation: "https://agat.readthedocs.io/en/latest/tools/agat_sp_filter_feature_from_kill_list.html" - tool_dev_url: "https://github.com/NBISweden/AGAT" - doi: "10.5281/zenodo.3552717" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ]` - - gff: - type: file - description: Input GFF3 file that will be read - pattern: "*.{gff,gff3}" - - kill_list: - type: file - description: Kill list. One value per line. - pattern: "*.txt" - - config: - type: file - description: | - Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any, otherwise it takes the orignal agat_config.yaml shipped with AGAT. To get the agat_config.yaml locally type: "agat config --expose". The --config option gives you the possibility to use your own AGAT config file (located elsewhere or named differently). - pattern: "*.yaml" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - gff: - type: file - description: Output GFF file. - pattern: "*.gff" - -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/agat/spfilterfeaturefromkilllist/tests/main.nf.test b/modules/nf-core/agat/spfilterfeaturefromkilllist/tests/main.nf.test deleted file mode 100644 index 82a3c30..0000000 --- a/modules/nf-core/agat/spfilterfeaturefromkilllist/tests/main.nf.test +++ /dev/null @@ -1,104 +0,0 @@ -nextflow_process { - - name "Test Process AGAT_SPFILTERFEATUREFROMKILLLIST" - script "../main.nf" - process "AGAT_SPFILTERFEATUREFROMKILLLIST" - - tag "modules" - tag "modules_nfcore" - tag "agat" - tag "agat/spfilterfeaturefromkilllist" - - test("sarscov2 - gff3") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - - def kill_list = "unknown_transcript_1" - def kill_list_file = new File('kill.list.txt') - kill_list_file.text = kill_list - - input[1] = kill_list_file.toPath() - - input[2] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - gff3 - config") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - - def kill_list = "unknown_transcript_1" - def kill_list_file = new File('kill.list.txt') - kill_list_file.text = kill_list - - input[1] = kill_list_file.toPath() - - input[2] = file(params.modules_testdata_base_path + 'generic/config/agat_config.yaml', checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - gff3 - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - - def kill_list = "unknown_transcript_1" - def kill_list_file = new File('kill.list.txt') - kill_list_file.text = kill_list - - input[1] = kill_list_file.toPath() - - input[2] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/nf-core/agat/spfilterfeaturefromkilllist/tests/main.nf.test.snap b/modules/nf-core/agat/spfilterfeaturefromkilllist/tests/main.nf.test.snap deleted file mode 100644 index 8322d0f..0000000 --- a/modules/nf-core/agat/spfilterfeaturefromkilllist/tests/main.nf.test.snap +++ /dev/null @@ -1,101 +0,0 @@ -{ - "sarscov2 - gff3 - config": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gff:md5,df19e1b84ba6f691d20c72b397c88abf" - ] - ], - "1": [ - "versions.yml:md5,e2962240799182aee69421c746be183a" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,df19e1b84ba6f691d20c72b397c88abf" - ] - ], - "versions": [ - "versions.yml:md5,e2962240799182aee69421c746be183a" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-03T15:32:54.707393" - }, - "sarscov2 - gff3 - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,e2962240799182aee69421c746be183a" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e2962240799182aee69421c746be183a" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-03T15:32:59.888053" - }, - "sarscov2 - gff3": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gff:md5,df19e1b84ba6f691d20c72b397c88abf" - ] - ], - "1": [ - "versions.yml:md5,e2962240799182aee69421c746be183a" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,df19e1b84ba6f691d20c72b397c88abf" - ] - ], - "versions": [ - "versions.yml:md5,e2962240799182aee69421c746be183a" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-03T15:32:47.772624" - } -} \ No newline at end of file diff --git a/modules/nf-core/agat/spmergeannotations/environment.yml b/modules/nf-core/agat/spmergeannotations/environment.yml deleted file mode 100644 index 5644e08..0000000 --- a/modules/nf-core/agat/spmergeannotations/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "agat_spmergeannotations" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::agat=1.4.0" diff --git a/modules/nf-core/agat/spmergeannotations/main.nf b/modules/nf-core/agat/spmergeannotations/main.nf deleted file mode 100644 index e0861c0..0000000 --- a/modules/nf-core/agat/spmergeannotations/main.nf +++ /dev/null @@ -1,53 +0,0 @@ -process AGAT_SPMERGEANNOTATIONS { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/agat:1.4.0--pl5321hdfd78af_0': - 'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(gffs) - path config - - output: - tuple val(meta), path("*.gff") , emit: gff - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def config_param = config ? "--config $config" : '' - def file_names = "$gffs".split(' ') - def gff_param = file_names.collect { "--gff $it" }.join(' ') - if ( file_names.contains ( "${prefix}.gff" ) ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - agat_sp_merge_annotations.pl \\ - $gff_param \\ - $config_param \\ - $args \\ - --output ${prefix}.gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_merge_annotations.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def file_names = "$gffs".split(' ') - if ( file_names.contains ( "${prefix}.gff" ) ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - touch ${prefix}.gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - agat: \$(agat_sp_merge_annotations.pl -h | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/nf-core/agat/spmergeannotations/meta.yml b/modules/nf-core/agat/spmergeannotations/meta.yml deleted file mode 100644 index afa9ddd..0000000 --- a/modules/nf-core/agat/spmergeannotations/meta.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "agat_spmergeannotations" -description: | - This script merge different gff annotation files in one. It uses the AGAT parser that takes care of duplicated names and fixes other oddities met in those files. -keywords: - - genomics - - gff - - merge - - combine -tools: - - "agat": - description: "Another Gff Analysis Toolkit (AGAT). Suite of tools to handle gene annotations in any GTF/GFF format." - homepage: "https://agat.readthedocs.io/en/latest/" - documentation: "https://agat.readthedocs.io/en/latest/tools/agat_sp_merge_annotations.html" - tool_dev_url: "https://github.com/NBISweden/AGAT" - doi: "10.5281/zenodo.3552717" - licence: ["GPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - gffs: - type: list - description: A list of GFFs to merge - pattern: "[ *.{gff,gff3} ]" - - config: - type: file - description: | - Input agat config file. By default AGAT takes as input agat_config.yaml file from the working directory if any, - otherwise it takes the orignal agat_config.yaml shipped with AGAT. To get the agat_config.yaml - locally type: "agat config --expose". The --config option gives you the possibility to use your - own AGAT config file (located elsewhere or named differently). - pattern: "*.yaml" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - gff: - type: file - description: Output GFF file. - pattern: "*.gff" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/agat/spmergeannotations/tests/main.nf.test b/modules/nf-core/agat/spmergeannotations/tests/main.nf.test deleted file mode 100644 index 3f500fa..0000000 --- a/modules/nf-core/agat/spmergeannotations/tests/main.nf.test +++ /dev/null @@ -1,130 +0,0 @@ -nextflow_process { - - name "Test Process AGAT_SPMERGEANNOTATIONS" - script "../main.nf" - process "AGAT_SPMERGEANNOTATIONS" - - tag "modules" - tag "modules_nfcore" - tag "agat" - tag "agat/spmergeannotations" - - test("candidatus_portiera_aleyrodidarum - multi_gffs") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test2.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff', checkIfExists: true) - ] - ] - - input[1] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.gff[0][1]).text.contains('AGAT gene') }, - { assert snapshot(process.out.versions).match("versions") } - ) - } - - } - - test("candidatus_portiera_aleyrodidarum - multi_gffs - stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test2.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff', checkIfExists: true) - ] - ] - - input[1] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("candidatus_portiera_aleyrodidarum - multi_gffs - config") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test2.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff', checkIfExists: true) - ] - ] - - input[1] = file(params.modules_testdata_base_path + 'generic/config/agat_config.yaml', checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.gff[0][1]).text.contains('AGAT gene') }, - { assert snapshot(process.out.versions).match("versions_config") } - ) - } - - } - - test("candidatus_portiera_aleyrodidarum - multi_gffs - stub - config") { - - options '-stub' - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test2.gff', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff', checkIfExists: true) - ] - ] - - input[1] = file(params.modules_testdata_base_path + 'generic/config/agat_config.yaml', checkIfExists: true) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/nf-core/agat/spmergeannotations/tests/main.nf.test.snap b/modules/nf-core/agat/spmergeannotations/tests/main.nf.test.snap deleted file mode 100644 index 5b56cd9..0000000 --- a/modules/nf-core/agat/spmergeannotations/tests/main.nf.test.snap +++ /dev/null @@ -1,92 +0,0 @@ -{ - "candidatus_portiera_aleyrodidarum - multi_gffs - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,bb159018d6a64ae51339f7c886ad28d7" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,bb159018d6a64ae51339f7c886ad28d7" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-15T13:23:28.495387" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,bb159018d6a64ae51339f7c886ad28d7" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-15T13:23:23.220341" - }, - "versions_config": { - "content": [ - [ - "versions.yml:md5,bb159018d6a64ae51339f7c886ad28d7" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-15T13:25:34.519378" - }, - "candidatus_portiera_aleyrodidarum - multi_gffs - stub - config": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,bb159018d6a64ae51339f7c886ad28d7" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,bb159018d6a64ae51339f7c886ad28d7" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-15T13:23:43.811463" - } -} \ No newline at end of file diff --git a/modules/nf-core/agat/spmergeannotations/tests/tags.yml b/modules/nf-core/agat/spmergeannotations/tests/tags.yml deleted file mode 100644 index de92188..0000000 --- a/modules/nf-core/agat/spmergeannotations/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -agat/spmergeannotations: - - "modules/nf-core/agat/spmergeannotations/**" diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml deleted file mode 100644 index 17a04ef..0000000 --- a/modules/nf-core/cat/cat/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: cat_cat -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - conda-forge::pigz=2.3.4 diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf deleted file mode 100644 index 2862c64..0000000 --- a/modules/nf-core/cat/cat/main.nf +++ /dev/null @@ -1,78 +0,0 @@ -process CAT_CAT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pigz:2.3.4' : - 'biocontainers/pigz:2.3.4' }" - - input: - tuple val(meta), path(files_in) - - output: - tuple val(meta), path("${prefix}"), emit: file_out - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def file_list = files_in.collect { it.toString() } - - // choose appropriate concatenation tool depending on input and output format - - // | input | output | command1 | command2 | - // |-----------|------------|----------|----------| - // | gzipped | gzipped | cat | | - // | ungzipped | ungzipped | cat | | - // | gzipped | ungzipped | zcat | | - // | ungzipped | gzipped | cat | pigz | - - // Use input file ending as default - prefix = task.ext.prefix ?: "${meta.id}${getFileSuffix(file_list[0])}" - out_zip = prefix.endsWith('.gz') - in_zip = file_list[0].endsWith('.gz') - command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' - command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' - if(file_list.contains(prefix.trim())) { - error "The name of the input file can't be the same as for the output prefix in the " + - "module CAT_CAT (currently `$prefix`). Please choose a different one." - } - """ - $command1 \\ - $args \\ - ${file_list.join(' ')} \\ - $command2 \\ - > ${prefix} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ - - stub: - def file_list = files_in.collect { it.toString() } - prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}" - if(file_list.contains(prefix.trim())) { - error "The name of the input file can't be the same as for the output prefix in the " + - "module CAT_CAT (currently `$prefix`). Please choose a different one." - } - """ - touch $prefix - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ -} - -// for .gz files also include the second to last extension if it is present. E.g., .fasta.gz -def getFileSuffix(filename) { - def match = filename =~ /^.*?((\.\w{1,5})?(\.\w{1,5}\.gz$))/ - return match ? match[0][1] : filename.substring(filename.lastIndexOf('.')) -} diff --git a/modules/nf-core/cat/cat/meta.yml b/modules/nf-core/cat/cat/meta.yml deleted file mode 100644 index 00a8db0..0000000 --- a/modules/nf-core/cat/cat/meta.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: cat_cat -description: A module for concatenation of gzipped or uncompressed files -keywords: - - concatenate - - gzip - - cat -tools: - - cat: - description: Just concatenation - documentation: https://man7.org/linux/man-pages/man1/cat.1.html - licence: ["GPL-3.0-or-later"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - files_in: - type: file - description: List of compressed / uncompressed files - pattern: "*" -output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - file_out: - type: file - description: Concatenated file. Will be gzipped if file_out ends with ".gz" - pattern: "${file_out}" -authors: - - "@erikrikarddaniel" - - "@FriederikeHanssen" -maintainers: - - "@erikrikarddaniel" - - "@FriederikeHanssen" diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test deleted file mode 100644 index 9cb1617..0000000 --- a/modules/nf-core/cat/cat/tests/main.nf.test +++ /dev/null @@ -1,191 +0,0 @@ -nextflow_process { - - name "Test Process CAT_CAT" - script "../main.nf" - process "CAT_CAT" - tag "modules" - tag "modules_nfcore" - tag "cat" - tag "cat/cat" - - test("test_cat_name_conflict") { - when { - params { - outdir = "${outputDir}" - } - process { - """ - input[0] = - [ - [ id:'genome', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) - ] - ] - """ - } - } - then { - assertAll( - { assert !process.success }, - { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") }, - { assert snapshot(process.out.versions).match() } - ) - } - } - - test("test_cat_unzipped_unzipped") { - when { - params { - outdir = "${outputDir}" - } - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) - ] - ] - """ - } - } - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - - test("test_cat_zipped_zipped") { - when { - params { - outdir = "${outputDir}" - } - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true) - ] - ] - """ - } - } - then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip - assertAll( - { assert process.success }, - { assert snapshot( - lines[0..5], - lines.size(), - process.out.versions - ).match() - } - ) - } - } - - test("test_cat_zipped_unzipped") { - config './nextflow_zipped_unzipped.config' - - when { - params { - outdir = "${outputDir}" - } - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("test_cat_unzipped_zipped") { - config './nextflow_unzipped_zipped.config' - when { - params { - outdir = "${outputDir}" - } - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) - ] - ] - """ - } - } - then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip - assertAll( - { assert process.success }, - { assert snapshot( - lines[0..5], - lines.size(), - process.out.versions - ).match() - } - ) - } - } - - test("test_cat_one_file_unzipped_zipped") { - config './nextflow_unzipped_zipped.config' - when { - params { - outdir = "${outputDir}" - } - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - ] - """ - } - } - then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip - assertAll( - { assert process.success }, - { assert snapshot( - lines[0..5], - lines.size(), - process.out.versions - ).match() - } - ) - } - } -} diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap deleted file mode 100644 index b7623ee..0000000 --- a/modules/nf-core/cat/cat/tests/main.nf.test.snap +++ /dev/null @@ -1,147 +0,0 @@ -{ - "test_cat_unzipped_unzipped": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" - ] - ], - "1": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ], - "file_out": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" - ] - ], - "versions": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2023-10-16T14:32:18.500464399" - }, - "test_cat_zipped_unzipped": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" - ] - ], - "1": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ], - "file_out": [ - [ - { - "id": "test", - "single_end": true - }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" - ] - ], - "versions": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2023-10-16T14:32:49.642741302" - }, - "test_cat_zipped_zipped": { - "content": [ - [ - "MT192765.1\tGenbank\ttranscript\t259\t29667\t.\t+\t.\tID=unknown_transcript_1;geneID=orf1ab;gene_name=orf1ab", - "MT192765.1\tGenbank\tgene\t259\t21548\t.\t+\t.\tParent=unknown_transcript_1", - "MT192765.1\tGenbank\tCDS\t259\t13461\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", - "MT192765.1\tGenbank\tCDS\t13461\t21548\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", - "MT192765.1\tGenbank\tCDS\t21556\t25377\t.\t+\t0\tParent=unknown_transcript_1;gbkey=CDS;gene=S;note=\"structural protein\";product=\"surface glycoprotein\";protein_id=QIK50427.1", - "MT192765.1\tGenbank\tgene\t21556\t25377\t.\t+\t.\tParent=unknown_transcript_1" - ], - 78, - [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:51:46.802978" - }, - "test_cat_name_conflict": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:51:29.45394" - }, - "test_cat_one_file_unzipped_zipped": { - "content": [ - [ - ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", - "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT", - "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG", - "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", - "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", - "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" - ], - 374, - [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:52:02.774016" - }, - "test_cat_unzipped_zipped": { - "content": [ - [ - ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", - "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT", - "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG", - "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", - "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", - "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" - ], - 375, - [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:51:57.581523" - } -} \ No newline at end of file diff --git a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config b/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config deleted file mode 100644 index ec26b0f..0000000 --- a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config +++ /dev/null @@ -1,6 +0,0 @@ - -process { - withName: CAT_CAT { - ext.prefix = 'cat.txt.gz' - } -} diff --git a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config b/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config deleted file mode 100644 index fbc7978..0000000 --- a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config +++ /dev/null @@ -1,8 +0,0 @@ - -process { - - withName: CAT_CAT { - ext.prefix = 'cat.txt' - } - -} diff --git a/modules/nf-core/cat/cat/tests/tags.yml b/modules/nf-core/cat/cat/tests/tags.yml deleted file mode 100644 index 37b578f..0000000 --- a/modules/nf-core/cat/cat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/cat: - - modules/nf-core/cat/cat/** diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml deleted file mode 100644 index 8c69b12..0000000 --- a/modules/nf-core/cat/fastq/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: cat_fastq -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - conda-forge::coreutils=8.30 diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf deleted file mode 100644 index b68e5f9..0000000 --- a/modules/nf-core/cat/fastq/main.nf +++ /dev/null @@ -1,79 +0,0 @@ -process CAT_FASTQ { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" - - input: - tuple val(meta), path(reads, stageAs: "input*/*") - - output: - tuple val(meta), path("*.merged.fastq.gz"), emit: reads - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] - if (meta.single_end) { - if (readList.size >= 1) { - """ - cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS - """ - } - } else { - if (readList.size >= 2) { - def read1 = [] - def read2 = [] - readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v } - """ - cat ${read1.join(' ')} > ${prefix}_1.merged.fastq.gz - cat ${read2.join(' ')} > ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS - """ - } - } - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] - if (meta.single_end) { - if (readList.size >= 1) { - """ - echo '' | gzip > ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS - """ - } - } else { - if (readList.size >= 2) { - """ - echo '' | gzip > ${prefix}_1.merged.fastq.gz - echo '' | gzip > ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS - """ - } - } -} diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml deleted file mode 100644 index db4ac3c..0000000 --- a/modules/nf-core/cat/fastq/meta.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: cat_fastq -description: Concatenates fastq files -keywords: - - cat - - fastq - - concatenate -tools: - - cat: - description: | - The cat utility reads files sequentially, writing them to the standard output. - documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html - licence: ["GPL-3.0-or-later"] -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 to be concatenated. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Merged fastq file - pattern: "*.{merged.fastq.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@joseespinosa" - - "@drpatelh" -maintainers: - - "@joseespinosa" - - "@drpatelh" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test deleted file mode 100644 index f88a78b..0000000 --- a/modules/nf-core/cat/fastq/tests/main.nf.test +++ /dev/null @@ -1,248 +0,0 @@ -// NOTE The version snaps may not be consistant -// https://github.com/nf-core/modules/pull/4087#issuecomment-1767948035 -nextflow_process { - - name "Test Process CAT_FASTQ" - script "../main.nf" - process "CAT_FASTQ" - tag "modules" - tag "modules_nfcore" - tag "cat" - tag "cat/fastq" - - test("test_cat_fastq_single_end") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // 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("test_cat_fastq_paired_end") { - - 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("test_cat_fastq_single_end_same_name") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // 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_1.fastq.gz', checkIfExists: true)] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_cat_fastq_paired_end_same_name") { - - 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/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("test_cat_fastq_single_end_single_file") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', 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 snapshot(process.out).match() } - ) - } - } - - test("test_cat_fastq_single_end - stub") { - - options "-stub" - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // 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("test_cat_fastq_paired_end - 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("test_cat_fastq_single_end_same_name - stub") { - - options "-stub" - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // 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_1.fastq.gz', checkIfExists: true)] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_cat_fastq_paired_end_same_name - 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/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("test_cat_fastq_single_end_single_file - stub") { - - options "-stub" - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', 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 snapshot(process.out).match() } - ) - } - } -} diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap deleted file mode 100644 index aec119a..0000000 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ /dev/null @@ -1,376 +0,0 @@ -{ - "test_cat_fastq_single_end": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-01-17T17:30:39.816981" - }, - "test_cat_fastq_single_end_same_name": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22" - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22" - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-01-17T17:32:35.229332" - }, - "test_cat_fastq_single_end_single_file": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-01-17T17:34:00.058829" - }, - "test_cat_fastq_paired_end_same_name": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" - ] - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" - ] - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-01-17T17:33:33.031555" - }, - "test_cat_fastq_single_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T12:07:28.244999" - }, - "test_cat_fastq_paired_end_same_name - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T12:07:57.070911" - }, - "test_cat_fastq_single_end_same_name - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T12:07:46.796254" - }, - "test_cat_fastq_paired_end": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" - ] - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" - ] - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-01-17T17:32:02.270935" - }, - "test_cat_fastq_paired_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T12:07:37.807553" - }, - "test_cat_fastq_single_end_single_file - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T12:14:51.861264" - } -} \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/tests/tags.yml b/modules/nf-core/cat/fastq/tests/tags.yml deleted file mode 100644 index 6ac4361..0000000 --- a/modules/nf-core/cat/fastq/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/fastq: - - modules/nf-core/cat/fastq/** diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml deleted file mode 100644 index b48ced2..0000000 --- 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.20 diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf deleted file mode 100644 index 105f926..0000000 --- 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.20--pyhdfd78af_0' : - 'biocontainers/multiqc:1.20--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 5f15a5f..0000000 --- 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 9a493ac..0000000 --- a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ /dev/null @@ -1,100 +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 b1e1630..0000000 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test +++ /dev/null @@ -1,43 +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.versions, - file(process.out.mqc_yml[0]).readLines()[0..10], - file(process.out.yml[0]).readLines()[0..7] - ).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 5f59a93..0000000 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap +++ /dev/null @@ -1,33 +0,0 @@ -{ - "Should run without failures": { - "content": [ - [ - "versions.yml:md5,76d454d92244589d32455833f7c1ba6d" - ], - [ - "data: \"\\n\\n \\n \\n \\n \\n \\n \\n \\n\\", - " \\n\\n\\n \\n \\n\\", - " \\ \\n\\n\\n\\n \\n \\", - " \\ \\n \\n\\n\\n\\n\\", - " \\n\\n \\n \\n\\", - " \\ \\n\\n\\n\\n\\n\\n \\n\\", - " \\ \\n \\n\\n\\n\\n\\", - " \\n\\n \\n \\n\\" - ], - [ - "CUSTOM_DUMPSOFTWAREVERSIONS:", - " python: 3.11.7", - " yaml: 5.4.1", - "TOOL1:", - " tool1: 0.11.9", - "TOOL2:", - " tool2: '1.9'", - "Workflow:" - ] - ], - "timestamp": "2024-01-09T23:01:18.710682" - } -} \ No newline at end of file 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 405aa24..0000000 --- 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/eggnogmapper/environment.yml b/modules/nf-core/eggnogmapper/environment.yml deleted file mode 100644 index f4fb6fd..0000000 --- a/modules/nf-core/eggnogmapper/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: eggnogmapper -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::eggnog-mapper=2.1.12 diff --git a/modules/nf-core/eggnogmapper/main.nf b/modules/nf-core/eggnogmapper/main.nf deleted file mode 100644 index 2489b7f..0000000 --- a/modules/nf-core/eggnogmapper/main.nf +++ /dev/null @@ -1,68 +0,0 @@ -process EGGNOGMAPPER { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/eggnog-mapper:2.1.12--pyhdfd78af_0': - 'biocontainers/eggnog-mapper:2.1.12--pyhdfd78af_0' }" - - input: - tuple val(meta), path(fasta) - path(eggnog_db) - path(eggnog_data_dir) - tuple val(meta2), path(eggnog_diamond_db) - - output: - tuple val(meta), path("*.emapper.annotations") , emit: annotations - tuple val(meta), path("*.emapper.seed_orthologs"), emit: orthologs - tuple val(meta), path("*.emapper.hits") , emit: hits - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def is_compressed = fasta.extension == '.gz' ? true : false - def fasta_name = is_compressed ? fasta.baseName : "$fasta" - def dbmem = task.memory.toMega() > 40000 ? '--dbmem' : '' - def database_arg = eggnog_db ? "--database $eggnog_db" : '' - def dmnd_db_arg = eggnog_diamond_db ? "--dmnd_db $eggnog_diamond_db" : '' - """ - if [ "$is_compressed" == "true" ]; then - gzip -c -d $fasta > $fasta_name - fi - - emapper.py \\ - --cpu ${task.cpus} \\ - -i ${fasta_name} \\ - --data_dir ${eggnog_data_dir} \\ - -m diamond \\ - $dmnd_db_arg \\ - $database_arg \\ - --output ${prefix} \\ - ${dbmem} \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - eggnog-mapper: \$(echo \$(emapper.py --version) | grep -o "emapper-[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+" | sed "s/emapper-//") - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.emapper.annotations - touch ${prefix}.emapper.seed_orthologs - touch ${prefix}.emapper.hits - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - eggnog-mapper: \$(echo \$(emapper.py --version) | grep -o "emapper-[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+" | sed "s/emapper-//") - END_VERSIONS - """ -} diff --git a/modules/nf-core/eggnogmapper/meta.yml b/modules/nf-core/eggnogmapper/meta.yml deleted file mode 100644 index 95090a1..0000000 --- a/modules/nf-core/eggnogmapper/meta.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: "eggnogmapper" -description: Fast genome-wide functional annotation through orthology assignment. -keywords: - - annotation - - orthology - - genomics -tools: - - "eggnogmapper": - description: "Fast genome-wide functional annotation through orthology assignment." - homepage: "https://github.com/eggnogdb/eggnog-mapper" - documentation: "https://github.com/eggnogdb/eggnog-mapper/wiki" - tool_dev_url: "https://github.com/eggnogdb/eggnog-mapper" - doi: "10.1093/molbev/msab293" - licence: ["AGPL v3"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - fasta: - type: file - description: Database of sequences in FASTA format - pattern: "*.{fasta,fa,fasta.gz,fa.gz}" - - eggnog_db: - type: file - description: The eggnog database file (e.g. eggnog-mapper/data/eggnog.db) - pattern: "*.db" - - eggnog_data_dir: - type: directory - description: Directory containing eggnog database files (e.g. eggnog-mapper/data) - pattern: "*" - - meta2: - type: map - description: | - Groovy Map containing database information - e.g. `[ id:'test' ]` - - eggnog_diamond_db: - type: file - description: The eggnog Diamond protein database file (e.g. eggnog-mapper/data/eggnog_proteins.dmnd) - pattern: "*.dmnd" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - annotations: - type: file - description: TSV with the results from the annotation phase - pattern: "*.emapper.annotations" - - orthologs: - type: file - description: TSV with the results from parsing the hits, linking queries with seed orthologs (with commented metadata) - pattern: "*.emapper.seed_orthologs" - - hits: - type: file - description: TSV with the results from the Diamond search phase - pattern: "*.emapper.hits" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@vagkaratzas" -maintainers: - - "@vagkaratzas" - - "@gallvp" diff --git a/modules/nf-core/eggnogmapper/tests/main.nf.test b/modules/nf-core/eggnogmapper/tests/main.nf.test deleted file mode 100644 index 5f36b44..0000000 --- a/modules/nf-core/eggnogmapper/tests/main.nf.test +++ /dev/null @@ -1,95 +0,0 @@ -nextflow_process { - - name "Test Process EGGNOGMAPPER" - script "../main.nf" - process "EGGNOGMAPPER" - tag "modules" - tag "modules_nfcore" - tag "eggnogmapper" - tag "diamond/makedb" - - setup { - run("DIAMOND_MAKEDB") { - script "../../diamond/makedb/main.nf" - process { - """ - input[0] = [ [id:'test2'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] - input[1] = [] - input[2] = [] - input[3] = [] - """ - } - } - } - - test("Should search for protein annotations against the eggnogmapper db") { - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] - eggnog_db = file("https://github.com/nf-core/test-datasets/raw/eddf5b0e3336e0f93c81d4b4843b07257f9efaec/data/delete_me/eggnogmapper/eggnog.db", checkIfExists: true) - eggnog_db.copyTo("${workDir}/tmp/eggnog.db") - eggnog_data_dir = "${workDir}/tmp/" - input[1] = eggnog_db - input[2] = eggnog_data_dir - input[3] = DIAMOND_MAKEDB.out.db - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.annotations.get(0).get(1)).readLines().contains("ENSSASP00005000002.1\tENSSASP00005000002.1\t0.0\t14179.0\tCOG0498@1|root,COG0498@2|Bacteria,1MUWQ@1224|Proteobacteria,2VHR6@28216|Betaproteobacteria,2KUMA@206389|Rhodocyclales\t1224|Proteobacteria\tE\tthreonine synthase\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-") }, - { assert path(process.out.orthologs.get(0).get(1)).readLines().contains("ENSSASP00005000002.1\tENSSASP00005000002.1\t0.0\t14179.0\t1\t7096\t1\t7096\t100.0\t100.0\t100.0") }, - { assert snapshot(process.out.hits).match("hits") }, - { assert snapshot(process.out.versions).match("versions") } - ) - } - - } - - test("Should search for protein annotations against the eggnogmapper db -- empty-params") { - - when { - params { - outdir = "$outputDir" - } - process { - """ - eggnog_db = file("https://github.com/nf-core/test-datasets/raw/eddf5b0e3336e0f93c81d4b4843b07257f9efaec/data/delete_me/eggnogmapper/eggnog.db", checkIfExists: true) - eggnog_db.copyTo("${workDir}/tmp/eggnog.db") - - ch_synced_inputs = DIAMOND_MAKEDB.out.db.map { meta, dmnd -> - dmnd.copyTo("${workDir}/tmp/eggnog_proteins.dmnd") - - return true - } - | combine ( Channel.fromPath( "${workDir}/tmp/" ) ) - eggnog_data_dir = ch_synced_inputs.map { sync_status, data_dir -> data_dir } - - input[0] = [ [id:'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] - input[1] = [] - input[2] = eggnog_data_dir - input[3] = [[], []] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.annotations.get(0).get(1)).readLines().contains("ENSSASP00005000002.1\tENSSASP00005000002.1\t0.0\t14179.0\tCOG0498@1|root,COG0498@2|Bacteria,1MUWQ@1224|Proteobacteria,2VHR6@28216|Betaproteobacteria,2KUMA@206389|Rhodocyclales\t1224|Proteobacteria\tE\tthreonine synthase\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-\t-") }, - { assert path(process.out.orthologs.get(0).get(1)).readLines().contains("ENSSASP00005000002.1\tENSSASP00005000002.1\t0.0\t14179.0\t1\t7096\t1\t7096\t100.0\t100.0\t100.0") }, - { assert snapshot(process.out.hits).match("hits--empty-params") }, - { assert snapshot(process.out.versions).match("versions--empty-params") } - ) - } - - } - -} diff --git a/modules/nf-core/eggnogmapper/tests/main.nf.test.snap b/modules/nf-core/eggnogmapper/tests/main.nf.test.snap deleted file mode 100644 index 170e8c9..0000000 --- a/modules/nf-core/eggnogmapper/tests/main.nf.test.snap +++ /dev/null @@ -1,60 +0,0 @@ -{ - "hits": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.emapper.hits:md5,864b7a1f902893d8aee6621baeab7be8" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-12T13:43:01.751295" - }, - "versions--empty-params": { - "content": [ - [ - "versions.yml:md5,d3e4efad28b5a924585ea3dfcf72c32c" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-15T11:42:23.737523" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,d3e4efad28b5a924585ea3dfcf72c32c" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-12T13:45:26.555465" - }, - "hits--empty-params": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.emapper.hits:md5,864b7a1f902893d8aee6621baeab7be8" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-15T11:42:23.690105" - } -} \ No newline at end of file diff --git a/modules/nf-core/eggnogmapper/tests/tags.yml b/modules/nf-core/eggnogmapper/tests/tags.yml deleted file mode 100644 index 284ba2e..0000000 --- a/modules/nf-core/eggnogmapper/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -eggnogmapper: - - modules/nf-core/eggnogmapper/** diff --git a/modules/nf-core/fastavalidator/environment.yml b/modules/nf-core/fastavalidator/environment.yml deleted file mode 100644 index 70f346e..0000000 --- a/modules/nf-core/fastavalidator/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "fastavalidator" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::py_fasta_validator=0.6" diff --git a/modules/nf-core/fastavalidator/main.nf b/modules/nf-core/fastavalidator/main.nf deleted file mode 100644 index ac5470f..0000000 --- a/modules/nf-core/fastavalidator/main.nf +++ /dev/null @@ -1,62 +0,0 @@ -process FASTAVALIDATOR { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/py_fasta_validator:0.6--py37h595c7a6_0': - 'biocontainers/py_fasta_validator:0.6--py37h595c7a6_0' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path('*.success.log') , emit: success_log , optional: true - tuple val(meta), path('*.error.log') , emit: error_log , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - py_fasta_validator \\ - -f $fasta \\ - 2> "${prefix}.error.log" \\ - || echo "Errors from fasta_validate printed to ${prefix}.error.log" - - if [ \$(cat "${prefix}.error.log" | wc -l) -gt 0 ]; then - echo "Validation failed..." - - cat \\ - "${prefix}.error.log" - else - echo "Validation successful..." - - mv \\ - "${prefix}.error.log" \\ - fasta_validate.stderr - - echo "Validation successful..." \\ - > "${prefix}.success.log" - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - py_fasta_validator: \$(py_fasta_validator -v | sed 's/.* version //') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - echo "Validation successful..." \\ - > "${prefix}.success.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - py_fasta_validator: \$(py_fasta_validator -v | sed 's/.* version //') - END_VERSIONS - """ -} diff --git a/modules/nf-core/fastavalidator/meta.yml b/modules/nf-core/fastavalidator/meta.yml deleted file mode 100644 index c5c4371..0000000 --- a/modules/nf-core/fastavalidator/meta.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "fastavalidator" -description: | - "Python C-extension for a simple validator for fasta files. The module emits the validated file or an - error log upon validation failure." -keywords: - - fasta - - validation - - genome -tools: - - fasta_validate: - description: | - "Python C-extension for a simple C code to validate a fasta file. It only checks a few things, - and by default only sets its response via the return code, - so you will need to check that!" - homepage: "https://github.com/linsalrob/py_fasta_validator" - documentation: "https://github.com/linsalrob/py_fasta_validator" - tool_dev_url: "https://github.com/linsalrob/py_fasta_validator" - doi: "10.5281/zenodo.5002710" - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing file information - e.g. [ id:'test' ] - - fasta: - type: file - description: Input fasta file - pattern: "*.fasta" -output: - - meta: - type: map - description: | - Groovy Map containing file information - e.g. [ id:'test' ] - - success_log: - type: file - description: Log file for successful validation - pattern: "*.success.log" - - error_log: - type: file - description: Log file for failed validation - pattern: "*.error.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@gallvp" -maintainers: - - "@gallvp" diff --git a/modules/nf-core/fastavalidator/tests/main.nf.test b/modules/nf-core/fastavalidator/tests/main.nf.test deleted file mode 100644 index 39b00d8..0000000 --- a/modules/nf-core/fastavalidator/tests/main.nf.test +++ /dev/null @@ -1,60 +0,0 @@ -nextflow_process { - - name "Test Process FASTAVALIDATOR" - script "../main.nf" - process "FASTAVALIDATOR" - - tag "modules" - tag "modules_nfcore" - tag "fastavalidator" - - test("sarscov2-fasta-valid") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.success_log != null }, - { assert process.out.error_log == [] }, - { assert path(process.out.success_log.get(0).get(1)).getText().contains("Validation successful...") } - ) - } - - } - - test("sarscov2-gff3-invalid") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.success_log == [] }, - { assert process.out.error_log != null }, - { assert path(process.out.error_log.get(0).get(1)).getText().contains("genome.gff3 does not start with a >") } - ) - } - - } -} diff --git a/modules/nf-core/fastavalidator/tests/main.nf.test.snap b/modules/nf-core/fastavalidator/tests/main.nf.test.snap deleted file mode 100644 index 382dee7..0000000 --- a/modules/nf-core/fastavalidator/tests/main.nf.test.snap +++ /dev/null @@ -1,76 +0,0 @@ -{ - "sarscov2-fasta-valid": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.success.log:md5,b0b859eda1db5cd43915846e00ebc22c" - ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ], - "error_log": [ - - ], - "success_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.success.log:md5,b0b859eda1db5cd43915846e00ebc22c" - ] - ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ] - } - ], - "timestamp": "2023-11-28T11:23:25.106872" - }, - "sarscov2-gff3-invalid": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.error.log:md5,531d520c0e7767176f743f197f1f87b3" - ] - ], - "2": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ], - "error_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.error.log:md5,531d520c0e7767176f743f197f1f87b3" - ] - ], - "success_log": [ - - ], - "versions": [ - "versions.yml:md5,05aa059840b3b4dd6d88bc1e4bf976d7" - ] - } - ], - "timestamp": "2023-11-28T11:23:29.40324" - } -} \ No newline at end of file diff --git a/modules/nf-core/fastavalidator/tests/tags.yml b/modules/nf-core/fastavalidator/tests/tags.yml deleted file mode 100644 index c3c7757..0000000 --- a/modules/nf-core/fastavalidator/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -fastavalidator: - - "modules/nf-core/fastavalidator/**" diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf deleted file mode 100644 index e1b9f56..0000000 --- a/modules/nf-core/fastp/main.nf +++ /dev/null @@ -1,125 +0,0 @@ -process FASTP { - tag "$meta.id" - label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/fastp:0.23.4--h5f740d0_0' : - 'biocontainers/fastp:0.23.4--h5f740d0_0' }" - - input: - tuple val(meta), path(reads) - path adapter_fasta - val discard_trimmed_pass - val save_trimmed_fail - val save_merged - - output: - tuple val(meta), path('*.fastp.fastq.gz') , optional:true, emit: reads - tuple val(meta), path('*.json') , emit: json - tuple val(meta), path('*.html') , emit: html - tuple val(meta), path('*.log') , emit: log - tuple val(meta), path('*.fail.fastq.gz') , optional:true, emit: reads_fail - tuple val(meta), path('*.merged.fastq.gz'), optional:true, emit: reads_merged - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def adapter_list = adapter_fasta ? "--adapter_fasta ${adapter_fasta}" : "" - def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' - def out_fq1 = discard_trimmed_pass ?: ( meta.single_end ? "--out1 ${prefix}.fastp.fastq.gz" : "--out1 ${prefix}_1.fastp.fastq.gz" ) - def out_fq2 = discard_trimmed_pass ?: "--out2 ${prefix}_2.fastp.fastq.gz" - // Added soft-links to original fastqs for consistent naming in MultiQC - // Use single ended for interleaved. Add --interleaved_in in config. - if ( task.ext.args?.contains('--interleaved_in') ) { - """ - [ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz - - fastp \\ - --stdout \\ - --in1 ${prefix}.fastq.gz \\ - --thread $task.cpus \\ - --json ${prefix}.fastp.json \\ - --html ${prefix}.fastp.html \\ - $adapter_list \\ - $fail_fastq \\ - $args \\ - 2> >(tee ${prefix}.fastp.log >&2) \\ - | gzip -c > ${prefix}.fastp.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS - """ - } else if (meta.single_end) { - """ - [ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz - - fastp \\ - --in1 ${prefix}.fastq.gz \\ - $out_fq1 \\ - --thread $task.cpus \\ - --json ${prefix}.fastp.json \\ - --html ${prefix}.fastp.html \\ - $adapter_list \\ - $fail_fastq \\ - $args \\ - 2> >(tee ${prefix}.fastp.log >&2) - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS - """ - } else { - def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : '' - """ - [ ! -f ${prefix}_1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_1.fastq.gz - [ ! -f ${prefix}_2.fastq.gz ] && ln -sf ${reads[1]} ${prefix}_2.fastq.gz - fastp \\ - --in1 ${prefix}_1.fastq.gz \\ - --in2 ${prefix}_2.fastq.gz \\ - $out_fq1 \\ - $out_fq2 \\ - --json ${prefix}.fastp.json \\ - --html ${prefix}.fastp.html \\ - $adapter_list \\ - $fail_fastq \\ - $merge_fastq \\ - --thread $task.cpus \\ - --detect_adapter_for_pe \\ - $args \\ - 2> >(tee ${prefix}.fastp.log >&2) - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS - """ - } - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def is_single_output = task.ext.args?.contains('--interleaved_in') || meta.single_end - def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_2.fastp.fastq.gz" - def touch_merged = (!is_single_output && save_merged) ? "echo '' | gzip > ${prefix}.merged.fastq.gz" : "" - def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_1.fail.fastq.gz ; echo '' | gzip > ${prefix}_2.fail.fastq.gz" - """ - $touch_reads - $touch_fail_fastq - $touch_merged - touch "${prefix}.fastp.json" - touch "${prefix}.fastp.html" - touch "${prefix}.fastp.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS - """ -} diff --git a/modules/nf-core/fastp/meta.yml b/modules/nf-core/fastp/meta.yml deleted file mode 100644 index 8dfecc1..0000000 --- a/modules/nf-core/fastp/meta.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: fastp -description: Perform adapter/quality trimming on sequencing reads -keywords: - - trimming - - quality control - - fastq -tools: - - fastp: - description: | - A tool designed to provide fast all-in-one preprocessing for FastQ files. This tool is developed in C++ with multithreading supported to afford high performance. - documentation: https://github.com/OpenGene/fastp - doi: 10.1093/bioinformatics/bty560 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information. Use 'single_end: true' to specify single ended or interleaved FASTQs. Use 'single_end: false' for paired-end reads. - 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. If you wish to run interleaved paired-end data, supply as single-end data - but with `--interleaved_in` in your `modules.conf`'s `ext.args` for the module. - - adapter_fasta: - type: file - description: File in FASTA format containing possible adapters to remove. - pattern: "*.{fasta,fna,fas,fa}" - - discard_trimmed_pass: - type: boolean - description: Specify true to not write any reads that pass trimming thresholds. | - This can be used to use fastp for the output report only. - - save_trimmed_fail: - type: boolean - description: Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz` - - save_merged: - type: boolean - description: Specify true to save all merged reads to a file ending in `*.merged.fastq.gz` -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: The trimmed/modified/unmerged fastq reads - pattern: "*fastp.fastq.gz" - - json: - type: file - description: Results in JSON format - pattern: "*.json" - - html: - type: file - description: Results in HTML format - pattern: "*.html" - - log: - type: file - description: fastq log file - pattern: "*.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - reads_fail: - type: file - description: Reads the failed the preprocessing - pattern: "*fail.fastq.gz" - - reads_merged: - type: file - description: Reads that were successfully merged - pattern: "*.{merged.fastq.gz}" -authors: - - "@drpatelh" - - "@kevinmenden" -maintainers: - - "@drpatelh" - - "@kevinmenden" diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test deleted file mode 100644 index 30dbb8a..0000000 --- a/modules/nf-core/fastp/tests/main.nf.test +++ /dev/null @@ -1,576 +0,0 @@ -nextflow_process { - - name "Test Process FASTP" - script "../main.nf" - process "FASTP" - tag "modules" - tag "modules_nfcore" - tag "fastp" - - test("test_fastp_single_end") { - - when { - - 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) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.versions).match() } - ) - } - } - - test("test_fastp_paired_end") { - - when { - - process { - """ - adapter_fasta = [] - save_trimmed_pass = true - save_trimmed_fail = false - save_merged = false - - 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) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.versions).match() } - ) - } - } - - test("fastp test_fastp_interleaved") { - - config './nextflow.interleaved.config' - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("paired end (151 cycles + 151 cycles)") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, - { assert process.out.reads_fail == [] }, - { assert process.out.reads_merged == [] }, - { assert snapshot( - process.out.reads, - process.out.json, - process.out.versions).match() } - ) - } - } - - test("test_fastp_single_end_trim_fail") { - - when { - - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] - ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.versions).match() } - ) - } - } - - test("test_fastp_paired_end_trim_fail") { - - config './nextflow.save_failed.config' - 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)] - ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, - { assert snapshot( - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.json, - process.out.versions).match() } - ) - } - } - - test("test_fastp_paired_end_merged") { - - 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) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = true - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("total reads: 75") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.versions).match() }, - ) - } - } - - test("test_fastp_paired_end_merged_adapterlist") { - - 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) ] - ]) - input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) - input[2] = false - input[3] = false - input[4] = true - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("
") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("total bases: 13683") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads_fail, - process.out.reads_merged, - process.out.versions).match() } - ) - } - } - - test("test_fastp_single_end_qc_only") { - - when { - 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) ] - ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads, - process.out.reads_fail, - process.out.reads_fail, - process.out.reads_merged, - process.out.reads_merged, - process.out.versions).match() } - ) - } - } - - test("test_fastp_paired_end_qc_only") { - - 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) ] - ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, - { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, - { assert snapshot( - process.out.json, - process.out.reads, - process.out.reads, - process.out.reads_fail, - process.out.reads_fail, - process.out.reads_merged, - process.out.reads_merged, - process.out.versions).match() } - ) - } - } - - test("test_fastp_single_end - stub") { - - options "-stub" - - when { - - 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) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_paired_end - stub") { - - options "-stub" - - when { - - process { - """ - adapter_fasta = [] - save_trimmed_pass = true - save_trimmed_fail = false - save_merged = false - - 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) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("fastp - stub test_fastp_interleaved") { - - options "-stub" - - config './nextflow.interleaved.config' - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_single_end_trim_fail - stub") { - - options "-stub" - - when { - - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] - ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_paired_end_trim_fail - stub") { - - options "-stub" - - config './nextflow.save_failed.config' - 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)] - ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_paired_end_merged - 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) ] - ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = true - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_paired_end_merged_adapterlist - 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) ] - ]) - input[1] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) - input[2] = false - input[3] = false - input[4] = true - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_single_end_qc_only - stub") { - - options "-stub" - - when { - 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) ] - ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("test_fastp_paired_end_qc_only - 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) ] - ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} \ No newline at end of file diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap deleted file mode 100644 index 54be7e4..0000000 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ /dev/null @@ -1,1331 +0,0 @@ -{ - "test_fastp_single_end_qc_only - stub": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - - ], - "reads_fail": [ - - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T14:31:10.841098" - }, - "test_fastp_paired_end": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" - ] - ] - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:43:28.665779" - }, - "test_fastp_paired_end_merged_adapterlist": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,5914ca3f21ce162123a824e33e8564f6" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" - ] - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:44:18.210375" - }, - "test_fastp_single_end_qc_only": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,5cc5f01e449309e0e689ed6f51a2294a" - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:44:27.380974" - }, - "test_fastp_paired_end_trim_fail": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" - ] - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:43:58.749589" - }, - "fastp - stub test_fastp_interleaved": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "reads_fail": [ - - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:50:00.270029" - }, - "test_fastp_single_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "reads_fail": [ - - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:49:42.502789" - }, - "test_fastp_paired_end_merged_adapterlist - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "reads_fail": [ - - ], - "reads_merged": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:54:53.458252" - }, - "test_fastp_paired_end_merged - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "reads_fail": [ - - ], - "reads_merged": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:50:27.689379" - }, - "test_fastp_paired_end_merged": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" - ] - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:44:08.68476" - }, - "test_fastp_paired_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "reads_fail": [ - - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:49:51.679221" - }, - "test_fastp_single_end": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" - ] - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:43:18.834322" - }, - "test_fastp_single_end_trim_fail - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "reads_fail": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T14:05:36.898142" - }, - "test_fastp_paired_end_trim_fail - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "reads_fail": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T14:05:49.212847" - }, - "fastp test_fastp_interleaved": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,217d62dc13a23e92513a1bd8e1bcea39" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,b24e0624df5cc0b11cd5ba21b726fb22" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:43:38.910832" - }, - "test_fastp_single_end_trim_fail": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fail.fastq.gz:md5,3e4aaadb66a5b8fc9b881bf39c227abd" - ] - ], - [ - - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:43:48.22378" - }, - "test_fastp_paired_end_qc_only": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,623064a45912dac6f2b64e3f2e9901df" - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T13:44:36.334938" - }, - "test_fastp_paired_end_qc_only - stub": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - - ], - "5": [ - - ], - "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - - ], - "reads_fail": [ - - ], - "reads_merged": [ - - ], - "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-05T14:31:27.096468" - } -} \ No newline at end of file diff --git a/modules/nf-core/fastp/tests/nextflow.interleaved.config b/modules/nf-core/fastp/tests/nextflow.interleaved.config deleted file mode 100644 index 4be8dbd..0000000 --- a/modules/nf-core/fastp/tests/nextflow.interleaved.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: FASTP { - ext.args = "--interleaved_in -e 30" - } -} diff --git a/modules/nf-core/fastp/tests/nextflow.save_failed.config b/modules/nf-core/fastp/tests/nextflow.save_failed.config deleted file mode 100644 index 53b61b0..0000000 --- a/modules/nf-core/fastp/tests/nextflow.save_failed.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: FASTP { - ext.args = "-e 30" - } -} diff --git a/modules/nf-core/fastp/tests/tags.yml b/modules/nf-core/fastp/tests/tags.yml deleted file mode 100644 index c1afcce..0000000 --- a/modules/nf-core/fastp/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -fastp: - - modules/nf-core/fastp/** diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index e9d79a0..70edae4 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -23,14 +23,17 @@ nextflow_process { 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("
") }, - { assert snapshot(process.out.versions).match() } + { 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("") }, + + { assert snapshot(process.out.versions).match("fastqc_versions_single") } ) } } @@ -51,14 +54,16 @@ nextflow_process { 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("") }, - { assert path(process.out.html[0][1][1]).text.contains("") }, - { assert snapshot(process.out.versions).match() } + { 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("") }, + { assert path(process.out.html[0][1][1]).text.contains("") }, + + { assert snapshot(process.out.versions).match("fastqc_versions_paired") } ) } } @@ -78,11 +83,13 @@ nextflow_process { 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("") }, - { assert snapshot(process.out.versions).match() } + { 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("") }, + + { assert snapshot(process.out.versions).match("fastqc_versions_interleaved") } ) } } @@ -102,11 +109,13 @@ nextflow_process { 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("") }, - { assert snapshot(process.out.versions).match() } + { 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("") }, + + { assert snapshot(process.out.versions).match("fastqc_versions_bam") } ) } } @@ -129,20 +138,22 @@ nextflow_process { 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("") }, - { assert path(process.out.html[0][1][1]).text.contains("") }, - { assert path(process.out.html[0][1][2]).text.contains("") }, - { assert path(process.out.html[0][1][3]).text.contains("") }, - { assert snapshot(process.out.versions).match() } + { 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("") }, + { assert path(process.out.html[0][1][1]).text.contains("") }, + { assert path(process.out.html[0][1][2]).text.contains("") }, + { assert path(process.out.html[0][1][3]).text.contains("") }, + + { assert snapshot(process.out.versions).match("fastqc_versions_multiple") } ) } } @@ -162,116 +173,27 @@ nextflow_process { 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("") }, - { assert snapshot(process.out.versions).match() } - ) - } - } + { assert process.success }, - test("sarscov2 single-end [fastq] - stub") { + { 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("") }, - options "-stub" - when { - 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 }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out.versions).match("fastqc_versions_custom_prefix") } ) } } - 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 single-end [fastq] - stub") { - test("sarscov2 multiple [fastq] - stub") { + options "-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) ] + [ id: 'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ]) """ } @@ -279,31 +201,12 @@ nextflow_process { then { assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert process.success }, + { assert snapshot(process.out.html.collect { file(it[1]).getName() } + + process.out.zip.collect { file(it[1]).getName() } + + process.out.versions ).match("fastqc_stub") } ) } } - 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 }, - { assert snapshot(process.out).match() } - ) - } - } } diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap index d5db309..86f7c31 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -1,392 +1,88 @@ { - "sarscov2 custom_prefix": { + "fastqc_versions_interleaved": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:02:16.374038" + "timestamp": "2024-01-31T17:40:07.293713" }, - "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]": { + "fastqc_stub": { "content": [ [ + "test.html", + "test.zip", "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:01:42.355718" + "timestamp": "2024-01-31T17:31:01.425198" }, - "sarscov2 paired-end [bam]": { + "fastqc_versions_multiple": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:01:53.276274" + "timestamp": "2024-01-31T17:40:55.797907" }, - "sarscov2 multiple [fastq]": { + "fastqc_versions_bam": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:02:05.527626" + "timestamp": "2024-01-31T17:40:26.795862" }, - "sarscov2 paired-end [fastq]": { + "fastqc_versions_single": { "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" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:02:34.273566" + "timestamp": "2024-01-31T17:39:27.043675" }, - "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]": { + "fastqc_versions_paired": { "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" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:02:44.640184" + "timestamp": "2024-01-31T17:39:47.584191" }, - "sarscov2 paired-end [bam] - stub": { + "fastqc_versions_custom_prefix": { "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" - ] - ] - } + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" + "nf-test": "0.8.4", + "nextflow": "23.10.1" }, - "timestamp": "2024-07-22T11:02:53.550742" + "timestamp": "2024-01-31T17:41:14.576531" } } \ No newline at end of file diff --git a/modules/nf-core/gffcompare/environment.yml b/modules/nf-core/gffcompare/environment.yml deleted file mode 100644 index bcd633e..0000000 --- a/modules/nf-core/gffcompare/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: gffcompare -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::gffcompare=0.12.6 diff --git a/modules/nf-core/gffcompare/main.nf b/modules/nf-core/gffcompare/main.nf deleted file mode 100644 index edca0f2..0000000 --- a/modules/nf-core/gffcompare/main.nf +++ /dev/null @@ -1,63 +0,0 @@ -process GFFCOMPARE { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gffcompare:0.12.6--h9f5acd7_0' : - 'biocontainers/gffcompare:0.12.6--h9f5acd7_0' }" - - input: - tuple val(meta), path(gtfs) - tuple val(meta2), path(fasta), path(fai) - tuple val(meta3), path(reference_gtf) - - output: - tuple val(meta), path("*.annotated.gtf"), optional: true, emit: annotated_gtf - tuple val(meta), path("*.combined.gtf") , optional: true, emit: combined_gtf - tuple val(meta), path("*.tmap") , optional: true, emit: tmap - tuple val(meta), path("*.refmap") , optional: true, emit: refmap - tuple val(meta), path("*.loci") , emit: loci - tuple val(meta), path("*.stats") , emit: stats - tuple val(meta), path("*.tracking") , emit: tracking - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def ref_fasta = fasta ? "-s ${fasta}" : '' - def ref_gtf = reference_gtf ? "-r ${reference_gtf}" : '' - """ - gffcompare \\ - $args \\ - $ref_fasta \\ - $ref_gtf \\ - -o $prefix \\ - $gtfs - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffcompare: \$(echo \$(gffcompare --version 2>&1) | sed 's/^gffcompare v//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.annotated.gtf - touch ${prefix}.combined.gtf - touch ${prefix}.tmap - touch ${prefix}.refmap - touch ${prefix}.loci - touch ${prefix}.stats - touch ${prefix}.tracking - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffcompare: \$(echo \$(gffcompare --version 2>&1) | sed 's/^gffcompare v//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/gffcompare/meta.yml b/modules/nf-core/gffcompare/meta.yml deleted file mode 100644 index 674f08c..0000000 --- a/modules/nf-core/gffcompare/meta.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: "gffcompare" -description: Compare, merge, annotate and estimate accuracy of generated gtf files -keywords: - - transcripts - - gtf - - merge - - compare -tools: - - "gffcompare": - description: "GffCompare by Geo Pertea" - homepage: "http://ccb.jhu.edu/software/stringtie/gffcompare.shtml" - documentation: "http://ccb.jhu.edu/software/stringtie/gffcompare.shtml" - tool_dev_url: "https://github.com/gpertea/gffcompare" - doi: "10.12688/f1000research.23297.1" - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing meta data - e.g. [ id:'test', single_end:false ] - - gtfs: - type: file - description: | - GTF/GFF files - e.g. [ 'file_1.gtf', 'file_2.gtf' ] - pattern: "*.{gtf,gff}" - - fasta: - type: file - description: Genome reference fasta file (optional) - pattern: "*.{fasta,fa}" - - fai: - type: file - description: Index for fasta file - pattern: "*.fai" - - reference_gtf: - type: file - description: Reference annotation in gtf/gff format (optional) - pattern: "*.{gtf,gff}" -output: - - meta: - type: map - description: | - Groovy Map containing meta data - e.g. [ id:'test', single_end:false ] - - annotated_gtf: - type: file - description: | - Annotated gtf file when reference gtf is provided (optional) - pattern: "*.annotated.gtf" - - combined_gtf: - type: file - description: | - Combined gtf file when multiple input files are - provided (optional) - pattern: "*.annotated.gtf" - - tmap: - type: file - description: | - File listing the most closely matching reference transcript - for each query transcript (optional) - pattern: "*.tmap" - - refmap: - type: file - description: | - File listing the reference transcripts with overlapping - query transcripts (optional) - pattern: "*.refmap" - - loci: - type: file - description: File with loci - pattern: "*.loci" - - stats: - type: file - description: | - File with stats for input transcripts as compared to - reference alternatively stats for the combined gtf - pattern: "*.stats" - - tracking: - type: file - description: | - This file matches transcripts up between samples - pattern: "*.tracking" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@jemten" -maintainers: - - "@jemten" diff --git a/modules/nf-core/gffread/environment.yml b/modules/nf-core/gffread/environment.yml deleted file mode 100644 index c6df58a..0000000 --- a/modules/nf-core/gffread/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: gffread -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::gffread=0.12.7 diff --git a/modules/nf-core/gffread/main.nf b/modules/nf-core/gffread/main.nf deleted file mode 100644 index da55cba..0000000 --- a/modules/nf-core/gffread/main.nf +++ /dev/null @@ -1,60 +0,0 @@ -process GFFREAD { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gffread:0.12.7--hdcf5f25_4' : - 'biocontainers/gffread:0.12.7--hdcf5f25_4' }" - - input: - tuple val(meta), path(gff) - path fasta - - output: - tuple val(meta), path("*.gtf") , emit: gtf , optional: true - tuple val(meta), path("*.gff3") , emit: gffread_gff , optional: true - tuple val(meta), path("*.fasta"), emit: gffread_fasta , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { args.contains(it) } ) ? 'fasta' : 'gff3' ) - def fasta_arg = fasta ? "-g $fasta" : '' - def output_name = "${prefix}.${extension}" - def output = extension == "fasta" ? "$output_name" : "-o $output_name" - def args_sorted = args.replaceAll(/(.*)(-[wxy])(.*)/) { all, pre, param, post -> "$pre $post $param" }.trim() - // args_sorted = Move '-w', '-x', and '-y' to the end of the args string as gffread expects the file name after these parameters - if ( "$output_name" in [ "$gff", "$fasta" ] ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - gffread \\ - $gff \\ - $fasta_arg \\ - $args_sorted \\ - $output - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffread: \$(gffread --version 2>&1) - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { args.contains(it) } ) ? 'fasta' : 'gff3' ) - def output_name = "${prefix}.${extension}" - if ( "$output_name" in [ "$gff", "$fasta" ] ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - """ - touch $output_name - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffread: \$(gffread --version 2>&1) - END_VERSIONS - """ -} diff --git a/modules/nf-core/gffread/meta.yml b/modules/nf-core/gffread/meta.yml deleted file mode 100644 index c060282..0000000 --- a/modules/nf-core/gffread/meta.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: gffread -description: Validate, filter, convert and perform various other operations on GFF files -keywords: - - gff - - conversion - - validation -tools: - - gffread: - description: GFF/GTF utility providing format conversions, region filtering, FASTA sequence extraction and more. - homepage: http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread - documentation: http://ccb.jhu.edu/software/stringtie/gff.shtml#gffread - tool_dev_url: https://github.com/gpertea/gffread - doi: 10.12688/f1000research.23297.1 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing meta data - e.g. [ id:'test' ] - - gff: - type: file - description: A reference file in either the GFF3, GFF2 or GTF format. - pattern: "*.{gff, gtf}" - - fasta: - type: file - description: A multi-fasta file with the genomic sequences - pattern: "*.{fasta,fa,faa,fas,fsa}" -output: - - meta: - type: map - description: | - Groovy Map containing meta data - e.g. [ id:'test' ] - - gtf: - type: file - description: GTF file resulting from the conversion of the GFF input file if '-T' argument is present - pattern: "*.{gtf}" - - gffread_gff: - type: file - description: GFF3 file resulting from the conversion of the GFF input file if '-T' argument is absent - pattern: "*.gff3" - - gffread_fasta: - type: file - description: Fasta file produced when either of '-w', '-x', '-y' parameters is present - pattern: "*.fasta" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@edmundmiller" -maintainers: - - "@edmundmiller" - - "@gallvp" diff --git a/modules/nf-core/gffread/tests/main.nf.test b/modules/nf-core/gffread/tests/main.nf.test deleted file mode 100644 index 4cd13dc..0000000 --- a/modules/nf-core/gffread/tests/main.nf.test +++ /dev/null @@ -1,223 +0,0 @@ -nextflow_process { - - name "Test Process GFFREAD" - script "../main.nf" - process "GFFREAD" - - tag "gffread" - tag "modules_nfcore" - tag "modules" - - test("sarscov2-gff3-gtf") { - - config "./nextflow.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gffread_gff == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-gtf-stub") { - - options '-stub' - config "./nextflow.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gffread_gff == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-gff3") { - - config "./nextflow-gff3.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-gff3-stub") { - - options '-stub' - config "./nextflow-gff3.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = [] - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_fasta == [] } - ) - } - - } - - test("sarscov2-gff3-fasta") { - - config "./nextflow-fasta.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_gff == [] } - ) - } - - } - - test("sarscov2-gff3-fasta-stub") { - - options '-stub' - config "./nextflow-fasta.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gtf == [] }, - { assert process.out.gffread_gff == [] } - ) - } - - } - - test("sarscov2-gff3-fasta-fail-catch") { - - options '-stub' - config "./nextflow-fasta.config" - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = [ - [id: 'genome'], - file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.gff3", checkIfExists: true) - ] - input[1] = file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - """ - } - } - - then { - assertAll ( - { assert ! process.success }, - { assert process.stdout.toString().contains("Input and output names are the same") } - ) - } - - } - -} diff --git a/modules/nf-core/gffread/tests/main.nf.test.snap b/modules/nf-core/gffread/tests/main.nf.test.snap deleted file mode 100644 index 1526232..0000000 --- a/modules/nf-core/gffread/tests/main.nf.test.snap +++ /dev/null @@ -1,272 +0,0 @@ -{ - "sarscov2-gff3-gtf": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gtf:md5,1ea0ae98d3388e0576407dc4a24ef428" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - - ], - "gtf": [ - [ - { - "id": "test" - }, - "test.gtf:md5,1ea0ae98d3388e0576407dc4a24ef428" - ] - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T10:48:56.496187" - }, - "sarscov2-gff3-gff3": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,c4e5da6267c6bee5899a2c204ae1ad91" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - [ - { - "id": "test" - }, - "test.gff3:md5,c4e5da6267c6bee5899a2c204ae1ad91" - ] - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T10:49:00.892782" - }, - "sarscov2-gff3-gtf-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - - ], - "gtf": [ - [ - { - "id": "test" - }, - "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T11:11:26.975666" - }, - "sarscov2-gff3-fasta-stub": { - "content": [ - { - "0": [ - - ], - "1": [ - - ], - "2": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - [ - { - "id": "test" - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gffread_gff": [ - - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T11:11:44.34792" - }, - "sarscov2-gff3-gff3-stub": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - - ], - "gffread_gff": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T11:11:35.221671" - }, - "sarscov2-gff3-fasta": { - "content": [ - { - "0": [ - - ], - "1": [ - - ], - "2": [ - [ - { - "id": "test" - }, - "test.fasta:md5,5f8108fb51739a0588ccf0a251de919a" - ] - ], - "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ], - "gffread_fasta": [ - [ - { - "id": "test" - }, - "test.fasta:md5,5f8108fb51739a0588ccf0a251de919a" - ] - ], - "gffread_gff": [ - - ], - "gtf": [ - - ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-09T10:54:02.88143" - } -} \ No newline at end of file diff --git a/modules/nf-core/gffread/tests/nextflow-fasta.config b/modules/nf-core/gffread/tests/nextflow-fasta.config deleted file mode 100644 index ac6cb14..0000000 --- a/modules/nf-core/gffread/tests/nextflow-fasta.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GFFREAD { - ext.args = '-w -S' - } -} diff --git a/modules/nf-core/gffread/tests/nextflow-gff3.config b/modules/nf-core/gffread/tests/nextflow-gff3.config deleted file mode 100644 index afe0830..0000000 --- a/modules/nf-core/gffread/tests/nextflow-gff3.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GFFREAD { - ext.args = '' - } -} diff --git a/modules/nf-core/gffread/tests/nextflow.config b/modules/nf-core/gffread/tests/nextflow.config deleted file mode 100644 index 74b2509..0000000 --- a/modules/nf-core/gffread/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GFFREAD { - ext.args = '-T' - } -} diff --git a/modules/nf-core/gffread/tests/tags.yml b/modules/nf-core/gffread/tests/tags.yml deleted file mode 100644 index 0557606..0000000 --- a/modules/nf-core/gffread/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -gffread: - - modules/nf-core/gffread/** diff --git a/modules/nf-core/gt/gff3/environment.yml b/modules/nf-core/gt/gff3/environment.yml deleted file mode 100644 index 8289fb3..0000000 --- a/modules/nf-core/gt/gff3/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "gt_gff3" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::genometools-genometools=1.6.5" diff --git a/modules/nf-core/gt/gff3/main.nf b/modules/nf-core/gt/gff3/main.nf deleted file mode 100644 index 6324a39..0000000 --- a/modules/nf-core/gt/gff3/main.nf +++ /dev/null @@ -1,51 +0,0 @@ -process GT_GFF3 { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/genometools-genometools:1.6.5--py310h3db02ab_0': - 'biocontainers/genometools-genometools:1.6.5--py310h3db02ab_0' }" - - input: - tuple val(meta), path(gff3) - - output: - tuple val(meta), path("*.gt.gff3") , emit: gt_gff3 , optional: true - tuple val(meta), path("*.error.log"), emit: error_log , optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - gt \\ - gff3 \\ - $args \\ - "$gff3" \\ - > "${prefix}.gt.gff3" \\ - 2> >(tee "${prefix}.error.log" >&2) \\ - || echo "Errors from gt-gff3 printed to ${prefix}.error.log" - - if grep -q "gt gff3: error:" "${prefix}.error.log"; then - echo "gt-gff3 failed to parse $gff3" - - rm \\ - "${prefix}.gt.gff3" - else - echo "gt-gff3 successfully parsed $gff3" - - mv \\ - "${prefix}.error.log" \\ - gt_gff3.stderr - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genometools: \$(gt --version | head -1 | sed 's/gt (GenomeTools) //') - END_VERSIONS - """ -} diff --git a/modules/nf-core/gt/gff3/meta.yml b/modules/nf-core/gt/gff3/meta.yml deleted file mode 100644 index 5cecd8d..0000000 --- a/modules/nf-core/gt/gff3/meta.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "gt_gff3" -description: "GenomeTools gt-gff3 utility to parse, possibly transform, and output GFF3 files" -keywords: - - genome - - gff3 - - annotation -tools: - - "gt": - description: "The GenomeTools genome analysis system" - homepage: "https://genometools.org/index.html" - documentation: "https://genometools.org/documentation.html" - tool_dev_url: "https://github.com/genometools/genometools" - doi: "10.1109/TCBB.2013.68" - licence: ["ISC"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - gff3: - type: file - description: Input gff3 file - pattern: "*.{gff,gff3}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - gt_gff3: - type: file - description: Parsed gff3 file produced only if there is no parsing error - pattern: "*.gt.gff3" - - error_log: - type: file - description: Error log if gt-gff3 failed to parse the input gff3 file - pattern: "*.error.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@gallvp" -maintainers: - - "@gallvp" diff --git a/modules/nf-core/gt/gff3/tests/main.nf.test b/modules/nf-core/gt/gff3/tests/main.nf.test deleted file mode 100644 index 46c7da3..0000000 --- a/modules/nf-core/gt/gff3/tests/main.nf.test +++ /dev/null @@ -1,61 +0,0 @@ -nextflow_process { - - name "Test Process GT_GFF3" - script "../main.nf" - process "GT_GFF3" - config "./nextflow.config" - - tag "modules" - tag "modules_nfcore" - tag "gt" - tag "gt/gff3" - - test("sarscov2-gff3-valid") { - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gt_gff3 != null }, - { assert process.out.error_log == [] } - ) - } - - } - - test("sarscov2-gff3-invalid") { - when { - process { - """ - input[0] = Channel.of( - '##gff-version 3', - 'chr22\tID=gene:ENSG00000233995;Name=AP000547.1' - ) - .collectFile(name: 'sample.gff3', newLine: true) - .map { file -> [ [ id:'test' ], file ] } - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() }, - { assert process.out.gt_gff3 == [] }, - { assert process.out.error_log != null }, - { assert path(process.out.error_log.get(0).get(1)).getText().contains("gt gff3: error:") } - ) - } - } - -} diff --git a/modules/nf-core/gt/gff3/tests/main.nf.test.snap b/modules/nf-core/gt/gff3/tests/main.nf.test.snap deleted file mode 100644 index 6e454f1..0000000 --- a/modules/nf-core/gt/gff3/tests/main.nf.test.snap +++ /dev/null @@ -1,72 +0,0 @@ -{ - "sarscov2-gff3-invalid": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test" - }, - "test.error.log:md5,31e6117c516f936ec403f792c732bc76" - ] - ], - "2": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" - ], - "error_log": [ - [ - { - "id": "test" - }, - "test.error.log:md5,31e6117c516f936ec403f792c732bc76" - ] - ], - "gt_gff3": [ - - ], - "versions": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" - ] - } - ], - "timestamp": "2023-11-29T10:42:11.408352" - }, - "sarscov2-gff3-valid": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gt.gff3:md5,2ae900237ace415557b8735fac088b85" - ] - ], - "1": [ - - ], - "2": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" - ], - "error_log": [ - - ], - "gt_gff3": [ - [ - { - "id": "test" - }, - "test.gt.gff3:md5,2ae900237ace415557b8735fac088b85" - ] - ], - "versions": [ - "versions.yml:md5,9753770dd19a2a306dcf16d4aaf049eb" - ] - } - ], - "timestamp": "2023-11-29T10:42:07.817894" - } -} \ No newline at end of file diff --git a/modules/nf-core/gt/gff3/tests/nextflow.config b/modules/nf-core/gt/gff3/tests/nextflow.config deleted file mode 100644 index af56226..0000000 --- a/modules/nf-core/gt/gff3/tests/nextflow.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.args = '-tidy -retainids' -} diff --git a/modules/nf-core/gt/gff3/tests/tags.yml b/modules/nf-core/gt/gff3/tests/tags.yml deleted file mode 100644 index 0ce15a9..0000000 --- a/modules/nf-core/gt/gff3/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -gt/gff3: - - "modules/nf-core/gt/gff3/**" diff --git a/modules/nf-core/gunzip/environment.yml b/modules/nf-core/gunzip/environment.yml deleted file mode 100644 index dfc02a7..0000000 --- a/modules/nf-core/gunzip/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: gunzip -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - conda-forge::grep=3.11 - - conda-forge::sed=4.8 - - conda-forge::tar=1.34 diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf deleted file mode 100644 index 5e67e3b..0000000 --- a/modules/nf-core/gunzip/main.nf +++ /dev/null @@ -1,55 +0,0 @@ -process GUNZIP { - tag "$archive" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:22.04' : - 'nf-core/ubuntu:22.04' }" - - input: - tuple val(meta), path(archive) - - output: - tuple val(meta), path("$gunzip"), emit: gunzip - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1] - def name = archive.toString() - '.gz' - ".$extension" - def prefix = task.ext.prefix ?: name - gunzip = prefix + ".$extension" - """ - # Not calling gunzip itself because it creates files - # with the original group ownership rather than the - # default one for that user / the work directory - gzip \\ - -cd \\ - $args \\ - $archive \\ - > $gunzip - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def extension = ( archive.toString() - '.gz' ).tokenize('.')[-1] - def name = archive.toString() - '.gz' - ".$extension" - def prefix = task.ext.prefix ?: name - gunzip = prefix + ".$extension" - """ - touch $gunzip - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml deleted file mode 100644 index f32973a..0000000 --- a/modules/nf-core/gunzip/meta.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: gunzip -description: Compresses and decompresses files. -keywords: - - gunzip - - compression - - decompression -tools: - - gunzip: - description: | - gzip is a file format and a software application used for file compression and decompression. - documentation: https://www.gnu.org/software/gzip/manual/gzip.html - licence: ["GPL-3.0-or-later"] -input: - - meta: - type: map - description: | - Optional groovy Map containing meta information - e.g. [ id:'test', single_end:false ] - - archive: - type: file - description: File to be compressed/uncompressed - pattern: "*.*" -output: - - gunzip: - type: file - description: Compressed/uncompressed file - pattern: "*.*" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@joseespinosa" - - "@drpatelh" - - "@jfy133" -maintainers: - - "@joseespinosa" - - "@drpatelh" - - "@jfy133" - - "@gallvp" diff --git a/modules/nf-core/gunzip/tests/main.nf.test b/modules/nf-core/gunzip/tests/main.nf.test deleted file mode 100644 index 776211a..0000000 --- a/modules/nf-core/gunzip/tests/main.nf.test +++ /dev/null @@ -1,121 +0,0 @@ -nextflow_process { - - name "Test Process GUNZIP" - script "../main.nf" - process "GUNZIP" - tag "gunzip" - tag "modules_nfcore" - tag "modules" - - test("Should run without failures") { - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = Channel.of([ - [], - 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("Should run without failures - prefix") { - - config './nextflow.config' - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = Channel.of([ - [ id: 'test' ], - 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("Should run without failures - stub") { - - options '-stub' - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = Channel.of([ - [], - 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("Should run without failures - prefix - stub") { - - options '-stub' - config './nextflow.config' - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = Channel.of([ - [ id: 'test' ], - 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() } - ) - } - - } - -} diff --git a/modules/nf-core/gunzip/tests/main.nf.test.snap b/modules/nf-core/gunzip/tests/main.nf.test.snap deleted file mode 100644 index 069967e..0000000 --- a/modules/nf-core/gunzip/tests/main.nf.test.snap +++ /dev/null @@ -1,134 +0,0 @@ -{ - "Should run without failures - prefix - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ], - "gunzip": [ - [ - { - "id": "test" - }, - "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-25T11:35:10.861293" - }, - "Should run without failures - stub": { - "content": [ - { - "0": [ - [ - [ - - ], - "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ], - "gunzip": [ - [ - [ - - ], - "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-25T11:35:05.857145" - }, - "Should run without failures": { - "content": [ - { - "0": [ - [ - [ - - ], - "test_1.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" - ] - ], - "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ], - "gunzip": [ - [ - [ - - ], - "test_1.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" - ] - ], - "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2023-10-17T15:35:37.690477896" - }, - "Should run without failures - prefix": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" - ] - ], - "1": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ], - "gunzip": [ - [ - { - "id": "test" - }, - "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" - ] - ], - "versions": [ - "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-25T11:33:32.921739" - } -} \ No newline at end of file diff --git a/modules/nf-core/gunzip/tests/nextflow.config b/modules/nf-core/gunzip/tests/nextflow.config deleted file mode 100644 index dec7764..0000000 --- a/modules/nf-core/gunzip/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: GUNZIP { - ext.prefix = { "${meta.id}.xyz" } - } -} diff --git a/modules/nf-core/gunzip/tests/tags.yml b/modules/nf-core/gunzip/tests/tags.yml deleted file mode 100644 index fd3f691..0000000 --- a/modules/nf-core/gunzip/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -gunzip: - - modules/nf-core/gunzip/** diff --git a/modules/nf-core/liftoff/environment.yml b/modules/nf-core/liftoff/environment.yml deleted file mode 100644 index 7f3eadf..0000000 --- a/modules/nf-core/liftoff/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: liftoff - -channels: - - conda-forge - - bioconda - - defaults - -dependencies: - - bioconda::liftoff=1.6.3 diff --git a/modules/nf-core/liftoff/main.nf b/modules/nf-core/liftoff/main.nf deleted file mode 100644 index 4db5da2..0000000 --- a/modules/nf-core/liftoff/main.nf +++ /dev/null @@ -1,66 +0,0 @@ -process LIFTOFF { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/liftoff:1.6.3--pyhdfd78af_0': - 'biocontainers/liftoff:1.6.3--pyhdfd78af_0' }" - - input: - tuple val(meta), path(target_fa) - path ref_fa, name: 'ref_assembly.fa' - path ref_annotation - path ref_db - - output: - tuple val(meta), path("${prefix}.gff3") , emit: gff3 - tuple val(meta), path("*.polished.gff3") , emit: polished_gff3, optional: true - tuple val(meta), path("*.unmapped.txt") , emit: unmapped_txt - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def arg_g = ref_annotation ? "-g $ref_annotation" : '' - def arg_db = ref_db ? "-db $ref_db" : '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - liftoff \\ - $arg_g \\ - $arg_db \\ - -p $task.cpus \\ - -o "${prefix}.gff3" \\ - -u "${prefix}.unmapped.txt" \\ - $args \\ - $target_fa \\ - ref_assembly.fa - - mv \\ - "${prefix}.gff3_polished" \\ - "${prefix}.polished.gff3" \\ - || echo "-polish is absent" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - liftoff: \$(liftoff --version 2> /dev/null) - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def touch_polished = args.contains('-polish') ? "touch ${prefix}.polished.gff3" : '' - """ - touch "${prefix}.gff3" - touch "${prefix}.unmapped.txt" - $touch_polished - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - liftoff: \$(liftoff --version 2> /dev/null) - END_VERSIONS - """ -} diff --git a/modules/nf-core/liftoff/meta.yml b/modules/nf-core/liftoff/meta.yml deleted file mode 100644 index 10e502c..0000000 --- a/modules/nf-core/liftoff/meta.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "liftoff" -description: | - Uses Liftoff to accurately map annotations in GFF or GTF between assemblies of the same, - or closely-related species -keywords: - - genome - - annotation - - gff3 - - gtf - - liftover -tools: - - "liftoff": - description: | - Liftoff is a tool that accurately maps annotations in GFF or GTF between assemblies of the same, - or closely-related species - homepage: "https://github.com/agshumate/Liftoff" - documentation: "https://github.com/agshumate/Liftoff" - tool_dev_url: "https://github.com/agshumate/Liftoff" - doi: "10.1093/bioinformatics/bty191" - licence: ["GPL v3 License"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - target_fa: - type: file - description: Target assembly in fasta format - pattern: "*.{fsa,fa,fasta}" - - ref_fa: - type: file - description: Reference assembly in fasta format - pattern: "*.{fsa,fa,fasta}" - - ref_annotation: - type: file - description: Reference assembly annotations in gtf or gff3 format - pattern: "*.{gtf,gff3}" - - ref_db: - type: file - description: | - Name of feature database; if not specified, the -g argument must - be provided and a database will be built automatically -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test' ]` - - gff3: - type: file - description: Lifted annotations for the target assembly in gff3 format - pattern: "*.gff3" - - polished_gff3: - type: file - description: Polished lifted annotations for the target assembly in gff3 format - pattern: "*.polished.gff3" - - unmapped_txt: - type: file - description: List of unmapped reference annotations - pattern: "*.unmapped.txt" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/liftoff/tests/main.nf.test b/modules/nf-core/liftoff/tests/main.nf.test deleted file mode 100644 index c8ebf26..0000000 --- a/modules/nf-core/liftoff/tests/main.nf.test +++ /dev/null @@ -1,102 +0,0 @@ -nextflow_process { - - name "Test Process LIFTOFF" - script "../main.nf" - process "LIFTOFF" - config "./nextflow.config" - - tag "modules" - tag "modules_nfcore" - tag "nf-core/gunzip" - tag "liftoff" - tag "gunzip" - - test("homo_sapiens-genome_21_fasta-genome_1_fasta-genome_1_gtf") { - - setup { - run("GUNZIP") { - script "../../../nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - """ - } - } - } - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) - ] - input[1] = GUNZIP.out.gunzip.map { meta, file -> file } - input[2] = [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr1/genome.gtf', checkIfExists: true) - ] - input[3] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.unmapped_txt).match("unmapped_txt") }, - { assert file(process.out.gff3[0][1]).text.contains("chr21\tLiftoff\texon\t34608061\t34608118\t.\t+\t.") }, - { assert file(process.out.polished_gff3[0][1]).text.contains("chr21\tLiftoff\texon\t34608061\t34608118\t.\t+\t.") }, - { assert snapshot(process.out.versions).match("versions") } - ) - } - - } - - test("homo_sapiens-genome_21_fasta-genome_1_fasta-genome_1_gtf-stub") { - options '-stub' - - setup { - run("GUNZIP") { - script "../../../nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - """ - } - } - } - - when { - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) - ] - input[1] = GUNZIP.out.gunzip.map { meta, file -> file } - input[2] = [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr1/genome.gtf', checkIfExists: true) - ] - input[3] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/liftoff/tests/main.nf.test.snap b/modules/nf-core/liftoff/tests/main.nf.test.snap deleted file mode 100644 index f606446..0000000 --- a/modules/nf-core/liftoff/tests/main.nf.test.snap +++ /dev/null @@ -1,96 +0,0 @@ -{ - "unmapped_txt": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.unmapped.txt:md5,7391d10df6e15db356b084c9af5259e4" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-01T13:57:40.748507" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,205d9c609e7fe27d8199550d842bdce8" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2023-12-01T13:57:40.752414" - }, - "homo_sapiens-genome_21_fasta-genome_1_fasta-genome_1_gtf-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.polished.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "test.unmapped.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,205d9c609e7fe27d8199550d842bdce8" - ], - "gff3": [ - [ - { - "id": "test" - }, - "test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "polished_gff3": [ - [ - { - "id": "test" - }, - "test.polished.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "unmapped_txt": [ - [ - { - "id": "test" - }, - "test.unmapped.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,205d9c609e7fe27d8199550d842bdce8" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-19T09:15:25.661428" - } -} \ No newline at end of file diff --git a/modules/nf-core/liftoff/tests/nextflow.config b/modules/nf-core/liftoff/tests/nextflow.config deleted file mode 100644 index f35ef80..0000000 --- a/modules/nf-core/liftoff/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: LIFTOFF { - ext.args = '-polish' - } -} diff --git a/modules/nf-core/fastp/environment.yml b/modules/nf-core/multiqc/environment.yml similarity index 61% rename from modules/nf-core/fastp/environment.yml rename to modules/nf-core/multiqc/environment.yml index 70389e6..ca39fb6 100644 --- a/modules/nf-core/fastp/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -1,7 +1,7 @@ -name: fastp +name: multiqc channels: - conda-forge - bioconda - defaults dependencies: - - bioconda::fastp=0.23.4 + - bioconda::multiqc=1.21 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf new file mode 100644 index 0000000..47ac352 --- /dev/null +++ b/modules/nf-core/multiqc/main.nf @@ -0,0 +1,55 @@ +process MULTIQC { + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/multiqc:1.21--pyhdfd78af_0' : + 'biocontainers/multiqc:1.21--pyhdfd78af_0' }" + + input: + path multiqc_files, stageAs: "?/*" + path(multiqc_config) + path(extra_multiqc_config) + path(multiqc_logo) + + output: + path "*multiqc_report.html", emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + 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}"'/ : '' + """ + multiqc \\ + --force \\ + $args \\ + $config \\ + $extra_config \\ + $logo \\ + . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ + + stub: + """ + mkdir multiqc_data + touch multiqc_plots + touch multiqc_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml new file mode 100644 index 0000000..45a9bc3 --- /dev/null +++ b/modules/nf-core/multiqc/meta.yml @@ -0,0 +1,58 @@ +name: multiqc +description: Aggregate results from bioinformatics analyses across many samples into a single report +keywords: + - QC + - bioinformatics tools + - Beautiful stand-alone HTML report +tools: + - multiqc: + description: | + MultiQC searches a given directory for analysis logs and compiles a HTML report. + It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. + homepage: https://multiqc.info/ + documentation: https://multiqc.info/docs/ + licence: ["GPL-3.0-or-later"] +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}" +output: + - report: + type: file + description: MultiQC report file + pattern: "multiqc_report.html" + - data: + type: directory + description: MultiQC data dir + pattern: "multiqc_data" + - plots: + type: file + description: Plots created by MultiQC + pattern: "*_data" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@bunop" + - "@drpatelh" + - "@jfy133" +maintainers: + - "@abhi18av" + - "@bunop" + - "@drpatelh" + - "@jfy133" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test new file mode 100644 index 0000000..f1c4242 --- /dev/null +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -0,0 +1,84 @@ +nextflow_process { + + name "Test Process MULTIQC" + script "../main.nf" + process "MULTIQC" + + tag "modules" + tag "modules_nfcore" + tag "multiqc" + + test("sarscov2 single-end [fastqc]") { + + 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] = [] + """ + } + } + + 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_single") } + ) + } + + } + + test("sarscov2 single-end [fastqc] [config]") { + + when { + process { + """ + 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] = [] + """ + } + } + + 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] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { 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 0000000..bfebd80 --- /dev/null +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -0,0 +1,41 @@ +{ + "multiqc_versions_single": { + "content": [ + [ + "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-29T08:48:55.657331" + }, + "multiqc_stub": { + "content": [ + [ + "multiqc_report.html", + "multiqc_data", + "multiqc_plots", + "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-29T08:49:49.071937" + }, + "multiqc_versions_config": { + "content": [ + [ + "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-29T08:49:25.457567" + } +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/tests/tags.yml b/modules/nf-core/multiqc/tests/tags.yml new file mode 100644 index 0000000..bea6c0d --- /dev/null +++ b/modules/nf-core/multiqc/tests/tags.yml @@ -0,0 +1,2 @@ +multiqc: + - modules/nf-core/multiqc/** diff --git a/modules/nf-core/orthofinder/environment.yml b/modules/nf-core/orthofinder/environment.yml deleted file mode 100644 index f93b9bb..0000000 --- a/modules/nf-core/orthofinder/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "orthofinder" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::orthofinder=2.5.5" diff --git a/modules/nf-core/orthofinder/main.nf b/modules/nf-core/orthofinder/main.nf deleted file mode 100644 index 2971fc0..0000000 --- a/modules/nf-core/orthofinder/main.nf +++ /dev/null @@ -1,69 +0,0 @@ -process ORTHOFINDER { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/orthofinder:2.5.5--hdfd78af_2': - 'biocontainers/orthofinder:2.5.5--hdfd78af_2' }" - - input: - tuple val(meta), path(fastas, stageAs: 'input/') - - output: - tuple val(meta), path("$prefix") , emit: orthofinder - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - mkdir temp_pickle - - orthofinder \\ - $args \\ - -t $task.cpus \\ - -a $task.cpus \\ - -p temp_pickle \\ - -f input \\ - -n $prefix - - mv \\ - input/OrthoFinder/Results_$prefix \\ - $prefix - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - orthofinder: \$(orthofinder -h | sed -n 's/.*version \\(.*\\) Copy.*/\\1/p') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - """ - mkdir -p $prefix/Comparative_Genomics_Statistics - mkdir $prefix/Gene_Duplication_Events - mkdir $prefix/Gene_Trees - mkdir $prefix/Orthogroup_Sequences - mkdir $prefix/Orthogroups - mkdir $prefix/Orthologues - mkdir $prefix/Phylogenetic_Hierarchical_Orthogroups - mkdir $prefix/Phylogenetically_Misplaced_Genes - mkdir $prefix/Putative_Xenologs - mkdir $prefix/Resolved_Gene_Trees - mkdir $prefix/Single_Copy_Orthologue_Sequences - mkdir $prefix/Species_Tree - mkdir $prefix/WorkingDirectory - - touch $prefix/Log.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - orthofinder: \$(orthofinder -h | sed -n 's/.*version \\(.*\\) Copy.*/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/nf-core/orthofinder/meta.yml b/modules/nf-core/orthofinder/meta.yml deleted file mode 100644 index 23cc532..0000000 --- a/modules/nf-core/orthofinder/meta.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "orthofinder" -description: OrthoFinder is a fast, accurate and comprehensive platform for comparative genomics. -keywords: - - genomics - - orthogroup - - orthologs - - gene - - duplication - - tree - - phylogeny -tools: - - "orthofinder": - description: "Accurate inference of orthogroups, orthologues, gene trees and rooted species tree made easy!" - homepage: "https://github.com/davidemms/OrthoFinder" - documentation: "https://github.com/davidemms/OrthoFinder" - tool_dev_url: "https://github.com/davidemms/OrthoFinder" - doi: "10.1186/s13059-019-1832-y" - licence: ["GPL v3"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - fastas: - type: list - description: Input fasta files - pattern: "*.{fa,faa,fasta,fas,pep}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - orthofinder: - type: directory - description: Orthofinder output directory - -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/orthofinder/tests/main.nf.test b/modules/nf-core/orthofinder/tests/main.nf.test deleted file mode 100644 index 2d64800..0000000 --- a/modules/nf-core/orthofinder/tests/main.nf.test +++ /dev/null @@ -1,96 +0,0 @@ -import groovy.io.FileType - -nextflow_process { - - name "Test Process ORTHOFINDER" - script "../main.nf" - process "ORTHOFINDER" - - tag "modules" - tag "modules_nfcore" - tag "orthofinder" - - test("sarscov2 - candidatus_portiera_aleyrodidarum - proteome") { - - when { - process { - """ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) - .copyTo("${workDir}/sarscov2.fasta") - - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/proteome.fasta', checkIfExists: true) - .copyTo("${workDir}/candidatus_portiera_aleyrodidarum.fasta") - - def file_a = file("${workDir}/sarscov2.fasta", checkIfExists:true) - def file_b = file("${workDir}/candidatus_portiera_aleyrodidarum.fasta", checkIfExists:true) - - input[0] = [ - [ id:'test', single_end:false ], - [ file_a, file_b ] - ] - """ - } - } - - then { - assert process.success - - def all_files = [] - - file(process.out.orthofinder[0][1]).eachFileRecurse (FileType.FILES) { file -> - all_files << file - } - - def all_file_names = all_files.collect { it.name }.sort(false) - - def stable_file_names = [ - 'Statistics_PerSpecies.tsv', - 'SpeciesTree_Gene_Duplications_0.5_Support.txt', - 'SpeciesTree_rooted.txt' - ] - - def stable_files = all_files.findAll { it.name in stable_file_names } - - assert snapshot( - all_file_names, - stable_files, - process.out.versions[0] - ).match() - } - - } - - test("sarscov2 - candidatus_portiera_aleyrodidarum - proteome - stub") { - - options '-stub' - - when { - process { - """ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) - .copyTo("${workDir}/sarscov2.fasta") - - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/proteome.fasta', checkIfExists: true) - .copyTo("${workDir}/candidatus_portiera_aleyrodidarum.fasta") - - def file_a = file("${workDir}/sarscov2.fasta", checkIfExists:true) - def file_b = file("${workDir}/candidatus_portiera_aleyrodidarum.fasta", checkIfExists:true) - - input[0] = [ - [ id:'test', single_end:false ], - [ file_a, file_b ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/orthofinder/tests/main.nf.test.snap b/modules/nf-core/orthofinder/tests/main.nf.test.snap deleted file mode 100644 index 8b621c0..0000000 --- a/modules/nf-core/orthofinder/tests/main.nf.test.snap +++ /dev/null @@ -1,438 +0,0 @@ -{ - "sarscov2 - candidatus_portiera_aleyrodidarum - proteome": { - "content": [ - [ - "Blast0_0.txt.gz", - "Blast0_1.txt.gz", - "Blast1_0.txt.gz", - "Blast1_1.txt.gz", - "Citation.txt", - "Duplications.tsv", - "Duplications_per_Orthogroup.tsv", - "Duplications_per_Species_Tree_Node.tsv", - "Log.txt", - "N0.tsv", - "OG0000000.fa", - "OG0000000_tree.txt", - "OG0000000_tree.txt", - "OG0000000_tree_id.txt", - "OG0000001.fa", - "OG0000001_tree.txt", - "OG0000001_tree.txt", - "OG0000001_tree_id.txt", - "OG0000002.fa", - "OG0000003.fa", - "OG0000004.fa", - "OG0000005.fa", - "OG0000006.fa", - "OG0000007.fa", - "OG0000008.fa", - "OG0000009.fa", - "OG0000010.fa", - "OG0000011.fa", - "OG0000012.fa", - "OG0000013.fa", - "OG0000014.fa", - "OG0000015.fa", - "OG0000016.fa", - "OG0000017.fa", - "OG0000018.fa", - "OG0000019.fa", - "OG0000020.fa", - "OG0000021.fa", - "OG0000022.fa", - "OG0000023.fa", - "OG0000024.fa", - "OG0000025.fa", - "OG0000026.fa", - "OG0000027.fa", - "OG0000028.fa", - "OG0000029.fa", - "OG0000030.fa", - "OG0000031.fa", - "OG0000032.fa", - "OG0000033.fa", - "OG0000034.fa", - "OG0000035.fa", - "OG0000036.fa", - "OG0000037.fa", - "OG0000038.fa", - "OG0000039.fa", - "OG0000040.fa", - "OG0000041.fa", - "OG0000042.fa", - "OG0000043.fa", - "OG0000044.fa", - "OG0000045.fa", - "OG0000046.fa", - "OG0000047.fa", - "OG0000048.fa", - "OG0000049.fa", - "OG0000050.fa", - "OG0000051.fa", - "OG0000052.fa", - "OG0000053.fa", - "OG0000054.fa", - "OG0000055.fa", - "OG0000056.fa", - "OG0000057.fa", - "OG0000058.fa", - "OG0000059.fa", - "OG0000060.fa", - "OG0000061.fa", - "OG0000062.fa", - "OG0000063.fa", - "OG0000064.fa", - "OG0000065.fa", - "OG0000066.fa", - "OG0000067.fa", - "OG0000068.fa", - "OG0000069.fa", - "OG0000070.fa", - "OG0000071.fa", - "OG0000072.fa", - "OG0000073.fa", - "OG0000074.fa", - "OG0000075.fa", - "OG0000076.fa", - "OG0000077.fa", - "OG0000078.fa", - "OG0000079.fa", - "OG0000080.fa", - "OG0000081.fa", - "OG0000082.fa", - "OG0000083.fa", - "OG0000084.fa", - "OG0000085.fa", - "OG0000086.fa", - "OG0000087.fa", - "OG0000088.fa", - "OG0000089.fa", - "OG0000090.fa", - "OG0000091.fa", - "OG0000092.fa", - "OG0000093.fa", - "OG0000094.fa", - "OG0000095.fa", - "OG0000096.fa", - "OG0000097.fa", - "OG0000098.fa", - "OG0000099.fa", - "OG0000100.fa", - "OG0000101.fa", - "OG0000102.fa", - "OG0000103.fa", - "OG0000104.fa", - "OG0000105.fa", - "OG0000106.fa", - "OG0000107.fa", - "OG0000108.fa", - "OG0000109.fa", - "OG0000110.fa", - "OG0000111.fa", - "OG0000112.fa", - "OG0000113.fa", - "OG0000114.fa", - "OG0000115.fa", - "OG0000116.fa", - "OG0000117.fa", - "OG0000118.fa", - "OG0000119.fa", - "OG0000120.fa", - "OG0000121.fa", - "OG0000122.fa", - "OG0000123.fa", - "OG0000124.fa", - "OG0000125.fa", - "OG0000126.fa", - "OG0000127.fa", - "OG0000128.fa", - "OG0000129.fa", - "OG0000130.fa", - "OG0000131.fa", - "OG0000132.fa", - "OG0000133.fa", - "OG0000134.fa", - "OG0000135.fa", - "OG0000136.fa", - "OG0000137.fa", - "OG0000138.fa", - "OG0000139.fa", - "OG0000140.fa", - "OG0000141.fa", - "OG0000142.fa", - "OG0000143.fa", - "OG0000144.fa", - "OG0000145.fa", - "OG0000146.fa", - "OG0000147.fa", - "OG0000148.fa", - "OG0000149.fa", - "OG0000150.fa", - "OG0000151.fa", - "OG0000152.fa", - "OG0000153.fa", - "OG0000154.fa", - "OG0000155.fa", - "OG0000156.fa", - "OG0000157.fa", - "OG0000158.fa", - "OG0000159.fa", - "OG0000160.fa", - "OG0000161.fa", - "OG0000162.fa", - "OG0000163.fa", - "OG0000164.fa", - "OG0000165.fa", - "OG0000166.fa", - "OG0000167.fa", - "OG0000168.fa", - "OG0000169.fa", - "OG0000170.fa", - "OG0000171.fa", - "OG0000172.fa", - "OG0000173.fa", - "OG0000174.fa", - "OG0000175.fa", - "OG0000176.fa", - "OG0000177.fa", - "OG0000178.fa", - "OG0000179.fa", - "OG0000180.fa", - "OG0000181.fa", - "OG0000182.fa", - "OG0000183.fa", - "OG0000184.fa", - "OG0000185.fa", - "OG0000186.fa", - "OG0000187.fa", - "OG0000188.fa", - "OG0000189.fa", - "OG0000190.fa", - "OG0000191.fa", - "OG0000192.fa", - "OG0000193.fa", - "OG0000194.fa", - "OG0000195.fa", - "OG0000196.fa", - "OG0000197.fa", - "OG0000198.fa", - "OG0000199.fa", - "OG0000200.fa", - "OG0000201.fa", - "OG0000202.fa", - "OG0000203.fa", - "OG0000204.fa", - "OG0000205.fa", - "OG0000206.fa", - "OG0000207.fa", - "OG0000208.fa", - "OG0000209.fa", - "OG0000210.fa", - "OG0000211.fa", - "OG0000212.fa", - "OG0000213.fa", - "OG0000214.fa", - "OG0000215.fa", - "OG0000216.fa", - "OG0000217.fa", - "OG0000218.fa", - "OG0000219.fa", - "OG0000220.fa", - "OG0000221.fa", - "OG0000222.fa", - "OG0000223.fa", - "OG0000224.fa", - "OG0000225.fa", - "OG0000226.fa", - "OG0000227.fa", - "OG0000228.fa", - "OG0000229.fa", - "OG0000230.fa", - "OG0000231.fa", - "OG0000232.fa", - "OG0000233.fa", - "OG0000234.fa", - "OG0000235.fa", - "OG0000236.fa", - "OG0000237.fa", - "OG0000238.fa", - "OG0000239.fa", - "OG0000240.fa", - "OG0000241.fa", - "OG0000242.fa", - "OG0000243.fa", - "OG0000244.fa", - "OG0000245.fa", - "OrthoFinder_graph.txt", - "Orthogroups.GeneCount.tsv", - "Orthogroups.tsv", - "Orthogroups.txt", - "Orthogroups_SingleCopyOrthologues.txt", - "Orthogroups_SpeciesOverlaps.tsv", - "Orthogroups_UnassignedGenes.tsv", - "OrthologuesStats_Totals.tsv", - "OrthologuesStats_many-to-many.tsv", - "OrthologuesStats_many-to-one.tsv", - "OrthologuesStats_one-to-many.tsv", - "OrthologuesStats_one-to-one.tsv", - "SequenceIDs.txt", - "SimpleTest.phy", - "SimpleTest.phy_fastme_stat.txt", - "SimpleTest.tre", - "Species0.fa", - "Species0.fa", - "Species1.fa", - "SpeciesIDs.txt", - "SpeciesTree_Gene_Duplications_0.5_Support.txt", - "SpeciesTree_rooted.txt", - "SpeciesTree_rooted_ids.txt", - "SpeciesTree_rooted_node_labels.txt", - "SpeciesTree_unrooted.txt", - "SpeciesTree_unrooted_ids.txt", - "Statistics_Overall.tsv", - "Statistics_PerSpecies.tsv", - "candidatus_portiera_aleyrodidarum.tsv", - "candidatus_portiera_aleyrodidarum.tsv", - "candidatus_portiera_aleyrodidarum__v__sarscov2.tsv", - "clusters_OrthoFinder_I1.5.txt", - "clusters_OrthoFinder_I1.5.txt_id_pairs.txt", - "diamondDBSpecies0.dmnd", - "diamondDBSpecies0.dmnd", - "diamondDBSpecies1.dmnd", - "sarscov2.tsv", - "sarscov2.tsv", - "sarscov2__v__candidatus_portiera_aleyrodidarum.tsv", - "test_search_results.txt.gz" - ], - [ - "Statistics_PerSpecies.tsv:md5,984b5011a34d54527fe17896bfa36a2d", - "SpeciesTree_Gene_Duplications_0.5_Support.txt:md5,8b7a673e2e8b6d1aeb697f2bb88afa18", - "SpeciesTree_rooted.txt:md5,4d5ea525feebe479fca0c0768271ba81" - ], - "versions.yml:md5,86b472c85626aac1840eec0769016f5c" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-07T21:33:50.902329" - }, - "sarscov2 - candidatus_portiera_aleyrodidarum - proteome - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - [ - - ], - [ - - ], - [ - - ], - "Log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ] - ] - ], - "1": [ - "versions.yml:md5,86b472c85626aac1840eec0769016f5c" - ], - "orthofinder": [ - [ - { - "id": "test", - "single_end": false - }, - [ - [ - - ], - [ - - ], - [ - - ], - "Log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ] - ] - ], - "versions": [ - "versions.yml:md5,86b472c85626aac1840eec0769016f5c" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-07T16:00:56.530716" - } -} \ No newline at end of file diff --git a/modules/nf-core/orthofinder/tests/tags.yml b/modules/nf-core/orthofinder/tests/tags.yml deleted file mode 100644 index f386e25..0000000 --- a/modules/nf-core/orthofinder/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -orthofinder: - - "modules/nf-core/orthofinder/**" diff --git a/modules/nf-core/repeatmodeler/builddatabase/environment.yml b/modules/nf-core/repeatmodeler/builddatabase/environment.yml deleted file mode 100644 index ecc282e..0000000 --- a/modules/nf-core/repeatmodeler/builddatabase/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "repeatmodeler_builddatabase" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::repeatmodeler=2.0.5" diff --git a/modules/nf-core/repeatmodeler/builddatabase/main.nf b/modules/nf-core/repeatmodeler/builddatabase/main.nf deleted file mode 100644 index 6fe244b..0000000 --- a/modules/nf-core/repeatmodeler/builddatabase/main.nf +++ /dev/null @@ -1,50 +0,0 @@ -process REPEATMODELER_BUILDDATABASE { - tag "$meta.id" - label 'process_single' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/repeatmodeler:2.0.5--pl5321hdfd78af_0': - 'biocontainers/repeatmodeler:2.0.5--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path("${prefix}.*") , emit: db - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - prefix = task.ext.prefix ?: "${meta.id}" - """ - BuildDatabase \\ - -name $prefix \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //') - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.nhr - touch ${prefix}.nin - touch ${prefix}.njs - touch ${prefix}.nnd - touch ${prefix}.nni - touch ${prefix}.nog - touch ${prefix}.nsq - touch ${prefix}.translation - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //') - END_VERSIONS - """ -} diff --git a/modules/nf-core/repeatmodeler/builddatabase/meta.yml b/modules/nf-core/repeatmodeler/builddatabase/meta.yml deleted file mode 100644 index d3aa931..0000000 --- a/modules/nf-core/repeatmodeler/builddatabase/meta.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "repeatmodeler_builddatabase" -description: Create a database for RepeatModeler -keywords: - - genomics - - fasta - - repeat -tools: - - "repeatmodeler": - description: "RepeatModeler is a de-novo repeat family identification and modeling package." - homepage: "https://github.com/Dfam-consortium/RepeatModeler" - documentation: "https://github.com/Dfam-consortium/RepeatModeler" - tool_dev_url: "https://github.com/Dfam-consortium/RepeatModeler" - licence: ["Open Software License v2.1"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - fasta: - type: file - description: Fasta file - pattern: "*.{fasta,fsa,fa}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - db: - type: file - description: Database files for repeatmodeler - pattern: "`${prefix}.*`" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test b/modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test deleted file mode 100644 index bfe5d78..0000000 --- a/modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test +++ /dev/null @@ -1,60 +0,0 @@ -nextflow_process { - - name "Test Process REPEATMODELER_BUILDDATABASE" - script "../main.nf" - process "REPEATMODELER_BUILDDATABASE" - - tag "modules" - tag "modules_nfcore" - tag "repeatmodeler" - tag "repeatmodeler/builddatabase" - - test("sarscov2-genome_fasta") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.versions).match("versions") }, - { assert snapshot(process.out.db[0][1].collect { file(it).name }.sort().toString()).match("db") }, - { assert snapshot(process.out.db[0][1].findAll { ! ( "$it"[-3..-1] in [ 'nin', 'njs' ] ) } ).match("stable_md5") } - ) - } - - } - - test("sarscov2-genome_fasta-stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test.snap b/modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test.snap deleted file mode 100644 index 1f1a551..0000000 --- a/modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test.snap +++ /dev/null @@ -1,92 +0,0 @@ -{ - "sarscov2-genome_fasta-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - [ - "test.nhr:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nin:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.njs:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nnd:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nni:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nog:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nsq:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.translation:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "1": [ - "versions.yml:md5,7944637266bc3e2726899eaad5e46c87" - ], - "db": [ - [ - { - "id": "test" - }, - [ - "test.nhr:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nin:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.njs:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nnd:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nni:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nog:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.nsq:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.translation:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,7944637266bc3e2726899eaad5e46c87" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-02T12:06:44.261566" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,7944637266bc3e2726899eaad5e46c87" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-01-09T15:14:48.807063" - }, - "stable_md5": { - "content": [ - [ - "test.nhr:md5,1a41cb6d0b00c28f62ad60e75ae2f6fc", - "test.nnd:md5,2002e13acf59079a1a5782c918894579", - "test.nni:md5,26a954ba0fd80983b550d8f6b8b35ff8", - "test.nog:md5,30896f123998e926ea2237b89091e7fe", - "test.nsq:md5,982cbc7d9e38743b9b1037588862b9da", - "test.translation:md5,ccbb119522c09daa976a9015ba999329" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-23T10:03:41.669433" - }, - "db": { - "content": [ - "[test.nhr, test.nin, test.njs, test.nnd, test.nni, test.nog, test.nsq, test.translation]" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-02T12:08:36.94713" - } -} \ No newline at end of file diff --git a/modules/nf-core/repeatmodeler/builddatabase/tests/tags.yml b/modules/nf-core/repeatmodeler/builddatabase/tests/tags.yml deleted file mode 100644 index c524294..0000000 --- a/modules/nf-core/repeatmodeler/builddatabase/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -repeatmodeler/builddatabase: - - "modules/nf-core/repeatmodeler/builddatabase/**" diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml b/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml deleted file mode 100644 index 2422071..0000000 --- a/modules/nf-core/repeatmodeler/repeatmodeler/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "repeatmodeler_repeatmodeler" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::repeatmodeler=2.0.5" diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/main.nf b/modules/nf-core/repeatmodeler/repeatmodeler/main.nf deleted file mode 100644 index 9d0449f..0000000 --- a/modules/nf-core/repeatmodeler/repeatmodeler/main.nf +++ /dev/null @@ -1,54 +0,0 @@ -process REPEATMODELER_REPEATMODELER { - tag "$meta.id" - label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/repeatmodeler:2.0.5--pl5321hdfd78af_0': - 'biocontainers/repeatmodeler:2.0.5--pl5321hdfd78af_0' }" - - input: - tuple val(meta), path(db) - - output: - tuple val(meta), path("*.fa") , emit: fasta - tuple val(meta), path("*.stk"), emit: stk - tuple val(meta), path("*.log"), emit: log - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def db_name = file(db[0]).getBaseName() - """ - RepeatModeler \\ - -database $db_name \\ - $args \\ - -threads $task.cpus - - mv ${db_name}-families.fa ${prefix}.fa - mv ${db_name}-families.stk ${prefix}.stk - mv ${db_name}-rmod.log ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.fa - touch ${prefix}.stk - touch ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //') - END_VERSIONS - """ -} diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/meta.yml b/modules/nf-core/repeatmodeler/repeatmodeler/meta.yml deleted file mode 100644 index 29bb795..0000000 --- a/modules/nf-core/repeatmodeler/repeatmodeler/meta.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "repeatmodeler_repeatmodeler" -description: Performs de novo transposable element (TE) family identification with RepeatModeler -keywords: - - genomics - - fasta - - repeat - - transposable element -tools: - - "repeatmodeler": - description: "RepeatModeler is a de-novo repeat family identification and modeling package." - homepage: "https://github.com/Dfam-consortium/RepeatModeler" - documentation: "https://github.com/Dfam-consortium/RepeatModeler" - tool_dev_url: "https://github.com/Dfam-consortium/RepeatModeler" - licence: ["Open Software License v2.1"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - db: - type: file - description: RepeatModeler database files generated with REPEATMODELER_BUILDDATABASE - pattern: "*" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - fasta: - type: file - description: Consensus repeat sequences - pattern: "*.fa" - - stk: - type: file - description: Seed alignments - pattern: "*.stk" - - log: - type: file - description: A summarized log of the run - pattern: "*.log" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test b/modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test deleted file mode 100644 index 65edd7e..0000000 --- a/modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test +++ /dev/null @@ -1,74 +0,0 @@ -nextflow_process { - - name "Test Process REPEATMODELER_REPEATMODELER" - script "../main.nf" - process "REPEATMODELER_REPEATMODELER" - - tag "modules" - tag "modules_nfcore" - tag "repeatmodeler" - tag "repeatmodeler/repeatmodeler" - tag "repeatmodeler/builddatabase" - - test("homo_sapiens-genome_fasta") { - - setup { - run("REPEATMODELER_BUILDDATABASE") { - script "../../../../nf-core/repeatmodeler/builddatabase" - - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - """ - } - } - } - - when { - process { - """ - input[0] = REPEATMODELER_BUILDDATABASE.out.db - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out.fasta).match("fasta") }, - { assert snapshot(process.out.stk).match("stk") }, - { assert file(process.out.log[0][1]).text.contains('1 families discovered.') }, - { assert snapshot(process.out.versions).match("versions") } - ) - } - - } - - test("homo_sapiens-genome_fasta-stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test.snap b/modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test.snap deleted file mode 100644 index e923952..0000000 --- a/modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test.snap +++ /dev/null @@ -1,113 +0,0 @@ -{ - "versions": { - "content": [ - [ - "versions.yml:md5,1bb6846ecf1304c262eaef4d3de60cf9" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-01-09T15:06:55.753492" - }, - "homo_sapiens-genome_fasta-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.fa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.stk:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,1bb6846ecf1304c262eaef4d3de60cf9" - ], - "fasta": [ - [ - { - "id": "test" - }, - "test.fa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log": [ - [ - { - "id": "test" - }, - "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "stk": [ - [ - { - "id": "test" - }, - "test.stk:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,1bb6846ecf1304c262eaef4d3de60cf9" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-04-29T13:16:41.45166" - }, - "stk": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.stk:md5,acd01ad35763c11315e2297a4f051d57" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-01-09T15:06:55.740963" - }, - "fasta": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.fa:md5,e25326771341204e1f8054d9529411e5" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-01-09T15:06:55.737658" - } -} \ No newline at end of file diff --git a/modules/nf-core/repeatmodeler/repeatmodeler/tests/tags.yml b/modules/nf-core/repeatmodeler/repeatmodeler/tests/tags.yml deleted file mode 100644 index df65110..0000000 --- a/modules/nf-core/repeatmodeler/repeatmodeler/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -repeatmodeler/repeatmodeler: - - "modules/nf-core/repeatmodeler/repeatmodeler/**" diff --git a/modules/nf-core/samtools/cat/environment.yml b/modules/nf-core/samtools/cat/environment.yml deleted file mode 100644 index a368198..0000000 --- a/modules/nf-core/samtools/cat/environment.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: samtools_cat -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::samtools=1.20 - - bioconda::htslib=1.20 diff --git a/modules/nf-core/samtools/cat/main.nf b/modules/nf-core/samtools/cat/main.nf deleted file mode 100644 index 9447b65..0000000 --- a/modules/nf-core/samtools/cat/main.nf +++ /dev/null @@ -1,51 +0,0 @@ -process SAMTOOLS_CAT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.20--h50ea8bc_0' : - 'biocontainers/samtools:1.20--h50ea8bc_0' }" - - input: - tuple val(meta), path(input_files, stageAs: "?/*") - - output: - tuple val(meta), path("${prefix}.bam") , optional:true, emit: bam - tuple val(meta), path("${prefix}.cram"), optional:true, emit: cram - path "versions.yml" , emit: versions - - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def file_type = input_files instanceof List ? input_files[0].getExtension() : input_files.getExtension() - """ - samtools \\ - cat \\ - --threads ${task.cpus-1} \\ - $args \\ - -o ${prefix}.${file_type} \\ - $input_files - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" - def file_type = input_files instanceof List ? input_files[0].getExtension() : input_files.getExtension() - """ - touch ${prefix}.${file_type} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/samtools/cat/meta.yml b/modules/nf-core/samtools/cat/meta.yml deleted file mode 100644 index 3541e0c..0000000 --- a/modules/nf-core/samtools/cat/meta.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: samtools_cat -description: Concatenate BAM or CRAM file -keywords: - - merge - - bam - - sam - - cram -tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input_files: - type: file - description: BAM/CRAM files - pattern: "*.{bam,cram}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Concatenated BAM file - pattern: "*.{bam}" - - cram: - type: file - description: Concatenated CRAM file - pattern: "*.{cram}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@matthdsm" -maintainers: - - "@matthdsm" diff --git a/modules/nf-core/samtools/cat/tests/main.nf.test b/modules/nf-core/samtools/cat/tests/main.nf.test deleted file mode 100644 index dad80b8..0000000 --- a/modules/nf-core/samtools/cat/tests/main.nf.test +++ /dev/null @@ -1,61 +0,0 @@ -nextflow_process { - - name "Test Process SAMTOOLS_CAT" - script "../main.nf" - process "SAMTOOLS_CAT" - - tag "modules" - tag "modules_nfcore" - tag "samtools" - tag "samtools/cat" - - test("bams") { - - 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.bam', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.unaligned.bam', checkIfExists: true) ] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bams_bam") }, - { assert snapshot(process.out.cram).match("bams_cram") }, - { assert snapshot(process.out.versions).match("bams_versions") } - ) - } - } - - test("bams_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.bam', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.unaligned.bam', checkIfExists: true) ] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bams_stub_bam") }, - { assert snapshot(process.out.cram).match("bams_stub_cram") }, - { assert snapshot(process.out.versions).match("bams_stub_versions") } - ) - } - } -} diff --git a/modules/nf-core/samtools/cat/tests/main.nf.test.snap b/modules/nf-core/samtools/cat/tests/main.nf.test.snap deleted file mode 100644 index ae9344d..0000000 --- a/modules/nf-core/samtools/cat/tests/main.nf.test.snap +++ /dev/null @@ -1,70 +0,0 @@ -{ - "bams_stub_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:42.587418" - }, - "bams_stub_versions": { - "content": [ - [ - "versions.yml:md5,9b9451947b5de303ed028cf6513be3e8" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-28T15:45:35.044644556" - }, - "bams_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:37.965199" - }, - "bams_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:37.96805" - }, - "bams_stub_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:42.583881" - }, - "bams_versions": { - "content": [ - [ - "versions.yml:md5,9b9451947b5de303ed028cf6513be3e8" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-28T15:45:29.652817652" - } -} \ No newline at end of file diff --git a/modules/nf-core/samtools/cat/tests/tags.yml b/modules/nf-core/samtools/cat/tests/tags.yml deleted file mode 100644 index 9760557..0000000 --- a/modules/nf-core/samtools/cat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/cat: - - "modules/nf-core/samtools/cat/**" diff --git a/modules/nf-core/sortmerna/environment.yml b/modules/nf-core/sortmerna/environment.yml deleted file mode 100644 index f40f995..0000000 --- a/modules/nf-core/sortmerna/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: sortmerna -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::sortmerna=4.3.6 diff --git a/modules/nf-core/sortmerna/main.nf b/modules/nf-core/sortmerna/main.nf deleted file mode 100644 index 7c17e50..0000000 --- a/modules/nf-core/sortmerna/main.nf +++ /dev/null @@ -1,110 +0,0 @@ -process SORTMERNA { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sortmerna:4.3.6--h9ee0642_0' : - 'biocontainers/sortmerna:4.3.6--h9ee0642_0' }" - - input: - tuple val(meta), path(reads) - tuple val(meta2), path(fastas) - tuple val(meta3), path(index) - - output: - tuple val(meta), path("*non_rRNA.fastq.gz"), emit: reads, optional: true - tuple val(meta), path("*.log") , emit: log, optional: true - tuple val(meta2), path("idx") , emit: index, optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - - def index_only = args.contains('--index 1')? true : false - def skip_index = args.contains('--index 0')? true : false - def paired_end = reads instanceof List - def paired_cmd = '' - def reads_args = '' - def out2_cmd = '' - def mv_cmd = '' - def reads_input = '' - def refs_input = '' - - if (! index_only){ - reads_args = '--aligned rRNA_reads --fastx --other non_rRNA_reads' - reads_input = paired_end ? reads.collect{"--reads $it"}.join(' ') : "--reads $reads" - def n_fastq = paired_end ? reads.size() : 1 - if ( n_fastq == 1 ) { - mv_cmd = """ - mv non_rRNA_reads.f*q.gz ${prefix}.non_rRNA.fastq.gz - mv rRNA_reads.log ${prefix}.sortmerna.log - """ - } else { - mv_cmd = """ - mv non_rRNA_reads_fwd.f*q.gz ${prefix}_1.non_rRNA.fastq.gz - mv non_rRNA_reads_rev.f*q.gz ${prefix}_2.non_rRNA.fastq.gz - mv rRNA_reads.log ${prefix}.sortmerna.log - """ - paired_cmd = "--paired_in" - out2_cmd = "--out2" - } - } - """ - sortmerna \\ - ${'--ref '+fastas.join(' --ref ')} \\ - $refs_input \\ - $reads_input \\ - --threads $task.cpus \\ - --workdir . \\ - $reads_args \\ - $paired_cmd \\ - $out2_cmd \\ - $args - - $mv_cmd - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - - def index_only = args.contains('--index 1')? true : false - def paired_end = reads instanceof List - def paired_cmd = '' - def out2_cmd = '' - def mv_cmd = '' - def reads_input = '' - - if (! index_only){ - reads_input = paired_end ? reads.collect{"--reads $it"}.join(' ') : "--reads $reads" - def n_fastq = paired_end ? reads.size() : 1 - if ( n_fastq == 1 ) { - mv_cmd = "touch ${prefix}.non_rRNA.fastq.gz" - } else { - mv_cmd = """ - touch ${prefix}_1.non_rRNA.fastq.gz - touch ${prefix}_2.non_rRNA.fastq.gz - """ - } - } - """ - $mv_cmd - mkdir -p idx - touch ${prefix}.sortmerna.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/sortmerna/meta.yml b/modules/nf-core/sortmerna/meta.yml deleted file mode 100644 index c0a2a58..0000000 --- a/modules/nf-core/sortmerna/meta.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: sortmerna -description: Local sequence alignment tool for filtering, mapping and clustering. -keywords: - - filtering - - mapping - - clustering - - rRNA - - ribosomal RNA -tools: - - SortMeRNA: - description: The core algorithm is based on approximate seeds and allows for sensitive analysis of NGS reads. The main application of SortMeRNA is filtering rRNA from metatranscriptomic data. SortMeRNA takes as input files of reads (fasta, fastq, fasta.gz, fastq.gz) and one or multiple rRNA database file(s), and sorts apart aligned and rejected reads into two files. Additional applications include clustering and taxonomy assignation available through QIIME v1.9.1. SortMeRNA works with Illumina, Ion Torrent and PacBio data, and can produce SAM and BLAST-like alignments. - homepage: https://hpc.nih.gov/apps/sortmeRNA.html - documentation: https://github.com/biocore/sortmerna/wiki/ - licence: ["GPL-3.0-or-later"] -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. - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - fastas: - type: file - description: | - Path to reference file(s) - - meta3: - type: map - description: | - Groovy Map containing index information - e.g. [ id:'test' ] - - index: - type: directory - description: | - Path to index directory of a previous sortmerna run -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ], or reference information from an - indexing-only run - - reads: - type: file - description: The filtered fastq reads - pattern: "*fastq.gz" - - log: - type: file - description: SortMeRNA log file - pattern: "*sortmerna.log" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - index: - type: directory - description: | - Path to index directory generated by sortmern - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@mashehu" -maintainers: - - "@drpatelh" - - "@mashehu" diff --git a/modules/nf-core/sortmerna/tests/indexing_only.config b/modules/nf-core/sortmerna/tests/indexing_only.config deleted file mode 100644 index 3e74a32..0000000 --- a/modules/nf-core/sortmerna/tests/indexing_only.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: 'SORTMERNA' { - ext.args = '--index 1' - } -} diff --git a/modules/nf-core/sortmerna/tests/main.nf.test b/modules/nf-core/sortmerna/tests/main.nf.test deleted file mode 100644 index 73bc119..0000000 --- a/modules/nf-core/sortmerna/tests/main.nf.test +++ /dev/null @@ -1,327 +0,0 @@ -nextflow_process { - - name "Test Process SORTMERNA" - script "../main.nf" - process "SORTMERNA" - tag "modules" - tag "modules_nfcore" - tag "sortmerna" - - test("sarscov2 indexing only") { - - config './indexing_only.config' - - when { - process { - """ - input[0] = Channel.of([[],[]]) - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert ! process.out.reads }, - { assert snapshot(process.out.index).match("index_index_only") }, - { assert snapshot(process.out.versions).match("versions_index_only") } - ) - } - - } - - test("sarscov2 indexing only stub") { - - options '-stub' - config './indexing_only.config' - - when { - process { - """ - input[0] = Channel.of([[],[]]) - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert ! process.out.reads }, - { assert snapshot(process.out.index).match("index_only_stub") }, - { assert snapshot(process.out.versions).match("versions_index_only_stub") } - ) - } - - } - - test("sarscov2 single_end") { - - when { - process { - """ - input[0] = [ [ id:'test' ], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] - ] - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.reads }, - { assert file(process.out.log[0][1]).text.contains("Total reads passing E-value threshold = 100 (100.00)") }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } - ).sort() - ).match("sarscov2 single_end_match") - }, - { assert snapshot(process.out.index).match("index_single_end") }, - { assert snapshot(process.out.versions).match("versions_single_end") } - ) - } - - } - - test("sarscov2 single_end stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ [ id:'test' ], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] - ] - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } - ).sort() - ).match("sarscov2 single_end-for_stub_match") - }, - { assert snapshot(process.out.index).match("index_single_end_stub") }, - { assert snapshot(process.out.versions).match("versions_single_end_stub") } - ) - } - - } - - test("sarscov2 paired_end") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // 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) - ] - ] - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.reads }, - { assert file(process.out.log[0][1]).text.contains("Total reads passing E-value threshold = 200 (100.00)") }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { it[1].collect { item -> file(item).getName() } } + - process.out.log.collect { file(it[1]).getName() } - ).sort() - ).match("sarscov2 paired_end_match") - }, - { assert snapshot(process.out.index).match("index_paired_end") }, - { assert snapshot(process.out.versions).match("versions_paired_end") } - ) - } - - } - - test("sarscov2 paired_end stub") { - - options '-stub' - - when { - process { - """ - input[0] = [ [ id:'test' ], // 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) - ] - ] - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { it[1].collect { item -> file(item).getName() } } + - process.out.log.collect { file(it[1]).getName() } - ).sort() - ).match("sarscov2 paired_end-for_stub_match") - }, - { assert snapshot(process.out.index).match("index_paired_end_stub") }, - { assert snapshot(process.out.versions).match("versions_paired_end_stub") } - ) - } - - } - - test("sarscov2 single_end premade_index") { - - config './premade_index.config' - - setup { - - run("SORTMERNA", alias: "SORTMERNA_INDEX") { - script "../main.nf" - process { - """ - input[0] = Channel.of([[],[]]) - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - } - - when { - process { - """ - input[0] = [ [ id:'test' ], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] - ] - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = SORTMERNA_INDEX.out.index - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.reads }, - { assert file(process.out.log[0][1]).text.contains("Total reads passing E-value threshold = 100 (100.00)") }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } - ).sort() - ).match("sarscov2 single_end_premade_index_match") - }, - { assert snapshot(process.out.index).match("index_single_end_premade_index") }, - { assert snapshot(process.out.versions).match("versions_single_end_premade_index") } - ) - } - } - - test("sarscov2 single_end premade_index stub") { - - config './premade_index.config' - options '-stub' - - setup { - - run("SORTMERNA", alias: "SORTMERNA_INDEX") { - script "../main.nf" - process { - """ - input[0] = Channel.of([[],[]]) - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = Channel.of([[],[]]) - """ - } - } - } - - when { - process { - """ - input[0] = [ [ id:'test' ], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true) ] - ] - input[1] = [ [id:'test2'], // meta map - [ file(params.modules_testdata_base_path + "genomics/sarscov2/genome/genome.fasta", checkIfExists: true) ] - ] - input[2] = SORTMERNA_INDEX.out.index - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert process.out.reads }, - { - assert snapshot( - ( - [process.out.reads[0][0].toString()] + // meta - process.out.reads.collect { file(it[1]).getName() } + - process.out.log.collect { file(it[1]).getName() } - ).sort() - ).match("sarscov2 single_end_premade_index_match_stub") - }, - { assert snapshot(process.out.index).match("index_single_end_premade_index_stub") }, - { assert snapshot(process.out.versions).match("versions_single_end_premade_index_stub") } - ) - } - } -} diff --git a/modules/nf-core/sortmerna/tests/main.nf.test.snap b/modules/nf-core/sortmerna/tests/main.nf.test.snap deleted file mode 100644 index 86e8473..0000000 --- a/modules/nf-core/sortmerna/tests/main.nf.test.snap +++ /dev/null @@ -1,352 +0,0 @@ -{ - "versions_paired_end_stub": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-07T12:27:11.223149" - }, - "index_paired_end_stub": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T14:24:25.384097178" - }, - "versions_paired_end": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-07T12:27:04.517155" - }, - "versions_single_end_stub": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-01T12:10:35.228450189" - }, - "sarscov2 single_end_match": { - "content": [ - [ - "test.non_rRNA.fastq.gz", - "test.sortmerna.log", - "{id=test}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-07T12:28:23.20327" - }, - "index_only_stub": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:00:47.128504164" - }, - "index_single_end_premade_index": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - "2415186086593376314.bursttrie_0.dat:md5,74f7f020e8d46e24a8a2e9c5fbcd564a", - "2415186086593376314.kmer_0.dat:md5,4a0bcb71b120f6a6949b7969292ef2e7", - "2415186086593376314.pos_0.dat:md5,bc2875e4cc4017707306565e396839ef", - "2415186086593376314.stats:md5,67c9d4c768f28a450fc82a2b5d43db5c" - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:01:53.832643452" - }, - "versions_single_end_premade_index": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:01:53.902154982" - }, - "sarscov2 paired_end-for_stub_match": { - "content": [ - [ - "{id=test}", - [ - "test_1.non_rRNA.fastq.gz", - "test_2.non_rRNA.fastq.gz" - ], - "test.sortmerna.log" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-07T12:28:56.063579" - }, - "index_paired_end": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - "2415186086593376314.bursttrie_0.dat:md5,74f7f020e8d46e24a8a2e9c5fbcd564a", - "2415186086593376314.kmer_0.dat:md5,4a0bcb71b120f6a6949b7969292ef2e7", - "2415186086593376314.pos_0.dat:md5,bc2875e4cc4017707306565e396839ef", - "2415186086593376314.stats:md5,67c9d4c768f28a450fc82a2b5d43db5c" - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T14:24:14.272659781" - }, - "sarscov2 single_end_premade_index_match_stub": { - "content": [ - [ - "test.non_rRNA.fastq.gz", - "test.sortmerna.log", - "{id=test}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:05:01.913287272" - }, - "sarscov2 single_end-for_stub_match": { - "content": [ - [ - "test.non_rRNA.fastq.gz", - "test.sortmerna.log", - "{id=test}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-07T12:28:29.197913" - }, - "sarscov2 paired_end_match": { - "content": [ - [ - "{id=test}", - [ - "test_1.non_rRNA.fastq.gz", - "test_2.non_rRNA.fastq.gz" - ], - "test.sortmerna.log" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-07T12:28:49.914992" - }, - "versions_single_end": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T14:36:27.14244294" - }, - "versions_index_only": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:00:35.609161481" - }, - "versions_single_end_premade_index_stub": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:05:02.059858431" - }, - "index_single_end_stub": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T14:23:58.068772508" - }, - "versions_index_only_stub": { - "content": [ - [ - "versions.yml:md5,7df9d50209f351e1f75e05a1fad6ba4b" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:00:47.169402699" - }, - "index_single_end_premade_index_stub": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:05:01.953316205" - }, - "index_single_end": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - "2415186086593376314.bursttrie_0.dat:md5,74f7f020e8d46e24a8a2e9c5fbcd564a", - "2415186086593376314.kmer_0.dat:md5,4a0bcb71b120f6a6949b7969292ef2e7", - "2415186086593376314.pos_0.dat:md5,bc2875e4cc4017707306565e396839ef", - "2415186086593376314.stats:md5,67c9d4c768f28a450fc82a2b5d43db5c" - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T14:36:26.88061978" - }, - "index_index_only": { - "content": [ - [ - [ - { - "id": "test2" - }, - [ - "2415186086593376314.bursttrie_0.dat:md5,74f7f020e8d46e24a8a2e9c5fbcd564a", - "2415186086593376314.kmer_0.dat:md5,4a0bcb71b120f6a6949b7969292ef2e7", - "2415186086593376314.pos_0.dat:md5,bc2875e4cc4017707306565e396839ef", - "2415186086593376314.stats:md5,67c9d4c768f28a450fc82a2b5d43db5c" - ] - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:00:35.34089252" - }, - "sarscov2 single_end_premade_index_match": { - "content": [ - [ - "test.non_rRNA.fastq.gz", - "test.sortmerna.log", - "{id=test}" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-02-26T15:01:53.797737296" - } -} \ No newline at end of file diff --git a/modules/nf-core/sortmerna/tests/premade_index.config b/modules/nf-core/sortmerna/tests/premade_index.config deleted file mode 100644 index ab86d2e..0000000 --- a/modules/nf-core/sortmerna/tests/premade_index.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - withName: 'SORTMERNA_INDEX' { - ext.args = '--index 1' - } - withName: 'SORTMERNA' { - ext.args = '--index 0' - } -} diff --git a/modules/nf-core/sortmerna/tests/tags.yml b/modules/nf-core/sortmerna/tests/tags.yml deleted file mode 100644 index e088480..0000000 --- a/modules/nf-core/sortmerna/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -sortmerna: - - modules/nf-core/sortmerna/** diff --git a/modules/nf-core/star/align/environment.yml b/modules/nf-core/star/align/environment.yml deleted file mode 100644 index 8bd58cf..0000000 --- a/modules/nf-core/star/align/environment.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: star_align -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::star=2.7.10a - - bioconda::samtools=1.18 - - bioconda::htslib=1.18 - - conda-forge::gawk=5.1.0 diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf deleted file mode 100644 index ae67e00..0000000 --- a/modules/nf-core/star/align/main.nf +++ /dev/null @@ -1,109 +0,0 @@ -process STAR_ALIGN { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:ded3841da0194af2701c780e9b3d653a85d27489-0' : - 'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:ded3841da0194af2701c780e9b3d653a85d27489-0' }" - - input: - tuple val(meta), path(reads, stageAs: "input*/*") - tuple val(meta2), path(index) - tuple val(meta3), path(gtf) - val star_ignore_sjdbgtf - val seq_platform - val seq_center - - output: - tuple val(meta), path('*Log.final.out') , emit: log_final - tuple val(meta), path('*Log.out') , emit: log_out - tuple val(meta), path('*Log.progress.out'), emit: log_progress - path "versions.yml" , emit: versions - - tuple val(meta), path('*d.out.bam') , optional:true, emit: bam - tuple val(meta), path('*sortedByCoord.out.bam') , optional:true, emit: bam_sorted - tuple val(meta), path('*toTranscriptome.out.bam'), optional:true, emit: bam_transcript - tuple val(meta), path('*Aligned.unsort.out.bam') , optional:true, emit: bam_unsorted - tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq - tuple val(meta), path('*.tab') , optional:true, emit: tab - tuple val(meta), path('*.SJ.out.tab') , optional:true, emit: spl_junc_tab - tuple val(meta), path('*.ReadsPerGene.out.tab') , optional:true, emit: read_per_gene_tab - tuple val(meta), path('*.out.junction') , optional:true, emit: junction - tuple val(meta), path('*.out.sam') , optional:true, emit: sam - tuple val(meta), path('*.wig') , optional:true, emit: wig - tuple val(meta), path('*.bg') , optional:true, emit: bedgraph - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def reads1 = [], reads2 = [] - meta.single_end ? [reads].flatten().each{reads1 << it} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } - def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" - def seq_platform = seq_platform ? "'PL:$seq_platform'" : "" - def seq_center = seq_center ? "'CN:$seq_center'" : "" - def attrRG = args.contains("--outSAMattrRGline") ? "" : "--outSAMattrRGline 'ID:$prefix' $seq_center 'SM:$prefix' $seq_platform" - def out_sam_type = (args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted' - def mv_unsorted_bam = (args.contains('--outSAMtype BAM Unsorted SortedByCoordinate')) ? "mv ${prefix}.Aligned.out.bam ${prefix}.Aligned.unsort.out.bam" : '' - """ - STAR \\ - --genomeDir $index \\ - --readFilesIn ${reads1.join(",")} ${reads2.join(",")} \\ - --runThreadN $task.cpus \\ - --outFileNamePrefix $prefix. \\ - $out_sam_type \\ - $ignore_gtf \\ - $attrRG \\ - $args - - $mv_unsorted_bam - - if [ -f ${prefix}.Unmapped.out.mate1 ]; then - mv ${prefix}.Unmapped.out.mate1 ${prefix}.unmapped_1.fastq - gzip ${prefix}.unmapped_1.fastq - fi - if [ -f ${prefix}.Unmapped.out.mate2 ]; then - mv ${prefix}.Unmapped.out.mate2 ${prefix}.unmapped_2.fastq - gzip ${prefix}.unmapped_2.fastq - fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - echo "" | gzip > ${prefix}.unmapped_1.fastq.gz - echo "" | gzip > ${prefix}.unmapped_2.fastq.gz - touch ${prefix}Xd.out.bam - touch ${prefix}.Log.final.out - touch ${prefix}.Log.out - touch ${prefix}.Log.progress.out - touch ${prefix}.sortedByCoord.out.bam - touch ${prefix}.toTranscriptome.out.bam - touch ${prefix}.Aligned.unsort.out.bam - touch ${prefix}.Aligned.sortedByCoord.out.bam - touch ${prefix}.tab - touch ${prefix}.SJ.out.tab - touch ${prefix}.ReadsPerGene.out.tab - touch ${prefix}.Chimeric.out.junction - touch ${prefix}.out.sam - touch ${prefix}.Signal.UniqueMultiple.str1.out.wig - touch ${prefix}.Signal.UniqueMultiple.str1.out.bg - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/star/align/meta.yml b/modules/nf-core/star/align/meta.yml deleted file mode 100644 index e80dbb7..0000000 --- a/modules/nf-core/star/align/meta.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: star_align -description: Align reads to a reference genome using STAR -keywords: - - align - - fasta - - genome - - reference -tools: - - star: - description: | - STAR is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: https://github.com/alexdobin/STAR - manual: https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf - doi: 10.1093/bioinformatics/bts635 - licence: ["MIT"] -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. - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - index: - type: directory - description: STAR genome index - pattern: "star" - - meta3: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - gtf: - type: file - description: Annotation GTF file - pattern: "*.{gtf}" - - star_ignore_sjdbgtf: - type: boolean - description: Ignore annotation GTF file - - seq_platform: - type: string - description: Sequencing platform - - seq_center: - type: string - description: Sequencing center -output: - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - log_final: - type: file - description: STAR final log file - pattern: "*Log.final.out" - - log_out: - type: file - description: STAR lot out file - pattern: "*Log.out" - - log_progress: - type: file - description: STAR log progress file - pattern: "*Log.progress.out" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bam_sorted: - type: file - description: Sorted BAM file of read alignments (optional) - pattern: "*sortedByCoord.out.bam" - - bam_transcript: - type: file - description: Output BAM file of transcriptome alignment (optional) - pattern: "*toTranscriptome.out.bam" - - bam_unsorted: - type: file - description: Unsorted BAM file of read alignments (optional) - pattern: "*Aligned.unsort.out.bam" - - fastq: - type: file - description: Unmapped FastQ files (optional) - pattern: "*fastq.gz" - - tab: - type: file - description: STAR output tab file(s) (optional) - pattern: "*.tab" - - junction: - type: file - description: STAR chimeric junction output file (optional) - pattern: "*.out.junction" - - wig: - type: file - description: STAR output wiggle format file(s) (optional) - pattern: "*.wig" - - bedgraph: - type: file - description: STAR output bedGraph format file(s) (optional) - pattern: "*.bg" -authors: - - "@kevinmenden" - - "@drpatelh" - - "@praveenraj2018" -maintainers: - - "@kevinmenden" - - "@drpatelh" - - "@praveenraj2018" diff --git a/modules/nf-core/star/align/tests/main.nf.test b/modules/nf-core/star/align/tests/main.nf.test deleted file mode 100644 index 2d9f72d..0000000 --- a/modules/nf-core/star/align/tests/main.nf.test +++ /dev/null @@ -1,609 +0,0 @@ -nextflow_process { - - name "Test Process STAR_ALIGN" - script "../main.nf" - process "STAR_ALIGN" - tag "modules" - tag "modules_nfcore" - tag "star" - tag "star/align" - tag "star/genomegenerate" - - test("homo_sapiens - single_end") { - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true) ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.log_final[0][1]).name, - file(process.out.log_out[0][1]).name, - file(process.out.log_progress[0][1]).name, - process.out.bam, - process.out.bam_sorted, - process.out.bam_transcript, - process.out.bam_unsorted, - process.out.bedgraph, - process.out.fastq, - process.out.junction, - process.out.read_per_gene_tab, - process.out.sam, - process.out.spl_junc_tab, - process.out.tab, - process.out.wig, - process.out.versions - ).match() } - ) - } - } - - test("homo_sapiens - paired_end") { - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.log_final[0][1]).name, - file(process.out.log_out[0][1]).name, - file(process.out.log_progress[0][1]).name, - process.out.bam, - process.out.bam_sorted, - process.out.bam_transcript, - process.out.bam_unsorted, - process.out.bedgraph, - process.out.fastq, - process.out.junction, - process.out.read_per_gene_tab, - process.out.sam, - process.out.spl_junc_tab, - process.out.tab, - process.out.wig, - process.out.versions - ).match() } - ) - } - } - - test("homo_sapiens - paired_end - arriba") { - config "./nextflow.arriba.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.log_final[0][1]).name, - file(process.out.log_out[0][1]).name, - file(process.out.log_progress[0][1]).name, - process.out.bam, - process.out.bam_sorted, - process.out.bam_transcript, - process.out.bam_unsorted, - process.out.bedgraph, - process.out.fastq, - process.out.junction, - process.out.read_per_gene_tab, - process.out.sam, - process.out.spl_junc_tab, - process.out.tab, - process.out.wig, - process.out.versions - ).match() } - ) - } - } - - test("homo_sapiens - paired_end - starfusion") { - config "./nextflow.starfusion.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.log_final[0][1]).name, - file(process.out.log_out[0][1]).name, - file(process.out.log_progress[0][1]).name, - process.out.bam, - process.out.bam_sorted, - process.out.bam_transcript, - process.out.bam_unsorted, - process.out.bedgraph, - process.out.fastq, - process.out.junction, - process.out.read_per_gene_tab, - process.out.sam, - process.out.spl_junc_tab, - process.out.tab, - process.out.wig, - process.out.versions - ).match() } - ) - } - } - - test("homo_sapiens - paired_end - multiple") { - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.log_final[0][1]).name, - file(process.out.log_out[0][1]).name, - file(process.out.log_progress[0][1]).name, - process.out.bam, - process.out.bam_sorted, - process.out.bam_transcript, - process.out.bam_unsorted, - process.out.bedgraph, - process.out.fastq, - process.out.junction, - process.out.read_per_gene_tab, - process.out.sam, - process.out.spl_junc_tab, - process.out.tab, - process.out.wig, - process.out.versions - ).match() } - ) - } - } - - test("homo_sapiens - single_end - stub") { - options "-stub" - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:true ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true) ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - paired_end - stub") { - options "-stub" - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - paired_end - arriba - stub") { - options "-stub" - config "./nextflow.arriba.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - paired_end - starfusion - stub") { - options "-stub" - config "./nextflow.starfusion.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("homo_sapiens - paired_end - multiple - stub") { - options "-stub" - config "./nextflow.config" - - setup { - run("STAR_GENOMEGENERATE") { - script "../../../star/genomegenerate/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - } - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) - ] - ]) - input[1] = STAR_GENOMEGENERATE.out.index - input[2] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - input[3] = false - input[4] = 'illumina' - input[5] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} \ No newline at end of file diff --git a/modules/nf-core/star/align/tests/main.nf.test.snap b/modules/nf-core/star/align/tests/main.nf.test.snap deleted file mode 100644 index c814eb5..0000000 --- a/modules/nf-core/star/align/tests/main.nf.test.snap +++ /dev/null @@ -1,1973 +0,0 @@ -{ - "homo_sapiens - single_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": true - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": true - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - [ - { - "id": "test", - "single_end": true - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "14": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "15": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "4": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": true - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_sorted": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_transcript": [ - [ - { - "id": "test", - "single_end": true - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bam_unsorted": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bedgraph": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastq": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "junction": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_final": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_out": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_progress": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "read_per_gene_tab": [ - [ - { - "id": "test", - "single_end": true - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "sam": [ - [ - { - "id": "test", - "single_end": true - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "spl_junc_tab": [ - [ - { - "id": "test", - "single_end": true - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tab": [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "wig": [ - [ - { - "id": "test", - "single_end": true - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T15:16:04.712114" - }, - "homo_sapiens - paired_end - arriba - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "14": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "15": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_sorted": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_transcript": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bam_unsorted": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bedgraph": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastq": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "junction": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_out": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_progress": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "read_per_gene_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "sam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "spl_junc_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tab": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "wig": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T15:16:28.874293" - }, - "homo_sapiens - single_end": { - "content": [ - "test.Log.final.out", - "test.Log.out", - "test.Log.progress.out", - [ - [ - { - "id": "test", - "single_end": true - }, - "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.Aligned.sortedByCoord.out.bam:md5,c6cfaccaf91bc7fdabed3cfe236d4535" - ] - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": true - }, - [ - "test.Signal.Unique.str1.out.bg:md5,c56fc1472776fb927eaf62d973da5f9a", - "test.Signal.UniqueMultiple.str1.out.bg:md5,e93373cf6f2a2a9506e2efdb260cdd4f" - ] - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.SJ.out.tab:md5,75a516ab950fb958f40b29996474949c" - ] - ], - [ - - ], - [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T18:02:34.35338" - }, - "homo_sapiens - paired_end": { - "content": [ - "test.Log.final.out", - "test.Log.out", - "test.Log.progress.out", - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.sortedByCoord.out.bam:md5,b9ee1c607e07323bc1652ef3babb543f" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.sortedByCoord.out.bam:md5,b9ee1c607e07323bc1652ef3babb543f" - ] - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", - "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" - ] - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,844af19ab0fc8cd9a3f75228445aca0d" - ] - ], - [ - - ], - [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T18:03:16.701923" - }, - "homo_sapiens - paired_end - multiple - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "14": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "15": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_sorted": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_transcript": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bam_unsorted": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bedgraph": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastq": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "junction": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_out": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_progress": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "read_per_gene_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "sam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "spl_junc_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tab": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "wig": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T15:16:51.360287" - }, - "homo_sapiens - paired_end - multiple": { - "content": [ - "test.Log.final.out", - "test.Log.out", - "test.Log.progress.out", - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.sortedByCoord.out.bam:md5,ab07c21d63ab0a6c07d171d213c81d5a" - ] - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Signal.Unique.str1.out.bg:md5,d7bf8b70b436ca048a62513e1d0ece3a", - "test.Signal.UniqueMultiple.str1.out.bg:md5,686d58493b9eb445b56ace4d67f76ef6" - ] - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,069877e053714e23010fe4e1c003b4a2" - ] - ], - [ - - ], - [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T13:13:28.987438" - }, - "homo_sapiens - paired_end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "14": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "15": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_sorted": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_transcript": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bam_unsorted": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bedgraph": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastq": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "junction": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_out": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_progress": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "read_per_gene_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "sam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "spl_junc_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tab": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "wig": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T15:16:16.798018" - }, - "homo_sapiens - paired_end - starfusion": { - "content": [ - "test.Log.final.out", - "test.Log.out", - "test.Log.progress.out", - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.out.bam:md5,bcad07b838f6762fc01eea52b5cd3f84" - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,c10ef219f4a30e83711b995bc5e40dba" - ] - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,19c3faa1bfa9a0cc5e4c45f17065b53a" - ] - ], - [ - - ], - [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T13:10:55.371956" - }, - "homo_sapiens - paired_end - arriba": { - "content": [ - "test.Log.final.out", - "test.Log.out", - "test.Log.progress.out", - [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.out.bam:md5,c1b1747f5873f2d17762725636e891d5" - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,5155c9fd1f787ad6d7d80987fb06219c" - ] - ], - [ - - ], - [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T13:05:10.7534" - }, - "homo_sapiens - paired_end - starfusion - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "14": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "15": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_sorted": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "bam_transcript": [ - [ - { - "id": "test", - "single_end": false - }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bam_unsorted": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "bedgraph": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.bg:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastq": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "junction": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_final": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.final.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_out": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "log_progress": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Log.progress.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "read_per_gene_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "sam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "spl_junc_tab": [ - [ - { - "id": "test", - "single_end": false - }, - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tab": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,2e6b6d8809f5a17f38f4d27c45dcb22f" - ], - "wig": [ - [ - { - "id": "test", - "single_end": false - }, - "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T15:16:40.64399" - } -} \ No newline at end of file diff --git a/modules/nf-core/star/align/tests/nextflow.arriba.config b/modules/nf-core/star/align/tests/nextflow.arriba.config deleted file mode 100644 index 2324b9e..0000000 --- a/modules/nf-core/star/align/tests/nextflow.arriba.config +++ /dev/null @@ -1,14 +0,0 @@ -process { - - withName: STAR_GENOMEGENERATE { - ext.args = '--genomeSAindexNbases 9' - } - - withName: STAR_ALIGN { - ext.args = '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50' - } - -} - -// Fix chown issue for the output star folder -docker.runOptions = '--platform=linux/amd64 -u $(id -u):$(id -g)' diff --git a/modules/nf-core/star/align/tests/nextflow.config b/modules/nf-core/star/align/tests/nextflow.config deleted file mode 100644 index c4ac580..0000000 --- a/modules/nf-core/star/align/tests/nextflow.config +++ /dev/null @@ -1,14 +0,0 @@ -process { - - withName: STAR_GENOMEGENERATE { - ext.args = '--genomeSAindexNbases 9' - } - - withName: STAR_ALIGN { - ext.args = '--readFilesCommand zcat --outSAMtype BAM SortedByCoordinate --outWigType bedGraph --outWigStrand Unstranded' - } - -} - -// Fix chown issue for the output star folder -docker.runOptions = '--platform=linux/amd64 -u $(id -u):$(id -g)' diff --git a/modules/nf-core/star/align/tests/nextflow.starfusion.config b/modules/nf-core/star/align/tests/nextflow.starfusion.config deleted file mode 100644 index 467b649..0000000 --- a/modules/nf-core/star/align/tests/nextflow.starfusion.config +++ /dev/null @@ -1,14 +0,0 @@ -process { - - withName: STAR_GENOMEGENERATE { - ext.args = '--genomeSAindexNbases 9' - } - - withName: STAR_ALIGN { - ext.args = '--readFilesCommand zcat --outSAMtype BAM Unsorted --outReadsUnmapped None --twopassMode Basic --outSAMstrandField intronMotif --outSAMunmapped Within --chimSegmentMin 12 --chimJunctionOverhangMin 8 --chimOutJunctionFormat 1 --alignSJDBoverhangMin 10 --alignMatesGapMax 100000 --alignIntronMax 100000 --alignSJstitchMismatchNmax 5 -1 5 5 --chimMultimapScoreRange 3 --chimScoreJunctionNonGTAG -4 --chimMultimapNmax 20 --chimNonchimScoreDropMin 10 --peOverlapNbasesMin 12 --peOverlapMMp 0.1 --alignInsertionFlush Right --alignSplicedMateMapLminOverLmate 0 --alignSplicedMateMapLmin 30' - } - -} - -// Fix chown issue for the output star folder -docker.runOptions = '--platform=linux/amd64 -u $(id -u):$(id -g)' diff --git a/modules/nf-core/star/align/tests/tags.yml b/modules/nf-core/star/align/tests/tags.yml deleted file mode 100644 index 8beace1..0000000 --- a/modules/nf-core/star/align/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -star/align: - - modules/nf-core/star/align/** diff --git a/modules/nf-core/star/genomegenerate/environment.yml b/modules/nf-core/star/genomegenerate/environment.yml deleted file mode 100644 index 791f255..0000000 --- a/modules/nf-core/star/genomegenerate/environment.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: star_genomegenerate -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::samtools=1.18 - - bioconda::htslib=1.18 - - bioconda::star=2.7.10a - - conda-forge::gawk=5.1.0 diff --git a/modules/nf-core/star/genomegenerate/main.nf b/modules/nf-core/star/genomegenerate/main.nf deleted file mode 100644 index b885571..0000000 --- a/modules/nf-core/star/genomegenerate/main.nf +++ /dev/null @@ -1,119 +0,0 @@ -process STAR_GENOMEGENERATE { - tag "$fasta" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:ded3841da0194af2701c780e9b3d653a85d27489-0' : - 'biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:ded3841da0194af2701c780e9b3d653a85d27489-0' }" - - input: - tuple val(meta), path(fasta) - tuple val(meta2), path(gtf) - - output: - tuple val(meta), path("star") , emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args_list = args.tokenize() - def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : '' - def include_gtf = gtf ? "--sjdbGTFfile $gtf" : '' - if (args_list.contains('--genomeSAindexNbases')) { - """ - mkdir star - STAR \\ - --runMode genomeGenerate \\ - --genomeDir star/ \\ - --genomeFastaFiles $fasta \\ - $include_gtf \\ - --runThreadN $task.cpus \\ - $memory \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS - """ - } else { - """ - samtools faidx $fasta - NUM_BASES=`gawk '{sum = sum + \$2}END{if ((log(sum)/log(2))/2 - 1 > 14) {printf "%.0f", 14} else {printf "%.0f", (log(sum)/log(2))/2 - 1}}' ${fasta}.fai` - - mkdir star - STAR \\ - --runMode genomeGenerate \\ - --genomeDir star/ \\ - --genomeFastaFiles $fasta \\ - $include_gtf \\ - --runThreadN $task.cpus \\ - --genomeSAindexNbases \$NUM_BASES \\ - $memory \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS - """ - } - - stub: - if (gtf) { - """ - mkdir star - touch star/Genome - touch star/Log.out - touch star/SA - touch star/SAindex - touch star/chrLength.txt - touch star/chrName.txt - touch star/chrNameLength.txt - touch star/chrStart.txt - touch star/exonGeTrInfo.tab - touch star/exonInfo.tab - touch star/geneInfo.tab - touch star/genomeParameters.txt - touch star/sjdbInfo.txt - touch star/sjdbList.fromGTF.out.tab - touch star/sjdbList.out.tab - touch star/transcriptInfo.tab - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS - """ - } else { - """ - mkdir star - touch star/Genome - touch star/Log.out - touch star/SA - touch star/SAindex - touch star/chrLength.txt - touch star/chrName.txt - touch star/chrNameLength.txt - touch star/chrStart.txt - touch star/genomeParameters.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS - """ - } -} diff --git a/modules/nf-core/star/genomegenerate/meta.yml b/modules/nf-core/star/genomegenerate/meta.yml deleted file mode 100644 index 1061e1b..0000000 --- a/modules/nf-core/star/genomegenerate/meta.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: star_genomegenerate -description: Create index for STAR -keywords: - - index - - fasta - - genome - - reference -tools: - - star: - description: | - STAR is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: https://github.com/alexdobin/STAR - manual: https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf - doi: 10.1093/bioinformatics/bts635 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Fasta file of the reference genome - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'test' ] - - gtf: - type: file - description: GTF file of the reference genome -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - index: - type: directory - description: Folder containing the star index files - pattern: "star" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@kevinmenden" - - "@drpatelh" -maintainers: - - "@kevinmenden" - - "@drpatelh" diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test b/modules/nf-core/star/genomegenerate/tests/main.nf.test deleted file mode 100644 index 4d619c4..0000000 --- a/modules/nf-core/star/genomegenerate/tests/main.nf.test +++ /dev/null @@ -1,114 +0,0 @@ -nextflow_process { - - name "Test Process STAR_GENOMEGENERATE" - script "../main.nf" - process "STAR_GENOMEGENERATE" - tag "modules" - tag "modules_nfcore" - tag "star" - tag "star/genomegenerate" - - test("fasta_gtf") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString(), - process.out.versions) - .match() } - ) - } - } - - test("fasta") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ [], [] ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - file(process.out.index[0][1]).listFiles().collect { it.getName() }.sort().toString(), - process.out.versions - ).match() } - ) - } - } - - test("fasta_gtf_stub") { - - options '-stub' - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ - [ id:'test_gtf' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.gtf', checkIfExists: true) ] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("fasta_stub") { - - options '-stub' - - when { - process { - """ - input[0] = Channel.of([ - [ id:'test_fasta' ], - [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ] - ]) - input[1] = Channel.of([ [], [] ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} diff --git a/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap b/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap deleted file mode 100644 index 207f4b4..0000000 --- a/modules/nf-core/star/genomegenerate/tests/main.nf.test.snap +++ /dev/null @@ -1,148 +0,0 @@ -{ - "fasta_gtf": { - "content": [ - "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, exonGeTrInfo.tab, exonInfo.tab, geneInfo.tab, genomeParameters.txt, sjdbInfo.txt, sjdbList.fromGTF.out.tab, sjdbList.out.tab, transcriptInfo.tab]", - [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T14:55:35.478401" - }, - "fasta_gtf_stub": { - "content": [ - { - "0": [ - [ - { - "id": "test_fasta" - }, - [ - "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", - "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", - "SA:md5,d41d8cd98f00b204e9800998ecf8427e", - "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "exonGeTrInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "exonInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "geneInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "sjdbInfo.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "sjdbList.fromGTF.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "sjdbList.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "transcriptInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "1": [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ], - "index": [ - [ - { - "id": "test_fasta" - }, - [ - "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", - "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", - "SA:md5,d41d8cd98f00b204e9800998ecf8427e", - "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "exonGeTrInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "exonInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "geneInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "sjdbInfo.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "sjdbList.fromGTF.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "sjdbList.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e", - "transcriptInfo.tab:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T14:55:57.247585" - }, - "fasta_stub": { - "content": [ - { - "0": [ - [ - { - "id": "test_fasta" - }, - [ - "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", - "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", - "SA:md5,d41d8cd98f00b204e9800998ecf8427e", - "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "1": [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ], - "index": [ - [ - { - "id": "test_fasta" - }, - [ - "Genome:md5,d41d8cd98f00b204e9800998ecf8427e", - "Log.out:md5,d41d8cd98f00b204e9800998ecf8427e", - "SA:md5,d41d8cd98f00b204e9800998ecf8427e", - "SAindex:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrName.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrNameLength.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "chrStart.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "genomeParameters.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - ], - "versions": [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T14:56:07.01742" - }, - "fasta": { - "content": [ - "[Genome, Log.out, SA, SAindex, chrLength.txt, chrName.txt, chrNameLength.txt, chrStart.txt, genomeParameters.txt]", - [ - "versions.yml:md5,46b8f1f34bb7f23892cd1eb249ed4d7f" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T14:55:45.48784" - } -} \ No newline at end of file diff --git a/modules/nf-core/star/genomegenerate/tests/tags.yml b/modules/nf-core/star/genomegenerate/tests/tags.yml deleted file mode 100644 index 79f619b..0000000 --- a/modules/nf-core/star/genomegenerate/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -star/genomegenerate: - - modules/nf-core/star/genomegenerate/** diff --git a/modules/nf-core/tsebra/environment.yml b/modules/nf-core/tsebra/environment.yml deleted file mode 100644 index 657cd82..0000000 --- a/modules/nf-core/tsebra/environment.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -name: "tsebra" -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - "bioconda::tsebra=1.1.2.5" diff --git a/modules/nf-core/tsebra/main.nf b/modules/nf-core/tsebra/main.nf deleted file mode 100644 index 2b0673a..0000000 --- a/modules/nf-core/tsebra/main.nf +++ /dev/null @@ -1,62 +0,0 @@ -process TSEBRA { - tag "$meta.id" - label 'process_single' - - // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tsebra:1.1.2.5--pyhca03a8a_0': - 'biocontainers/tsebra:1.1.2.5--pyhca03a8a_0' }" - - input: - tuple val(meta), path(gtfs) - path hints_files - path keep_gtfs - path config - - output: - tuple val(meta), path("*.gtf"), emit: tsebra_gtf - tuple val(meta), path("*.tsv"), emit: tsebra_scores - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def gtf_arg = '-g ' + gtfs.collect { "$it" }.join(',') - def hints_arg = '-e ' + hints_files.collect { "$it" }.join(',') - def keep_arg = keep_gtfs ? ( '-k ' + keep_gtfs.collect { "$it" }.join(',') ) : '' - def config_arg = config ? "-c $config" : '' - def VERSION = '1.1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - tsebra.py \\ - $gtf_arg \\ - $hints_arg \\ - $keep_arg \\ - $config_arg \\ - $args \\ - -o ${prefix}.gtf \\ - -s ${prefix}.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - tsebra: $VERSION - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '1.1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - """ - touch ${prefix}.gtf - touch ${prefix}.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - tsebra: $VERSION - END_VERSIONS - """ -} diff --git a/modules/nf-core/tsebra/meta.yml b/modules/nf-core/tsebra/meta.yml deleted file mode 100644 index 18660d4..0000000 --- a/modules/nf-core/tsebra/meta.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -name: "tsebra" -description: Transcript Selector for BRAKER TSEBRA combines gene predictions by selecing transcripts based on their extrisic evidence support -keywords: - - genomics - - transcript - - selector - - gene - - prediction - - evidence -tools: - - "tsebra": - description: TSEBRA is a combiner tool that selects transcripts from gene predictions based on the support by extrisic evidence in form of introns and start/stop codons - homepage: "https://github.com/Gaius-Augustus/TSEBRA" - documentation: "https://github.com/Gaius-Augustus/TSEBRA" - tool_dev_url: "https://github.com/Gaius-Augustus/TSEBRA" - doi: "10.1186/s12859-021-04482-0" - licence: ["Artistic-2.0"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - gtfs: - type: list - description: List of gene prediction files in gtf - pattern: "*.gtf" - - hints_files: - type: list - description: List of files containing extrinsic evidence in gff - pattern: "*.gff" - - keep_gtfs: - type: list - description: | - List of gene prediction files in gtf. These gene sets are used the same way as other inputs, but TSEBRA ensures that all - transcripts from these gene sets are included in the output - pattern: "*.gtf" - - config: - type: file - description: Configuration file that sets the parameter for TSEBRA - pattern: "*.cfg" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'sample1' ]` - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - tsebra_gtf: - type: file - description: Output file for the combined gene predictions in gtf - pattern: "*.gtf" - - tsebra_scores: - type: file - description: Transcript scores as a table - pattern: "*.tsv" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/modules/nf-core/tsebra/tests/main.nf.test b/modules/nf-core/tsebra/tests/main.nf.test deleted file mode 100644 index 6e45110..0000000 --- a/modules/nf-core/tsebra/tests/main.nf.test +++ /dev/null @@ -1,91 +0,0 @@ -nextflow_process { - - name "Test Process TSEBRA" - script "../main.nf" - process "TSEBRA" - - tag "modules" - tag "modules_nfcore" - tag "tsebra" - tag "gunzip" - - test("actinidia_chinensis-genome") { - - setup { - run('GUNZIP', alias: 'GUNZIP_GTF') { - script "../../../nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.gtf.gz', checkIfExists: true) - ] - """ - } - } - - run('GUNZIP', alias: 'GUNZIP_HINTS') { - script "../../../nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.hints.gff.gz', checkIfExists: true) - ] - """ - } - } - } - - when { - process { - """ - input[0] = GUNZIP_GTF.out.gunzip.map { meta, gtf -> [ meta, [ gtf ] ] } - input[1] = GUNZIP_HINTS.out.gunzip.map { meta, gff -> [ gff ] } - input[2] = [] - input[3] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("actinidia_chinensis-genome-stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.gtf.gz', checkIfExists: true) ] - ] - input[1] = [ - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.hints.gff.gz', checkIfExists: true) - ] - input[2] = [] - input[3] = [] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} diff --git a/modules/nf-core/tsebra/tests/main.nf.test.snap b/modules/nf-core/tsebra/tests/main.nf.test.snap deleted file mode 100644 index bbe880d..0000000 --- a/modules/nf-core/tsebra/tests/main.nf.test.snap +++ /dev/null @@ -1,100 +0,0 @@ -{ - "actinidia_chinensis-genome-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,4e3a44cee65282ac56b08e2bbc4f1d46" - ], - "tsebra_gtf": [ - [ - { - "id": "test" - }, - "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tsebra_scores": [ - [ - { - "id": "test" - }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,4e3a44cee65282ac56b08e2bbc4f1d46" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.1" - }, - "timestamp": "2024-05-28T16:27:56.639849" - }, - "actinidia_chinensis-genome": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.gtf:md5,7c781c919e6aa20561f72dea09474f74" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.tsv:md5,ad7bd858c1838b40286609a311f3a891" - ] - ], - "2": [ - "versions.yml:md5,4e3a44cee65282ac56b08e2bbc4f1d46" - ], - "tsebra_gtf": [ - [ - { - "id": "test" - }, - "test.gtf:md5,7c781c919e6aa20561f72dea09474f74" - ] - ], - "tsebra_scores": [ - [ - { - "id": "test" - }, - "test.tsv:md5,ad7bd858c1838b40286609a311f3a891" - ] - ], - "versions": [ - "versions.yml:md5,4e3a44cee65282ac56b08e2bbc4f1d46" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.1" - }, - "timestamp": "2024-05-28T16:27:52.049367" - } -} \ No newline at end of file diff --git a/modules/nf-core/tsebra/tests/tags.yml b/modules/nf-core/tsebra/tests/tags.yml deleted file mode 100644 index c76165b..0000000 --- a/modules/nf-core/tsebra/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -tsebra: - - "modules/nf-core/tsebra/**" diff --git a/modules/nf-core/umitools/extract/environment.yml b/modules/nf-core/umitools/extract/environment.yml deleted file mode 100644 index aab452d..0000000 --- a/modules/nf-core/umitools/extract/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: umitools_extract -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::umi_tools=1.1.5 diff --git a/modules/nf-core/umitools/extract/main.nf b/modules/nf-core/umitools/extract/main.nf deleted file mode 100644 index b97900e..0000000 --- a/modules/nf-core/umitools/extract/main.nf +++ /dev/null @@ -1,74 +0,0 @@ -process UMITOOLS_EXTRACT { - tag "$meta.id" - label "process_single" - label "process_long" - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/umi_tools:1.1.5--py39hf95cd2a_0' : - 'biocontainers/umi_tools:1.1.5--py39hf95cd2a_0' }" - - input: - tuple val(meta), path(reads) - - output: - tuple val(meta), path("*.fastq.gz"), emit: reads - tuple val(meta), path("*.log") , emit: log - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - if (meta.single_end) { - """ - umi_tools \\ - extract \\ - -I $reads \\ - -S ${prefix}.umi_extract.fastq.gz \\ - $args \\ - > ${prefix}.umi_extract.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) - END_VERSIONS - """ - } else { - """ - umi_tools \\ - extract \\ - -I ${reads[0]} \\ - --read2-in=${reads[1]} \\ - -S ${prefix}.umi_extract_1.fastq.gz \\ - --read2-out=${prefix}.umi_extract_2.fastq.gz \\ - $args \\ - > ${prefix}.umi_extract.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) - END_VERSIONS - """ - } - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - if (meta.single_end) { - output_command = "echo '' | gzip > ${prefix}.umi_extract.fastq.gz" - } else { - output_command = "echo '' | gzip > ${prefix}.umi_extract_1.fastq.gz ;" - output_command += "echo '' | gzip > ${prefix}.umi_extract_2.fastq.gz" - } - """ - touch ${prefix}.umi_extract.log - ${output_command} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/umitools/extract/meta.yml b/modules/nf-core/umitools/extract/meta.yml deleted file mode 100644 index 7695b27..0000000 --- a/modules/nf-core/umitools/extract/meta.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: umitools_extract -description: Extracts UMI barcode from a read and add it to the read name, leaving any sample barcode in place -keywords: - - UMI - - barcode - - extract - - umitools -tools: - - umi_tools: - description: > - UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes - documentation: https://umi-tools.readthedocs.io/en/latest/ - license: "MIT" -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: list - description: | - List of input FASTQ files whose UMIs will be extracted. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: > - Extracted FASTQ files. | For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. - pattern: "*.{fastq.gz}" - - log: - type: file - description: Logfile for umi_tools - pattern: "*.{log}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@grst" -maintainers: - - "@drpatelh" - - "@grst" diff --git a/modules/nf-core/umitools/extract/tests/main.nf.test b/modules/nf-core/umitools/extract/tests/main.nf.test deleted file mode 100644 index bb8a065..0000000 --- a/modules/nf-core/umitools/extract/tests/main.nf.test +++ /dev/null @@ -1,106 +0,0 @@ -nextflow_process { - - name "Test Process UMITOOLS_EXTRACT" - script "../main.nf" - process "UMITOOLS_EXTRACT" - config "./nextflow.config" - tag "modules_nfcore" - tag "modules" - tag "umitools" - tag "umitools/extract" - - test("single end") { - - when { - process { - """ - input[0] = [ [ id:'test', 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 snapshot( - process.out.reads.collect { it.collect { it instanceof Map ? it : file(it).name }}, - process.out.log.collect { it.collect { it instanceof Map ? it : file(it).name }}, - process.out.versions - ).match() } - ) - } - } - - test("single end - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ [ id:'test', 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 snapshot(process.out).match() } - ) - } - } - - test("pair end") { - - when { - process { - """ - input[0] = [ [ 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( - file(process.out.reads[0][1][0]).name, - file(process.out.reads[0][1][1]).name, - process.out.log.collect { it.collect { it instanceof Map ? it : file(it).name }}, - process.out.versions - ).match() } - ) - } - } - - test("pair end - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ [ 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() } - ) - } - } -} \ No newline at end of file diff --git a/modules/nf-core/umitools/extract/tests/main.nf.test.snap b/modules/nf-core/umitools/extract/tests/main.nf.test.snap deleted file mode 100644 index b115905..0000000 --- a/modules/nf-core/umitools/extract/tests/main.nf.test.snap +++ /dev/null @@ -1,167 +0,0 @@ -{ - "pair end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.umi_extract_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.umi_extract_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,568d243174c081a0301e74ed42e59b48" - ], - "log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.umi_extract_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.umi_extract_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "versions": [ - "versions.yml:md5,568d243174c081a0301e74ed42e59b48" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-02T15:05:20.008312" - }, - "single end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.umi_extract.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,568d243174c081a0301e74ed42e59b48" - ], - "log": [ - [ - { - "id": "test", - "single_end": true - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.umi_extract.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "versions": [ - "versions.yml:md5,568d243174c081a0301e74ed42e59b48" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-02T15:04:12.145999" - }, - "pair end": { - "content": [ - "test.umi_extract_1.fastq.gz", - "test.umi_extract_2.fastq.gz", - [ - [ - { - "id": "test", - "single_end": false - }, - "test.umi_extract.log" - ] - ], - [ - "versions.yml:md5,568d243174c081a0301e74ed42e59b48" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-02T15:21:09.578031" - }, - "single end": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.umi_extract.fastq.gz" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.umi_extract.log" - ] - ], - [ - "versions.yml:md5,568d243174c081a0301e74ed42e59b48" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-07-02T15:03:52.464606" - } -} \ No newline at end of file diff --git a/modules/nf-core/umitools/extract/tests/nextflow.config b/modules/nf-core/umitools/extract/tests/nextflow.config deleted file mode 100644 index c866f5a..0000000 --- a/modules/nf-core/umitools/extract/tests/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: UMITOOLS_EXTRACT { - ext.args = '--bc-pattern="NNNN"' - } - -} diff --git a/modules/nf-core/umitools/extract/tests/tags.yml b/modules/nf-core/umitools/extract/tests/tags.yml deleted file mode 100644 index c3fb23d..0000000 --- a/modules/nf-core/umitools/extract/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -umitools/extract: - - modules/nf-core/umitools/extract/** diff --git a/nextflow.config b/nextflow.config index 57d8d4e..49104dd 100644 --- a/nextflow.config +++ b/nextflow.config @@ -1,107 +1,270 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + PlantandFoodResearch/genepal Nextflow config file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Default config options for all compute environments +---------------------------------------------------------------------------------------- +*/ + +// Global default params, used in configs params { - // Input/output options - input = null - protein_evidence = null - eggnogmapper_db_dir = null - eggnogmapper_tax_scope = 1 - rna_evidence = null - liftoff_annotations = null - orthofinder_annotations = null - outdir = "./results" - - // Repeat annotation options - repeat_annotator = 'repeatmodeler' - save_annotated_te_lib = false - edta_is_sensitive = false - repeatmasker_save_outputs = false - - // RNASeq pre-processing options - skip_fastqc = false - skip_fastp = false - min_trimmed_reads = 10000 - extra_fastp_args = null - save_trimmed = false - remove_ribo_rna = false - save_non_ribo_reads = false - ribo_database_manifest = "${projectDir}/assets/rrna-db-defaults.txt" - - // RNAseq alignment options - star_max_intron_length = 16000 - star_align_extra_args = null - star_save_outputs = false - save_cat_bam = false - - // Annotation options - braker_extra_args = null - braker_save_outputs = false - liftoff_coverage = 0.9 - liftoff_identity = 0.9 - allow_isoforms = true - enforce_full_intron_support = true - filter_liftoff_by_hints = true - eggnogmapper_evalue = 0.00001 - eggnogmapper_pident = 35 - eggnogmapper_purge_nohits = false - - // Evaluation options - busco_skip = false - busco_lineage_datasets = 'eukaryota_odb10' - - // Max job request options - max_cpus = 12 - max_memory = '72.GB' - max_time = '7.day' - - // Infrastructure options - validationSkipDuplicateCheck= true - validationS3PathCheck = true + + // TODO nf-core: Specify your pipeline's command line flags + // Input options + input = null + + // MultiQC options + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null + + // Boilerplate options + outdir = null + publish_dir_mode = 'copy' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = null + help = 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_contact = null + config_profile_url = null + + // Max resource options + // Defaults only, expecting to be overwritten + max_memory = '128.GB' + max_cpus = 16 + max_time = '240.h' + + // Schema validation default options + validationFailUnrecognisedParams = false + validationLenientMode = false + validationSchemaIgnoreParams = 'genomes,igenomes_base' + validationShowHiddenParams = false + validate_params = true + } -includeConfig './conf/base.config' +// 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 PlantandFoodResearch/genepal custom profiles from different institutions. +try { + includeConfig "${params.custom_config_base}/pipeline/genepal.config" +} catch (Exception e) { + System.err.println("WARNING: Could not load nf-core/config/genepal profiles: ${params.custom_config_base}/pipeline/genepal.config") +} profiles { - apptainer { - apptainer.enabled = true - apptainer.autoMounts = true - apptainer.registry = 'quay.io' + debug { + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false + nextflow.enable.configProcessNamesValidation = true + } + conda { + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda', 'defaults'] + apptainer.enabled = false + } + mamba { + 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.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' - docker.registry = 'quay.io' } - - test { includeConfig 'conf/test.config' } + singularity { + 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 + conda.enabled = false + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + } + shifter { + 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 + 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 = 4 + executor.memory = 8.GB + } + test { includeConfig 'conf/test.config' } + test_full { includeConfig 'conf/test_full.config' } } +// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile +// Will not be used unless Apptainer / Docker / Podman / Singularity are enabled +// Set to your registry if you have a mirror of containers +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' + +// Nextflow plugins plugins { - id 'nf-validation@1.1.3' + id 'nf-validation@1.1.3' // Validation of pipeline parameters and creation of an input channel from a sample sheet } -def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') +// 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. + +env { + PYTHONNOUSERSITE = 1 + R_PROFILE_USER = "/.Rprofile" + R_ENVIRON_USER = "/.Renviron" + JULIA_DEPOT_PATH = "/usr/local/share/julia" +} + +// Capture exit codes from upstream processes when piping +process.shell = ['/bin/bash', '-euo', 'pipefail'] + +// Disable process selector warnings by default. Use debug profile to enable warnings. +nextflow.enable.configProcessNamesValidation = false + +def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') timeline { - enabled = true - file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html" + enabled = true + file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html" } report { - enabled = true - file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html" + enabled = true + file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html" } trace { - enabled = true - file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt" + enabled = true + file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt" +} +dag { + enabled = true + file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html" } manifest { - name = 'genepal' - author = """Usman Rashid, Jason Shiller""" - homePage = 'https://github.com/PlantandFoodResearch/genepal' - description = """A NextFlow pipeline for single genome and pan-genome annotation""" - mainScript = 'main.nf' - nextflowVersion = '!>=23.04.4' - version = '0.4.0+dev' - doi = '' + name = 'PlantandFoodResearch/genepal' + author = """Usman Rashid, Jason Shiller""" + homePage = 'https://github.com/PlantandFoodResearch/genepal' + description = """A Nextflow pipeline for single genome and pan-genome annotation""" + mainScript = 'main.nf' + nextflowVersion = '!>=23.04.0' + version = '1.0dev' + doi = '' } -includeConfig './conf/modules.config' +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' + +// 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 + } + } +} diff --git a/nextflow_schema.json b/nextflow_schema.json index 13706a9..e3e0f04 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,258 +1,93 @@ { "$schema": "http://json-schema.org/draft-07/schema", - "$id": "https://raw.githubusercontent.com/plantandfoodresearch/genepal/master/nextflow_schema.json", - "title": "plantandfoodresearch/genepal pipeline parameters", - "description": "A NextFlow pipeline for single genome and pan-genome annotation", + "$id": "https://raw.githubusercontent.com/PlantandFoodResearch/genepal/master/nextflow_schema.json", + "title": "PlantandFoodResearch/genepal pipeline parameters", + "description": "A Nextflow pipeline for single genome and pan-genome annotation", "type": "object", "definitions": { "input_output_options": { "title": "Input/output options", "type": "object", "fa_icon": "fas fa-terminal", - "description": "", - "required": ["input", "protein_evidence", "outdir"], + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir"], "properties": { "input": { "type": "string", "format": "file-path", - "mimetype": "text/csv", + "exists": true, "schema": "assets/schema_input.json", - "pattern": "^\\S+\\.csv$", - "description": "Target assemblies listed in a CSV sheet", - "fa_icon": "fas fa-file-csv" - }, - "protein_evidence": { - "type": "string", - "description": "Protein evidence provided as a fasta file or multiple fasta files listed in a plain txt file", - "format": "file-path", - "pattern": "^\\S+\\.(txt|fa|faa|fna|fsa|fas|fasta)(\\.gz)?$", - "fa_icon": "far fa-file-alt" - }, - "eggnogmapper_db_dir": { - "type": "string", - "description": "Eggnogmapper database directory", - "format": "directory-path" - }, - "eggnogmapper_tax_scope": { - "type": "integer", - "description": "Eggnogmapper taxonomy scopre. Eukaryota: 2759, Viridiplantae: 33090, Archaea: 2157, Bacteria: 2, root: 1", - "minimum": 1, - "default": 1 - }, - "rna_evidence": { - "type": "string", - "format": "file-path", - "mimetype": "text/csv", - "schema": "assets/schema_rna.json", - "pattern": "^\\S+\\.csv$", - "fa_icon": "fas fa-file-csv", - "description": "FASTQ/BAM samples listed in a CSV sheet" - }, - "liftoff_annotations": { - "type": "string", - "format": "file-path", "mimetype": "text/csv", - "schema": "assets/schema_liftoff.json", "pattern": "^\\S+\\.csv$", - "description": "Reference annotations listed in a CSV sheet", - "fa_icon": "fas fa-file-csv" - }, - "orthofinder_annotations": { - "type": "string", - "format": "file-path", - "mimetype": "text/csv", - "schema": "/assets/schema_orthofinder.json", - "pattern": "^\\S+\\.csv$", - "description": "Additional annotations for orthology listed in a CSV sheet", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", "fa_icon": "fas fa-file-csv" }, "outdir": { "type": "string", "format": "directory-path", - "description": "The output directory where the results will be saved", - "fa_icon": "fas fa-folder-open", - "default": "./results" - } - } - }, - "repeat_annotation_options": { - "title": "Repeat annotation options", - "type": "object", - "description": "", - "default": "", - "properties": { - "repeat_annotator": { - "type": "string", - "default": "repeatmodeler", - "enum": ["edta", "repeatmodeler"], - "description": "'edta' or 'repeatmodeler'" - }, - "save_annotated_te_lib": { - "type": "boolean", - "description": "Save annotated TE library or not?" - }, - "edta_is_sensitive": { - "type": "boolean", - "description": "Use '--sensitive 1' flag with EDTA or not?" - }, - "repeatmasker_save_outputs": { - "type": "boolean", - "description": "Save the repeat-masked genome or not?" - } - } - }, - "rnaseq_pre_processing_options": { - "title": "RNASeq pre-processing options", - "type": "object", - "description": "", - "default": "", - "properties": { - "skip_fastqc": { - "type": "boolean", - "description": "Skip FASTQC or not?" - }, - "skip_fastp": { - "type": "boolean", - "description": "Skip trimming by FASTQP or not?" - }, - "min_trimmed_reads": { - "type": "integer", - "default": 10000, - "description": "Exclude a sample if its reads after trimming are below this number", - "minimum": 0 + "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" }, - "extra_fastp_args": { + "email": { "type": "string", - "description": "Extra FASTP arguments" - }, - "save_trimmed": { - "type": "boolean", - "description": "Save FASTQ files after trimming or not?" - }, - "remove_ribo_rna": { - "type": "boolean", - "description": "Remove Ribosomal RNA or not?" + "description": "Email address for completion summary.", + "fa_icon": "fas fa-envelope", + "help_text": "Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (`~/.nextflow/config`) then you don't need to specify this on the command line for every run.", + "pattern": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" }, - "save_non_ribo_reads": { - "type": "boolean", - "description": "Save FASTQ files after Ribosomal RNA removal or not?" - }, - "ribo_database_manifest": { + "multiqc_title": { "type": "string", - "default": "${projectDir}/assets/rrna-db-defaults.txt", - "description": "Ribosomal RNA fastas listed in a text sheet", - "format": "file-path", - "mimetype": "text/txt" + "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", + "fa_icon": "fas fa-file-signature" } } }, - "rnaseq_alignment_options": { - "title": "RNAseq alignment options", + "institutional_config_options": { + "title": "Institutional config options", "type": "object", - "description": "", - "default": "", + "fa_icon": "fas fa-university", + "description": "Parameters used to describe centralised config profiles. These should not be edited.", + "help_text": "The centralised nf-core configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", "properties": { - "star_max_intron_length": { - "type": "integer", - "default": 16000, - "minimum": 0, - "description": "Maximum intron length for STAR alignment" - }, - "star_align_extra_args": { + "custom_config_version": { "type": "string", - "description": "EXTRA arguments for STAR" - }, - "star_save_outputs": { - "type": "boolean", - "description": "Save BAM files from STAR or not?" + "description": "Git commit id for Institutional configs.", + "default": "master", + "hidden": true, + "fa_icon": "fas fa-users-cog" }, - "save_cat_bam": { - "type": "boolean", - "description": "SAVE a concatenated BAM file per assembly or not?" - } - } - }, - "annotation_options": { - "title": "Annotation options", - "type": "object", - "description": "", - "default": "", - "properties": { - "braker_extra_args": { + "custom_config_base": { "type": "string", - "description": "Extra arguments for BRAKER" + "description": "Base directory for Institutional configs.", + "default": "https://raw.githubusercontent.com/nf-core/configs/master", + "hidden": true, + "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "fa_icon": "fas fa-users-cog" }, - "braker_save_outputs": { - "type": "boolean", - "description": "Save BRAKER files", - "fa_icon": "fas fa-question-circle" - }, - "liftoff_coverage": { - "type": "number", - "default": 0.9, - "minimum": 0, - "maximum": 1, - "description": "Liftoff coverage parameter" - }, - "liftoff_identity": { - "type": "number", - "default": 0.9, - "description": "Liftoff identity parameter" - }, - "allow_isoforms": { - "type": "boolean", - "default": true, - "description": "Allow multiple isoforms for gene models", - "fa_icon": "fas fa-question-circle" - }, - "enforce_full_intron_support": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-question-circle", - "description": "Require every model to have external evidence for all its introns" - }, - "filter_liftoff_by_hints": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-question-circle", - "description": "Use BRAKER hints to filter Liftoff models" - }, - "eggnogmapper_evalue": { - "type": "number", - "default": 1e-5, - "description": "Only report alignments below or equal the e-value threshold" + "config_profile_name": { + "type": "string", + "description": "Institutional config name.", + "hidden": true, + "fa_icon": "fas fa-users-cog" }, - "eggnogmapper_pident": { - "type": "integer", - "default": 35, - "description": "Only report alignments above or equal to the given percentage of identity (0-100)", - "minimum": 0, - "maximum": 100 + "config_profile_description": { + "type": "string", + "description": "Institutional config description.", + "hidden": true, + "fa_icon": "fas fa-users-cog" }, - "eggnogmapper_purge_nohits": { - "type": "boolean", - "description": "Purge transcripts which do not have a hit against eggnog" - } - } - }, - "evaluation_options": { - "title": "Evaluation options", - "type": "object", - "description": "", - "default": "", - "fa_icon": "fas fa-balance-scale-right", - "properties": { - "busco_skip": { - "type": "boolean", - "fa_icon": "fas fa-fast-forward", - "description": "Skip evaluation by BUSCO" + "config_profile_contact": { + "type": "string", + "description": "Institutional config contact information.", + "hidden": true, + "fa_icon": "fas fa-users-cog" }, - "busco_lineage_datasets": { + "config_profile_url": { "type": "string", - "pattern": "^(\\w+_odb10\\s)*\\w+_odb10$", - "fa_icon": "fas fa-tree", - "description": "BUSCO lineages as a space-separated list: 'fungi_odb10 microsporidia_odb10'", - "default": "eukaryota_odb10" + "description": "Institutional config URL link.", + "hidden": true, + "fa_icon": "fas fa-users-cog" } } }, @@ -261,47 +96,150 @@ "type": "object", "fa_icon": "fab fa-acquisitions-incorporated", "description": "Set the top limit for requested resources for any single job.", + "help_text": "If you are running on a smaller system, a pipeline step requesting more resources than are available may cause the Nextflow to stop the run with an error. These options allow you to cap the maximum resources requested by any single job so that the pipeline will run on your system.\n\nNote that you can not _increase_ the resources requested by any job using these options. For that you will need your own configuration file. See [the nf-core website](https://nf-co.re/usage/configuration) for details.", "properties": { "max_cpus": { "type": "integer", "description": "Maximum number of CPUs that can be requested for any single job.", - "default": 12, + "default": 16, "fa_icon": "fas fa-microchip", - "hidden": true + "hidden": true, + "help_text": "Use to set an upper-limit for the CPU requirement for each process. Should be an integer e.g. `--max_cpus 1`" }, "max_memory": { "type": "string", "description": "Maximum amount of memory that can be requested for any single job.", - "default": "72.GB", + "default": "128.GB", "fa_icon": "fas fa-memory", "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", - "hidden": true + "hidden": true, + "help_text": "Use to set an upper-limit for the memory requirement for each process. Should be a string in the format integer-unit e.g. `--max_memory '8.GB'`" }, "max_time": { "type": "string", "description": "Maximum amount of time that can be requested for any single job.", - "default": "7.day", + "default": "240.h", "fa_icon": "far fa-clock", "pattern": "^(\\d+\\.?\\s*(s|m|h|d|day)\\s*)+$", - "hidden": true + "hidden": true, + "help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '2.h'`" } } }, - "infrastructure_options": { - "title": "Infrastructure options", + "generic_options": { + "title": "Generic options", "type": "object", "fa_icon": "fas fa-file-import", - "description": "", - "help_text": "", + "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": { - "validationSkipDuplicateCheck": { + "help": { "type": "boolean", - "default": true, + "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 + }, + "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 + }, + "email_on_fail": { + "type": "string", + "description": "Email address for completion summary, only when pipeline fails.", + "fa_icon": "fas fa-exclamation-triangle", + "pattern": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$", + "help_text": "An email address to send a summary email to when the pipeline is completed - ONLY sent if the pipeline does not exit successfully.", "hidden": true }, - "validationS3PathCheck": { + "plaintext_email": { "type": "boolean", + "description": "Send plain-text email instead of HTML.", + "fa_icon": "fas fa-remove-format", + "hidden": true + }, + "max_multiqc_email_size": { + "type": "string", + "description": "File size limit when attaching MultiQC reports to summary emails.", + "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", + "default": "25.MB", + "fa_icon": "fas fa-file-upload", + "hidden": true + }, + "monochrome_logs": { + "type": "boolean", + "description": "Do not use coloured log outputs.", + "fa_icon": "fas fa-palette", + "hidden": true + }, + "hook_url": { + "type": "string", + "description": "Incoming hook URL for messaging service", + "fa_icon": "fas fa-people-group", + "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 + }, + "multiqc_logo": { + "type": "string", + "description": "Custom logo file to supply to MultiQC. File name must also be set in the MultiQC config file", + "fa_icon": "fas fa-image", + "hidden": true + }, + "multiqc_methods_description": { + "type": "string", + "description": "Custom MultiQC yaml file containing HTML including a methods description.", + "fa_icon": "fas fa-cog" + }, + "validate_params": { + "type": "boolean", + "description": "Boolean whether to validate parameters against the schema at runtime", "default": true, + "fa_icon": "fas fa-check-square", + "hidden": true + }, + "validationShowHiddenParams": { + "type": "boolean", + "fa_icon": "far fa-eye-slash", + "description": "Show all params when using `--help`", + "hidden": true, + "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters." + }, + "validationFailUnrecognisedParams": { + "type": "boolean", + "fa_icon": "far fa-check-circle", + "description": "Validation of parameters fails when an unrecognised parameter is found.", + "hidden": true, + "help_text": "By default, when an unrecognised parameter is found, it returns a warinig." + }, + "validationLenientMode": { + "type": "boolean", + "fa_icon": "far fa-check-circle", + "description": "Validation of parameters in lenient more.", + "hidden": true, + "help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)." + }, + "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 } } @@ -312,25 +250,13 @@ "$ref": "#/definitions/input_output_options" }, { - "$ref": "#/definitions/repeat_annotation_options" - }, - { - "$ref": "#/definitions/rnaseq_pre_processing_options" - }, - { - "$ref": "#/definitions/rnaseq_alignment_options" - }, - { - "$ref": "#/definitions/annotation_options" - }, - { - "$ref": "#/definitions/evaluation_options" + "$ref": "#/definitions/institutional_config_options" }, { "$ref": "#/definitions/max_job_request_options" }, { - "$ref": "#/definitions/infrastructure_options" + "$ref": "#/definitions/generic_options" } ] } diff --git a/pfr/params.json b/pfr/params.json deleted file mode 100644 index e547f98..0000000 --- a/pfr/params.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "input": "/workspace/genepal/test_data/assemblysheet.csv", - "protein_evidence": "/workspace/genepal/test_data/external-protein-fastas.txt", - "eggnogmapper_db_dir": "/workspace/ComparativeDataSources/emapperdb/5.0.2", - "eggnogmapper_tax_scope": 33090, - "rna_evidence": "/workspace/genepal/test_data/fastqsheet.csv", - "liftoff_annotations": "/workspace/genepal/test_data/liftoffannotations.csv" -} diff --git a/pfr/profile.config b/pfr/profile.config deleted file mode 100644 index 0d40c25..0000000 --- a/pfr/profile.config +++ /dev/null @@ -1,17 +0,0 @@ -profiles { - pfr { - process { - executor = 'slurm' - } - - apptainer { - envWhitelist = "APPTAINER_BINDPATH,APPTAINER_BIND" - cacheDir = "/workspace/genepal/singularity" - } - } -} - -// params { -// config_profile_name = 'Plant&Food profile' -// config_profile_description = 'Plant&Food profile using SLURM in combination with Apptainer' -// } diff --git a/pfr_genepal b/pfr_genepal deleted file mode 100644 index 3da5a74..0000000 --- a/pfr_genepal +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -e - - -#SBATCH --job-name GENEPAL -#SBATCH --time=14-00:00:00 -#SBATCH --nodes=1 -#SBATCH --ntasks=1 -#SBATCH --cpus-per-task=1 -#SBATCH --output pfr_genepal.stdout -#SBATCH --error pfr_genepal.stderr -#SBATCH --mem=4G - -full_test_flag=0 - -# Parse command line options -while getopts "t" opt; do - case ${opt} in - t ) - full_test_flag=1 - ;; - \? ) - echo "Invalid option: $OPTARG" 1>&2 - exit 1 - ;; - esac -done -shift $((OPTIND -1)) - -ml unload perl -ml apptainer/1.1 -ml nextflow/23.04.4 - -export TMPDIR="/workspace/$USER/tmp" -export APPTAINER_BINDPATH="$APPTAINER_BINDPATH,$TMPDIR:$TMPDIR,$TMPDIR:/tmp" - -if [ $full_test_flag -eq 1 ]; then - nextflow \ - main.nf \ - -c pfr/profile.config \ - -profile pfr,apptainer,test_full \ - -resume -else - nextflow \ - main.nf \ - -c pfr/profile.config \ - -profile pfr,apptainer \ - -params-file pfr/params.json \ - -resume -fi diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 5611062..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -# Config file for Python. Mostly used to configure linting of bin/*.py with Ruff. -# Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. -[tool.ruff] -line-length = 120 -target-version = "py38" -cache-dir = "~/.cache/ruff" - -[tool.ruff.lint] -select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"] - -[tool.ruff.lint.isort] -known-first-party = ["nf_core"] - -[tool.ruff.lint.per-file-ignores] -"__init__.py" = ["E402", "F401"] diff --git a/subworkflows/gallvp/fasta_edta_lai/main.nf b/subworkflows/gallvp/fasta_edta_lai/main.nf deleted file mode 100644 index 1d4dd85..0000000 --- a/subworkflows/gallvp/fasta_edta_lai/main.nf +++ /dev/null @@ -1,170 +0,0 @@ -include { CUSTOM_SHORTENFASTAIDS } from '../../../modules/gallvp/custom/shortenfastaids/main' -include { EDTA_EDTA } from '../../../modules/gallvp/edta/edta/main' -include { LTRRETRIEVER_LAI } from '../../../modules/gallvp/ltrretriever/lai/main' -include { CUSTOM_RESTOREGFFIDS } from '../../../modules/gallvp/custom/restoregffids/main' - -workflow FASTA_EDTA_LAI { - - take: - ch_fasta // channel: [ val(meta), fasta ] - ch_monoploid_seqs // channel: [ val(meta2), txt ]; Optional: Set to [] if not needed - // val(meta) from ch_fasta and val(meta2) from ch_monoploid_seqs are - // only required to have the same `id` - skip_lai // val(true|false) - - main: - ch_versions = Channel.empty() - - // Prapre input channels - ch_monoploid_seqs_plain = ( ch_monoploid_seqs ?: Channel.empty() ) - | filter { meta2, seqs -> seqs } - // Cater to channel: [ meta2, [] ] - | map { meta2, seqs -> [ meta2.id, seqs ] } - - // MOUDLE: CUSTOM_SHORTENFASTAIDS - CUSTOM_SHORTENFASTAIDS ( ch_fasta ) - - ch_short_ids_tsv = CUSTOM_SHORTENFASTAIDS.out.short_ids_tsv - ch_shortenfastaids_branch = ch_short_ids_tsv - | branch { meta, tsv -> - change: ! tsv.text.contains('IDs have acceptable length and character') - nonchange: tsv.text.contains('IDs have acceptable length and character') - } - - ch_short_ids_fasta = ch_shortenfastaids_branch.nonchange - | join( - ch_fasta - ) - | map { meta, tsv, fasta -> [ meta, fasta ] } - | mix( - ch_shortenfastaids_branch.change - | join( - CUSTOM_SHORTENFASTAIDS.out.short_ids_fasta - ) - | map { meta, tsv, fasta -> [ meta, fasta ] } - ) - - ch_versions = ch_versions.mix(CUSTOM_SHORTENFASTAIDS.out.versions.first()) - - // collectFile: Map monoploid seqs to short IDs - ch_short_monoploid_seqs = ch_short_ids_tsv - | map { meta, tsv -> [ meta.id, tsv ] } - | join(ch_monoploid_seqs_plain) - | map { id, tsv, seqs -> - map_monoploid_seqs_to_new_ids(id, tsv, seqs) - } - | collectFile(newLine:true) - | map { seqs -> - def id = seqs.name.split('.mapped.monoploid.seqs.txt')[0] - - [ id, seqs ] - } - | join( - ch_short_ids_tsv - | map { meta, tsv -> [ meta.id, meta, tsv ] } - ) - | map { id, seqs, meta, tsv -> [ meta, seqs ] } - - // MODULE: EDTA_EDTA - EDTA_EDTA( - ch_short_ids_fasta, - [], - [], - [], - [] - ) - - ch_pass_list = EDTA_EDTA.out.pass_list - ch_out_file = EDTA_EDTA.out.out_file - ch_pass_out = ch_pass_list.join(ch_out_file) - ch_te_lib_fasta = EDTA_EDTA.out.te_lib_fasta - ch_te_anno_gff3 = EDTA_EDTA.out.te_anno_gff3 - ch_versions = ch_versions.mix(EDTA_EDTA.out.versions.first()) - - ch_short_ids_fasta_mono = ch_short_ids_fasta - | join( - ch_short_monoploid_seqs, - by:0, - remainder: true - ) - // Danger! This partial join can fail - | filter { meta, fasta, seqs -> fasta } - // This filter safeguards against fail on upstream - // process failure: https://github.com/nextflow-io/nextflow/issues/5043 - // fasta may come from upstream processes - // seqs also comes from upstream processes, it is optional - // and may not be present for some of the combinations - | map { meta, fasta, seqs -> [ meta, fasta, seqs ?: [] ] } - - ch_lai_inputs = skip_lai - ? Channel.empty() - : ch_short_ids_fasta_mono - | join( - ch_pass_out - ) - | map { meta, fasta, seqs, pass, out -> - [ meta, fasta, pass, out, seqs ] - } - LTRRETRIEVER_LAI( - ch_lai_inputs.map { meta, fasta, pass, out, seqs -> [ meta, fasta ] }, - ch_lai_inputs.map { meta, fasta, pass, out, seqs -> pass }, - ch_lai_inputs.map { meta, fasta, pass, out, seqs -> out }, - ch_lai_inputs.map { meta, fasta, pass, out, seqs -> seqs } - ) - - ch_lai_log = LTRRETRIEVER_LAI.out.log - ch_lai_out = LTRRETRIEVER_LAI.out.lai_out - ch_versions = ch_versions.mix(LTRRETRIEVER_LAI.out.versions.first()) - - // MODULE: CUSTOM_RESTOREGFFIDS - ch_gff_tsv_branch = ch_te_anno_gff3.join(ch_short_ids_tsv) - | branch { meta, gff, tsv -> - change: ! tsv.text.contains('IDs have acceptable length and character') - nochange: tsv.text.contains('IDs have acceptable length and character') - } - - CUSTOM_RESTOREGFFIDS ( - ch_gff_tsv_branch.change.map { meta, gff, tsv -> [ meta, gff ] }, - ch_gff_tsv_branch.change.map { meta, gff, tsv -> tsv } - ) - - ch_restored_gff = ch_gff_tsv_branch.nochange - | map { meta, gff, tsv -> [ meta, gff ] } - | mix(CUSTOM_RESTOREGFFIDS.out.restored_ids_gff3) - - ch_versions = ch_versions.mix(CUSTOM_RESTOREGFFIDS.out.versions.first()) - - emit: - te_lib_fasta = ch_te_lib_fasta // channel: [ val(meta), fasta ] - te_anno_gff3 = ch_restored_gff // channel: [ val(meta), gff ] - lai_log = ch_lai_log // channel: [ val(meta), log ] - lai_out = ch_lai_out // channel: [ val(meta), out ] - versions = ch_versions // channel: [ versions.yml ] -} - -def map_monoploid_seqs_to_new_ids(id, short_ids_tsv, monoploid_seqs) { - - def short_ids_head = short_ids_tsv.text.tokenize('\n')[0] - - if (short_ids_head == "IDs have acceptable length and character. No change required.") { - return [ "${id}.mapped.monoploid.seqs.txt" ] + monoploid_seqs.text.tokenize('\n') - } - - def orig_to_new_ids = [:] - short_ids_tsv.text.eachLine { line -> - def (original_id, renamed_id) = line.tokenize('\t') - orig_to_new_ids[original_id] = renamed_id - } - - def mapped_ids = [] - monoploid_seqs.text.eachLine { original_id -> - if (!orig_to_new_ids[original_id]) { - error "Faild to find $original_id in ${short_ids_tsv}" + - "\nThe short_ids_tsv file is malformed!" - } - - mapped_ids.add(orig_to_new_ids[original_id]) - } - - return [ "${id}.mapped.monoploid.seqs.txt" ] + mapped_ids -} diff --git a/subworkflows/gallvp/fasta_edta_lai/meta.yml b/subworkflows/gallvp/fasta_edta_lai/meta.yml deleted file mode 100644 index c356ce7..0000000 --- a/subworkflows/gallvp/fasta_edta_lai/meta.yml +++ /dev/null @@ -1,69 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json -name: "fasta_edta_lai" -description: | - Performs extensive de-novo transposable element annotation with EDTA and optionally estimates repeat-space completeness with LAI -keywords: - - genomics - - genome - - annotation - - repeat - - transposons - - stats - - qc -components: - - edta/edta - - custom/restoregffids - - ltrretriever/lai - - custom/shortenfastaids -input: - - ch_fasta: - type: file - description: | - Channel for the assembly fasta file - Structure: [ val(meta), path(fasta) ] - pattern: "*.{fsa/fa/fasta}" - - ch_monoploid_seqs: - type: file - description: | - Channel for providing a list of monoploid sequences - for correct estimation of LAI for polyploid genomes. - This parameter is useful when all the haplotypes are - stored in a single fasta file. - Structure: [ val(meta), path(txt) ] - pattern: "*.txt" - - skip_lai: - type: boolean - description: | - Skip LAI estimation - Structure: [ val(boolean) ] -output: - - te_lib_fasta: - type: file - description: A non-redundant TE library in fasta format - pattern: "*.EDTA.TElib.fa" - - te_anno_gff3: - type: file - description: A gff3 file containing both structurally intact and fragmented TE annotations - pattern: "*.EDTA.TEanno.gff3" - - lai_log: - type: file - description: | - Log from LAI - Structure: [ val(meta), path(log) ] - pattern: "*.LAI.log" - - lai_out: - type: file - description: | - LAI output - Structure: [ val(meta), path(out) ] - pattern: "*.LAI.out" - - versions: - type: file - description: | - File containing software versions - Structure: [ path(versions.yml) ] - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/subworkflows/gallvp/fasta_edta_lai/tests/main.nf.test b/subworkflows/gallvp/fasta_edta_lai/tests/main.nf.test deleted file mode 100644 index 0b56ee5..0000000 --- a/subworkflows/gallvp/fasta_edta_lai/tests/main.nf.test +++ /dev/null @@ -1,79 +0,0 @@ -nextflow_workflow { - - name "Test Workflow FASTA_EDTA_LAI" - script "../main.nf" - workflow "FASTA_EDTA_LAI" - config "./nextflow.config" - - tag "subworkflows" - tag "subworkflows_gallvp" - tag "subworkflows/fasta_edta_lai" - tag "fasta_edta_lai" - tag "modules/nf-core/gunzip" - tag "custom/shortenfastaids" - tag "edta/edta" - tag "ltrretriever/lai" - tag "custom/restoregffids" - - setup { - run("GUNZIP") { - script "../../../../modules/nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz', checkIfExists: true) - ] - """ - } - } - } - - test("actinidia_chinensis-genome_1_fasta_gz") { - - when { - workflow { - """ - input[0] = GUNZIP.out.gunzip - input[1] = [] - input[2] = false - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert file(workflow.out.te_anno_gff3[0][1]).text.contains('Copia_LTR_retrotransposon') }, - { assert file(workflow.out.lai_log[0][1]).text.contains('Calculate LAI:') }, - { assert file(workflow.out.lai_log[0][1]).text.contains('Done!') }, - { assert Math.abs(Float.parseFloat(path(workflow.out.lai_out[0][1]).text.split("\n")[1].split("\t")[6]) - 31.87) <= 2.0 }, - { assert file(workflow.out.te_lib_fasta[0][1]).text.contains('#LTR/Copia') }, - { assert snapshot(workflow.out.versions).match() } - ) - } - } - - test("actinidia_chinensis-genome_1_fasta_gz-stub") { - - options '-stub' - - when { - workflow { - """ - input[0] = GUNZIP.out.gunzip - input[1] = [] - input[2] = false - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } -} \ No newline at end of file diff --git a/subworkflows/gallvp/fasta_edta_lai/tests/main.nf.test.snap b/subworkflows/gallvp/fasta_edta_lai/tests/main.nf.test.snap deleted file mode 100644 index 532ddd5..0000000 --- a/subworkflows/gallvp/fasta_edta_lai/tests/main.nf.test.snap +++ /dev/null @@ -1,101 +0,0 @@ -{ - "actinidia_chinensis-genome_1_fasta_gz-stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.EDTA.TElib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.EDTA.TEanno.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - [ - { - "id": "test" - }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test" - }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,0d4bc49e94acb8995ca552d4e666e3ce", - "versions.yml:md5,65666e975bdfd71978843ca963e84d0c", - "versions.yml:md5,754bb19f86be761d90c002a0af2faf1c" - ], - "lai_log": [ - [ - { - "id": "test" - }, - "test.LAI.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "lai_out": [ - [ - { - "id": "test" - }, - "test.LAI.out:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "te_anno_gff3": [ - [ - { - "id": "test" - }, - "test.EDTA.TEanno.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "te_lib_fasta": [ - [ - { - "id": "test" - }, - "test.EDTA.TElib.fa:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,0d4bc49e94acb8995ca552d4e666e3ce", - "versions.yml:md5,65666e975bdfd71978843ca963e84d0c", - "versions.yml:md5,754bb19f86be761d90c002a0af2faf1c" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-04T14:00:09.252745" - }, - "actinidia_chinensis-genome_1_fasta_gz": { - "content": [ - [ - "versions.yml:md5,0d4bc49e94acb8995ca552d4e666e3ce", - "versions.yml:md5,65666e975bdfd71978843ca963e84d0c", - "versions.yml:md5,754bb19f86be761d90c002a0af2faf1c" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-10T13:22:28.063183" - } -} \ No newline at end of file diff --git a/subworkflows/gallvp/fasta_edta_lai/tests/nextflow.config b/subworkflows/gallvp/fasta_edta_lai/tests/nextflow.config deleted file mode 100644 index 1fa6315..0000000 --- a/subworkflows/gallvp/fasta_edta_lai/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: EDTA_EDTA { - ext.args = '--anno 1' - } -} diff --git a/subworkflows/gallvp/fasta_gxf_busco_plot/main.nf b/subworkflows/gallvp/fasta_gxf_busco_plot/main.nf deleted file mode 100644 index 3e8ad28..0000000 --- a/subworkflows/gallvp/fasta_gxf_busco_plot/main.nf +++ /dev/null @@ -1,169 +0,0 @@ -include { BUSCO_BUSCO as BUSCO_ASSEMBLY } from '../../../modules/gallvp/busco/busco/main' -include { BUSCO_GENERATEPLOT as PLOT_ASSEMBLY } from '../../../modules/gallvp/busco/generateplot/main' -include { GFFREAD as EXTRACT_PROTEINS } from '../../../modules/gallvp/gffread/main' -include { BUSCO_BUSCO as BUSCO_ANNOTATION } from '../../../modules/gallvp/busco/busco/main' -include { BUSCO_GENERATEPLOT as PLOT_ANNOTATION } from '../../../modules/gallvp/busco/generateplot/main' - -workflow FASTA_GXF_BUSCO_PLOT { - - take: - ch_fasta // channel: [ val(meta), fasta ] - ch_gxf // channel: [ val(meta2), gxf ]; gxf ~ gff | gff3 | gtf - // - // Meta and meta2 should have same id - - val_mode // val(mode); BUSCO mode to apply to ch_fasta - // - genome, for genome assemblies (DNA) - // - transcriptome, for transcriptome assemblies (DNA) - // - proteins, for annotated gene sets (protein) - // - // If mode is genome, annotations from ch_gxf are evaluated with - // mode proteins, otherwise, evaluation of the annotations is skipped - // - val_lineages // [ val(lineage) ] - val_busco_lineages_path // val(path); Optional; Set to [] if not needed - val_busco_config // val(path); Optional; Set to [] if not needed - - main: - ch_versions = Channel.empty() - ch_db_path = val_busco_lineages_path - ? Channel.of(file(val_busco_lineages_path, checkIfExists: true)) - : Channel.of(null) - ch_config_path = val_busco_config - ? Channel.of(file(val_busco_config, checkIfExists: true)) - : Channel.of(null) - - // MODULE: BUSCO_BUSCO as BUSCO_ASSEMBLY - ch_busco_assembly_inputs = ch_fasta - | combine( - Channel.of(val_mode) - ) - | combine( - Channel.fromList(val_lineages) - ) - | map { meta, fasta, mode, lineage -> - [ - meta + [ mode:mode, lineage:lineage ], - fasta, mode, lineage - ] - } - | combine( - ch_db_path - ) - | combine( - ch_config_path - ) - - BUSCO_ASSEMBLY( - ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> [ meta, fasta ] }, - ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> mode }, - ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> lineage }, - ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> db ?: [] }, - ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> config ?: [] } - ) - - ch_assembly_batch_summary = BUSCO_ASSEMBLY.out.batch_summary - ch_assembly_short_summaries_txt = BUSCO_ASSEMBLY.out.short_summaries_txt - ch_assembly_short_summaries_json = BUSCO_ASSEMBLY.out.short_summaries_json - ch_versions = ch_versions.mix(BUSCO_ASSEMBLY.out.versions.first()) - - // MODULE: BUSCO_GENERATEPLOT as PLOT_ASSEMBLY - ch_assembly_plot_inputs = ch_assembly_short_summaries_txt - | map { meta, txt -> - def lineage_name = meta.lineage.split('_odb')[0] - [ - "short_summary.specific.${meta.lineage}.${meta.id}_${lineage_name}.txt", - txt.text - ] - } - | collectFile - | collect - - PLOT_ASSEMBLY( ch_assembly_plot_inputs ) - - ch_assembly_png = PLOT_ASSEMBLY.out.png - ch_versions = ch_versions.mix(PLOT_ASSEMBLY.out.versions) - - // MODULE: GFFREAD as EXTRACT_PROTEINS - ch_gffread_inputs = ! ( val_mode == 'geno' || val_mode == 'genome' ) - ? Channel.empty() - : ch_fasta - | map { meta, fasta -> [ meta.id, meta, fasta ] } - | join( - ch_gxf.map { meta2, gxf -> [ meta2.id, gxf ] } - // Join with matching annotation - // to allow one annotations per fasta - ) - | map { id, meta, fasta, gxf -> [ meta, gxf, fasta ] } - EXTRACT_PROTEINS( - ch_gffread_inputs.map { meta, gxf, fasta -> [ meta, gxf ] }, - ch_gffread_inputs.map { meta, gxf, fasta -> fasta } - ) - - ch_proteins = EXTRACT_PROTEINS.out.gffread_fasta - ch_versions = ch_versions.mix(EXTRACT_PROTEINS.out.versions.first()) - - // MODULE: BUSCO_BUSCO as BUSCO_ANNOTATION - ch_busco_annotation_inputs = ch_proteins - | combine( - Channel.of('proteins') - ) - | combine( - Channel.fromList(val_lineages) - ) - | map { meta, fasta, mode, lineage -> - [ - meta + [ mode:mode, lineage:lineage ], - fasta, mode, lineage - ] - } - | combine( - ch_db_path - ) - | combine( - ch_config_path - ) - - BUSCO_ANNOTATION( - ch_busco_annotation_inputs.map { meta, fasta, mode, lineage, db, config -> [ meta, fasta ] }, - ch_busco_annotation_inputs.map { meta, fasta, mode, lineage, db, config -> mode }, - ch_busco_annotation_inputs.map { meta, fasta, mode, lineage, db, config -> lineage }, - ch_busco_annotation_inputs.map { meta, fasta, mode, lineage, db, config -> db ?: [] }, - ch_busco_annotation_inputs.map { meta, fasta, mode, lineage, db, config -> config ?: [] } - ) - - ch_annotation_batch_summary = BUSCO_ANNOTATION.out.batch_summary - ch_annotation_short_summaries_txt = BUSCO_ANNOTATION.out.short_summaries_txt - ch_annotation_short_summaries_json = BUSCO_ANNOTATION.out.short_summaries_json - ch_versions = ch_versions.mix(BUSCO_ANNOTATION.out.versions.first()) - - // MODULE: BUSCO_GENERATEPLOT as PLOT_ANNOTATION - ch_annotation_plot_inputs = ch_annotation_short_summaries_txt - | map { meta, txt -> - def lineage_name = meta.lineage.split('_odb')[0] - [ - "short_summary.specific.${meta.lineage}.${meta.id}_${lineage_name}.txt", - txt.text - ] - } - | collectFile - | collect - - PLOT_ANNOTATION( ch_annotation_plot_inputs ) - - ch_annotation_png = PLOT_ANNOTATION.out.png - ch_versions = ch_versions.mix(PLOT_ANNOTATION.out.versions) - - - emit: - assembly_batch_summary = ch_assembly_batch_summary // channel: [ meta3, txt ]; meta3 ~ meta + [ val(mode), val(lineage) ] - assembly_short_summaries_txt = ch_assembly_short_summaries_txt // channel: [ meta3, txt ] - assembly_short_summaries_json = ch_assembly_short_summaries_json // channel: [ meta3, json ] - assembly_png = ch_assembly_png // channel: [ png ] - annotation_batch_summary = ch_annotation_batch_summary // channel: [ meta3, txt ] - annotation_short_summaries_txt = ch_annotation_short_summaries_txt // channel: [ meta3, txt ] - annotation_short_summaries_json = ch_annotation_short_summaries_json // channel: [ meta3, json ] - annotation_png = ch_annotation_png // channel: [ png ] - versions = ch_versions // channel: [ versions.yml ] -} - diff --git a/subworkflows/gallvp/fasta_gxf_busco_plot/meta.yml b/subworkflows/gallvp/fasta_gxf_busco_plot/meta.yml deleted file mode 100644 index 9226357..0000000 --- a/subworkflows/gallvp/fasta_gxf_busco_plot/meta.yml +++ /dev/null @@ -1,106 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json -name: "fasta_gxf_busco_plot" -description: | - Runs BUSCO for input assemblies and their annotations in GFF/GFF3/GTF format, and creates summary plots using `BUSCO/generate_plot.py` script -keywords: - - genome - - annotation - - busco - - plot -components: - - busco/busco - - busco/generateplot - - gffread -input: - - ch_fasta: - type: file - description: | - Channel containing FASTA files - Structure:[ val(meta), fasta ] - pattern: "*.{fa,faa,fsa,fas,fasta}(.gz)?" - - ch_gxf: - type: file - description: | - Channel containing GFF/GFF3/GTF files - Structure:[ val(meta2), gxf ] - pattern: "*.{gff,gff3,gtf}" - - val_mode: - type: string - description: | - String containing BUSCO mode to apply to ch_fasta files - Structure:val(mode) - - val_lineages: - type: array - description: | - Array of strings representing BUSCO lineage datasets - Structure:[ val(lineage) ] - - val_busco_lineages_path: - type: path - description: | - Path where BUSCO lineages are located or downloaded if not already there. If this input is `[]`, - BUSCO will download the datasets in the task work directory - Structure:val(busco_lineages_path) - - val_busco_config: - type: path - description: | - Path to BUSCO config. It is optional and can be set to `[]` - Structure:val(busco_config) -output: - - assembly_batch_summary: - type: file - description: | - Channel containing BUSCO batch summaries corresponding to fasta files - Structure: [ val(meta), txt ] - pattern: "*.txt" - - assembly_short_summaries_txt: - type: file - description: | - Channel containing BUSCO short summaries corresponding to fasta files - Structure: [ val(meta), txt ] - pattern: "*.txt" - - assembly_short_summaries_json: - type: file - description: | - Channel containing BUSCO short summaries corresponding to fasta files - Structure: [ val(meta), json ] - pattern: "*.json" - - assembly_png: - type: file - description: | - Channel containing summary plot for assemblies - Structure: png - pattern: "*.png" - - annotation_batch_summary: - type: file - description: | - Channel containing BUSCO batch summaries corresponding to annotation files - Structure: [ val(meta), txt ] - pattern: "*.txt" - - annotation_short_summaries_txt: - type: file - description: | - Channel containing BUSCO short summaries corresponding to annotation files - Structure: [ val(meta), txt ] - pattern: "*.txt" - - annotation_short_summaries_json: - type: file - description: | - Channel containing BUSCO short summaries corresponding to annotation files - Structure: [ val(meta), json ] - pattern: "*.json" - - annotation_png: - type: file - description: | - Channel containing summary plot for annotations - Structure: png - pattern: "*.png" - - versions: - type: file - description: | - File containing software versions - Structure: [ path(versions.yml) ] - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/subworkflows/gallvp/fasta_gxf_busco_plot/tests/main.nf.test b/subworkflows/gallvp/fasta_gxf_busco_plot/tests/main.nf.test deleted file mode 100644 index 783be86..0000000 --- a/subworkflows/gallvp/fasta_gxf_busco_plot/tests/main.nf.test +++ /dev/null @@ -1,104 +0,0 @@ -nextflow_workflow { - - name "Test Subworkflow FASTA_GXF_BUSCO_PLOT" - script "../main.nf" - workflow "FASTA_GXF_BUSCO_PLOT" - config './nextflow.config' - - tag "subworkflows" - tag "subworkflows_gallvp" - tag "subworkflows/fasta_gxf_busco_plot" - tag "busco" - tag "busco/busco" - tag "busco/generateplot" - tag "gffread" - - test("candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome") { - - when { - workflow { - """ - input[0] = Channel.of( - [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/genome.fasta', checkIfExists: true) - ], - [ - [ id:'test2' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) - ] - ) - input[1] = Channel.of( - [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true) - ] - ) - input[2] = 'genome' - input[3] = [ 'bacteria_odb10', 'archaea_odb10' ] - input[4] = [] - input[5] = [] - """ - } - } - - then { - assertAll( - { assert workflow.success}, - { assert snapshot( - workflow.out.assembly_batch_summary, - workflow.out.annotation_batch_summary, - workflow.out.versions, - ).match() - }, - - { assert workflow.out.assembly_png != null }, - { assert workflow.out.annotation_png != null }, - - { assert workflow.out.assembly_short_summaries_json != null }, - { assert workflow.out.assembly_short_summaries_txt != null }, - { assert workflow.out.annotation_short_summaries_json != null }, - { assert workflow.out.annotation_short_summaries_txt != null } - ) - } - } - - test("candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome - stub") { - - options '-stub' - - when { - workflow { - """ - input[0] = Channel.of( - [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/genome.fasta', checkIfExists: true) - ], - [ - [ id:'test2' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) - ] - ) - input[1] = Channel.of( - [ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true) - ] - ) - input[2] = 'genome' - input[3] = [ 'bacteria_odb10', 'archaea_odb10' ] - input[4] = [] - input[5] = [] - """ - } - } - - then { - assertAll( - { assert workflow.success}, - { assert snapshot(workflow.out).match()} - ) - } - } -} diff --git a/subworkflows/gallvp/fasta_gxf_busco_plot/tests/main.nf.test.snap b/subworkflows/gallvp/fasta_gxf_busco_plot/tests/main.nf.test.snap deleted file mode 100644 index 118ad7e..0000000 --- a/subworkflows/gallvp/fasta_gxf_busco_plot/tests/main.nf.test.snap +++ /dev/null @@ -1,231 +0,0 @@ -{ - "candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "mode": "genome", - "lineage": "archaea_odb10" - }, - "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test", - "mode": "genome", - "lineage": "bacteria_odb10" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test2", - "mode": "genome", - "lineage": "archaea_odb10" - }, - "test2-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test2", - "mode": "genome", - "lineage": "bacteria_odb10" - }, - "test2-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "mode": "proteins", - "lineage": "archaea_odb10" - }, - "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test", - "mode": "proteins", - "lineage": "bacteria_odb10" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "5": [ - - ], - "6": [ - - ], - "7": [ - - ], - "8": [ - "versions.yml:md5,36b11c442943567e471af0abd474a10b", - "versions.yml:md5,9435355f913e283f60b4fb7ef77dd52a", - "versions.yml:md5,e9d65e2f2f13175e99c5b7f4ae1013b9" - ], - "annotation_batch_summary": [ - [ - { - "id": "test", - "mode": "proteins", - "lineage": "archaea_odb10" - }, - "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test", - "mode": "proteins", - "lineage": "bacteria_odb10" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "annotation_png": [ - - ], - "annotation_short_summaries_json": [ - - ], - "annotation_short_summaries_txt": [ - - ], - "assembly_batch_summary": [ - [ - { - "id": "test", - "mode": "genome", - "lineage": "archaea_odb10" - }, - "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test", - "mode": "genome", - "lineage": "bacteria_odb10" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test2", - "mode": "genome", - "lineage": "archaea_odb10" - }, - "test2-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ], - [ - { - "id": "test2", - "mode": "genome", - "lineage": "bacteria_odb10" - }, - "test2-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "assembly_png": [ - - ], - "assembly_short_summaries_json": [ - - ], - "assembly_short_summaries_txt": [ - - ], - "versions": [ - "versions.yml:md5,36b11c442943567e471af0abd474a10b", - "versions.yml:md5,9435355f913e283f60b4fb7ef77dd52a", - "versions.yml:md5,e9d65e2f2f13175e99c5b7f4ae1013b9" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-13T16:39:45.021811" - }, - "candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome": { - "content": [ - [ - [ - { - "id": "test", - "mode": "genome", - "lineage": "archaea_odb10" - }, - "test-archaea_odb10-busco.batch_summary.txt:md5,1397d74518a776ad75b16a843bc5b6c1" - ], - [ - { - "id": "test", - "mode": "genome", - "lineage": "bacteria_odb10" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,a1186bc25448ac1949bf7790810f7161" - ], - [ - { - "id": "test2", - "mode": "genome", - "lineage": "archaea_odb10" - }, - "test2-archaea_odb10-busco.batch_summary.txt:md5,946582b353a8dba7d6452a71856eca06" - ], - [ - { - "id": "test2", - "mode": "genome", - "lineage": "bacteria_odb10" - }, - "test2-bacteria_odb10-busco.batch_summary.txt:md5,21b3fb771cf36be917cc451540d999be" - ] - ], - [ - [ - { - "id": "test", - "mode": "proteins", - "lineage": "archaea_odb10" - }, - "test-archaea_odb10-busco.batch_summary.txt:md5,95172bd5b1a30e632fc79084ea0ca585" - ], - [ - { - "id": "test", - "mode": "proteins", - "lineage": "bacteria_odb10" - }, - "test-bacteria_odb10-busco.batch_summary.txt:md5,995127c0caecb36205dbf21aa2f9f8a8" - ] - ], - [ - "versions.yml:md5,05d8022e3afb0d5642ed17147b991730", - "versions.yml:md5,36b11c442943567e471af0abd474a10b", - "versions.yml:md5,53987b35fc275297efdaf525937fdca3", - "versions.yml:md5,9435355f913e283f60b4fb7ef77dd52a", - "versions.yml:md5,e9d65e2f2f13175e99c5b7f4ae1013b9" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-13T16:39:04.376704" - } -} \ No newline at end of file diff --git a/subworkflows/gallvp/fasta_gxf_busco_plot/tests/nextflow.config b/subworkflows/gallvp/fasta_gxf_busco_plot/tests/nextflow.config deleted file mode 100644 index ddbc644..0000000 --- a/subworkflows/gallvp/fasta_gxf_busco_plot/tests/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - withName: EXTRACT_PROTEINS { - ext.args = '-y' - } -} diff --git a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/main.nf b/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/main.nf deleted file mode 100644 index 57c9297..0000000 --- a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/main.nf +++ /dev/null @@ -1,117 +0,0 @@ -include { AGAT_SPADDINTRONS } from '../../../modules/gallvp/agat/spaddintrons/main' -include { AGAT_SPEXTRACTSEQUENCES } from '../../../modules/gallvp/agat/spextractsequences/main' - -workflow GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES { - - take: - ch_gxf // channel: [ val(meta), gxf ] - ch_fasta // channel: [ val(meta2), fasta ] - - main: - ch_versions = Channel.empty() - - // collectFile: Remove all/partial introns - ch_gxf_purged = ch_gxf - | map { meta, gxf -> - def gxf_lines = gxf.readLines().findAll { line -> - - if ( line.startsWith('#') ) { return true } - - def cols = line.tokenize('\t') - def feat = cols[2].trim().toLowerCase() - - if ( feat == 'intron' ) { return false } - - return true - } - - [ "${meta.id}.nointrons.${gxf.extension}", gxf_lines.join('\n') ] - } - | collectFile - | map { gxf -> [ gxf.baseName.replace('.nointrons', ''), gxf ] } - | join( - ch_gxf.map { meta, gxf -> [ meta.id, meta ] } - ) - | map { id, gxf, meta -> [ meta, gxf ] } - - // MODULE: AGAT_SPADDINTRONS - AGAT_SPADDINTRONS ( ch_gxf_purged, [] ) - - ch_introns_gff = AGAT_SPADDINTRONS.out.gff - ch_versions = ch_versions.mix(AGAT_SPADDINTRONS.out.versions.first()) - - // MODULE: AGAT_SPEXTRACTSEQUENCES - ch_gxf_fasta = ch_introns_gff - | map { meta, gff3 -> [ meta.id, meta, gff3 ] } - | join( - ch_fasta.map { meta2, fasta -> [ meta2.id, fasta ] } - ) - | map { id, meta, gff3, fasta -> [ meta, gff3, fasta ] } - - AGAT_SPEXTRACTSEQUENCES( - ch_gxf_fasta.map { meta, gff3, fasta -> [ meta, gff3 ] }, - ch_gxf_fasta.map { meta, gff3, fasta -> fasta }, - [] // config - ) - - ch_intron_sequences = AGAT_SPEXTRACTSEQUENCES.out.fasta - ch_versions = ch_versions.mix(AGAT_SPEXTRACTSEQUENCES.out.versions.first()) - - // collectFile: splice motifs - ch_splice_motifs = ch_intron_sequences - | map { meta, fasta -> - def splice_motifs = fasta.splitFasta ( record: [id: true, seqString: true] ) - .collect { el -> [ el.id, "${el.seqString[0..1]}${el.seqString[-2..-1]}" ].join('\t') } - - [ "${meta.id}.motifs.tsv", splice_motifs.join('\n') ] - } - | collectFile - | map { tsv -> [ tsv.baseName.replace('.motifs', ''), tsv ] } - | join( - ch_gxf_purged.map { meta, gxf -> [ meta.id, meta ] } - ) - | map { id, tsv, meta -> [ meta, tsv ] } - - // collectFile: Mark gff3 - ch_marked_gff3 = ch_introns_gff - | join ( ch_splice_motifs ) - | map { meta, gff3, tsv -> - def motif_map = [:] - tsv.eachLine { line -> - def cols = line.tokenize('\t') - def id = cols[0] - def motif = cols[1] - - motif_map [ ( id ) ] = motif - } - - def marked_gff3 = gff3.readLines().collect{ line -> - if ( line.startsWith('#') ) { return line } - - def cols = line.tokenize('\t') - def feat = cols[2].trim() - - if ( feat != 'intron' ) { return line } - - def atts = cols[8].trim() - def id = ( atts =~ /ID=([^;]*)/ )[0][1] - - def atts_r = "$atts;splice_motif=${motif_map[id]};canonical_splicing=${motif_map[id]=='GTAG'}" - - return ( cols[0..7] + [ atts_r ] ).join('\t') - } - - [ "${meta.id}.marked.gff3", marked_gff3.join('\n') ] - } - | collectFile - | map { gff3 -> [ gff3.baseName.replace('.marked', ''), gff3 ] } - | join( - ch_gxf_purged.map { meta, gxf -> [ meta.id, meta ] } - ) - | map { id, gff3, meta -> [ meta, gff3 ] } - - emit: - motifs_tsv = ch_splice_motifs // channel: [ val(meta), tsv ] - marked_gff3 = ch_marked_gff3 // channel: [ val(meta), gff3 ] - versions = ch_versions // channel: [ versions.yml ] -} diff --git a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/meta.yml b/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/meta.yml deleted file mode 100644 index 1863d97..0000000 --- a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/meta.yml +++ /dev/null @@ -1,54 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json -name: "gxf_fasta_agat_spaddintrons_spextractsequences" -description: Add introns, extract intron sequences and mark introns with splice motifs -keywords: - - genomics - - gtf - - gff - - fasta - - intron - - extract - - sequence - - mark - - splice - - motif -components: - - agat/spaddintrons - - agat/spextractsequences -input: - - ch_gxf: - type: file - description: | - The input channel containing the GTF/GFF file - Structure: [ val(meta), path(gxf) ] - pattern: "*.{gtf,gff,gff3}" - - ch_fasta: - type: file - description: | - The input channel containing the fasta file - Structure: [ val(meta), path(fasta) ] - pattern: "*.{fa,fas,fsa,faa,fasta}" -output: - - motifs_tsv: - type: file - description: | - The output channel containing the motifs TSV file with first column containing intron ID and - the second column containing the splice motif - Structure: [ val(meta), path(tsv) ] - pattern: "*.motifs.tsv" - - marked_gff3: - type: file - description: | - The output channel containing the GFF3 file with splicing annotation added to it - Structure: [ val(meta), path(gff3) ] - pattern: "*.marked.gff3" - - versions: - type: file - description: | - File containing software versions - Structure: [ path(versions.yml) ] - pattern: "versions.yml" -authors: - - "@GallVp" -maintainers: - - "@GallVp" diff --git a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/main.nf.test b/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/main.nf.test deleted file mode 100644 index f5242c9..0000000 --- a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/main.nf.test +++ /dev/null @@ -1,83 +0,0 @@ -nextflow_workflow { - - name "Test Subworkflow GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES" - script "../main.nf" - workflow "GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES" - config './nextflow.config' - - tag "subworkflows" - tag "subworkflows_gallvp" - tag "subworkflows/gxf_fasta_agat_spaddintrons_spextractsequences" - tag "modules/nf-core/gunzip" - tag "agat/spextractsequences" - tag "agat/spaddintrons" - - setup { - run("GUNZIP", alias: 'GUNZIP_FASTA') { - script "../../../../modules/nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.fasta.gz' , checkIfExists: true) - ] - """ - } - } - - run("GUNZIP", alias: 'GUNZIP_GFF3') { - script "../../../../modules/nf-core/gunzip" - - process { - """ - input[0] = [ - [ id:'test' ], - file(params.modules_testdata_base_path + 'genomics/eukaryotes/actinidia_chinensis/genome/chr1/genome.gff3.gz' , checkIfExists: true) - ] - """ - } - } - } - - - test("actinidia_chinensis - fasta - gff3") { - - when { - workflow { - """ - input[0] = GUNZIP_GFF3.out.gunzip - input[1] = GUNZIP_FASTA.out.gunzip - """ - } - } - - then { - assertAll( - { assert workflow.success}, - { assert snapshot(workflow.out).match()} - ) - } - } - - test("actinidia_chinensis - fasta - gff3 - stub") { - - options '-stub' - - when { - workflow { - """ - input[0] = GUNZIP_GFF3.out.gunzip - input[1] = GUNZIP_FASTA.out.gunzip - """ - } - } - - then { - assertAll( - { assert workflow.success}, - { assert snapshot(workflow.out).match()} - ) - } - } -} diff --git a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/main.nf.test.snap b/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/main.nf.test.snap deleted file mode 100644 index a52bebe..0000000 --- a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/main.nf.test.snap +++ /dev/null @@ -1,104 +0,0 @@ -{ - "actinidia_chinensis - fasta - gff3": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.motifs.tsv:md5,feb30ceeb2662125a80539929f2908c5" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.marked.gff3:md5,ae8800dc42d5da4a94c93cf09d319fc5" - ] - ], - "2": [ - "versions.yml:md5,1befbe41bc7abbf49767b8dc68877bc7", - "versions.yml:md5,65042e008b2466984150cb219a05291c" - ], - "marked_gff3": [ - [ - { - "id": "test" - }, - "test.marked.gff3:md5,ae8800dc42d5da4a94c93cf09d319fc5" - ] - ], - "motifs_tsv": [ - [ - { - "id": "test" - }, - "test.motifs.tsv:md5,feb30ceeb2662125a80539929f2908c5" - ] - ], - "versions": [ - "versions.yml:md5,1befbe41bc7abbf49767b8dc68877bc7", - "versions.yml:md5,65042e008b2466984150cb219a05291c" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-24T16:20:01.32929" - }, - "actinidia_chinensis - fasta - gff3 - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.motifs.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.marked.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,1befbe41bc7abbf49767b8dc68877bc7", - "versions.yml:md5,65042e008b2466984150cb219a05291c" - ], - "marked_gff3": [ - [ - { - "id": "test" - }, - "test.marked.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "motifs_tsv": [ - [ - { - "id": "test" - }, - "test.motifs.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,1befbe41bc7abbf49767b8dc68877bc7", - "versions.yml:md5,65042e008b2466984150cb219a05291c" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-06-24T16:22:01.840388" - } -} \ No newline at end of file diff --git a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/nextflow.config b/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/nextflow.config deleted file mode 100644 index 456093c..0000000 --- a/subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/tests/nextflow.config +++ /dev/null @@ -1,6 +0,0 @@ -process { - - withName: AGAT_SPEXTRACTSEQUENCES { - ext.args = '-t intron' - } -} diff --git a/subworkflows/local/align_rnaseq.nf b/subworkflows/local/align_rnaseq.nf deleted file mode 100644 index 0ad3b59..0000000 --- a/subworkflows/local/align_rnaseq.nf +++ /dev/null @@ -1,81 +0,0 @@ -include { STAR_ALIGN } from '../../modules/nf-core/star/align' -include { SAMTOOLS_CAT } from '../../modules/nf-core/samtools/cat' - -workflow ALIGN_RNASEQ { - take: - reads_target // channel: [ meta, assembly_id ] - trim_reads // channel: [ meta, [ fq ] ] - rna_bam_by_assembly // channel: [ meta, [ bam ] ] - assembly_index // channel: [ meta2, star_index ] - - main: - ch_versions = Channel.empty() - - // MODULE: STAR_ALIGN - ch_star_inputs = reads_target - | combine(trim_reads, by:0) - | map { meta, assembly, fastq -> - [ - assembly, - [ - id: "${meta.id}.on.${assembly}", - single_end: meta.single_end, - target_assembly: assembly - ], - fastq - ] - } - | combine( - assembly_index.map { meta, index -> [ meta.id, index ] }, - by:0 - ) - | map { assembly, meta, fastq, index -> [ meta, fastq, index ] } - - def star_ignore_sjdbgtf = true - def seq_platform = false - def seq_center = false - - STAR_ALIGN( - ch_star_inputs.map { meta, fastq, index -> [ meta, fastq ] }, - ch_star_inputs.map { meta, fastq, index -> [ [ id: meta.target_assembly ], index ] }, - ch_star_inputs.map { meta, fastq, index -> [ [ id: meta.target_assembly ], [] ] }, - star_ignore_sjdbgtf, - seq_platform, - seq_center - ) - - ch_star_bam = STAR_ALIGN.out.bam_sorted - ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) - - // MODULE: SAMTOOLS_CAT - ch_star_bam_branch = ch_star_bam - | map { meta, bam -> - [ - [ id: meta.target_assembly ], - bam instanceof List ? bam.find { it =~ /Aligned/ } : bam - ] - } - | mix ( rna_bam_by_assembly ) - | groupTuple - | map { meta, bams -> [ meta, bams.flatten() ] } - | branch { meta, bamList -> - bams: bamList.size() > 1 - bam: bamList.size() <= 1 - } - - SAMTOOLS_CAT( - ch_star_bam_branch.bams.map { meta, bams -> [ meta, bams.toSorted() ] } - ) - - ch_samtools_bam = SAMTOOLS_CAT.out.bam - | map { meta, bam -> [ meta, [ bam ] ] } - | mix( - ch_star_bam_branch.bam - ) - - ch_versions = ch_versions.mix(SAMTOOLS_CAT.out.versions.first()) - - emit: - bam = ch_samtools_bam // channel: [ [ id: target_assembly, single_end ], [ bam ] ] - versions = ch_versions // channel: [ versions.yml ] -} diff --git a/subworkflows/local/fasta_braker3.nf b/subworkflows/local/fasta_braker3.nf deleted file mode 100644 index dcb0e5d..0000000 --- a/subworkflows/local/fasta_braker3.nf +++ /dev/null @@ -1,65 +0,0 @@ -include { BRAKER3 } from '../../modules/gallvp/braker3' -include { FILE_GUNZIP as BRAKER_GFF3_GUNZIP } from '../../subworkflows/local/file_gunzip' -include { FILE_GUNZIP as BRAKER_HINTS_GUNZIP } from '../../subworkflows/local/file_gunzip' - -workflow FASTA_BRAKER3 { - take: - ch_masked_target_assembly // channel: [ meta, fasta ]; meta ~ [ id: traget_assembly ] - ch_braker_ex_asm_str // channel: val(assembly_x,assembly_y) - ch_rnaseq_bam // channel: [ meta, bam ] - ch_ext_prots_fasta // channel: [ meta2, fasta ]; meta2 ~ [ id: ext_protein_seqs ] - ch_braker_annotation // channel: [ meta, gff3, hints.gff ] - - main: - ch_versions = Channel.empty() - - - ch_braker_inputs = ch_masked_target_assembly - | combine( ch_braker_ex_asm_str ) - | filter { meta, fasta, ex_str -> !( ex_str.split(",").contains( meta.id ) ) } - | map { meta, fasta, ex_str -> - [ meta, fasta ] - } - | join(ch_rnaseq_bam, remainder: true) - | combine( - ch_ext_prots_fasta.map { meta, fasta -> fasta }.ifEmpty(null) - ) - | map { meta, fasta, bam, prots -> [ meta, fasta, bam ?: [], prots ?: [] ] } - - def rnaseq_sets_dirs = [] - def rnaseq_sets_ids = [] - def hintsfile = [] - - // MODULE: BRAKER3 - BRAKER3( - ch_braker_inputs.map { meta, fasta, bam, prots -> [meta, fasta] }, - ch_braker_inputs.map { meta, fasta, bam, prots -> bam }, - rnaseq_sets_dirs, - rnaseq_sets_ids, - ch_braker_inputs.map { meta, fasta, bam, prots -> prots }, - hintsfile - ) - - ch_braker_gff3 = BRAKER3.out.gff3 - | mix( ch_braker_annotation.map { meta, gff3, hints -> [ meta, gff3 ] } ) - ch_braker_hints = BRAKER3.out.hintsfile - | mix( ch_braker_annotation.map { meta, gff3, hints -> [ meta, hints ] } ) - ch_versions = ch_versions.mix(BRAKER3.out.versions.first()) - - // WORKFLOW: FILE_GUNZIP as BRAKER_GFF3_GUNZIP - BRAKER_GFF3_GUNZIP ( ch_braker_gff3 ) - - ch_braker_gff3 = BRAKER_GFF3_GUNZIP.out.gunzip - ch_versions = ch_versions.mix(BRAKER_GFF3_GUNZIP.out.versions) - - // WORKFLOW: FILE_GUNZIP as BRAKER_HINTS_GUNZIP - BRAKER_HINTS_GUNZIP ( ch_braker_hints ) - - ch_braker_hints = BRAKER_HINTS_GUNZIP.out.gunzip - ch_versions = ch_versions.mix(BRAKER_HINTS_GUNZIP.out.versions) - - emit: - braker_gff3 = ch_braker_gff3 // [ meta, gff3 ] - braker_hints = ch_braker_hints // [ meta, hints.gff ] - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/fasta_liftoff.nf b/subworkflows/local/fasta_liftoff.nf deleted file mode 100644 index a46beb3..0000000 --- a/subworkflows/local/fasta_liftoff.nf +++ /dev/null @@ -1,186 +0,0 @@ -include { GUNZIP as GUNZIP_FASTA } from '../../modules/nf-core/gunzip/main' -include { GUNZIP as GUNZIP_GFF } from '../../modules/nf-core/gunzip/main' -include { GFFREAD as GFFREAD_BEFORE_LIFTOFF } from '../../modules/nf-core/gffread/main' -include { LIFTOFF } from '../../modules/nf-core/liftoff/main' -include { AGAT_SPMERGEANNOTATIONS as MERGE_LIFTOFF_ANNOTATIONS } from '../../modules/nf-core/agat/spmergeannotations/main' -include { AGAT_SPFILTERFEATUREFROMKILLLIST } from '../../modules/nf-core/agat/spfilterfeaturefromkilllist/main' -include { GFFREAD as GFFREAD_AFTER_LIFTOFF } from '../../modules/nf-core/gffread/main' -include { GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST } from '../../subworkflows/local/gff_tsebra_spfilterfeaturefromkilllist' - -workflow FASTA_LIFTOFF { - take: - target_assemby // Channel: [ meta, fasta ] - xref_fasta // Channel: [ meta2, fasta ] - xref_gff // Channel: [ meta2, gff3 ] - val_filter_liftoff_by_hints // val(true|false) - braker_hints // [ meta, gff ] - tsebra_config // Channel: [ cfg ] - allow_isoforms // val(true|false) - - - main: - ch_versions = Channel.empty() - - // MODULE: GUNZIP as GUNZIP_FASTA - ch_xref_fasta_branch = xref_fasta - | branch { meta, file -> - gz: "$file".endsWith(".gz") - rest: !"$file".endsWith(".gz") - } - - GUNZIP_FASTA ( ch_xref_fasta_branch.gz ) - - ch_xref_gunzip_fasta = GUNZIP_FASTA.out.gunzip - | mix( - ch_xref_fasta_branch.rest - ) - - ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions.first()) - - // MODULE: GUNZIP as GUNZIP_GFF - ch_xref_gff_branch = xref_gff - | branch { meta, file -> - gz: "$file".endsWith(".gz") - rest: !"$file".endsWith(".gz") - } - - GUNZIP_GFF ( ch_xref_gff_branch.gz ) - - ch_xref_gunzip_gff = GUNZIP_GFF.out.gunzip - | mix( - ch_xref_gff_branch.rest - ) - - ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions.first()) - - // MODULE: GFFREAD as GFFREAD_BEFORE_LIFTOFF - GFFREAD_BEFORE_LIFTOFF ( ch_xref_gunzip_gff, [] ) - - ch_gffread_gff = GFFREAD_BEFORE_LIFTOFF.out.gffread_gff - ch_versions = ch_versions.mix(GFFREAD_BEFORE_LIFTOFF.out.versions.first()) - - // MODULE: LIFTOFF - ch_liftoff_inputs = target_assemby - | combine( - ch_xref_gunzip_fasta - | join( - ch_gffread_gff - ) - ) - | map { meta, target_fa, ref_meta, ref_fa, ref_gff -> - [ - [ - id: "${meta.id}.from.${ref_meta.id}", - target_assemby: meta.id - ], - target_fa, - ref_fa, - ref_gff - ] - } - - LIFTOFF( - ch_liftoff_inputs.map { meta, target_fa, ref_fa, ref_gff -> [ meta, target_fa ] }, - ch_liftoff_inputs.map { meta, target_fa, ref_fa, ref_gff -> ref_fa }, - ch_liftoff_inputs.map { meta, target_fa, ref_fa, ref_gff -> ref_gff }, - [] - ) - - ch_liftoff_gff3 = LIFTOFF.out.polished_gff3 - | map { meta, gff -> [ [ id: meta.target_assemby ], gff ] } - | groupTuple - - ch_versions = ch_versions.mix(LIFTOFF.out.versions.first()) - - // MODULE: AGAT_SPMERGEANNOTATIONS as MERGE_LIFTOFF_ANNOTATIONS - ch_merge_inputs = ch_liftoff_gff3 - | branch { meta, list_polished -> - one: list_polished.size() == 1 - many: list_polished.size() > 1 - } - - MERGE_LIFTOFF_ANNOTATIONS( - ch_merge_inputs.many, - [] - ) - - ch_merged_gff = MERGE_LIFTOFF_ANNOTATIONS.out.gff - | mix( - ch_merge_inputs.one - | map { meta, gffs -> [ meta, gffs[0] ] } - // Unlist the upstream groupTuple - ) - ch_versions = ch_versions.mix(MERGE_LIFTOFF_ANNOTATIONS.out.versions.first()) - - // COLLECTFILE: Kill list for valid_ORF=False transcripts - ch_kill_list = ch_merged_gff - | map { meta, gff -> - - def tx_from_gff = gff.readLines() - .findAll { it -> - if ( it.startsWith('#') ) { return false } - - def cols = it.split('\t') - def feat = cols[2] - if ( ! ( feat == 'transcript' || feat == 'mRNA' ) ) { return false } - - def attrs = cols[8] - attrs.contains('valid_ORF=False') - } - .collect { - def cols = it.split('\t') - def attrs = cols[8] - - def matches = attrs =~ /ID=([^;]*)/ - - return matches[0][1] - } - - [ "${meta.id}.kill.list.txt" ] + tx_from_gff.join('\n') - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.kill.list', '') ], file ] - } - - // MODULE: AGAT_SPFILTERFEATUREFROMKILLLIST - ch_agat_kill_inputs = ch_merged_gff - | join(ch_kill_list) - - - AGAT_SPFILTERFEATUREFROMKILLLIST( - ch_agat_kill_inputs.map { meta, gff, kill -> [ meta, gff ] }, - ch_agat_kill_inputs.map { meta, gff, kill -> kill }, - [] // default config - ) - - ch_liftoff_purged_gff = AGAT_SPFILTERFEATUREFROMKILLLIST.out.gff - ch_versions = ch_versions.mix(AGAT_SPFILTERFEATUREFROMKILLLIST.out.versions.first()) - - // MODULE: GFFREAD as GFFREAD_AFTER_LIFTOFF - GFFREAD_AFTER_LIFTOFF ( ch_liftoff_purged_gff, [] ) - - ch_attr_trimmed_gff = GFFREAD_AFTER_LIFTOFF.out.gffread_gff - ch_versions = ch_versions.mix(GFFREAD_AFTER_LIFTOFF.out.versions.first()) - - // SUBWORKFLOW: GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST - GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST( - val_filter_liftoff_by_hints ? ch_attr_trimmed_gff : Channel.empty(), - braker_hints, - tsebra_config, - allow_isoforms, - 'liftoff' - ) - - ch_tsebra_killed_gff = GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST.out.tsebra_killed_gff - ch_versions = ch_versions.mix(GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST.out.versions) - - // Prepare output channel - ch_output_gff = val_filter_liftoff_by_hints - ? ch_tsebra_killed_gff - : ch_attr_trimmed_gff - - emit: - gff3 = ch_output_gff // [ meta, gff3 ] - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/fasta_orthofinder.nf b/subworkflows/local/fasta_orthofinder.nf deleted file mode 100644 index 715d78e..0000000 --- a/subworkflows/local/fasta_orthofinder.nf +++ /dev/null @@ -1,33 +0,0 @@ -include { FILE_GUNZIP as FASTA_GUNZIP } from '../../subworkflows/local/file_gunzip' -include { ORTHOFINDER } from '../../modules/nf-core/orthofinder/main' - -workflow FASTA_ORTHOFINDER { - take: - ch_pep_fasta // [ meta, fasta ] - ch_external_pep_fasta // [ meta, fasta ] - - main: - ch_versions = Channel.empty() - - // SUBWORKFLOW: FILE_GUNZIP as FASTA_GUNZIP - FASTA_GUNZIP ( ch_external_pep_fasta ) - - ch_fasta_unzipped = FASTA_GUNZIP.out.gunzip - ch_versions = ch_versions.mix(FASTA_GUNZIP.out.versions) - - // MODULE: ORTHOFINDER - ch_orthofinder_peps = ch_fasta_unzipped - | map { meta, fasta -> fasta } - | mix( - ch_pep_fasta.map { meta, fasta -> fasta } - ) - | collect - | filter { it.size() > 1 } - - ORTHOFINDER ( ch_orthofinder_peps.map { fastas -> [ [ id: 'genepal' ], fastas ] } ) - - ch_versions = ch_versions.mix(ORTHOFINDER.out.versions) - - emit: - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/file_gunzip.nf b/subworkflows/local/file_gunzip.nf deleted file mode 100644 index 30f3368..0000000 --- a/subworkflows/local/file_gunzip.nf +++ /dev/null @@ -1,20 +0,0 @@ -include { GUNZIP } from '../../modules/nf-core/gunzip' - -workflow FILE_GUNZIP { - take: - ch_input // channel [ meta, archive ] - - main: - ch_input_branch = ch_input - | branch { meta, archive -> - gz: "$archive".endsWith('.gz') - rest: ! "$archive".endsWith('.gz') - } - - // MODULE: GUNZIP - GUNZIP ( ch_input_branch.gz ) - - emit: - versions = GUNZIP.out.versions.first() - gunzip = GUNZIP.out.gunzip.mix( ch_input_branch.rest ) -} diff --git a/subworkflows/local/gff_eggnogmapper.nf b/subworkflows/local/gff_eggnogmapper.nf deleted file mode 100644 index 841a243..0000000 --- a/subworkflows/local/gff_eggnogmapper.nf +++ /dev/null @@ -1,49 +0,0 @@ -include { GFFREAD as GFF2FASTA_FOR_EGGNOGMAPPER } from '../../modules/nf-core/gffread/main' -include { EGGNOGMAPPER } from '../../modules/nf-core/eggnogmapper/main' - -workflow GFF_EGGNOGMAPPER { - take: - ch_gff // Channel: [ meta, gff ] - ch_fasta // Channel: [ meta, fasta ] - db_folder // val(db_folder) - - main: - // Versions - ch_versions = Channel.empty() - - // MODULE: GFFREAD as GFF2FASTA_FOR_EGGNOGMAPPER - ch_gffread_inputs = ch_gff - | join(ch_fasta) - - GFF2FASTA_FOR_EGGNOGMAPPER( - ch_gffread_inputs.map { meta, gff, fasta -> [ meta, gff ] }, - ch_gffread_inputs.map { meta, gff, fasta -> fasta } - ) - - ch_gffread_fasta = GFF2FASTA_FOR_EGGNOGMAPPER.out.gffread_fasta - ch_versions = ch_versions.mix(GFF2FASTA_FOR_EGGNOGMAPPER.out.versions.first()) - - - ch_eggnogmapper_inputs = ! db_folder - ? Channel.empty() - : ch_gffread_fasta - | combine(Channel.fromPath(db_folder)) - - EGGNOGMAPPER( - ch_eggnogmapper_inputs.map { meta, fasta, db -> [ meta, fasta ] }, - [], - ch_eggnogmapper_inputs.map { meta, fasta, db -> db }, - [ [], [] ] - ) - - ch_eggnogmapper_annotations = EGGNOGMAPPER.out.annotations - ch_eggnogmapper_orthologs = EGGNOGMAPPER.out.orthologs - ch_eggnogmapper_hits = EGGNOGMAPPER.out.hits - ch_versions = ch_versions.mix(EGGNOGMAPPER.out.versions.first()) - - emit: - eggnogmapper_annotations = ch_eggnogmapper_annotations - eggnogmapper_orthologs = ch_eggnogmapper_orthologs - eggnogmapper_hits = ch_eggnogmapper_hits - versions = ch_versions -} diff --git a/subworkflows/local/gff_merge_cleanup.nf b/subworkflows/local/gff_merge_cleanup.nf deleted file mode 100644 index fc6c75e..0000000 --- a/subworkflows/local/gff_merge_cleanup.nf +++ /dev/null @@ -1,183 +0,0 @@ -include { AGAT_SPMERGEANNOTATIONS } from '../../modules/nf-core/agat/spmergeannotations/main' -include { GT_GFF3 } from '../../modules/nf-core/gt/gff3/main' -include { AGAT_CONVERTSPGXF2GXF } from '../../modules/nf-core/agat/convertspgxf2gxf/main' - -workflow GFF_MERGE_CLEANUP { - take: - ch_braker_gff // Channel: [ meta, gff ] - ch_liftoff_gff // Channel: [ meta, gff ] - - main: - ch_versions = Channel.empty() - - ch_gff_branch = ch_braker_gff - | join(ch_liftoff_gff, remainder:true) - | branch { meta, braker_gff, liftoff_gff -> - both : ( braker_gff && liftoff_gff ) - braker_only : ( braker_gff && ( ! liftoff_gff ) ) - liftoff_only: ( ( ! braker_gff ) && liftoff_gff ) - } - - // MODULE: AGAT_SPMERGEANNOTATIONS - AGAT_SPMERGEANNOTATIONS( - ch_gff_branch.both.map { meta, bg, lg -> [ meta, [ bg, lg ] ] }, - [] - ) - - ch_merged_gff = AGAT_SPMERGEANNOTATIONS.out.gff - | mix ( ch_gff_branch.liftoff_only.map { meta, braker_gff, liftoff_gff -> [ meta, liftoff_gff ] } ) - | mix ( ch_gff_branch.braker_only.map { meta, braker_gff, liftoff_gff -> [ meta, braker_gff ] } ) - ch_versions = ch_versions.mix(AGAT_SPMERGEANNOTATIONS.out.versions.first()) - - // MODULE: GT_GFF3 - GT_GFF3 ( ch_merged_gff ) - - ch_gt_gff = GT_GFF3.out.gt_gff3 - ch_versions = ch_versions.mix(GT_GFF3.out.versions.first()) - - // COLLECTFILE: Format GT_GFF3 output - ch_gt_formatted_gff = ch_gt_gff - | map { meta, gff -> - - def lines = gff.readLines() - .collect { line -> - if ( line.startsWith('##') ) { return line } - if ( line.startsWith('#') ) { return '' } - - def cols = line.split('\t') - def program = cols[1] - def feat = cols[2] - def atts = cols[8] - - def atts_r = '' - // Remove attributes and use AGAT_CONVERTSPGXF2GXF - // to create attributes based on sequential layout - - def feat_r = feat == 'transcript' ? 'mRNA' : feat - // Use mRNA inplace of transcript - - if ( feat_r != 'mRNA' || program != 'Liftoff' ) { - return ( cols[0..1] + [ feat_r ] + cols[3..7] + [ atts_r ] ).join('\t') - } - - def tx_id = ( atts =~ /ID=([^;]*)/ )[0][1] - def matches = ( atts =~ /liftoffID=([^;]*)/ ) - - def liftoffID = matches ? matches[0][1] : tx_id - - def atts_g = "liftoffID=$liftoffID" - - return ( cols[0..1] + [ feat_r ] + cols[3..7] + [ atts_g ] ).join('\t') - - }.join('\n') - - [ "${meta.id}.bare.gff" ] + [ lines ] - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.bare', '') ], file ] - } - - // MODULE: AGAT_CONVERTSPGXF2GXF - AGAT_CONVERTSPGXF2GXF ( ch_gt_formatted_gff ) - - ch_agat_gff = AGAT_CONVERTSPGXF2GXF.out.output_gff - ch_versions = ch_versions.mix(AGAT_CONVERTSPGXF2GXF.out.versions.first()) - - // COLLECTFILE: Format AGAT_CONVERTSPGXF2GXF output and only allow: [ 'gene', 'mRNA', 'exon', 'CDS' ] - ch_agat_formatted_gff = ch_agat_gff - | map { meta, gff -> - - def filtered_lines = gff.readLines() - .findAll { line -> - if ( line.startsWith('#') ) { return true } - - def cols = line.split('\t') - def feat = cols[2].trim() - - ( feat in [ 'gene', 'mRNA', 'exon', 'CDS' ] ) - ? true - : false - } - .collect { line -> - if ( line.startsWith('#') ) { return line } - - def cols = line.split('\t') - def program = cols[1] - def feat = cols[2] - def atts = cols[8] - def atts_r = atts.replace('-', '').replace('agat', '') - - if ( feat != 'mRNA' || program != 'Liftoff' ) { - return ( cols[0..7] + [ atts_r ] ).join('\t') - } - - def oldID = ( atts =~ /liftoffID=([^;]*)/ )[0][1] - def newID = ( atts =~ /ID=([^;]*)/ )[0][1].replace('-', '').replace('agat', '') - def pID = ( atts =~ /Parent=([^;]*)/ )[0][1].replace('-', '').replace('agat', '') - def atts_g = "ID=${newID};Parent=${pID};liftoffID=${oldID}" - - return ( cols[0..7] + [ atts_g ] ).join('\t') - } - - def tx_formatted_lines = [] - def current_gene_id = '' - def current_mrna_id = -1 - def current_exon_id = -1 - def current_cds_id = -1 - - filtered_lines.each { line -> - if ( line.startsWith('#') ) { - tx_formatted_lines << line - return - } - - def cols = line.split('\t') - def feat = cols[2] - def atts = cols[8] - def id = ( atts =~ /ID=([^;]*)/ )[0][1] - - if ( feat == 'gene' ) { - tx_formatted_lines << line - current_gene_id = id - current_mrna_id = 0 - return - } - - if ( feat == 'mRNA' ) { - current_mrna_id += 1 - current_exon_id = 0 - current_cds_id = 0 - - def matches = ( atts =~ /liftoffID=([^;]*)/ ) - def liftoffIDStr = matches ? ";liftoffID=${matches[0][1]}" : '' - - tx_formatted_lines << ( ( cols[0..7] + [ "ID=${current_gene_id}.t${current_mrna_id};Parent=${current_gene_id}${liftoffIDStr}" ] ).join('\t') ) - return - } - - if ( feat == 'exon' ) { - current_exon_id += 1 - tx_formatted_lines << ( ( cols[0..7] + [ "ID=${current_gene_id}.t${current_mrna_id}.exon${current_exon_id};Parent=${current_gene_id}.t${current_mrna_id}" ] ).join('\t') ) - return - } - - if ( feat == 'CDS' ) { - current_cds_id += 1 - tx_formatted_lines << ( ( cols[0..7] + [ "ID=${current_gene_id}.t${current_mrna_id}.cds${current_cds_id};Parent=${current_gene_id}.t${current_mrna_id}" ] ).join('\t') ) - return - } - - } - - [ "${meta.id}.agat.cleanup.gff" ] + [ tx_formatted_lines.join('\n') ] - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.agat.cleanup', '') ], file ] - } - - emit: - gff = ch_agat_formatted_gff // [ meta, gff ] - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/gff_store.nf b/subworkflows/local/gff_store.nf deleted file mode 100644 index 00ca00b..0000000 --- a/subworkflows/local/gff_store.nf +++ /dev/null @@ -1,141 +0,0 @@ -import java.net.URLEncoder - -include { GT_GFF3 as FINAL_GFF_CHECK } from '../../modules/nf-core/gt/gff3/main' -include { GFFREAD as EXTRACT_PROTEINS } from '../../modules/nf-core/gffread/main' - -workflow GFF_STORE { - take: - ch_target_gff // [ meta, gff ] - ch_eggnogmapper_annotations // [ meta, annotations ] - ch_fasta // [ meta, fasta ] - val_describe_gff // val(true|false) - - main: - ch_versions = Channel.empty() - - // COLLECTFILE: Add eggnogmapper hits to gff - ch_described_gff = ! val_describe_gff - ? Channel.empty() - : ch_target_gff - | join(ch_eggnogmapper_annotations) - | map { meta, gff, annotations -> - def tx_annotations = annotations.readLines() - .findAll { ! it.startsWith('#') } - .collect { line -> - def cols = line.split('\t') - def id = cols[0] - def txt = cols[7] - def pfams = cols[20] - - [ id, txt, pfams ] - } - .collect { id, txt, pfams -> - if ( txt != '-' ) { return [ id, txt ] } - if ( pfams != '-' ) { return [ id, "PFAMs: $pfams" ] } - - [ id, 'No eggnog description and PFAMs' ] - } - .collectEntries { id, txt -> - [ id, txt ] - } - - def gene_tx_annotations = [:] - gff.readLines() - .findAll { line -> - if ( line.startsWith('#') || line == '' ) { return false } - - def cols = line.split('\t') - def feat = cols[2] - - if ( ! ( feat == 'transcript' || feat == 'mRNA' ) ) { return false } - - return true - } - .each { line -> - def cols = line.split('\t') - def atts = cols[8] - - def matches = atts =~ /ID=([^;]*)/ - def tx_id = matches[0][1] - - def matches_p= atts =~ /Parent=([^;]*)/ - def gene_id = matches_p[0][1] - - if ( ! gene_tx_annotations.containsKey(gene_id) ) { - gene_tx_annotations[gene_id] = [:] - } - - def anno = tx_annotations.containsKey(tx_id) - ? URLEncoder.encode(tx_annotations[tx_id], "UTF-8").replace('+', '%20') - : URLEncoder.encode('Hypothetical protein | no eggnog hit', "UTF-8").replace('+', '%20') - - gene_tx_annotations[gene_id] += [ ( tx_id ): anno ] - } - - gene_tx_annotations = gene_tx_annotations - .collectEntries { gene_id, tx_annos -> - def default_anno = tx_annos.values().first() - - if ( tx_annos.values().findAll { it != default_anno }.size() > 0 ) { - return [ gene_id, ( tx_annos + [ 'default': 'Differing%20isoform%20descriptions' ] ) ] - } - - [ gene_id, ( tx_annos + [ 'default': default_anno ] ) ] - } - - def gff_lines = gff.readLines() - .collect { line -> - - if ( line.startsWith('#') || line == '' ) { return line } - - def cols = line.split('\t') - def feat = cols[2] - def atts = cols[8] - - if ( ! ( feat == 'gene' || feat == 'transcript' || feat == 'mRNA' ) ) { return line } - - def id = feat == 'gene' ? ( atts =~ /ID=([^;]*)/ )[0][1] : ( atts =~ /Parent=([^;]*)/ )[0][1] - - if ( ! gene_tx_annotations.containsKey(id) ) { return line } - - def tx_id = feat == 'gene' ? null : ( atts =~ /ID=([^;]*)/ )[0][1] - def desc = feat == 'gene' ? gene_tx_annotations[id]['default'] : gene_tx_annotations[id][tx_id] - - return ( line + ";description=$desc" ) - } - - [ "${meta.id}.described.gff" ] + gff_lines.join('\n') - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.described', '') ], file ] - } - - // MODULE: GT_GFF3 as FINAL_GFF_CHECK - ch_final_check_input = val_describe_gff - ? ch_described_gff - : ch_target_gff - - FINAL_GFF_CHECK ( ch_final_check_input ) - - ch_final_gff = FINAL_GFF_CHECK.out.gt_gff3 - ch_versions = ch_versions.mix(FINAL_GFF_CHECK.out.versions.first()) - - // MODULE: GFFREAD as EXTRACT_PROTEINS - ch_extraction_inputs = ch_final_gff - | join(ch_fasta) - - EXTRACT_PROTEINS( - ch_extraction_inputs.map { meta, gff, fasta -> [ meta, gff ] }, - ch_extraction_inputs.map { meta, gff, fasta -> fasta } - ) - - ch_final_proteins = EXTRACT_PROTEINS.out.gffread_fasta - ch_versions = ch_versions.mix(FINAL_GFF_CHECK.out.versions.first()) - - - emit: - final_gff = ch_final_gff // [ meta, gff ] - final_proteins = ch_final_proteins // [ meta, fasta ] - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/gff_tsebra_spfilterfeaturefromkilllist.nf b/subworkflows/local/gff_tsebra_spfilterfeaturefromkilllist.nf deleted file mode 100644 index c4e4fb6..0000000 --- a/subworkflows/local/gff_tsebra_spfilterfeaturefromkilllist.nf +++ /dev/null @@ -1,186 +0,0 @@ -include { AGAT_CONVERTSPGFF2GTF } from '../../modules/nf-core/agat/convertspgff2gtf/main' -include { TSEBRA } from '../../modules/nf-core/tsebra/main' -include { AGAT_CONVERTSPGXF2GXF } from '../../modules/nf-core/agat/convertspgxf2gxf/main' -include { AGAT_SPFILTERFEATUREFROMKILLLIST as KILL_TSEBRA_ISOFORMS } from '../../modules/nf-core/agat/spfilterfeaturefromkilllist/main' - -workflow GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST { - - take: - input_gff3 // [ meta, gff3 ] - braker_hints // [ meta, gff ] - tsebra_config // Channel: [ cfg ] - allow_isoforms // val(true|false) - val_prefix // val(String) - - main: - ch_versions = Channel.empty() - - // MODULE: AGAT_CONVERTSPGFF2GTF - AGAT_CONVERTSPGFF2GTF ( input_gff3 ) - - ch_input_gtf = AGAT_CONVERTSPGFF2GTF.out.output_gtf - ch_versions = ch_versions.mix(AGAT_CONVERTSPGFF2GTF.out.versions.first()) - - // COLLECTFILE: Prepare for TSEBRA - ch_tsebra_input_gtf = ch_input_gtf - | map { meta, gtf -> - - def lines = gtf.readLines() - .collect { line -> - if ( line.startsWith('#') ) { return line } - - def cols = line.split('\t') - def feat = cols[2] - - if ( ! ( feat in [ 'gene', 'transcript', 'mRNA' ] ) ) { return line } - - def atts = cols[8] - def matches = atts =~ /ID ([^;]*)/ - def id = matches[0][1] - - def feat_format = ( feat == 'mRNA' ) ? 'transcript' : feat - - return ( cols[0..1] + [ feat_format ] + cols[3..7] + [ id ] ).join('\t') - }.join('\n') - - [ "${meta.id}.clean.gtf" ] + [ lines ] - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace(".clean", "") ], file ] - } - - // MODULE: TSEBRA - ch_tsebra_inputs = ch_tsebra_input_gtf - | join(braker_hints) - | combine(tsebra_config) - TSEBRA( - ch_tsebra_inputs.map { meta, gtf, gff, cfg -> [ meta, [ gtf ] ] }, - ch_tsebra_inputs.map { meta, gtf, gff, cfg -> [ gff ] }, - [], - ch_tsebra_inputs.map { meta, gtf, gff, cfg -> cfg } - ) - - ch_tsebra_gtf = TSEBRA.out.tsebra_gtf - ch_versions = ch_versions.mix(TSEBRA.out.versions.first()) - - // COLLECTFILE: Format TSEBRA output - ch_tsebra_formatted_gtf = ch_tsebra_gtf - | map { meta, gtf -> - - def lines = gtf.readLines() - .collect { line -> - if ( line.startsWith('#') ) { return line } - - def cols = line.split('\t') - def program = cols[1] - def feat = cols[2] - def atts = cols[8] - - def atts_r = '' - // Remove attributes and use AGAT_CONVERTSPGXF2GXF - // to create attributes based on sequential layout - - if ( feat != 'transcript' || program != 'Liftoff' ) { - return ( cols[0..7] + [ atts_r ] ).join('\t') - } - - def tx_id = atts.trim().replaceFirst('anno1.', '') - def atts_g = "liftoffID $tx_id" - - return ( cols[0..7] + [ atts_g ] ).join('\t') - }.join('\n') - - [ "${meta.id}.gtf" ] + [ lines ] - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName ], file ] - } - - // MODULE: AGAT_CONVERTSPGXF2GXF - AGAT_CONVERTSPGXF2GXF ( ch_tsebra_formatted_gtf ) - - ch_tsebra_formatted_gff = AGAT_CONVERTSPGXF2GXF.out.output_gff - ch_versions = ch_versions.mix(AGAT_CONVERTSPGXF2GXF.out.versions.first()) - - // COLLECTFILE: Format AGAT_CONVERTSPGXF2GXF output - ch_tsebra_gff = ch_tsebra_formatted_gff - | map { meta, gff -> - - def lines = gff.readLines() - .collect { line -> - if ( line.startsWith('#') ) { return line } - - def cols = line.split('\t') - def atts_r = cols[8].replaceAll('-', '').replaceAll('agat', '') - - return ( cols[0..7] + [ atts_r ] ).join('\t') - }.join('\n') - - [ "${meta.id}.${val_prefix}.gff3" ] + [ lines ] - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace(".${val_prefix}", '') ], file ] - } - - // COLLECTFILE: Iso-form kill list if allow_isoforms=true - ch_post_tsebra_kill_list = allow_isoforms - ? Channel.empty() - : ch_tsebra_gff - | map { meta, gff -> - def kill_list = gff.readLines() - .findAll { line -> - if ( line.startsWith('#') ) { return false } - - def cols = line.split('\t') - def feat = cols[2] - - ( feat == 'mRNA' || feat == 'transcript' ) - } - .collect { line -> - def cols = line.split('\t') - def atts = cols[8] - def tx_id = ( atts =~ /ID=([^;]*)/ )[0][1] - def g_id = ( atts =~ /Parent=([^;]*)/ )[0][1] - - [ g_id, tx_id ] - } - .groupBy { g_id, tx_id -> g_id } - .findAll { key, value -> value.size() > 1 } - .collect { key, value -> - value.collect { it[1] }[1..-1] - } - .flatten() - .join('\n') - - [ "${meta.id}.kill.list.txt" ] + [ kill_list ] - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.kill.list', '') ], file ] - } - - // MODULE: AGAT_SPFILTERFEATUREFROMKILLLIST as KILL_TSEBRA_ISOFORMS - ch_tsebra_kill_inputs = ch_tsebra_gff - | join(ch_post_tsebra_kill_list) - - - KILL_TSEBRA_ISOFORMS( - ch_tsebra_kill_inputs.map { meta, gff, kill -> [ meta, gff ] }, - ch_tsebra_kill_inputs.map { meta, gff, kill -> kill }, - [] // default config - ) - - ch_tsebra_killed_gff = ch_tsebra_gff - | join(KILL_TSEBRA_ISOFORMS.out.gff, remainder: true) - | map { meta, tsebra, killed -> - if ( tsebra ) { [ meta, killed ?: tsebra ] } - } - ch_versions = ch_versions.mix(KILL_TSEBRA_ISOFORMS.out.versions.first()) - - emit: - tsebra_killed_gff = ch_tsebra_killed_gff // [ val(meta), gff ] - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/prepare_assembly.nf b/subworkflows/local/prepare_assembly.nf deleted file mode 100644 index c05faf5..0000000 --- a/subworkflows/local/prepare_assembly.nf +++ /dev/null @@ -1,159 +0,0 @@ -include { GUNZIP as GUNZIP_TARGET_ASSEMBLY } from '../../modules/nf-core/gunzip' -include { GUNZIP as GUNZIP_TE_LIBRARY } from '../../modules/nf-core/gunzip' -include { FASTAVALIDATOR } from '../../modules/nf-core/fastavalidator' -include { REPEATMODELER_BUILDDATABASE } from '../../modules/nf-core/repeatmodeler/builddatabase' -include { REPEATMODELER_REPEATMODELER } from '../../modules/nf-core/repeatmodeler/repeatmodeler' -include { REPEATMASKER_REPEATMASKER } from '../../modules/gallvp/repeatmasker/repeatmasker' -include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate' - -include { FASTA_EDTA_LAI } from '../../subworkflows/gallvp/fasta_edta_lai' - -workflow PREPARE_ASSEMBLY { - take: - target_assembly // channel: [ meta, fasta ] - te_library // channel: [ meta, fasta ] - repeat_annotator // val(String), 'repeatmodeler' or 'edta' - exclude_assemblies // channel: val(assembly_x,assembly_y) - ch_is_masked // channel: [ meta, val(true|false) ] - - main: - ch_versions = Channel.empty() - - // MODULE: GUNZIP_TARGET_ASSEMBLY - target_assembly_branch = target_assembly - | branch { meta, file -> - gz: "$file".endsWith(".gz") - rest: !"$file".endsWith(".gz") - } - - GUNZIP_TARGET_ASSEMBLY ( target_assembly_branch.gz ) - - ch_gunzip_assembly = GUNZIP_TARGET_ASSEMBLY.out.gunzip - | mix( - target_assembly_branch.rest - ) - ch_versions = ch_versions.mix(GUNZIP_TARGET_ASSEMBLY.out.versions.first()) - - - // MODULE: FASTAVALIDATOR - FASTAVALIDATOR ( ch_gunzip_assembly ) - - ch_validated_assembly = ch_gunzip_assembly - | join(FASTAVALIDATOR.out.success_log) - | map { meta, fasta, log -> [ meta, fasta ] } - ch_versions = ch_versions.mix(FASTAVALIDATOR.out.versions.first()) - - FASTAVALIDATOR.out.error_log - | map { meta, log -> - System.err.println("WARNING: FASTAVALIDATOR failed for ${meta.id} with error: ${log}. ${meta.id} is excluded from further analysis.") - } - - // MODULE: GUNZIP_TE_LIBRARY - ch_te_library_branch = te_library - | branch { meta, file -> - gz: "$file".endsWith(".gz") - rest: !"$file".endsWith(".gz") - } - - GUNZIP_TE_LIBRARY ( ch_te_library_branch.gz ) - - ch_gunzip_te_library = GUNZIP_TE_LIBRARY.out.gunzip - | mix( - ch_te_library_branch.rest - ) - ch_versions = ch_versions.mix(GUNZIP_TE_LIBRARY.out.versions.first()) - - // SUBWORKFLOW: FASTA_EDTA_LAI - ch_unmasked_masked_branch = ch_validated_assembly - | combine( exclude_assemblies ) - | map { meta, fasta, ex_assemblies -> - ex_assemblies.tokenize(",").contains( meta.id ) - ? null - : [ meta, fasta ] - } - | join( - ch_is_masked - ) - | branch { meta, fasta, is_masked -> - unmasked: ! is_masked - return [ meta, fasta ] - masked: is_masked - return [ meta, fasta ] - } - - ch_annotator_inputs = ch_unmasked_masked_branch.unmasked - | join( - ch_gunzip_te_library, remainder: true - ) - | filter { meta, assembly, teLib -> - teLib == null && ( assembly != null ) - } - | map { meta, assembly, teLib -> [ meta, assembly ] } - - ch_edta_inputs = repeat_annotator != 'edta' - ? Channel.empty() - : ch_annotator_inputs - - FASTA_EDTA_LAI( - ch_edta_inputs, - [], - true // Skip LAI - ) - - ch_versions = ch_versions.mix(FASTA_EDTA_LAI.out.versions.first()) - - // MODULE: REPEATMODELER_BUILDDATABASE - ch_repeatmodeler_inputs = repeat_annotator != 'repeatmodeler' - ? Channel.empty() - : ch_annotator_inputs - - REPEATMODELER_BUILDDATABASE ( ch_repeatmodeler_inputs ) - - ch_versions = ch_versions.mix(REPEATMODELER_BUILDDATABASE.out.versions.first()) - - // MODULE: REPEATMODELER_REPEATMODELER - REPEATMODELER_REPEATMODELER ( REPEATMODELER_BUILDDATABASE.out.db ) - - ch_assembly_and_te_lib = ch_unmasked_masked_branch.unmasked - | join( - repeat_annotator == 'edta' - ? FASTA_EDTA_LAI.out.te_lib_fasta.mix(ch_gunzip_te_library) - : REPEATMODELER_REPEATMODELER.out.fasta.mix(ch_gunzip_te_library) - ) - - ch_versions = ch_versions.mix(REPEATMODELER_REPEATMODELER.out.versions.first()) - - // MODULE: REPEATMASKER_REPEATMASKER - REPEATMASKER_REPEATMASKER( - ch_assembly_and_te_lib.map { meta, assembly, teLib -> [ meta, assembly ] }, - ch_assembly_and_te_lib.map { meta, assembly, teLib -> teLib }, - ) - - ch_masked_assembly = ch_unmasked_masked_branch.masked - | mix(REPEATMASKER_REPEATMASKER.out.masked) - ch_versions = ch_versions.mix(REPEATMASKER_REPEATMASKER.out.versions.first()) - - // MODULE: STAR_GENOMEGENERATE - ch_genomegenerate_inputs = ch_validated_assembly - | combine( exclude_assemblies ) - | map { meta, fasta, ex_assemblies -> - ex_assemblies.tokenize(",").contains( meta.id ) - ? null - : [ meta, fasta ] - } - - - STAR_GENOMEGENERATE( - ch_genomegenerate_inputs, - ch_genomegenerate_inputs.map { meta, fasta -> [ [], [] ] } - ) - - ch_assembly_index = STAR_GENOMEGENERATE.out.index - ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first()) - - emit: - target_assemby = ch_validated_assembly // channel: [ meta, fasta ] - masked_target_assembly = ch_masked_assembly // channel: [ meta, fasta ] - target_assemby_index = ch_assembly_index // channel: [ meta, star_index ] - versions = ch_versions // channel: [ versions.yml ] -} diff --git a/subworkflows/local/prepare_ext_prots.nf b/subworkflows/local/prepare_ext_prots.nf deleted file mode 100644 index 92c245d..0000000 --- a/subworkflows/local/prepare_ext_prots.nf +++ /dev/null @@ -1,42 +0,0 @@ -include { GUNZIP } from '../../modules/nf-core/gunzip' -include { CAT_CAT as CAT_PROTEIN_FASTAS } from '../../modules/nf-core/cat/cat' - -workflow PREPARE_EXT_PROTS { - take: - ch_ext_prot_fastas // Channel: [ meta, fasta ] - - main: - ch_versions = Channel.empty() - - // MODULE: GUNZIP - ch_ext_prot_seqs_branch = ch_ext_prot_fastas - | branch { meta, file -> - gz: "$file".endsWith(".gz") - rest: !"$file".endsWith(".gz") - } - - GUNZIP ( ch_ext_prot_seqs_branch.gz ) - - ch_ext_prot_gunzip_fastas = GUNZIP.out.gunzip.mix(ch_ext_prot_seqs_branch.rest) - | map { meta, filePath -> filePath } - | collect - | map { fileList -> - [ - [ id: "ext_protein_seqs" ], - ( fileList instanceof List ) - ? fileList.toSorted() - : fileList - ] - } - - ch_versions = ch_versions.mix(GUNZIP.out.versions.first()) - - // MODULE: CAT_CAT as CAT_PROTEIN_FASTAS - CAT_PROTEIN_FASTAS ( ch_ext_prot_gunzip_fastas ) - - ch_versions = ch_versions.mix(CAT_PROTEIN_FASTAS.out.versions) - - emit: - ext_prots_fasta = CAT_PROTEIN_FASTAS.out.file_out // Channel: [ meta, fasta ] - versions = ch_versions // Channel: [ versions.yml ] -} diff --git a/subworkflows/local/preprocess_rnaseq.nf b/subworkflows/local/preprocess_rnaseq.nf deleted file mode 100644 index 72fa176..0000000 --- a/subworkflows/local/preprocess_rnaseq.nf +++ /dev/null @@ -1,123 +0,0 @@ -include { CAT_FASTQ } from '../../modules/nf-core/cat/fastq' -include { SORTMERNA as SORTMERNA_INDEX } from '../../modules/nf-core/sortmerna' -include { SORTMERNA as SORTMERNA_READS } from '../../modules/nf-core/sortmerna' -include { FASTQ_FASTQC_UMITOOLS_FASTP } from '../../subworkflows/nf-core/fastq_fastqc_umitools_fastp' - -workflow PREPROCESS_RNASEQ { - take: - ch_reads // channel: [ [ id, single_end, target_assemblies ], [ [ fq ] ] ] - permissible_assemblies // val: assembly_a,assembly_b - exclude_assemblies // channel: val(assembly_x,assembly_y) - skip_fastqc // val: true|false - skip_fastp // val: true|false - save_trimmed // val: true|false - min_trimmed_reads // val: Integer - remove_ribo_rna // val: true|false - sortmerna_fastas // channel: [ [ fasta ] ] - - main: - ch_versions = Channel.empty() - - ch_fastq = ch_reads - | combine( exclude_assemblies ) - | map { meta, fqs, ex_assemblies -> - def ex_list = ex_assemblies.split(",") - - if ( !( meta.target_assemblies.every { ex_list.contains( it ) } ) ) { - [ [ id:meta.id, single_end:meta.single_end ], fqs ] - } - } - | branch { meta, fqs -> - single : fqs.size() == 1 - return [ meta, fqs.flatten() ] - multiple: fqs.size() > 1 - return [ meta, fqs.flatten() ] - } - - - ch_reads_target = ch_reads - | combine( exclude_assemblies ) - | flatMap { meta, fqs, ex_assemblies -> - def ex_list = ex_assemblies.split(",") - - meta - .target_assemblies - .collect { assembly -> [ [ id:meta.id, single_end:meta.single_end ], assembly ] } - .findAll { _meta, assembly -> !( ex_list.contains( assembly ) ) } - } - | unique - - // MODULES: CAT_FASTQ - CAT_FASTQ ( ch_fastq.multiple ) - - ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_fastq.single) - ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first()) - - // SUBWORKFLOW: FASTQ_FASTQC_UMITOOLS_FASTP - def with_umi = false - def skip_umi_extract = true - def umi_discard_read = false - - FASTQ_FASTQC_UMITOOLS_FASTP ( - ch_cat_fastq, - skip_fastqc, - with_umi, - skip_umi_extract, - umi_discard_read, - skip_fastp, - [], - save_trimmed, - save_trimmed, - min_trimmed_reads - ) - - ch_trim_reads = FASTQ_FASTQC_UMITOOLS_FASTP.out.reads - - ch_cat_fastq - | join(ch_trim_reads, remainder:true) - | map { meta, reads, trimmed -> - if (!trimmed) { - System.err.println("WARNING: Dropping ${reads.collect { it.getName() }} as read count after trimming is less than $min_trimmed_reads") - } - } - - ch_versions = ch_versions.mix(FASTQ_FASTQC_UMITOOLS_FASTP.out.versions.first()) - - - // MODULE: SORTMERNA as SORTMERNA_INDEX - SORTMERNA_INDEX( - [ [ id: 'idx' ], [] ], - sortmerna_fastas.map { fastas -> [ [ id: 'fastas' ], fastas ] }, - [ [], [] ] - ) - - ch_versions = ch_versions.mix(SORTMERNA_INDEX.out.versions) - - // MODULE: SORTMERNA as SORTMERNA_READS - ch_sortmerna_inputs = remove_ribo_rna - ? ch_trim_reads - | combine( - sortmerna_fastas - | map { fastas -> [ [ id: 'fastas' ], fastas ] } - | join(SORTMERNA_INDEX.out.index) - ) - : Channel.empty() - - SORTMERNA_READS( - ch_sortmerna_inputs.map { meta, reads, meta2, fastas, idx -> [ meta, reads ] }, - ch_sortmerna_inputs.map { meta, reads, meta2, fastas, idx -> [ meta2, fastas ] }, - ch_sortmerna_inputs.map { meta, reads, meta2, fastas, idx -> [ meta2, idx ] } - ) - - ch_emitted_reads = remove_ribo_rna - ? SORTMERNA_READS.out.reads - : ch_trim_reads - ch_versions = ch_versions.mix(SORTMERNA_READS.out.versions.first()) - - - - emit: - trim_reads = ch_emitted_reads // channel: [ [ id, single_end ], [ fq ] ] - reads_target = ch_reads_target // channel: [ [ id, single_end ], assembly_id ] - versions = ch_versions // channel: [ versions.yml ] -} diff --git a/subworkflows/local/purge_braker_models.nf b/subworkflows/local/purge_braker_models.nf deleted file mode 100644 index bda8ce1..0000000 --- a/subworkflows/local/purge_braker_models.nf +++ /dev/null @@ -1,96 +0,0 @@ -include { GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST } from '../../subworkflows/local/gff_tsebra_spfilterfeaturefromkilllist' -include { GFFCOMPARE as COMPARE_BRAKER_TO_LIFTOFF } from '../../modules/nf-core/gffcompare/main' -include { AGAT_SPFILTERFEATUREFROMKILLLIST } from '../../modules/nf-core/agat/spfilterfeaturefromkilllist/main' -include { GFFCOMPARE as VALIDATE_PURGING_BY_AGAT } from '../../modules/nf-core/gffcompare/main' -include { AGAT_SPMERGEANNOTATIONS as MERGE_BRAKER_LIFTOFF } from '../../modules/nf-core/agat/spmergeannotations/main' - -workflow PURGE_BRAKER_MODELS { - take: - braker_gff3 // [ meta, gff3 ] - braker_hints // [ meta, gff ] - liftoff_gff3 // [ meta, gff3 ] - tsebra_config // Channel: [ cfg ] - allow_isoforms // val(true|false) - - main: - ch_versions = Channel.empty() - - // SUBWORKFLOW: GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST - GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST( - braker_gff3, - braker_hints, - tsebra_config, - allow_isoforms, - 'braker' - ) - - ch_tsebra_killed_gff = GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST.out.tsebra_killed_gff - ch_versions = ch_versions.mix(GFF_TSEBRA_SPFILTERFEATUREFROMKILLLIST.out.versions) - - // MODULE: GFFCOMPARE as COMPARE_BRAKER_TO_LIFTOFF - ch_comparison_inputs = ch_tsebra_killed_gff - | join(liftoff_gff3) - - - COMPARE_BRAKER_TO_LIFTOFF ( - ch_comparison_inputs.map { meta, braker, liftoff -> [ meta, braker ] }, - [ [], [], [] ], - ch_comparison_inputs.map { meta, braker, liftoff -> [ meta, liftoff ] }, - ) - - ch_tracking = COMPARE_BRAKER_TO_LIFTOFF.out.tracking - ch_versions = ch_versions.mix(COMPARE_BRAKER_TO_LIFTOFF.out.versions.first()) - - // COLLECTFILE: Transcript level kill list - ch_kill_list = ch_tracking - | map { meta, tracking -> - - def kept_lines = tracking.readLines() - .findAll { line -> - def cols = line.split('\t') - - ( cols[3] != 'u' ) && ( cols[3] != 'p' ) - } - - def tx_kill_list = kept_lines - .collect { line -> - def cols = line.split('\t') - - def matched = cols[4] =~ /q1:([^\|]+)\|([^\|]+)/ - - matched[0][2].trim() - }.join('\n') - - [ "${meta.id}.kill.list.txt" ] + tx_kill_list - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.kill.list', '') ], file ] - } - - // MODULE: AGAT_SPFILTERFEATUREFROMKILLLIST - ch_agat_kill_inputs = ch_tsebra_killed_gff - | join(ch_kill_list) - - - AGAT_SPFILTERFEATUREFROMKILLLIST( - ch_agat_kill_inputs.map { meta, gff, kill -> [ meta, gff ] }, - ch_agat_kill_inputs.map { meta, gff, kill -> kill }, - [] // default config - ) - - ch_braker_purged_gff = AGAT_SPFILTERFEATUREFROMKILLLIST.out.gff - ch_versions = ch_versions.mix(AGAT_SPFILTERFEATUREFROMKILLLIST.out.versions.first()) - - // Handle case where liftoff is not present - ch_all_braker_gff = ch_tsebra_killed_gff - | join(ch_braker_purged_gff, remainder:true) - | map { meta, tsebra_gff, purged_gff -> - if ( purged_gff ) { return [ meta, purged_gff ] } - if ( tsebra_gff ) { return [ meta, tsebra_gff ] } - } - - emit: - braker_purged_gff = ch_all_braker_gff // [ meta, gff3 ] - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/purge_nohit_models.nf b/subworkflows/local/purge_nohit_models.nf deleted file mode 100644 index 55b970e..0000000 --- a/subworkflows/local/purge_nohit_models.nf +++ /dev/null @@ -1,70 +0,0 @@ -include { AGAT_SPFILTERFEATUREFROMKILLLIST } from '../../modules/nf-core/agat/spfilterfeaturefromkilllist/main' - -workflow PURGE_NOHIT_MODELS { - take: - ch_target_gff // [ meta, gff ] - ch_eggnogmapper_hits // [ meta, hits ] - val_purge_nohits // val(true|false) - - main: - ch_versions = Channel.empty() - - // COLLECTFILE: Transcript level kill list - ch_kill_list = ch_target_gff - | join(ch_eggnogmapper_hits) - | map { meta, gff, hits -> - - def tx_with_hits = hits.readLines() - .collect { it.split('\t')[0] } - .sort(false) - .unique() - - def tx_in_gff = gff.readLines() - .findAll { line -> - if ( line.startsWith('#') || line == '' ) { return false } - - def feat = line.split('\t')[2] - ( feat == 'transcript' || feat == 'mRNA' ) - } - .collect { it -> - def attrs = it.split('\t')[8] - - ( attrs =~ /ID=([^;]*)/ )[0][1] - } - .sort(false) - .unique() - - def tx_without_hits = tx_in_gff - tx_with_hits - - [ "${meta.id}.kill.list.txt" ] + tx_without_hits.join('\n') - } - | collectFile(newLine: true) - | map { file -> - [ [ id: file.baseName.replace('.kill.list', '') ], file ] - } - - // MODULE: AGAT_SPFILTERFEATUREFROMKILLLIST - ch_agat_kill_inputs = ! val_purge_nohits - ? Channel.empty() - : ch_target_gff - | join(ch_kill_list) - - - AGAT_SPFILTERFEATUREFROMKILLLIST( - ch_agat_kill_inputs.map { meta, gff, kill -> [ meta, gff ] }, - ch_agat_kill_inputs.map { meta, gff, kill -> kill }, - [] // default config - ) - - ch_target_purged_gff = AGAT_SPFILTERFEATUREFROMKILLLIST.out.gff - ch_versions = ch_versions.mix(AGAT_SPFILTERFEATUREFROMKILLLIST.out.versions.first()) - - emit: - purged_gff = ch_target_purged_gff - | mix( - val_purge_nohits - ? Channel.empty() - : ch_target_gff - ) - versions = ch_versions // [ versions.yml ] -} diff --git a/subworkflows/local/utils_nfcore_genepal_pipeline/main.nf b/subworkflows/local/utils_nfcore_genepal_pipeline/main.nf new file mode 100644 index 0000000..d991642 --- /dev/null +++ b/subworkflows/local/utils_nfcore_genepal_pipeline/main.nf @@ -0,0 +1,228 @@ +// +// Subworkflow with functionality specific to the PlantandFoodResearch/genepal pipeline +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +include { UTILS_NFVALIDATION_PLUGIN } from '../../nf-core/utils_nfvalidation_plugin' +include { paramsSummaryMap } from 'plugin/nf-validation' +include { fromSamplesheet } from 'plugin/nf-validation' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { dashedLine } from '../../nf-core/utils_nfcore_pipeline' +include { nfCoreLogo } 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 { workflowCitation } from '../../nf-core/utils_nfcore_pipeline' + +/* +======================================================================================== + SUBWORKFLOW TO INITIALISE PIPELINE +======================================================================================== +*/ + +workflow PIPELINE_INITIALISATION { + + take: + version // boolean: Display version and exit + help // boolean: Display help text + 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 + input // string: Path to input samplesheet + + main: + + ch_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 + // + pre_help_text = nfCoreLogo(monochrome_logs) + post_help_text = '\n' + workflowCitation() + '\n' + dashedLine(monochrome_logs) + def String workflow_command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.csv --outdir " + UTILS_NFVALIDATION_PLUGIN ( + help, + workflow_command, + pre_help_text, + post_help_text, + validate_params, + "nextflow_schema.json" + ) + + // + // Check config provided to the pipeline + // + UTILS_NFCORE_PIPELINE ( + nextflow_cli_args + ) + + // + // Create channel from input file provided through params.input + // + Channel + .fromSamplesheet("input") + .map { + meta, fastq_1, fastq_2 -> + if (!fastq_2) { + return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ] + } else { + return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ] + } + } + .groupTuple() + .map { + validateInputSamplesheet(it) + } + .map { + meta, fastqs -> + return [ meta, fastqs.flatten() ] + } + .set { ch_samplesheet } + + emit: + samplesheet = ch_samplesheet + versions = ch_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 +======================================================================================== +*/ + +// +// 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{ it.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 ] +} + +// +// 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 = "" + String[] manifest_doi = meta.manifest_map.doi.tokenize(",") + for (String doi_ref: manifest_doi) 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/nf-core/fastq_fastqc_umitools_fastp/main.nf b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf deleted file mode 100644 index ab6cbb3..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf +++ /dev/null @@ -1,164 +0,0 @@ -// -// Read QC, UMI extraction and trimming -// - -include { FASTQC as FASTQC_RAW } from '../../../modules/nf-core/fastqc/main' -include { FASTQC as FASTQC_TRIM } from '../../../modules/nf-core/fastqc/main' -include { UMITOOLS_EXTRACT } from '../../../modules/nf-core/umitools/extract/main' -include { FASTP } from '../../../modules/nf-core/fastp/main' - -// -// Function that parses fastp json output file to get total number of reads after trimming -// -import groovy.json.JsonSlurper - -def getFastpReadsAfterFiltering(json_file, min_num_reads) { - - if ( workflow.stubRun ) { return min_num_reads } - - def Map json = (Map) new JsonSlurper().parseText(json_file.text).get('summary') - return json['after_filtering']['total_reads'].toLong() -} - -def getFastpAdapterSequence(json_file){ - - if ( workflow.stubRun ) { return "" } - - def Map json = (Map) new JsonSlurper().parseText(json_file.text) - try{ - adapter = json['adapter_cutting']['read1_adapter_sequence'] - } catch(Exception ex){ - adapter = "" - } - return adapter -} - -workflow FASTQ_FASTQC_UMITOOLS_FASTP { - take: - reads // channel: [ val(meta), [ reads ] ] - skip_fastqc // boolean: true/false - with_umi // boolean: true/false - skip_umi_extract // boolean: true/false - umi_discard_read // integer: 0, 1 or 2 - skip_trimming // boolean: true/false - adapter_fasta // file: adapter.fasta - save_trimmed_fail // boolean: true/false - save_merged // boolean: true/false - min_trimmed_reads // integer: > 0 - - main: - ch_versions = Channel.empty() - fastqc_raw_html = Channel.empty() - fastqc_raw_zip = Channel.empty() - if (!skip_fastqc) { - FASTQC_RAW ( - reads - ) - fastqc_raw_html = FASTQC_RAW.out.html - fastqc_raw_zip = FASTQC_RAW.out.zip - ch_versions = ch_versions.mix(FASTQC_RAW.out.versions.first()) - } - - umi_reads = reads - umi_log = Channel.empty() - if (with_umi && !skip_umi_extract) { - UMITOOLS_EXTRACT ( - reads - ) - umi_reads = UMITOOLS_EXTRACT.out.reads - umi_log = UMITOOLS_EXTRACT.out.log - ch_versions = ch_versions.mix(UMITOOLS_EXTRACT.out.versions.first()) - - // Discard R1 / R2 if required - if (umi_discard_read in [1,2]) { - UMITOOLS_EXTRACT - .out - .reads - .map { - meta, reads -> - meta.single_end ? [ meta, reads ] : [ meta + [single_end: true], reads[umi_discard_read % 2] ] - } - .set { umi_reads } - } - } - - trim_reads = umi_reads - trim_json = Channel.empty() - trim_html = Channel.empty() - trim_log = Channel.empty() - trim_reads_fail = Channel.empty() - trim_reads_merged = Channel.empty() - fastqc_trim_html = Channel.empty() - fastqc_trim_zip = Channel.empty() - trim_read_count = Channel.empty() - adapter_seq = Channel.empty() - - if (!skip_trimming) { - FASTP ( - umi_reads, - adapter_fasta, - false, // don't want to set discard_trimmed_pass, else there will be no reads output - save_trimmed_fail, - save_merged - ) - trim_json = FASTP.out.json - trim_html = FASTP.out.html - trim_log = FASTP.out.log - trim_reads_fail = FASTP.out.reads_fail - trim_reads_merged = FASTP.out.reads_merged - ch_versions = ch_versions.mix(FASTP.out.versions.first()) - - // - // Filter FastQ files based on minimum trimmed read count after adapter trimming - // - FASTP - .out - .reads - .join(trim_json) - .map { meta, reads, json -> [ meta, reads, getFastpReadsAfterFiltering(json, min_trimmed_reads.toLong()) ] } - .set { ch_num_trimmed_reads } - - ch_num_trimmed_reads - .filter { meta, reads, num_reads -> num_reads >= min_trimmed_reads.toLong() } - .map { meta, reads, num_reads -> [ meta, reads ] } - .set { trim_reads } - - ch_num_trimmed_reads - .map { meta, reads, num_reads -> [ meta, num_reads ] } - .set { trim_read_count } - - trim_json - .map { meta, json -> [meta, getFastpAdapterSequence(json)] } - .set { adapter_seq } - - if (!skip_fastqc) { - FASTQC_TRIM ( - trim_reads - ) - fastqc_trim_html = FASTQC_TRIM.out.html - fastqc_trim_zip = FASTQC_TRIM.out.zip - ch_versions = ch_versions.mix(FASTQC_TRIM.out.versions.first()) - } - } - - emit: - reads = trim_reads // channel: [ val(meta), [ reads ] ] - - fastqc_raw_html // channel: [ val(meta), [ html ] ] - fastqc_raw_zip // channel: [ val(meta), [ zip ] ] - - umi_log // channel: [ val(meta), [ log ] ] - adapter_seq // channel: [ val(meta), [ adapter_seq] ] - - trim_json // channel: [ val(meta), [ json ] ] - trim_html // channel: [ val(meta), [ html ] ] - trim_log // channel: [ val(meta), [ log ] ] - trim_reads_fail // channel: [ val(meta), [ fastq.gz ] ] - trim_reads_merged // channel: [ val(meta), [ fastq.gz ] ] - trim_read_count // channel: [ val(meta), val(count) ] - - fastqc_trim_html // channel: [ val(meta), [ html ] ] - fastqc_trim_zip // channel: [ val(meta), [ zip ] ] - - versions = ch_versions.ifEmpty(null) // channel: [ versions.yml ] -} diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml deleted file mode 100644 index 9308fe9..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml +++ /dev/null @@ -1,129 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json -# yaml-language-server: $schema=yaml-schema.json -name: "fastq_fastqc_umitools_fastp" -description: Read QC, UMI extraction and trimming -keywords: - - fastq - - fastqc - - qc - - UMI - - trimming - - fastp -components: - - fastqc - - umitools/extract - - fastp -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - - skip_fastqc: - type: boolean - description: | - Skip fastqc process - - with_umi: - type: boolean - description: | - With or without umi detection - - skip_umi_extract: - type: boolean - description: | - With or without umi extrection - - umi_discard_read: - type: integer - description: | - Discard R1 / R2 if required - - skip_trimming: - type: boolean - description: | - Allows to skip FastP execution - - adapter_fasta: - type: file - description: | - Fasta file of adapter sequences - - save_trimmed_fail: - type: boolean - description: | - Save trimmed fastqs of failed samples - - save_merged: - type: boolean - description: | - Save merged fastqs - - min_trimmed_reads: - type: integer - description: | - Inputs with fewer than this reads will be filtered out of the "reads" output channel -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - reads: - type: file - description: > - Extracted FASTQ files. | For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | - For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. - pattern: "*.{fastq.gz}" - - fastqc_html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" - - fastqc_zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" - - log: - type: file - description: Logfile for umi_tools - pattern: "*.{log}" - - trim_json: - type: file - description: FastP Trimming report - pattern: "*.{fastp.json}" - - trim_html: - type: file - description: FastP Trimming report - pattern: "*.{fastp.html}" - - log: - type: file - description: Logfile FastP - pattern: "*.{fastp.log}" - - trim_reads_fail: - type: file - description: Trimmed fastq files failing QC - pattern: "*.{fastq.gz}" - - trim_reads_merged: - type: file - description: Trimmed and merged fastq files - pattern: "*.{fastq.gz}" - - trim_read_count: - type: integer - description: Number of reads after trimming - - fastqc_trim_html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" - - fastqc_trim_zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" - - adapter_seq: - type: string - description: | - Adapter Sequence found in read1 - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@robsyme" -maintainers: - - "@robsyme" diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test deleted file mode 100644 index 48ba5f4..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test +++ /dev/null @@ -1,973 +0,0 @@ -nextflow_workflow { - - name "Test Workflow FASTQ_FASTQC_UMITOOLS_FASTP" - script "../main.nf" - workflow "FASTQ_FASTQC_UMITOOLS_FASTP" - config './nextflow.config' - - tag "subworkflows" - tag "subworkflows_nfcore" - tag "subworkflows/fastq_fastqc_umitools_fastp" - tag "fastq_fastqc_umitools_fastp" - tag "fastqc" - tag "umitools/extract" - tag "fastp" - - - test("sarscov2 paired-end [fastq]") { - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("skip_fastqc") { - - when { - workflow { - """ - skip_fastqc = true - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert !workflow.out.fastqc_raw_html }, - { assert !workflow.out.fastqc_raw_zip }, - { assert !workflow.out.fastqc_trim_html }, - { assert !workflow.out.fastqc_trim_zip }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("with_umi") { - - when { - workflow { - """ - skip_fastqc = false - with_umi = true - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.versions - ).match() - } - ) - } - } - - - test("skip_umi_extract") { - - when { - workflow { - """ - skip_fastqc = false - with_umi = true - skip_umi_extract = true - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("umi_discard_read = 2") { - - when { - workflow { - """ - skip_fastqc = false - with_umi = true - skip_umi_extract = true - umi_discard_read = 2 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("skip_trimming") { - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = true - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert !workflow.out.fastqc_trim_html }, - { assert !workflow.out.fastqc_trim_zip }, - { assert !workflow.out.trim_html }, - { assert !workflow.out.trim_log }, - { assert snapshot( - // If we skip trimming then input is output, so not snapshotting - workflow.out.adapter_seq, - workflow.out.reads.get(0).get(0), // Reads meta map - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("save_trimmed_fail") { - - config './nextflow.save_trimmed.config' - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = true - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("save_merged") { - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = true - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("min_trimmed_reads = 26") { - // Subworkflow should stop after FASTP which trims down to 25 reads - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = true - min_trimmed_reads = 26 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert workflow.out.fastqc_raw_html }, - { assert workflow.out.fastqc_raw_zip }, - { assert workflow.out.fastqc_trim_html }, - { assert workflow.out.fastqc_trim_zip }, - { assert workflow.out.trim_html }, - { assert workflow.out.trim_log }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.reads, - workflow.out.trim_json, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions - ).match() - } - ) - } - } - - test("sarscov2 paired-end [fastq] - stub") { - - options '-stub' - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - test("skip_fastqc - stub") { - - options "-stub" - - when { - workflow { - """ - skip_fastqc = true - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - test("with_umi - stub") { - - options "-stub" - - when { - workflow { - """ - skip_fastqc = false - with_umi = true - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - - test("skip_umi_extract - stub") { - - options "-stub" - - when { - workflow { - """ - skip_fastqc = false - with_umi = true - skip_umi_extract = true - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - test("umi_discard_read = 2 - stub") { - - options "-stub" - - when { - workflow { - """ - skip_fastqc = false - with_umi = true - skip_umi_extract = true - umi_discard_read = 2 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - test("skip_trimming - stub") { - - options "-stub" - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = true - adapter_fasta = [] - save_trimmed_fail = false - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot( - workflow.out.adapter_seq, - workflow.out.fastqc_raw_html, - workflow.out.fastqc_raw_zip, - workflow.out.fastqc_trim_html, - workflow.out.fastqc_trim_zip, - workflow.out.trim_html, - workflow.out.trim_json, - workflow.out.trim_log, - workflow.out.trim_read_count, - workflow.out.trim_reads_fail, - workflow.out.trim_reads_merged, - workflow.out.umi_log, - workflow.out.versions).match() } - ) - } - } - - test("save_trimmed_fail - stub") { - - options "-stub" - - config './nextflow.save_trimmed.config' - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = true - save_merged = false - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - test("save_merged - stub") { - - options "-stub" - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = true - min_trimmed_reads = 1 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } - - test("min_trimmed_reads = 26 - stub") { - // Subworkflow should stop after FASTP which trims down to 25 reads - - options "-stub" - - when { - workflow { - """ - skip_fastqc = false - with_umi = false - skip_umi_extract = false - umi_discard_read = 1 - skip_trimming = false - adapter_fasta = [] - save_trimmed_fail = false - save_merged = true - min_trimmed_reads = 26 - - 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) - ] - ]) - input[1] = skip_fastqc - input[2] = with_umi - input[3] = skip_umi_extract - input[4] = umi_discard_read - input[5] = skip_trimming - input[6] = adapter_fasta - input[7] = save_trimmed_fail - input[8] = save_merged - input[9] = min_trimmed_reads - """ - } - } - - then { - assertAll( - { assert workflow.success }, - { assert snapshot(workflow.out).match() } - ) - } - } -} diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap deleted file mode 100644 index e7d1f51..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap +++ /dev/null @@ -1,2407 +0,0 @@ -{ - "skip_fastqc": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 198 - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:56:01.933832" - }, - "save_trimmed_fail": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 162 - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" - ] - ] - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:57:38.736" - }, - "skip_umi_extract": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 198 - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:56:47.905105" - }, - "umi_discard_read = 2": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 198 - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:57:05.436744" - }, - "umi_discard_read = 2 - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:59:27.273892" - }, - "skip_trimming - stub": { - "content": [ - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:59:39.247758" - }, - "save_merged": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 75 - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:57:57.472342" - }, - "skip_trimming": { - "content": [ - [ - - ], - { - "id": "test", - "single_end": false - }, - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:57:19.875543" - }, - "with_umi": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,ba8c6c3a7ce718d9a2c5857e2edf53bc" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d39c5c6d9a2e35fb60d26ced46569af6" - ] - ], - [ - [ - { - "id": "test", - "single_end": true - }, - 99 - ] - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:56:26.778625" - }, - "min_trimmed_reads = 26": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 75 - ] - ], - [ - - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" - ] - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:58:16.36697" - }, - "min_trimmed_reads = 26 - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 26 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 26 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T17:00:16.524361" - }, - "with_umi - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": true - }, - 1 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": true - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": true - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - [ - { - "id": "test", - "single_end": true - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": true - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": true - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": true - }, - 1 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.umi_extract.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,01f264f78de3c6d893c449cc6d3cd721", - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:58:56.42517" - }, - "skip_fastqc - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "11": [ - - ], - "12": [ - - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" - ], - "2": [ - - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - - ], - "fastqc_raw_zip": [ - - ], - "fastqc_trim_html": [ - - ], - "fastqc_trim_zip": [ - - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:58:41.207281" - }, - "save_merged - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - [ - { - "id": "test", - "single_end": false - }, - "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T17:00:03.695409" - }, - "sarscov2 paired-end [fastq]": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "unspecified" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" - ] - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - 198 - ] - ], - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:55:50.614571" - }, - "sarscov2 paired-end [fastq] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:58:29.296468" - }, - "save_trimmed_fail - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "9": [ - - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "trim_reads_fail": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:59:51.615894" - }, - "skip_umi_extract - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "10": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "11": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "12": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "13": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "5": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "6": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "7": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "8": [ - - ], - "9": [ - - ], - "adapter_seq": [ - [ - { - "id": "test", - "single_end": false - }, - "" - ] - ], - "fastqc_raw_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_raw_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "fastqc_trim_zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "reads": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] - ] - ], - "trim_html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_json": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_log": [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "trim_read_count": [ - [ - { - "id": "test", - "single_end": false - }, - 1 - ] - ], - "trim_reads_fail": [ - - ], - "trim_reads_merged": [ - - ], - "umi_log": [ - - ], - "versions": [ - "versions.yml:md5,85bd0117e5778fff18e3920972a296ad", - "versions.yml:md5,c50aa59475ab901bc6f9a2cf7b1a14e0", - "versions.yml:md5,f3dcaae948e8eed92b4a5557b4c6668e" - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T16:59:12.592278" - } -} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config deleted file mode 100644 index 0174cae..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.config +++ /dev/null @@ -1,11 +0,0 @@ -process { - - withName: UMITOOLS_EXTRACT { - ext.args = '--bc-pattern="NNNN" --bc-pattern2="NNNN"' - } - - withName: UMICOLLAPSE { - ext.prefix = { "${meta.id}.dedup" } - } - -} diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config deleted file mode 100644 index 21207ad..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/nextflow.save_trimmed.config +++ /dev/null @@ -1,6 +0,0 @@ -process { - // Make filtering more aggressive to make more reads fail - withName: FASTP { - ext.args = "-e 30" - } -} diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml deleted file mode 100644 index 84a4b56..0000000 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/fastq_fastqc_umitools_fastp: - - subworkflows/nf-core/fastq_fastqc_umitools_fastp/** 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 0000000..ac31f28 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -0,0 +1,126 @@ +// +// Subworkflow with functionality that may be useful for any Nextflow pipeline +// + +import org.yaml.snakeyaml.Yaml +import groovy.json.JsonOutput +import nextflow.extension.FilesEx + +/* +======================================================================================== + 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() { + String version_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 = JsonOutput.toJson(params) + temp_pf.text = JsonOutput.prettyPrint(jsonStr) + + 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() { + 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/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml new file mode 100644 index 0000000..e5c3a0a --- /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 0000000..68718e4 --- /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 0000000..e3f0baf --- /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 0000000..ca964ce --- /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 0000000..d0a926b --- /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 0000000..f847611 --- /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 0000000..14558c3 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -0,0 +1,446 @@ +// +// Subworkflow with utility functions specific to the nf-core pipeline template +// + +import org.yaml.snakeyaml.Yaml +import nextflow.extension.FilesEx + +/* +======================================================================================== + 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() { + valid_config = true + 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 = "" + String[] manifest_doi = workflow.manifest.doi.tokenize(",") + // 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 + for (String doi_ref: manifest_doi) 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() { + String version_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) { + Yaml yaml = new Yaml() + 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 { processVersionsFromYAML(it) } + .unique() + .mix(Channel.of(workflowVersionToYAML())) +} + +// +// Get workflow summary for MultiQC +// +def paramsSummaryMultiqc(summary_params) { + def summary_section = '' + for (group in summary_params.keySet()) { + 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" + 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 +} + +// +// nf-core logo +// +def nfCoreLogo(monochrome_logs=true) { + 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} ${getWorkflowVersion()}${colors.reset} + ${dashedLine(monochrome_logs)} + """.stripIndent() + ) +} + +// +// Return dashed line +// +def dashedLine(monochrome_logs=true) { + Map colors = logColours(monochrome_logs) + return "-${colors.dim}----------------------------------------------------${colors.reset}-" +} + +// +// ANSII colours used for terminal logging +// +def logColours(monochrome_logs=true) { + 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 +} + +// +// 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 (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 = [:] + 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'] = 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 + Map colors = logColours(monochrome_logs) + if (email_address) { + try { + if (plaintext_email) { throw GroovyException('Send plaintext e-mail, not HTML') } + // Try to send HTML e-mail using sendmail + def sendmail_tf = new File(workflow.launchDir.toString(), ".sendmail_tmp.html") + sendmail_tf.withWriter { w -> w << sendmail_html } + [ 'sendmail', '-t' ].execute() << sendmail_html + log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (sendmail)-" + } catch (all) { + // Catch failures and try with plaintext + def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ] + 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 } + 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 } + FilesEx.copyTo(output_tf.toPath(), "${outdir}/pipeline_info/pipeline_report.txt"); + output_tf.delete() +} + +// +// Print pipeline summary on completion +// +def completionSummary(monochrome_logs=true) { + Map colors = logColours(monochrome_logs) + 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 = [:] + 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'] = 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 0000000..d08d243 --- /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 0000000..1dc317f --- /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 0000000..1037232 --- /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 0000000..8940d32 --- /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 0000000..859d103 --- /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 0000000..d0a926b --- /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 0000000..ac8523c --- /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_nfvalidation_plugin/main.nf b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf new file mode 100644 index 0000000..2585b65 --- /dev/null +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf @@ -0,0 +1,62 @@ +// +// Subworkflow that uses the nf-validation plugin to render help text and parameter summary +// + +/* +======================================================================================== + IMPORT NF-VALIDATION PLUGIN +======================================================================================== +*/ + +include { paramsHelp } from 'plugin/nf-validation' +include { paramsSummaryLog } from 'plugin/nf-validation' +include { validateParameters } from 'plugin/nf-validation' + +/* +======================================================================================== + SUBWORKFLOW DEFINITION +======================================================================================== +*/ + +workflow UTILS_NFVALIDATION_PLUGIN { + + take: + print_help // boolean: print help + workflow_command // string: default commmand used to run pipeline + pre_help_text // string: string to be printed before help text and summary log + post_help_text // string: string to be printed after help text and summary log + validate_params // boolean: validate parameters + schema_filename // path: JSON schema file, null to use default value + + main: + + log.debug "Using schema file: ${schema_filename}" + + // Default values for strings + pre_help_text = pre_help_text ?: '' + post_help_text = post_help_text ?: '' + workflow_command = workflow_command ?: '' + + // + // Print help message if needed + // + if (print_help) { + log.info pre_help_text + paramsHelp(workflow_command, parameters_schema: schema_filename) + post_help_text + System.exit(0) + } + + // + // Print parameter summary to stdout + // + log.info pre_help_text + paramsSummaryLog(workflow, parameters_schema: schema_filename) + post_help_text + + // + // Validate parameters relative to the parameter JSON schema + // + if (validate_params){ + validateParameters(parameters_schema: schema_filename) + } + + emit: + dummy_emit = true +} diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml b/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml new file mode 100644 index 0000000..3d4a6b0 --- /dev/null +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml @@ -0,0 +1,44 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "UTILS_NFVALIDATION_PLUGIN" +description: Use nf-validation to initiate and validate a pipeline +keywords: + - utility + - pipeline + - initialise + - validation +components: [] +input: + - print_help: + type: boolean + description: | + Print help message and exit + - workflow_command: + type: string + description: | + The command to run the workflow e.g. "nextflow run main.nf" + - pre_help_text: + type: string + description: | + Text to print before the help message + - post_help_text: + type: string + description: | + Text to print after the help message + - validate_params: + type: boolean + description: | + Validate the parameters and error if invalid. + - schema_filename: + type: string + description: | + The filename of the schema to validate against. +output: + - dummy_emit: + type: boolean + description: | + Dummy emit to make nf-core subworkflows lint happy +authors: + - "@adamrtalbot" +maintainers: + - "@adamrtalbot" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test new file mode 100644 index 0000000..5784a33 --- /dev/null +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test @@ -0,0 +1,200 @@ +nextflow_workflow { + + name "Test Workflow UTILS_NFVALIDATION_PLUGIN" + script "../main.nf" + workflow "UTILS_NFVALIDATION_PLUGIN" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "plugin/nf-validation" + tag "'plugin/nf-validation'" + tag "utils_nfvalidation_plugin" + tag "subworkflows/utils_nfvalidation_plugin" + + test("Should run nothing") { + + when { + + params { + monochrome_logs = true + test_data = '' + } + + workflow { + """ + help = false + workflow_command = null + pre_help_text = null + post_help_text = null + validate_params = false + schema_filename = "$moduleTestDir/nextflow_schema.json" + + input[0] = help + input[1] = workflow_command + input[2] = pre_help_text + input[3] = post_help_text + input[4] = validate_params + input[5] = schema_filename + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should run help") { + + + when { + + params { + monochrome_logs = true + test_data = '' + } + workflow { + """ + help = true + workflow_command = null + pre_help_text = null + post_help_text = null + validate_params = false + schema_filename = "$moduleTestDir/nextflow_schema.json" + + input[0] = help + input[1] = workflow_command + input[2] = pre_help_text + input[3] = post_help_text + input[4] = validate_params + input[5] = schema_filename + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert workflow.exitStatus == 0 }, + { assert workflow.stdout.any { it.contains('Input/output options') } }, + { assert workflow.stdout.any { it.contains('--outdir') } } + ) + } + } + + test("Should run help with command") { + + when { + + params { + monochrome_logs = true + test_data = '' + } + workflow { + """ + help = true + workflow_command = "nextflow run noorg/doesntexist" + pre_help_text = null + post_help_text = null + validate_params = false + schema_filename = "$moduleTestDir/nextflow_schema.json" + + input[0] = help + input[1] = workflow_command + input[2] = pre_help_text + input[3] = post_help_text + input[4] = validate_params + input[5] = schema_filename + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert workflow.exitStatus == 0 }, + { assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } }, + { assert workflow.stdout.any { it.contains('Input/output options') } }, + { assert workflow.stdout.any { it.contains('--outdir') } } + ) + } + } + + test("Should run help with extra text") { + + + when { + + params { + monochrome_logs = true + test_data = '' + } + workflow { + """ + help = true + workflow_command = "nextflow run noorg/doesntexist" + pre_help_text = "pre-help-text" + post_help_text = "post-help-text" + validate_params = false + schema_filename = "$moduleTestDir/nextflow_schema.json" + + input[0] = help + input[1] = workflow_command + input[2] = pre_help_text + input[3] = post_help_text + input[4] = validate_params + input[5] = schema_filename + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert workflow.exitStatus == 0 }, + { assert workflow.stdout.any { it.contains('pre-help-text') } }, + { assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } }, + { assert workflow.stdout.any { it.contains('Input/output options') } }, + { assert workflow.stdout.any { it.contains('--outdir') } }, + { assert workflow.stdout.any { it.contains('post-help-text') } } + ) + } + } + + test("Should validate params") { + + when { + + params { + monochrome_logs = true + test_data = '' + outdir = 1 + } + workflow { + """ + help = false + workflow_command = null + pre_help_text = null + post_help_text = null + validate_params = true + schema_filename = "$moduleTestDir/nextflow_schema.json" + + input[0] = help + input[1] = workflow_command + input[2] = pre_help_text + input[3] = post_help_text + input[4] = validate_params + input[5] = schema_filename + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ ERROR: Validation of pipeline parameters failed!') } } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/nextflow_schema.json b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/nextflow_schema.json new file mode 100644 index 0000000..7626c1c --- /dev/null +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/nextflow_schema.json @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json", + "title": ". pipeline parameters", + "description": "", + "type": "object", + "definitions": { + "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": "#/definitions/input_output_options" + }, + { + "$ref": "#/definitions/generic_options" + } + ] +} diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml new file mode 100644 index 0000000..60b1cff --- /dev/null +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml @@ -0,0 +1,2 @@ +subworkflows/utils_nfvalidation_plugin: + - subworkflows/nf-core/utils_nfvalidation_plugin/** diff --git a/tests/minimal/assemblysheet.csv b/tests/minimal/assemblysheet.csv deleted file mode 100644 index a77d36a..0000000 --- a/tests/minimal/assemblysheet.csv +++ /dev/null @@ -1,2 +0,0 @@ -tag,fasta,is_masked -a_thaliana,https://raw.githubusercontent.com/Gaius-Augustus/BRAKER/f58479fe5bb13a9e51c3ca09cb9e137cab3b8471/example/genome.fa,yes diff --git a/tests/minimal/params.json b/tests/minimal/params.json deleted file mode 100644 index c3e9566..0000000 --- a/tests/minimal/params.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "input": "tests/minimal/assemblysheet.csv", - "protein_evidence": "https://raw.githubusercontent.com/Gaius-Augustus/BRAKER/f58479fe5bb13a9e51c3ca09cb9e137cab3b8471/example/proteins.fa", - "braker_extra_args": "--gm_max_intergenic 10000 --skipOptimize", - "busco_lineage_datasets": "eudicots_odb10" -} diff --git a/tests/stub/assemblysheet.csv b/tests/stub/assemblysheet.csv deleted file mode 100644 index 7fdff29..0000000 --- a/tests/stub/assemblysheet.csv +++ /dev/null @@ -1,4 +0,0 @@ -tag,fasta,is_masked,te_lib,braker_gff3,braker_hints -red5_v2p1,tests/stub/target/red5_v2p1_chr1.fasta.gz,no,,tests/stub/braker/red5_v2p1.gff3.gz,tests/stub/braker/red5_v2p1.hints.gff.gz -donghong,tests/stub/target/donghong.chr1.fsa.gz,no,tests/stub/te_lib/donghong.TElib.fa.gz,tests/stub/braker/red5_v2p1.gff3.gz,tests/stub/braker/red5_v2p1.hints.gff.gz -red5_v3,tests/stub/target/red5_v3_chr1.fasta,yes diff --git a/tests/stub/bam/1505KHS-0090_Root3.red5_v3.bam b/tests/stub/bam/1505KHS-0090_Root3.red5_v3.bam deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/bam/1505KHS-0092_Root3.red5_v3.bam b/tests/stub/bam/1505KHS-0092_Root3.red5_v3.bam deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/braker/donghong.gff3.gz b/tests/stub/braker/donghong.gff3.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/braker/donghong.hints.gff.gz b/tests/stub/braker/donghong.hints.gff.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/braker/red5_v2p1.gff3.gz b/tests/stub/braker/red5_v2p1.gff3.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/braker/red5_v2p1.hints.gff.gz b/tests/stub/braker/red5_v2p1.hints.gff.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/emapperdb/5.0.2/eggnog.db b/tests/stub/emapperdb/5.0.2/eggnog.db deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/emapperdb/5.0.2/eggnog_proteins.dmnd b/tests/stub/emapperdb/5.0.2/eggnog_proteins.dmnd deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/ext_prot/RU01.20221115150135.chr1.pep.fasta.gz b/tests/stub/ext_prot/RU01.20221115150135.chr1.pep.fasta.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/ext_prot/RU01.20221115150135.chr2.pep.fasta.gz b/tests/stub/ext_prot/RU01.20221115150135.chr2.pep.fasta.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/external-protein-fastas.txt b/tests/stub/external-protein-fastas.txt deleted file mode 100644 index d510c4c..0000000 --- a/tests/stub/external-protein-fastas.txt +++ /dev/null @@ -1,2 +0,0 @@ -tests/stub/ext_prot/RU01.20221115150135.chr1.pep.fasta.gz -tests/stub/ext_prot/RU01.20221115150135.chr2.pep.fasta.gz diff --git a/tests/stub/fq/1505KHS-0090_Root1_162bp_C728RACXX_Lane1_R1.1k.fastq.gz b/tests/stub/fq/1505KHS-0090_Root1_162bp_C728RACXX_Lane1_R1.1k.fastq.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/fq/1505KHS-0090_Root1_162bp_C728RACXX_Lane1_R2.1k.fastq.gz b/tests/stub/fq/1505KHS-0090_Root1_162bp_C728RACXX_Lane1_R2.1k.fastq.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/fq/1505KHS-0090_Root2_156bp_C728RACXX_Lane1_R1.1k.fastq.gz b/tests/stub/fq/1505KHS-0090_Root2_156bp_C728RACXX_Lane1_R1.1k.fastq.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/fq/1505KHS-0090_Root2_156bp_C728RACXX_Lane1_R2.1k.fastq.gz b/tests/stub/fq/1505KHS-0090_Root2_156bp_C728RACXX_Lane1_R2.1k.fastq.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/fq/1505KHS-0090_cane3_165bp_C728RACXX_Lane1_R1.1k.fastq.gz b/tests/stub/fq/1505KHS-0090_cane3_165bp_C728RACXX_Lane1_R1.1k.fastq.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/fq/1505KHS-0090_cane3_165bp_C728RACXX_Lane1_R2.1k.fastq.gz b/tests/stub/fq/1505KHS-0090_cane3_165bp_C728RACXX_Lane1_R2.1k.fastq.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/liftoff/RU01.20221115150135.chr1.gff3.gz b/tests/stub/liftoff/RU01.20221115150135.chr1.gff3.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/liftoff/RU01.20221115150135.chr2.gff3.gz b/tests/stub/liftoff/RU01.20221115150135.chr2.gff3.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/liftoff/Russell_V2a.chr1.fsa.gz b/tests/stub/liftoff/Russell_V2a.chr1.fsa.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/liftoff/Russell_V2a.chr2.fsa.gz b/tests/stub/liftoff/Russell_V2a.chr2.fsa.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/liftoffannotations.csv b/tests/stub/liftoffannotations.csv deleted file mode 100644 index 5215d2c..0000000 --- a/tests/stub/liftoffannotations.csv +++ /dev/null @@ -1,3 +0,0 @@ -fasta,gff3 -tests/stub/liftoff/Russell_V2a.chr1.fsa.gz,tests/stub/liftoff/RU01.20221115150135.chr1.gff3.gz -tests/stub/liftoff/Russell_V2a.chr2.fsa.gz,tests/stub/liftoff/RU01.20221115150135.chr2.gff3.gz diff --git a/tests/stub/params.json b/tests/stub/params.json deleted file mode 100644 index dbaa4fb..0000000 --- a/tests/stub/params.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "input": "tests/stub/assemblysheet.csv", - "protein_evidence": "tests/stub/external-protein-fastas.txt", - "eggnogmapper_db_dir": "tests/stub/emapperdb/5.0.2", - "eggnogmapper_tax_scope": 33090, - "rna_evidence": "tests/stub/rnasheet.csv", - "liftoff_annotations": "tests/stub/liftoffannotations.csv", - "max_cpus": 2, - "max_memory": "3.GB" -} diff --git a/tests/stub/rnasheet.csv b/tests/stub/rnasheet.csv deleted file mode 100644 index 610bfbc..0000000 --- a/tests/stub/rnasheet.csv +++ /dev/null @@ -1,6 +0,0 @@ -sample,file_1,file_2,target_assemblies -Root1,tests/stub/fq/1505KHS-0090_Root1_162bp_C728RACXX_Lane1_R1.1k.fastq.gz,tests/stub/fq/1505KHS-0090_Root1_162bp_C728RACXX_Lane1_R2.1k.fastq.gz,red5_v2p1;red5_v3 -Root1,tests/stub/fq/1505KHS-0090_Root2_156bp_C728RACXX_Lane1_R1.1k.fastq.gz,tests/stub/fq/1505KHS-0090_Root2_156bp_C728RACXX_Lane1_R2.1k.fastq.gz,red5_v2p1;red5_v3 -Root3,tests/stub/bam/1505KHS-0090_Root3.red5_v3.bam,,red5_v3 -Root3,tests/stub/bam/1505KHS-0092_Root3.red5_v3.bam,,red5_v3 -cane3,tests/stub/fq/1505KHS-0090_cane3_165bp_C728RACXX_Lane1_R1.1k.fastq.gz,tests/stub/fq/1505KHS-0090_cane3_165bp_C728RACXX_Lane1_R2.1k.fastq.gz,red5_v2p1;donghong;red5_v3 diff --git a/tests/stub/target/donghong.chr1.fsa.gz b/tests/stub/target/donghong.chr1.fsa.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/target/red5_v2p1_chr1.fasta.gz b/tests/stub/target/red5_v2p1_chr1.fasta.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/target/red5_v3_chr1.fasta b/tests/stub/target/red5_v3_chr1.fasta deleted file mode 100644 index e69de29..0000000 diff --git a/tests/stub/te_lib/donghong.TElib.fa.gz b/tests/stub/te_lib/donghong.TElib.fa.gz deleted file mode 100644 index e69de29..0000000 diff --git a/tower.yml b/tower.yml new file mode 100644 index 0000000..787aedf --- /dev/null +++ b/tower.yml @@ -0,0 +1,5 @@ +reports: + multiqc_report.html: + display: "MultiQC HTML report" + samplesheet.csv: + display: "Auto-created samplesheet with collated metadata and FASTQ paths" diff --git a/workflows/genepal.nf b/workflows/genepal.nf index 9543981..1fb6a59 100644 --- a/workflows/genepal.nf +++ b/workflows/genepal.nf @@ -1,394 +1,98 @@ -include { fromSamplesheet; paramsSummaryLog } from 'plugin/nf-validation' -include { idFromFileName; validateFastqMetadata } from '../modules/local/utils' -include { validateBamMetadata } from '../modules/local/utils' -include { PREPARE_ASSEMBLY } from '../subworkflows/local/prepare_assembly' -include { PREPROCESS_RNASEQ } from '../subworkflows/local/preprocess_rnaseq' -include { ALIGN_RNASEQ } from '../subworkflows/local/align_rnaseq' -include { PREPARE_EXT_PROTS } from '../subworkflows/local/prepare_ext_prots' -include { FASTA_BRAKER3 } from '../subworkflows/local/fasta_braker3' -include { FASTA_LIFTOFF } from '../subworkflows/local/fasta_liftoff' -include { PURGE_BRAKER_MODELS } from '../subworkflows/local/purge_braker_models' -include { GFF_MERGE_CLEANUP } from '../subworkflows/local/gff_merge_cleanup' -include { GFF_EGGNOGMAPPER } from '../subworkflows/local/gff_eggnogmapper' -include { PURGE_NOHIT_MODELS } from '../subworkflows/local/purge_nohit_models' -include { GFF_STORE } from '../subworkflows/local/gff_store' -include { FASTA_ORTHOFINDER } from '../subworkflows/local/fasta_orthofinder' -include { FASTA_GXF_BUSCO_PLOT } from '../subworkflows/gallvp/fasta_gxf_busco_plot/main' -include { CAT_CAT as SAVE_MARKED_GFF3 } from '../modules/nf-core/cat/cat/main' -include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions' - -include { GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES } from '../subworkflows/gallvp/gxf_fasta_agat_spaddintrons_spextractsequences/main' - -log.info paramsSummaryLog(workflow) +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 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-validation' +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_genepal_pipeline' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RUN MAIN WORKFLOW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ workflow GENEPAL { - // Versions channel - ch_versions = Channel.empty() - - // Input channels - ch_input = Channel.fromSamplesheet('input') - - ch_target_assembly = ch_input - | map { it -> - def tag = it[0] - def fasta = it[1] - - [ [ id: tag ], file(fasta, checkIfExists: true) ] - } - - ch_tar_assm_str = ch_input - | map { it -> - def tag = it[0].strip() - - tag - } - | collect - | map { it -> - it.join(",") - } - - ch_is_masked = ch_input - | map { it -> - def tag = it[0] - def is_masked = it[2] - - [ [ id: tag ], is_masked == "yes" ] - } - - ch_te_library = ch_input - | map { it -> - def tag = it[0] - def te_fasta = it[3] - - if ( te_fasta ) { - [ [ id:tag ], file(te_fasta, checkIfExists: true) ] - } - } - - ch_braker_annotation = ch_input - | map { it -> - def tag = it[0] - def braker_gff3 = it[4] - def hints_gff = it[5] - - if ( braker_gff3 ) { - [ - [ id: tag ], - file(braker_gff3, checkIfExists: true), - file(hints_gff, checkIfExists: true) - ] - } - } - - ch_braker_ex_asm_str = ch_braker_annotation - | map { meta, braker_gff3, hints_gff -> meta.id } - | collect - | map { it.join(",") } - | ifEmpty( "" ) - - ch_rna_branch = ! params.rna_evidence - ? Channel.empty() - : Channel.fromSamplesheet('rna_evidence') - | map { meta, f1, f2 -> - f2 - ? [ meta + [ single_end: false ], [ file(f1, checkIfExists:true), file(f2, checkIfExists:true) ] ] - : [ meta + [ single_end: true ], [ file(f1, checkIfExists:true) ] ] - } - | map { meta, files -> - [ meta + [ target_assemblies: meta.target_assemblies.split(';').sort() ], files ] - } - | branch { meta, files -> - fq: files.first().extension != 'bam' - bam: files.first().extension == 'bam' - } - - ch_rna_fq = ! params.rna_evidence - ? Channel.empty() - : ch_rna_branch.fq - | map { meta, files -> [ meta.id, meta, files ] } - | groupTuple - | combine(ch_tar_assm_str) - | map { id, metas, files, tar_assm_str -> - validateFastqMetadata(metas, files, tar_assm_str) - } - - ch_rna_bam = ! params.rna_evidence - ? Channel.empty() - : ch_rna_branch.bam - | map { meta, files -> [ meta.id, meta, files ] } - | groupTuple - | combine(ch_tar_assm_str) - | flatMap { id, metas, files, tar_assm_str -> - validateBamMetadata(metas, files, tar_assm_str) - } - - // Check if each sample for a given assembly has either bam or fastq files - ch_rna_bam - | flatMap { meta, bams -> - meta.target_assemblies.collect { [ [ meta.id, it ], 'bam' ] } - } - | join( - ch_rna_fq - | flatMap { meta, fqs -> - meta.target_assemblies.collect { [ [ meta.id, it ], 'fq' ] } - } - ) - | map { combination, bam, fq -> - error "Sample ${combination[0]} for assembly ${combination[1]} can not have both fastq and bam files" - } - - ch_rna_bam_by_assembly = ch_rna_bam - | map { meta, bams -> [ [ id: meta.target_assemblies.first() ], bams ] } - | groupTuple - | map { meta, bams -> [ meta, bams.flatten() ] } - - ch_ribo_db = params.remove_ribo_rna - ? file(params.ribo_database_manifest, checkIfExists: true) - : null - - ch_sortmerna_fastas = ch_ribo_db - ? Channel.from(ch_ribo_db ? ch_ribo_db.readLines() : null) - | map { row -> file(row, checkIfExists: true) } - | collect - : Channel.empty() - - ch_ext_prot_fastas = ( params.protein_evidence.endsWith('txt') - ? Channel.fromPath(params.protein_evidence) - | splitText - : Channel.fromPath(params.protein_evidence) - ) - | map { file_path -> - - def file_handle = ( file_path instanceof String ) - ? file(file_path.strip(), checkIfExists: true) - : file_path - - [ [ id: idFromFileName( file_handle.baseName ) ], file_handle ] - } - - - ch_liftoff_mm = ! params.liftoff_annotations - ? Channel.empty() - : Channel.fromSamplesheet('liftoff_annotations') - | multiMap { fasta, gff -> - def fastaFile = file(fasta, checkIfExists:true) - - fasta: [ [ id: idFromFileName( fastaFile.baseName ) ], fastaFile ] - gff: [ [ id: idFromFileName( fastaFile.baseName ) ], file(gff, checkIfExists:true) ] - } - - ch_liftoff_fasta = params.liftoff_annotations - ? ch_liftoff_mm.fasta - : Channel.empty() - - ch_liftoff_gff = params.liftoff_annotations - ? ch_liftoff_mm.gff - : Channel.empty() - - ch_tsebra_config = Channel.of ( file("${projectDir}/assets/tsebra-template.cfg", checkIfExists: true) ) - | map { cfg -> - def param_intron_support = params.enforce_full_intron_support ? '1.0' : '0.0' - - def param_e1 = params.allow_isoforms ? '0.1' : '0.0' - def param_e2 = params.allow_isoforms ? '0.5' : '0.0' - def param_e3 = params.allow_isoforms ? '0.05' : '0.0' - def param_e4 = params.allow_isoforms ? '0.2' : '0.0' - - [ - 'tsebra-config.cfg', - cfg - .text - .replace('PARAM_INTRON_SUPPORT', param_intron_support) - .replace('PARAM_E1', param_e1) - .replace('PARAM_E2', param_e2) - .replace('PARAM_E3', param_e3) - .replace('PARAM_E4', param_e4) - ] - } - | collectFile - - - ch_orthofinder_pep = ! params.orthofinder_annotations - ? Channel.empty() - : Channel.fromSamplesheet('orthofinder_annotations') - | map { tag, fasta -> - [ [ id: tag ], file(fasta, checkIfExists:true) ] - } - - // SUBWORKFLOW: PREPARE_ASSEMBLY - PREPARE_ASSEMBLY( - ch_target_assembly, - ch_te_library, - params.repeat_annotator, - ch_braker_ex_asm_str, - ch_is_masked - ) - - ch_valid_target_assembly = PREPARE_ASSEMBLY.out.target_assemby - ch_masked_target_assembly = PREPARE_ASSEMBLY.out.masked_target_assembly - ch_target_assemby_index = PREPARE_ASSEMBLY.out.target_assemby_index - ch_versions = ch_versions.mix(PREPARE_ASSEMBLY.out.versions) - - // SUBWORKFLOW: PREPROCESS_RNASEQ - PREPROCESS_RNASEQ( - ch_rna_fq, - ch_tar_assm_str, - ch_braker_ex_asm_str, - params.skip_fastqc, - params.skip_fastp, - params.save_trimmed, - params.min_trimmed_reads, - params.remove_ribo_rna, - ch_sortmerna_fastas - ) - - ch_trim_reads = PREPROCESS_RNASEQ.out.trim_reads - ch_reads_target = PREPROCESS_RNASEQ.out.reads_target - ch_versions = ch_versions.mix(PREPROCESS_RNASEQ.out.versions) - - // SUBWORKFLOW: ALIGN_RNASEQ - ALIGN_RNASEQ( - ch_reads_target, - ch_trim_reads, - ch_rna_bam_by_assembly, - ch_target_assemby_index, - ) - - ch_rnaseq_bam = ALIGN_RNASEQ.out.bam - ch_versions = ch_versions.mix(ALIGN_RNASEQ.out.versions) - - // MODULE: PREPARE_EXT_PROTS - PREPARE_EXT_PROTS( - ch_ext_prot_fastas - ) - - ch_ext_prots_fasta = PREPARE_EXT_PROTS.out.ext_prots_fasta - ch_versions = ch_versions.mix(PREPARE_EXT_PROTS.out.versions) - - // SUBWORKFLOW: FASTA_BRAKER3 - FASTA_BRAKER3( - ch_masked_target_assembly, - ch_braker_ex_asm_str, - ch_rnaseq_bam, - ch_ext_prots_fasta, - ch_braker_annotation - ) - - ch_braker_gff3 = FASTA_BRAKER3.out.braker_gff3 - ch_braker_hints = FASTA_BRAKER3.out.braker_hints - ch_versions = ch_versions.mix(FASTA_BRAKER3.out.versions) - - // SUBWORKFLOW: FASTA_LIFTOFF - FASTA_LIFTOFF( - ch_valid_target_assembly, - ch_liftoff_fasta, - ch_liftoff_gff, - params.filter_liftoff_by_hints, - ch_braker_hints, - ch_tsebra_config, - params.allow_isoforms - ) - - ch_liftoff_gff3 = FASTA_LIFTOFF.out.gff3 - ch_versions = ch_versions.mix(FASTA_LIFTOFF.out.versions) - - // SUBWORKFLOW: PURGE_BRAKER_MODELS - PURGE_BRAKER_MODELS( - ch_braker_gff3, - ch_braker_hints, - ch_liftoff_gff3, - ch_tsebra_config, - params.allow_isoforms - ) - - ch_braker_purged_gff = PURGE_BRAKER_MODELS.out.braker_purged_gff - ch_versions = ch_versions.mix(PURGE_BRAKER_MODELS.out.versions) - - // SUBWORKFLOW: GFF_MERGE_CLEANUP - GFF_MERGE_CLEANUP( - ch_braker_purged_gff, - ch_liftoff_gff3 - ) - - ch_merged_gff = GFF_MERGE_CLEANUP.out.gff - ch_versions = ch_versions.mix(GFF_MERGE_CLEANUP.out.versions) - - // SUBWORKFLOW: GFF_EGGNOGMAPPER - GFF_EGGNOGMAPPER( - ch_merged_gff, - ch_valid_target_assembly, - params.eggnogmapper_db_dir, - ) - - ch_eggnogmapper_hits = GFF_EGGNOGMAPPER.out.eggnogmapper_hits - ch_eggnogmapper_annotations = GFF_EGGNOGMAPPER.out.eggnogmapper_annotations - ch_versions = ch_versions.mix(GFF_EGGNOGMAPPER.out.versions) - - // SUBWORKFLOW: PURGE_NOHIT_MODELS - PURGE_NOHIT_MODELS( - ch_merged_gff, - ch_eggnogmapper_hits, - params.eggnogmapper_purge_nohits && params.eggnogmapper_db_dir - ) - - ch_purged_gff = PURGE_NOHIT_MODELS.out.purged_gff - ch_versions = ch_versions.mix(PURGE_NOHIT_MODELS.out.versions) - - // SUBWORKFLOW: GFF_STORE - GFF_STORE( - ch_purged_gff, - ch_eggnogmapper_annotations, - ch_valid_target_assembly, - params.eggnogmapper_db_dir - ) - - ch_final_gff = GFF_STORE.out.final_gff - ch_final_proteins = GFF_STORE.out.final_proteins - ch_versions = ch_versions.mix(GFF_STORE.out.versions) - - // SUBWORKFLOW: FASTA_ORTHOFINDER - FASTA_ORTHOFINDER( - ch_final_proteins, - ch_orthofinder_pep - ) - - ch_versions = ch_versions.mix(FASTA_ORTHOFINDER.out.versions) - - // SUBWORKFLOW: FASTA_GXF_BUSCO_PLOT - ch_busco_fasta = params.busco_skip - ? Channel.empty() - : ch_valid_target_assembly - - ch_busco_gff = params.busco_skip - ? Channel.empty() - : ch_final_gff - - FASTA_GXF_BUSCO_PLOT( - ch_busco_fasta, - ch_busco_gff, - 'genome', - params.busco_lineage_datasets?.tokenize(' '), - [], // val_busco_lineages_path - [] // val_busco_config - ) - - ch_versions = ch_versions.mix(FASTA_GXF_BUSCO_PLOT.out.versions) - - // SUBWORKFLOW: GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES - GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES( - ch_final_gff, - ch_valid_target_assembly - ) - - ch_splicing_marked_gff3 = GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES.out.marked_gff3 - ch_versions = ch_versions.mix(GXF_FASTA_AGAT_SPADDINTRONS_SPEXTRACTSEQUENCES.out.versions) - - // MODULE: CAT_CAT as SAVE_MARKED_GFF3 - SAVE_MARKED_GFF3 ( ch_splicing_marked_gff3 ) - - // MODULE: CUSTOM_DUMPSOFTWAREVERSIONS - CUSTOM_DUMPSOFTWAREVERSIONS ( - ch_versions.unique().collectFile(name: 'collated_versions.yml') - ) + 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_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_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + 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 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/
    Process Name \\", - " \\ Software Version
    CUSTOM_DUMPSOFTWAREVERSIONSpython3.11.7
    yaml5.4.1
    TOOL1tool10.11.9
    TOOL2tool21.9
    WorkflowNextflow
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls
    File typeConventional base calls