├── .devcontainer └── devcontainer.json ├── .editorconfig ├── .gitattributes ├── .github ├── .dockstore.yml ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md ├── python │ ├── find_changed_files.py │ └── include.yaml └── workflows │ ├── awsfulltest.yml │ ├── awstest.yml │ ├── branch.yml │ ├── ci.yml │ ├── clean-up.yml │ ├── download_pipeline.yml │ ├── fix-linting.yml │ ├── linting.yml │ ├── linting_comment.yml │ └── release-announcements.yml ├── .gitignore ├── .gitpod.yml ├── .nf-core.yml ├── .pre-commit-config.yaml ├── .prettierignore ├── .prettierrc.yml ├── CHANGELOG.md ├── CITATIONS.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── assets ├── adaptivecard.json ├── email_template.html ├── email_template.txt ├── methods_description_template.yml ├── multiqc_config.yml ├── nf-core-phageannotator_logo_light.png ├── schema_input.json ├── sendmail_template.txt ├── slackreport.json └── viromeqc │ └── medians.csv ├── bin ├── anicalc.py ├── aniclust.py ├── append_screen_hits.py ├── biopython_version.py ├── cmseq_filter.py ├── create_instrain_stb.py ├── extract_viral_assemblies.py ├── extractreps.py ├── fastq_len_filter.py ├── numpy_version.py ├── pandas_version.py ├── quality_filter_viruses.py └── viromeQC.py ├── conf ├── base.config ├── test.config └── test_full.config ├── docs ├── README.md ├── images │ ├── mqc_fastqc_adapter.png │ ├── mqc_fastqc_counts.png │ ├── mqc_fastqc_quality.png │ ├── nf-core-phageannotator_logo_dark.png │ ├── nf-core-phageannotator_logo_light.png │ ├── nf-core-phageannotator_workflow.png │ └── nf-core-phageannotator_workflow.svg ├── output.md └── usage.md ├── lib └── NftestUtils.groovy ├── main.nf ├── modules.json ├── modules ├── local │ ├── anicluster │ │ ├── anicalc │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ │ ├── main.nf.test │ │ │ │ ├── main.nf.test.snap │ │ │ │ └── tags.yml │ │ ├── aniclust │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ │ ├── main.nf.test │ │ │ │ ├── main.nf.test.snap │ │ │ │ └── tags.yml │ │ └── extractreps │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── appendscreenhits │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── coverm │ │ └── contig │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── extractviralassemblies │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ └── main.nf.test.snap │ ├── instrain │ │ └── stb │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── mash │ │ └── paste │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── qualityfilterviruses │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── seqkit │ │ └── seq │ │ │ ├── environment.yml │ │ │ ├── main.nf │ │ │ ├── nextflow.config │ │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ └── viromeqc │ │ ├── install │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ │ └── viromeqc │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml └── nf-core │ ├── bacphlip │ ├── environment.yml │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── blast │ ├── blastn │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ ├── nextflow.config │ │ │ └── tags.yml │ └── makeblastdb │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── bowtie2 │ ├── align │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── cram_crai.config │ │ │ ├── large_index.config │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ ├── sam.config │ │ │ ├── sam2.config │ │ │ └── tags.yml │ └── build │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── cat │ └── cat │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow_unzipped_zipped.config │ │ ├── nextflow_zipped_unzipped.config │ │ └── tags.yml │ ├── checkv │ ├── downloaddatabase │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ ├── nextflow.config │ │ │ └── tags.yml │ └── endtoend │ │ ├── checkv-endtoend.diff │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── cobrameta │ ├── cobrameta.diff │ ├── environment.yml │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── fastqc │ ├── environment.yml │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── genomad │ ├── download │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ ├── nextflow.config │ │ │ └── tags.yml │ └── endtoend │ │ ├── genomad-endtoend.diff │ │ ├── main.nf │ │ ├── meta.yml │ │ └── nextflow.config │ ├── gunzip │ ├── environment.yml │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── instrain │ ├── compare │ │ ├── environment.yml │ │ ├── instrain-compare.diff │ │ ├── main.nf │ │ ├── meta.yml │ │ └── nextflow.config │ └── profile │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── iphop │ ├── download │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ └── nextflow.config │ └── predict │ │ ├── environment.yml │ │ ├── iphop-predict.diff │ │ ├── main.nf │ │ ├── meta.yml │ │ └── nextflow.config │ ├── mash │ ├── screen │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ └── sketch │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── multiqc │ ├── environment.yml │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── pharokka │ ├── installdatabases │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ └── pharokka │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ ├── pharokka-pharokka.diff │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── samtools │ ├── flagstat │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── idxstats │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── index │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── csi.nextflow.config │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── sort │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ ├── nextflow.config │ │ │ └── tags.yml │ └── stats │ │ ├── environment.yml │ │ ├── main.nf │ │ ├── meta.yml │ │ ├── nextflow.config │ │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ └── untar │ ├── environment.yml │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ ├── main.nf.test │ ├── main.nf.test.snap │ └── tags.yml ├── nextflow.config ├── nextflow_schema.json ├── nf-test.config ├── pyproject.toml ├── subworkflows ├── local │ ├── fasta_all_v_all_blast │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── fasta_microdiversity_instrain │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── fasta_phage_function_pharokka │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ ├── nextflow.config │ │ │ └── tags.yml │ ├── fasta_phage_host_iphop │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── fasta_virus_classification_genomad │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── fasta_virus_quality_checkv │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── fastq_fasta_contig_extension_cobra │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ └── main.nf.test.snap │ ├── fastq_fasta_reference_containment_mash │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ ├── fastq_virus_enrichment_viromeqc │ │ ├── main.nf │ │ ├── nextflow.config │ │ └── tests │ │ │ ├── main.nf.test │ │ │ ├── main.nf.test.snap │ │ │ └── tags.yml │ └── utils_nfcore_phageannotator_pipeline │ │ └── main.nf └── nf-core │ ├── bam_sort_stats_samtools │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── bam_stats_samtools │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ └── tags.yml │ ├── fastq_align_bowtie2 │ ├── main.nf │ ├── meta.yml │ ├── nextflow.config │ └── tests │ │ ├── main.nf.test │ │ ├── main.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ ├── initialise │ ├── main.nf │ └── meta.yml │ ├── utils_nextflow_pipeline │ ├── main.nf │ ├── meta.yml │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── nextflow.config │ │ └── tags.yml │ ├── utils_nfcore_pipeline │ ├── main.nf │ ├── meta.yml │ └── tests │ │ ├── main.function.nf.test │ │ ├── main.function.nf.test.snap │ │ ├── main.workflow.nf.test │ │ ├── main.workflow.nf.test.snap │ │ ├── nextflow.config │ │ └── tags.yml │ └── utils_nfvalidation_plugin │ ├── main.nf │ ├── meta.yml │ └── tests │ ├── main.nf.test │ ├── nextflow_schema.json │ └── tags.yml ├── tests ├── main.nf.test ├── main.nf.test.snap ├── nextflow.config ├── nf-test-local-db-params.json └── tags.yml ├── tower.yml └── workflows ├── nextflow.config └── phageannotator ├── main.nf ├── nextflow.config └── tests ├── full_test.nf.test ├── full_test.nf.test.snap ├── main.nf.test ├── main.nf.test.snap ├── run_bacphlip.nf.test ├── run_bacphlip.nf.test.snap ├── run_cobra.nf.test ├── run_cobra.nf.test.snap ├── run_genomad_taxonomy.nf.test ├── run_genomad_taxonomy.nf.test.snap ├── run_instrain.nf.test ├── run_instrain.nf.test.snap ├── run_iphop.nf.test ├── run_iphop.nf.test.snap ├── run_pharokka.nf.test ├── run_pharokka.nf.test.snap ├── run_reference.nf.test ├── run_reference.nf.test.snap ├── run_reference_no_reference.nf.test ├── run_viromeqc.nf.test ├── run_viromeqc.nf.test.snap ├── skip_checkv.nf.test ├── skip_checkv.nf.test.snap ├── skip_genomad.nf.test ├── skip_genomad.nf.test.snap ├── skip_virus_clustering.nf.test ├── skip_virus_clustering.nf.test.snap └── tags.yml /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nfcore", 3 | "image": "nfcore/gitpod:latest", 4 | "remoteUser": "gitpod", 5 | "runArgs": ["--privileged"], 6 | 7 | // Configure tool-specific properties. 8 | "customizations": { 9 | // Configure properties specific to VS Code. 10 | "vscode": { 11 | // Set *default* container specific settings.json values on container create. 12 | "settings": { 13 | "python.defaultInterpreterPath": "/opt/conda/bin/python" 14 | }, 15 | 16 | // Add the IDs of extensions you want installed when the container is created. 17 | "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | indent_size = 4 9 | indent_style = space 10 | 11 | [*.{md,yml,yaml,html,css,scss,js}] 12 | indent_size = 2 13 | 14 | # These files are edited and tested upstream in nf-core/modules 15 | [/modules/nf-core/**] 16 | charset = unset 17 | end_of_line = unset 18 | insert_final_newline = unset 19 | trim_trailing_whitespace = unset 20 | indent_style = unset 21 | [/subworkflows/nf-core/**] 22 | charset = unset 23 | end_of_line = unset 24 | insert_final_newline = unset 25 | trim_trailing_whitespace = unset 26 | indent_style = unset 27 | 28 | [/assets/email*] 29 | indent_size = unset 30 | 31 | # ignore Readme 32 | [README.md] 33 | indent_style = unset 34 | 35 | # ignore python 36 | [*.{py,md}] 37 | indent_style = unset 38 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.config linguist-language=nextflow 2 | *.nf.test linguist-language=nextflow 3 | modules/nf-core/** linguist-generated 4 | subworkflows/nf-core/** linguist-generated 5 | *.nf.test.snap linguist-generated 6 | -------------------------------------------------------------------------------- /.github/.dockstore.yml: -------------------------------------------------------------------------------- 1 | # Dockstore config version, not pipeline version 2 | version: 1.2 3 | workflows: 4 | - subclass: nfl 5 | primaryDescriptorPath: /nextflow.config 6 | publish: True 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Join nf-core 3 | url: https://nf-co.re/join 4 | about: Please join the nf-core community here 5 | - name: "Slack #phageannotator channel" 6 | url: https://nfcore.slack.com/channels/phageannotator 7 | about: Discussion about the nf-core/phageannotator pipeline 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for the nf-core/phageannotator pipeline 3 | labels: enhancement 4 | body: 5 | - type: textarea 6 | id: description 7 | attributes: 8 | label: Description of feature 9 | 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. 10 | validations: 11 | required: true 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | ## PR checklist 15 | 16 | - [ ] This comment contains a description of changes (with reason). 17 | - [ ] If you've fixed a bug or added code that should be tested, add tests! 18 | - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/phageannotator/tree/master/.github/CONTRIBUTING.md) 19 | - [ ] If necessary, also make a PR on the nf-core/phageannotator _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. 20 | - [ ] Make sure your code lints (`nf-core lint`). 21 | - [ ] Ensure the test suite passes (`nf-test test main.nf.test -profile test,docker`). 22 | - [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). 23 | - [ ] Usage Documentation in `docs/usage.md` is updated. 24 | - [ ] Output Documentation in `docs/output.md` is updated. 25 | - [ ] `CHANGELOG.md` is updated. 26 | - [ ] `README.md` is updated (including new tool citations and authors/contributors). 27 | -------------------------------------------------------------------------------- /.github/python/include.yaml: -------------------------------------------------------------------------------- 1 | ".": 2 | - .github/workflows/** 3 | - nf-test.config 4 | - /./nextflow.config 5 | tests: 6 | - assets/* 7 | - bin/* 8 | - conf/* 9 | - /./main.nf 10 | - nextflow_schema.json 11 | -------------------------------------------------------------------------------- /.github/workflows/awsfulltest.yml: -------------------------------------------------------------------------------- 1 | name: nf-core AWS full size tests 2 | # This workflow is triggered on published releases. 3 | # It can be additionally triggered manually with GitHub actions workflow dispatch button. 4 | # It runs the -profile 'test_full' on AWS batch 5 | 6 | on: 7 | release: 8 | types: [published] 9 | workflow_dispatch: 10 | jobs: 11 | run-tower: 12 | name: Run AWS full tests 13 | if: github.repository == 'nf-core/phageannotator' 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Launch workflow via tower 17 | uses: seqeralabs/action-tower-launch@v2 18 | # TODO nf-core: You can customise AWS full pipeline tests as required 19 | # Add full size test data (but still relatively small datasets for few samples) 20 | # on the `test_full.config` test runs with only one set of parameters 21 | with: 22 | workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} 23 | access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} 24 | compute_env: ${{ secrets.TOWER_COMPUTE_ENV }} 25 | revision: ${{ github.sha }} 26 | workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/phageannotator/work-${{ github.sha }} 27 | parameters: | 28 | { 29 | "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", 30 | "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/phageannotator/results-${{ github.sha }}" 31 | } 32 | profiles: test_full 33 | 34 | - uses: actions/upload-artifact@v4 35 | with: 36 | name: Tower debug log file 37 | path: | 38 | tower_action_*.log 39 | tower_action_*.json 40 | -------------------------------------------------------------------------------- /.github/workflows/awstest.yml: -------------------------------------------------------------------------------- 1 | name: nf-core AWS test 2 | # This workflow can be triggered manually with the GitHub actions workflow dispatch button. 3 | # It runs the -profile 'test' on AWS batch 4 | 5 | on: 6 | workflow_dispatch: 7 | jobs: 8 | run-tower: 9 | name: Run AWS tests 10 | if: github.repository == 'nf-core/phageannotator' 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Launch workflow using Tower CLI tool action 14 | - name: Launch workflow via tower 15 | uses: seqeralabs/action-tower-launch@v2 16 | with: 17 | workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} 18 | access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} 19 | compute_env: ${{ secrets.TOWER_COMPUTE_ENV }} 20 | revision: ${{ github.sha }} 21 | workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/phageannotator/work-${{ github.sha }} 22 | parameters: | 23 | { 24 | "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/phageannotator/results-test-${{ github.sha }}" 25 | } 26 | profiles: test 27 | 28 | - uses: actions/upload-artifact@v4 29 | with: 30 | name: Tower debug log file 31 | path: | 32 | tower_action_*.log 33 | tower_action_*.json 34 | -------------------------------------------------------------------------------- /.github/workflows/clean-up.yml: -------------------------------------------------------------------------------- 1 | name: "Close user-tagged issues and PRs" 2 | on: 3 | schedule: 4 | - cron: "0 0 * * 0" # Once a week 5 | 6 | jobs: 7 | clean-up: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | steps: 13 | - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 14 | with: 15 | 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." 16 | 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." 17 | 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." 18 | days-before-stale: 30 19 | days-before-close: 20 20 | days-before-pr-close: -1 21 | any-of-labels: "awaiting-changes,awaiting-feedback" 22 | exempt-issue-labels: "WIP" 23 | exempt-pr-labels: "WIP" 24 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 25 | -------------------------------------------------------------------------------- /.github/workflows/linting_comment.yml: -------------------------------------------------------------------------------- 1 | name: nf-core linting comment 2 | # This workflow is triggered after the linting action is complete 3 | # It posts an automated comment to the PR, even if the PR is coming from a fork 4 | 5 | on: 6 | workflow_run: 7 | workflows: ["nf-core linting"] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Download lint results 14 | uses: dawidd6/action-download-artifact@f6b0bace624032e30a85a8fd9c1a7f8f611f5737 # v3 15 | with: 16 | workflow: linting.yml 17 | workflow_conclusion: completed 18 | 19 | - name: Get PR number 20 | id: pr_number 21 | run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT 22 | 23 | - name: Post PR comment 24 | uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2 25 | with: 26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | number: ${{ steps.pr_number.outputs.pr_number }} 28 | path: linting-logs/lint_results.md 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .nextflow* 2 | work/ 3 | data/ 4 | results/ 5 | .DS_Store 6 | testing/ 7 | testing* 8 | *.pyc 9 | .nf-test* 10 | test.xml 11 | nf-test-checklist.csv 12 | *parallel-nf-test.sh 13 | nf-test-parallel/ 14 | 15 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: nfcore/gitpod:latest 2 | tasks: 3 | - name: Update Nextflow and setup pre-commit 4 | command: | 5 | pre-commit install --install-hooks 6 | nextflow self-update 7 | - name: unset JAVA_TOOL_OPTIONS 8 | command: | 9 | unset JAVA_TOOL_OPTIONS 10 | 11 | vscode: 12 | extensions: # based on nf-core.nf-core-extensionpack 13 | - esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code 14 | - EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files 15 | - Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar 16 | - mechatroner.rainbow-csv # Highlight columns in csv files in different colors 17 | # - nextflow.nextflow # Nextflow syntax highlighting 18 | - oderwat.indent-rainbow # Highlight indentation level 19 | - streetsidesoftware.code-spell-checker # Spelling checker for source code 20 | - charliermarsh.ruff # Code linter Ruff 21 | -------------------------------------------------------------------------------- /.nf-core.yml: -------------------------------------------------------------------------------- 1 | repository_type: pipeline 2 | lint: 3 | actions_ci: false 4 | files_exist: 5 | - conf/modules.config 6 | files_unchanged: 7 | - .gitattributes 8 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/mirrors-prettier 3 | rev: "v3.1.0" 4 | hooks: 5 | - id: prettier 6 | - repo: https://github.com/editorconfig-checker/editorconfig-checker.python 7 | rev: "2.7.3" 8 | hooks: 9 | - id: editorconfig-checker 10 | alias: ec 11 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | email_template.html 2 | adaptivecard.json 3 | slackreport.json 4 | .nextflow* 5 | work/ 6 | data/ 7 | results/ 8 | .DS_Store 9 | testing/ 10 | testing* 11 | *.pyc 12 | bin/ 13 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | printWidth: 120 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # nf-core/phageannotator: Changelog 2 | 3 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 4 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 5 | 6 | ## v1.0dev - [date] 7 | 8 | Initial release of nf-core/phageannotator, created with the [nf-core](https://nf-co.re/) template. 9 | 10 | ### `Added` 11 | 12 | ### `Fixed` 13 | 14 | ### `Dependencies` 15 | 16 | ### `Deprecated` 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) @CarsonJM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/email_template.txt: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------- 2 | ,--./,-. 3 | ___ __ __ __ ___ /,-._.--~\\ 4 | |\\ | |__ __ / ` / \\ |__) |__ } { 5 | | \\| | \\__, \\__/ | \\ |___ \\`-._,-`-, 6 | `._,._,' 7 | nf-core/phageannotator ${version} 8 | ---------------------------------------------------- 9 | Run Name: $runName 10 | 11 | <% if (success){ 12 | out << "## nf-core/phageannotator execution completed successfully! ##" 13 | } else { 14 | out << """#################################################### 15 | ## nf-core/phageannotator execution completed unsuccessfully! ## 16 | #################################################### 17 | The exit status of the task that caused the workflow execution to fail was: $exitStatus. 18 | The full error message was: 19 | 20 | ${errorReport} 21 | """ 22 | } %> 23 | 24 | 25 | The workflow was completed at $dateComplete (duration: $duration) 26 | 27 | The command used to launch the workflow was as follows: 28 | 29 | $commandLine 30 | 31 | 32 | 33 | Pipeline Configuration: 34 | ----------------------- 35 | <% out << summary.collect{ k,v -> " - $k: $v" }.join("\n") %> 36 | 37 | -- 38 | nf-core/phageannotator 39 | https://github.com/nf-core/phageannotator 40 | -------------------------------------------------------------------------------- /assets/multiqc_config.yml: -------------------------------------------------------------------------------- 1 | report_comment: > 2 | This report has been generated by the nf-core/phageannotator 3 | analysis pipeline. For information about how to interpret these results, please see the 4 | documentation. 5 | report_section_order: 6 | "nf-core-phageannotator-methods-description": 7 | order: -1000 8 | software_versions: 9 | order: -1001 10 | "nf-core-phageannotator-summary": 11 | order: -1002 12 | 13 | export_plots: true 14 | 15 | disable_version_detection: true 16 | -------------------------------------------------------------------------------- /assets/nf-core-phageannotator_logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/assets/nf-core-phageannotator_logo_light.png -------------------------------------------------------------------------------- /assets/sendmail_template.txt: -------------------------------------------------------------------------------- 1 | To: $email 2 | Subject: $subject 3 | Mime-Version: 1.0 4 | Content-Type: multipart/related;boundary="nfcoremimeboundary" 5 | 6 | --nfcoremimeboundary 7 | Content-Type: text/html; charset=utf-8 8 | 9 | $email_html 10 | 11 | --nfcoremimeboundary 12 | Content-Type: image/png;name="nf-core-phageannotator_logo.png" 13 | Content-Transfer-Encoding: base64 14 | Content-ID: 15 | Content-Disposition: inline; filename="nf-core-phageannotator_logo_light.png" 16 | 17 | <% out << new File("$projectDir/assets/nf-core-phageannotator_logo_light.png"). 18 | bytes. 19 | encodeBase64(). 20 | toString(). 21 | tokenize( '\n' )*. 22 | toList()*. 23 | collate( 76 )*. 24 | collect { it.join() }. 25 | flatten(). 26 | join( '\n' ) %> 27 | 28 | <% 29 | if (mqcFile){ 30 | def mqcFileObj = new File("$mqcFile") 31 | if (mqcFileObj.length() < mqcMaxSize){ 32 | out << """ 33 | --nfcoremimeboundary 34 | Content-Type: text/html; name=\"multiqc_report\" 35 | Content-Transfer-Encoding: base64 36 | Content-ID: 37 | Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\" 38 | 39 | ${mqcFileObj. 40 | bytes. 41 | encodeBase64(). 42 | toString(). 43 | tokenize( '\n' )*. 44 | toList()*. 45 | collate( 76 )*. 46 | collect { it.join() }. 47 | flatten(). 48 | join( '\n' )} 49 | """ 50 | }} 51 | %> 52 | 53 | --nfcoremimeboundary-- 54 | -------------------------------------------------------------------------------- /assets/viromeqc/medians.csv: -------------------------------------------------------------------------------- 1 | parameter environmental human 2 | AMPHORA2 0.481685106521252 0.700892560801689 3 | rRNA_LSU 0.13211572831416 0.530267135901026 4 | rRNA_SSU 0.076231996313743 0.247254267758797 5 | -------------------------------------------------------------------------------- /bin/biopython_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import Bio 4 | import sys 5 | 6 | 7 | def biopython_version(): 8 | return Bio.__version__ 9 | 10 | 11 | def main(args=None): 12 | print(biopython_version()) 13 | 14 | 15 | if __name__ == "__main__": 16 | sys.exit(main()) 17 | -------------------------------------------------------------------------------- /bin/create_instrain_stb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import argparse 5 | import pandas as pd 6 | from Bio import SeqIO 7 | 8 | 9 | def parse_args(args=None): 10 | Description = "Create a scaffold-to-bin file for input to inStrain." 11 | Epilog = "Example usage: python create_instrain_stb.py -f fasta.fasta -o fasta.stb" 12 | 13 | parser = argparse.ArgumentParser(description=Description, epilog=Epilog) 14 | parser.add_argument( 15 | "-f", 16 | "--fasta", 17 | help="Path to FASTA file that will be input into inStrain.", 18 | ) 19 | parser.add_argument( 20 | "-o", 21 | "--output", 22 | help="Path to the TSV file, that will be scaffold-to-bin file for inStrain", 23 | ) 24 | return parser.parse_args(args) 25 | 26 | 27 | def create_instrain_stb(fasta, output): 28 | # create list to store contig names in 29 | contig_names = [] 30 | 31 | # read in the fasta 32 | for record in SeqIO.parse(fasta, "fasta"): 33 | contig_names.append(record.id) 34 | 35 | stb_df = pd.DataFrame() 36 | stb_df["scaffold"] = contig_names 37 | stb_df["bin"] = stb_df["scaffold"] 38 | stb_df.to_csv(output, sep="\t", index=False, header=False) 39 | 40 | 41 | def main(args=None): 42 | args = parse_args(args) 43 | create_instrain_stb(args.fasta, args.output) 44 | 45 | 46 | if __name__ == "__main__": 47 | sys.exit(main()) 48 | -------------------------------------------------------------------------------- /bin/extract_viral_assemblies.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import argparse 4 | import pandas as pd 5 | from Bio import SeqIO 6 | import sys 7 | import gzip 8 | 9 | 10 | def parse_args(args=None): 11 | Description = "Extract genomes identified as contained via mash screen, and append to the sample's FASTA assembly." 12 | Epilog = "Example usage: python append_screen_hits.py " 13 | 14 | parser = argparse.ArgumentParser(description=Description, epilog=Epilog) 15 | parser.add_argument( 16 | "-v", 17 | "--virus_fasta", 18 | help="Path to virus FASTA file (gzipped) containing virus sequences.", 19 | ) 20 | parser.add_argument( 21 | "-o", 22 | "--output", 23 | help="Output TSV file containing the names of all viral assemblies.", 24 | ) 25 | return parser.parse_args(args) 26 | 27 | 28 | def extract_viral_assemblies(virus_fasta, output): 29 | 30 | viral_assemblies = [] 31 | with gzip.open(virus_fasta, "rt") as reference_fasta_gunzip: 32 | for record in SeqIO.parse(reference_fasta_gunzip, "fasta"): 33 | viral_assemblies.append(record.id) 34 | 35 | out = open(output, "w") 36 | for sequence in viral_assemblies: 37 | out.write(sequence + "\n") 38 | 39 | 40 | def main(args=None): 41 | args = parse_args(args) 42 | extract_viral_assemblies(args.virus_fasta, args.output) 43 | 44 | 45 | if __name__ == "__main__": 46 | sys.exit(main()) 47 | -------------------------------------------------------------------------------- /bin/numpy_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import numpy as np 4 | import sys 5 | 6 | 7 | def numpy_version(): 8 | return np.__version__ 9 | 10 | 11 | def main(args=None): 12 | print(numpy_version()) 13 | 14 | 15 | if __name__ == "__main__": 16 | sys.exit(main()) 17 | -------------------------------------------------------------------------------- /bin/pandas_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import pandas as pd 4 | import sys 5 | 6 | 7 | def pandas_version(): 8 | return pd.__version__ 9 | 10 | 11 | def main(args=None): 12 | print(pandas_version()) 13 | 14 | 15 | if __name__ == "__main__": 16 | sys.exit(main()) 17 | -------------------------------------------------------------------------------- /conf/test.config: -------------------------------------------------------------------------------- 1 | /* 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | Nextflow config file for running minimal tests 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | Defines input files and everything required to run a fast and simple pipeline test. 6 | 7 | Use as follows: 8 | nextflow run nf-core/phageannotator -profile test, --outdir 9 | 10 | ---------------------------------------------------------------------------------------- 11 | */ 12 | 13 | params { 14 | config_profile_name = 'Test profile' 15 | config_profile_description = 'Minimal test dataset to check pipeline function ' 16 | 17 | // Limit resources so that this can run on GitHub Actions 18 | max_cpus = 2 19 | max_memory = '6.GB' 20 | max_time = '6.h' 21 | 22 | // Input data 23 | input = 'https://github.com/nf-core/test-datasets/raw/phageannotator/assets/1.0.0/test_samplesheet.csv' 24 | 25 | // Tool options 26 | reference_virus_fasta = 'https://github.com/nf-core/test-datasets/raw/modules/data/genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz' 27 | mash_screen_min_score = 0 28 | genomad_splits = 5 29 | 30 | // Pipeline options 31 | publish_dir_mode = 'symlink' 32 | } 33 | -------------------------------------------------------------------------------- /conf/test_full.config: -------------------------------------------------------------------------------- 1 | /* 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | Nextflow config file for running full-size tests 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | Defines input files and everything required to run a full size pipeline test. 6 | 7 | Use as follows: 8 | nextflow run nf-core/phageannotator -profile test_full, --outdir 9 | 10 | ---------------------------------------------------------------------------------------- 11 | */ 12 | 13 | params { 14 | config_profile_name = 'Full test profile' 15 | config_profile_description = 'Full test dataset to check pipeline function' 16 | 17 | // Input data 18 | input = 'assets/1.0.0/test_samplesheet.csv' 19 | 20 | // Tool options 21 | mash_screen_min_score = 0 22 | genomad_splits = 5 23 | } 24 | 25 | // Load test_data.config for nf-tests 26 | includeConfig 'test_data.config' 27 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # nf-core/phageannotator: Documentation 2 | 3 | The nf-core/phageannotator documentation is split into the following pages: 4 | 5 | - [Usage](usage.md) 6 | - An overview of how the pipeline works, how to run it and a description of all of the different command-line flags. 7 | - [Output](output.md) 8 | - An overview of the different results produced by the pipeline and how to interpret them. 9 | 10 | You can find a lot more documentation about installing, configuring and running nf-core pipelines on the website: [https://nf-co.re](https://nf-co.re) 11 | -------------------------------------------------------------------------------- /docs/images/mqc_fastqc_adapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/docs/images/mqc_fastqc_adapter.png -------------------------------------------------------------------------------- /docs/images/mqc_fastqc_counts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/docs/images/mqc_fastqc_counts.png -------------------------------------------------------------------------------- /docs/images/mqc_fastqc_quality.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/docs/images/mqc_fastqc_quality.png -------------------------------------------------------------------------------- /docs/images/nf-core-phageannotator_logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/docs/images/nf-core-phageannotator_logo_dark.png -------------------------------------------------------------------------------- /docs/images/nf-core-phageannotator_logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/docs/images/nf-core-phageannotator_logo_light.png -------------------------------------------------------------------------------- /docs/images/nf-core-phageannotator_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nf-core/phageannotator/129a138b32e88c3e9e43a46d8146f70d2061f67f/docs/images/nf-core-phageannotator_workflow.png -------------------------------------------------------------------------------- /lib/NftestUtils.groovy: -------------------------------------------------------------------------------- 1 | // Helper functions for pipeline tests 2 | 3 | class NftestUtils { 4 | 5 | // Function to remove Nextflow version from software_versions.yml 6 | public static String removeNextflowVersion(outputDir) { 7 | def softwareVersions = path("$outputDir/pipeline_info/software_versions.yml").yaml 8 | if (softwareVersions.containsKey("Workflow")) { 9 | softwareVersions.Workflow.remove("Nextflow") 10 | } 11 | return softwareVersions 12 | } 13 | 14 | // Function to filter lines from a file and return a new file 15 | public static File filterLines(String inFilePath, int linesToSkip) { 16 | if (linesToSkip >= 0) { 17 | File inputFile = new File(inFilePath) 18 | File outputFile = new File(inFilePath + ".filtered") 19 | def lineCount = 0 20 | inputFile.eachLine { line -> 21 | lineCount++ 22 | if (lineCount > linesToSkip) { 23 | outputFile.append(line + '\n') 24 | } 25 | } 26 | return outputFile 27 | } else { 28 | File inputFile = new File(inFilePath) 29 | File outputFile = new File(inFilePath + ".filtered") 30 | def lines = inputFile.readLines() 31 | def totalLines = lines.size() 32 | lines.take(totalLines + linesToSkip).each { line -> 33 | outputFile.append(line + '\n') 34 | } 35 | return outputFile 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /modules/local/anicluster/anicalc/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.3.5 8 | -------------------------------------------------------------------------------- /modules/local/anicluster/anicalc/main.nf: -------------------------------------------------------------------------------- 1 | process ANICLUSTER_ANICALC { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' : 8 | 'biocontainers/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' }" 9 | 10 | input: 11 | tuple val(meta), path(blast_txt) 12 | 13 | output: 14 | tuple val(meta), path("*_ani.tsv") , emit: ani 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | anicalc.py \\ 25 | -i $blast_txt \\ 26 | -o ${prefix}_ani.tsv 27 | 28 | cat <<-END_VERSIONS > versions.yml 29 | "${task.process}": 30 | python: \$( python --version | sed 's/Python //' ) 31 | biopython: \$(echo \$(biopython_version.py 2>&1)) 32 | numpy: \$(echo \$(numpy_version.py 2>&1)) 33 | END_VERSIONS 34 | """ 35 | 36 | stub: 37 | def args = task.ext.args ?: '' 38 | def prefix = task.ext.prefix ?: "${meta.id}" 39 | """ 40 | touch ${prefix}_ani.tsv 41 | 42 | cat <<-END_VERSIONS > versions.yml 43 | "${task.process}": 44 | python: \$( python --version | sed 's/Python //' ) 45 | biopython: \$(echo \$(biopython_version.py 2>&1)) 46 | numpy: \$(echo \$(numpy_version.py 2>&1)) 47 | END_VERSIONS 48 | """ 49 | } 50 | -------------------------------------------------------------------------------- /modules/local/anicluster/anicalc/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: ANICLUSTER_ANICALC { 3 | publishDir = [ 4 | path: { "${params.outdir}/GenomeClustering/anicalc" }, 5 | mode: params.publish_dir_mode, 6 | pattern: '*_ani.tsv', 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/local/anicluster/anicalc/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test process: ANICLUSTER_ANICALC" 4 | script "../main.nf" 5 | process "ANICLUSTER_ANICALC" 6 | 7 | 8 | test("blast.txt") { 9 | 10 | when { 11 | process { 12 | """ 13 | input[0] = [ 14 | [ id: 'test' ], 15 | file(params.pipelines_testdata_base_path + 'modules/local/anicluster/anicalc/blast.txt', checkIfExists: true) 16 | ] 17 | """ 18 | } 19 | } 20 | 21 | then { 22 | assertAll ( 23 | { assert process.success }, 24 | { assert snapshot(process.out).match() } 25 | ) 26 | } 27 | } 28 | 29 | test("blast.txt - stub") { 30 | 31 | options "-stub" 32 | 33 | when { 34 | process { 35 | """ 36 | input[0] = [ 37 | [ id: 'test' ], 38 | file(params.pipelines_testdata_base_path + 'modules/local/anicluster/anicalc/blast.txt', checkIfExists: true) 39 | ] 40 | """ 41 | } 42 | } 43 | 44 | then { 45 | assertAll ( 46 | { assert process.success }, 47 | { assert snapshot(process.out).match() } 48 | ) 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /modules/local/anicluster/anicalc/tests/tags.yml: -------------------------------------------------------------------------------- 1 | anicluster_anicalc: 2 | - modules/local/anicluster/anicalc/** 3 | -------------------------------------------------------------------------------- /modules/local/anicluster/aniclust/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.3.5 8 | -------------------------------------------------------------------------------- /modules/local/anicluster/aniclust/main.nf: -------------------------------------------------------------------------------- 1 | process ANICLUSTER_ANICLUST { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' : 8 | 'biocontainers/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' }" 9 | 10 | input: 11 | tuple val(meta), path(fasta), path(ani) 12 | 13 | output: 14 | tuple val(meta), path("*_clusters.tsv") , emit: clusters 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | aniclust.py \\ 25 | --fna $fasta \\ 26 | --ani $ani \\ 27 | --out ${prefix}_clusters.tsv \\ 28 | $args 29 | 30 | cat <<-END_VERSIONS > versions.yml 31 | "${task.process}": 32 | python: \$( python --version | sed 's/Python //' ) 33 | END_VERSIONS 34 | """ 35 | 36 | stub: 37 | def args = task.ext.args ?: '' 38 | def prefix = task.ext.prefix ?: "${meta.id}" 39 | """ 40 | touch ${prefix}_clusters.tsv 41 | 42 | cat <<-END_VERSIONS > versions.yml 43 | "${task.process}": 44 | python: \$( python --version | sed 's/Python //' ) 45 | END_VERSIONS 46 | """ 47 | } 48 | -------------------------------------------------------------------------------- /modules/local/anicluster/aniclust/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: ANICLUSTER_ANICLUST { 3 | ext.args = [ 4 | "--min_ani ${params.anicluster_min_ani}", 5 | "--min_qcov ${params.anicluster_min_qcov}", 6 | "--min_tcov ${params.anicluster_min_tcov}" 7 | ].join(' ').trim() 8 | publishDir = [ 9 | path: { "${params.outdir}/GenomeClustering/aniclust" }, 10 | mode: params.publish_dir_mode, 11 | pattern: "*_clusters.tsv" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/local/anicluster/aniclust/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test process: ANICLUSTER_ANICLUST" 4 | script "../main.nf" 5 | process "ANICLUSTER_ANICLUST" 6 | 7 | 8 | test("fasta.gz & ani.tsv") { 9 | 10 | when { 11 | process { 12 | """ 13 | input[0] = [ 14 | [ id: 'test' ], 15 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true ), 16 | file(params.pipelines_testdata_base_path + 'modules/local/anicluster/aniclust/ani.tsv', checkIfExists: true ) 17 | ] 18 | """ 19 | } 20 | } 21 | 22 | then { 23 | assertAll ( 24 | { assert process.success }, 25 | { assert snapshot(process.out).match() } 26 | ) 27 | } 28 | } 29 | 30 | test("fasta.gz & ani.tsv - stub") { 31 | 32 | options "-stub" 33 | 34 | when { 35 | process { 36 | """ 37 | input[0] = [ 38 | [ id: 'test' ], 39 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true ), 40 | file(params.pipelines_testdata_base_path + 'modules/local/anicluster/aniclust/ani.tsv', checkIfExists: true ) 41 | ] 42 | """ 43 | } 44 | } 45 | 46 | then { 47 | assertAll ( 48 | { assert process.success }, 49 | { assert snapshot(process.out).match() } 50 | ) 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /modules/local/anicluster/aniclust/tests/tags.yml: -------------------------------------------------------------------------------- 1 | anicluster_aniclust: 2 | - modules/local/anicluster/aniclust/** 3 | -------------------------------------------------------------------------------- /modules/local/anicluster/extractreps/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.3.5 8 | -------------------------------------------------------------------------------- /modules/local/anicluster/extractreps/main.nf: -------------------------------------------------------------------------------- 1 | process ANICLUSTER_EXTRACTREPS { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' : 8 | 'biocontainers/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' }" 9 | 10 | input: 11 | tuple val(meta), path(fasta), path(clusters) 12 | 13 | output: 14 | tuple val(meta), path("*_representatives.fna.gz") , emit: representatives 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | extractreps.py \\ 25 | --fasta $fasta \\ 26 | --clusters $clusters \\ 27 | --out ${prefix}_representatives.fna 28 | 29 | gzip ${prefix}_representatives.fna 30 | 31 | cat <<-END_VERSIONS > versions.yml 32 | "${task.process}": 33 | python: \$( python --version | sed 's/Python //' ) 34 | biopython: \$(echo \$(biopython_version.py 2>&1)) 35 | END_VERSIONS 36 | """ 37 | 38 | stub: 39 | def args = task.ext.args ?: '' 40 | def prefix = task.ext.prefix ?: "${meta.id}" 41 | """ 42 | touch ${prefix}_representatives.fna 43 | gzip ${prefix}_representatives.fna 44 | 45 | cat <<-END_VERSIONS > versions.yml 46 | "${task.process}": 47 | python: \$( python --version | sed 's/Python //' ) 48 | biopython: \$(echo \$(biopython_version.py 2>&1)) 49 | END_VERSIONS 50 | """ 51 | } 52 | -------------------------------------------------------------------------------- /modules/local/anicluster/extractreps/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: ANICLUSTER_EXTRACTREPS { 3 | ext.prefix = { "${meta.id}_anicluster" } 4 | publishDir = [ 5 | path: { "${params.outdir}/GenomeClustering/" }, 6 | mode: params.publish_dir_mode, 7 | pattern: "*_representatives.fna.gz" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/local/anicluster/extractreps/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test process: ANICLUSTER_EXTRACTREPS" 4 | script "../main.nf" 5 | process "ANICLUSTER_EXTRACTREPS" 6 | 7 | 8 | test("fasta.gz & clusters.tsv") { 9 | 10 | when { 11 | process { 12 | """ 13 | input[0] = [ 14 | [ id: 'test' ], 15 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true ), 16 | file(params.pipelines_testdata_base_path + '/modules/local/anicluster/extractreps/clusters.tsv', checkIfExists: true ) 17 | ] 18 | """ 19 | } 20 | } 21 | 22 | then { 23 | assertAll ( 24 | { assert process.success }, 25 | { assert snapshot(process.out).match() } 26 | ) 27 | } 28 | } 29 | 30 | test("fasta.gz & clusters.tsv - stub") { 31 | 32 | options "-stub" 33 | 34 | when { 35 | process { 36 | """ 37 | input[0] = [ 38 | [ id: 'test' ], 39 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true ), 40 | file(params.pipelines_testdata_base_path + '/modules/local/anicluster/extractreps/clusters.tsv', checkIfExists: true ) 41 | ] 42 | """ 43 | } 44 | } 45 | 46 | then { 47 | assertAll ( 48 | { assert process.success }, 49 | { assert snapshot(process.out).match() } 50 | ) 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /modules/local/anicluster/extractreps/tests/tags.yml: -------------------------------------------------------------------------------- 1 | anicluster_extractreps: 2 | - modules/local/anicluster/extractreps/** 3 | -------------------------------------------------------------------------------- /modules/local/appendscreenhits/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.3.5 8 | -------------------------------------------------------------------------------- /modules/local/appendscreenhits/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: APPENDSCREENHITS { 3 | publishDir = [ 4 | path: { "${params.outdir}/ReferenceContainment/append_screen_hits" }, 5 | mode: params.publish_dir_mode, 6 | pattern: '*.fasta_w_screen_hits.fna.gz', 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/local/appendscreenhits/tests/tags.yml: -------------------------------------------------------------------------------- 1 | appendscreenhits: 2 | - modules/local/appendscreenhits/** 3 | -------------------------------------------------------------------------------- /modules/local/coverm/contig/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - bioconda::coverm=0.6.1 7 | -------------------------------------------------------------------------------- /modules/local/coverm/contig/main.nf: -------------------------------------------------------------------------------- 1 | process COVERM_CONTIG { 2 | tag "$meta.id" 3 | label 'process_high' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/coverm:0.6.1--h1535e20_5': 8 | 'biocontainers/coverm:0.6.1--h1535e20_5' }" 9 | 10 | input: 11 | tuple val(meta), path(bam_files) 12 | 13 | output: 14 | tuple val(meta), path("*_alignment_results.tsv") , emit: alignment_results 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | coverm \\ 25 | contig \\ 26 | --bam-files $bam_files \\ 27 | --output-file ${prefix}_alignment_results.tsv \\ 28 | --threads $task.cpus \\ 29 | $args 30 | 31 | cat <<-END_VERSIONS > versions.yml 32 | "${task.process}": 33 | coverm: \$(echo \$(coverm --version 2>&1) | sed 's/^.*coverm //; s/Using.*\$//' )) 34 | END_VERSIONS 35 | """ 36 | 37 | stub: 38 | def args = task.ext.args ?: '' 39 | def prefix = task.ext.prefix ?: "${meta.id}" 40 | """ 41 | touch ${prefix}_alignment_results.tsv 42 | 43 | cat <<-END_VERSIONS > versions.yml 44 | "${task.process}": 45 | coverm: \$(echo \$(coverm --version 2>&1) | sed 's/^.*coverm //; s/Using.*\$//' )) 46 | END_VERSIONS 47 | """ 48 | } 49 | -------------------------------------------------------------------------------- /modules/local/coverm/contig/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: COVERM_CONTIG { 3 | ext.args = [ 4 | "--methods $params.coverm_metrics", 5 | "--min-read-aligned-length $params.coverm_min_read_alignment", 6 | "--min-read-percent-identity $params.coverm_min_percent_identity", 7 | "--min-read-aligned-percent $params.coverm_min_percent_read_aligned", 8 | ].join(' ').trim() 9 | publishDir = [ 10 | path: { "${params.outdir}/VirusAbundance/coverm/contig" }, 11 | mode: params.publish_dir_mode, 12 | pattern: '*_alignment_results.tsv', 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/local/coverm/contig/tests/tags.yml: -------------------------------------------------------------------------------- 1 | coverm_contig: 2 | - modules/local/coverm/contig/** 3 | -------------------------------------------------------------------------------- /modules/local/extractviralassemblies/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.3.5 8 | -------------------------------------------------------------------------------- /modules/local/extractviralassemblies/main.nf: -------------------------------------------------------------------------------- 1 | process EXTRACTVIRALASSEMBLIES { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' : 8 | 'biocontainers/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' }" 9 | 10 | input: 11 | tuple val(meta), path(virus_fasta_gz) 12 | 13 | output: 14 | tuple val(meta), path("${prefix}_viral_assemblies.tsv") , emit: viral_assemblies 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | extract_viral_assemblies.py \\ 25 | --virus_fasta ${virus_fasta_gz} \\ 26 | --output ${prefix}_viral_assemblies.tsv 27 | 28 | cat <<-END_VERSIONS > versions.yml 29 | "${task.process}": 30 | python: \$( python --version | sed 's/Python //' ) 31 | biopython: \$(echo \$(biopython_version.py 2>&1)) 32 | pandas: \$(echo \$(pandas_version.py 2>&1)) 33 | END_VERSIONS 34 | """ 35 | 36 | stub: 37 | def args = task.ext.args ?: '' 38 | prefix = task.ext.prefix ?: "${meta.id}" 39 | """ 40 | touch ${prefix}_viral_assemblies.tsv 41 | 42 | cat <<-END_VERSIONS > versions.yml 43 | "${task.process}": 44 | python: \$( python --version | sed 's/Python //' ) 45 | biopython: \$(echo \$(biopython_version.py 2>&1)) 46 | pandas: \$(echo \$(pandas_version.py 2>&1)) 47 | END_VERSIONS 48 | """ 49 | } 50 | -------------------------------------------------------------------------------- /modules/local/extractviralassemblies/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: EXTRACTVIRALASSEMBLIES { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/local/extractviralassemblies/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test process: EXTRACTVIRALASSEMBLIES" 4 | script "../main.nf" 5 | process "EXTRACTVIRALASSEMBLIES" 6 | 7 | tag "modules" 8 | tag "modules_local" 9 | tag "extractviralassemblies" 10 | 11 | 12 | test("fasta.gz") { 13 | 14 | when { 15 | params { 16 | outdir = "$outputDir" 17 | } 18 | process { 19 | """ 20 | input[0] = [ 21 | [ id: 'test' ], 22 | file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz", checkifExists: true), 23 | ] 24 | """ 25 | } 26 | } 27 | 28 | then { 29 | assertAll ( 30 | { assert process.success }, 31 | { assert snapshot(process.out).match() } 32 | ) 33 | } 34 | } 35 | 36 | test("fasta.gz - stub") { 37 | 38 | options "-stub" 39 | 40 | when { 41 | params { 42 | outdir = "$outputDir" 43 | } 44 | process { 45 | """ 46 | input[0] = [ 47 | [ id: 'test' ], 48 | file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz", checkifExists: true), 49 | ] 50 | """ 51 | } 52 | } 53 | 54 | then { 55 | assertAll ( 56 | { assert process.success }, 57 | { assert snapshot(process.out).match() } 58 | ) 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /modules/local/instrain/stb/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.2.4 8 | -------------------------------------------------------------------------------- /modules/local/instrain/stb/main.nf: -------------------------------------------------------------------------------- 1 | process INSTRAIN_STB { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' : 8 | 'quay.io/biocontainers/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' }" 9 | 10 | input: 11 | tuple val(meta), path(fasta) 12 | 13 | output: 14 | tuple val(meta), path("*.stb") , emit: stb 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | create_instrain_stb.py \\ 25 | -f $fasta \\ 26 | -o ${prefix}.stb 27 | 28 | cat <<-END_VERSIONS > versions.yml 29 | "${task.process}": 30 | python: \$( python --version | sed 's/Python //' ) 31 | biopython: \$(echo \$(biopython_version.py 2>&1)) 32 | pandas: \$(echo \$(pandas_version.py 2>&1)) 33 | END_VERSIONS 34 | """ 35 | 36 | stub: 37 | def args = task.ext.args ?: '' 38 | def prefix = task.ext.prefix ?: "${meta.id}" 39 | """ 40 | touch ${prefix}.stb 41 | 42 | cat <<-END_VERSIONS > versions.yml 43 | "${task.process}": 44 | python: \$( python --version | sed 's/Python //' ) 45 | biopython: \$(echo \$(biopython_version.py 2>&1)) 46 | pandas: \$(echo \$(pandas_version.py 2>&1)) 47 | END_VERSIONS 48 | """ 49 | } 50 | -------------------------------------------------------------------------------- /modules/local/instrain/stb/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: INSTRAIN_STB { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/local/instrain/stb/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process: INSTRAIN_STB" 4 | script "../main.nf" 5 | process "INSTRAIN_STB" 6 | 7 | 8 | test("genome.fasta") { 9 | 10 | when { 11 | process { 12 | """ 13 | input[0] = [ 14 | [ id: 'reference_fasta' ], 15 | file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) 16 | ] 17 | """ 18 | } 19 | } 20 | 21 | then { 22 | assertAll ( 23 | { assert process.success }, 24 | { assert snapshot(process.out).match() } 25 | ) 26 | } 27 | } 28 | 29 | test("genome.fasta - stub") { 30 | 31 | options "-stub" 32 | 33 | when { 34 | process { 35 | """ 36 | input[0] = [ 37 | [ id: 'reference_fasta' ], 38 | file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) 39 | ] 40 | """ 41 | } 42 | } 43 | 44 | then { 45 | assertAll ( 46 | { assert process.success }, 47 | { assert snapshot(process.out).match() } 48 | ) 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /modules/local/instrain/stb/tests/tags.yml: -------------------------------------------------------------------------------- 1 | instrain_stb: 2 | - modules/local/instrain/stb/** 3 | -------------------------------------------------------------------------------- /modules/local/mash/paste/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - bioconda::mash=2.3 7 | -------------------------------------------------------------------------------- /modules/local/mash/paste/main.nf: -------------------------------------------------------------------------------- 1 | process MASH_PASTE { 2 | tag "$meta.id" 3 | label 'process_single' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mash:2.3--hd3113c8_4': 8 | 'biocontainers/mash:2.3--hd3113c8_4' }" 9 | 10 | input: 11 | tuple val(meta) , path(sketch1) 12 | tuple val(meta2), path(sketch2) 13 | 14 | output: 15 | tuple val(meta), path("*.msh"), emit: msh 16 | path "versions.yml" , emit: versions 17 | 18 | when: 19 | task.ext.when == null || task.ext.when 20 | 21 | script: 22 | def args = task.ext.args ?: '' 23 | def prefix = task.ext.prefix ?: "${meta.id}-${meta2.id}" 24 | """ 25 | mash \\ 26 | paste \\ 27 | ${prefix}\\ 28 | $sketch1 \\ 29 | $sketch2 \\ 30 | $args 31 | 32 | cat <<-END_VERSIONS > versions.yml 33 | "${task.process}": 34 | mash: \$( mash --version ) 35 | END_VERSIONS 36 | """ 37 | 38 | stub: 39 | def args = task.ext.args ?: '' 40 | def prefix = task.ext.prefix ?: "${meta.id}-${meta2.id}" 41 | """ 42 | touch ${prefix}.msh 43 | 44 | cat <<-END_VERSIONS > versions.yml 45 | "${task.process}": 46 | mash: \$( mash --version ) 47 | END_VERSIONS 48 | """ 49 | } 50 | -------------------------------------------------------------------------------- /modules/local/mash/paste/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: MASH_PASTE{ 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/local/mash/paste/tests/tags.yml: -------------------------------------------------------------------------------- 1 | mash_paste: 2 | - modules/local/mash/paste/** 3 | -------------------------------------------------------------------------------- /modules/local/qualityfilterviruses/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::biopython=1.78 7 | - conda-forge::pandas=1.3.5 8 | -------------------------------------------------------------------------------- /modules/local/qualityfilterviruses/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: QUALITYFILTERVIRUSES { 3 | ext.args = [ 4 | params.checkv_min_length ? "--min_length ${params.checkv_min_length}" : "", 5 | params.checkv_min_completeness ? "--min_completeness ${params.checkv_min_completeness}" : "", 6 | params.checkv_remove_proviruses ? "--remove_proviruses" : "--no-remove_proviruses", 7 | params.checkv_remove_warnings ? "--remove_warnings" : "--no-remove_warnings", 8 | ].join(' ').trim() 9 | publishDir = [ 10 | path: { "${params.outdir}/VirusQuality/quality_filter_viruses" }, 11 | mode: params.publish_dir_mode, 12 | pattern: '*.filtered.fna.gz', 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/local/qualityfilterviruses/tests/tags.yml: -------------------------------------------------------------------------------- 1 | qualityfilterviruses: 2 | - modules/local/qualityfilterviruses/** 3 | -------------------------------------------------------------------------------- /modules/local/seqkit/seq/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - bioconda::seqkit=2.2.0 7 | -------------------------------------------------------------------------------- /modules/local/seqkit/seq/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SEQKIT_SEQ { 3 | ext.args = params.assembly_min_length ? "--min-len ${params.assembly_min_length}" : "" 4 | publishDir = [ 5 | path: { "${params.outdir}/AssemblyFilter/seqkit/seq" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '*.fast*', 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/local/seqkit/seq/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process: SEQKIT_SEQ" 4 | script "../main.nf" 5 | process "SEQKIT_SEQ" 6 | 7 | 8 | test("fasta.gz") { 9 | 10 | when { 11 | params { 12 | assembly_min_length = 5 13 | } 14 | process { 15 | """ 16 | input[0] = [ 17 | [id: 'test'], 18 | file(params.pipelines_testdata_base_path + 'modules/local/seqkit/seq/assembly.fasta.gz', checkIfExists: true) 19 | ] 20 | """ 21 | } 22 | } 23 | 24 | then { 25 | assertAll ( 26 | { assert process.success }, 27 | { assert snapshot(process.out).match() } 28 | ) 29 | } 30 | } 31 | 32 | test("fasta.gz - stub") { 33 | 34 | options "-stub" 35 | 36 | when { 37 | params { 38 | assembly_min_length = 5 39 | } 40 | process { 41 | """ 42 | input[0] = [ 43 | [id: 'test'], 44 | file(params.pipelines_testdata_base_path + 'modules/local/seqkit/seq/assembly.fasta.gz', checkIfExists: true) 45 | ] 46 | """ 47 | } 48 | } 49 | 50 | then { 51 | assertAll ( 52 | { assert process.success }, 53 | { assert snapshot(process.out).match() } 54 | ) 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /modules/local/seqkit/seq/tests/tags.yml: -------------------------------------------------------------------------------- 1 | seqkit_seq: 2 | - modules/local/seqkit/seq/** 3 | -------------------------------------------------------------------------------- /modules/local/viromeqc/install/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::python=3.6 7 | - bioconda::bowtie2=2.3.4 8 | - bioconda::samtools=1.3.1 9 | - conda-forge::biopython=1.79 10 | - bioconda::pysam=0.19.1 11 | - bioconda::diamond=0.9.29 12 | - conda-forge::pandas=0.20 13 | -------------------------------------------------------------------------------- /modules/local/viromeqc/install/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: VIROMEQC_INSTALL { 3 | ext.args = '--zenodo' 4 | publishDir = [ 5 | enabled: false 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/local/viromeqc/install/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process: VIROMEQC_INSTALL" 4 | script "../main.nf" 5 | process "VIROMEQC_INSTALL" 6 | 7 | 8 | test("No input required") { 9 | then { 10 | assertAll ( 11 | { assert process.success }, 12 | { assert snapshot(process.out).match() } 13 | ) 14 | } 15 | } 16 | 17 | test("No input required - stub") { 18 | then { 19 | assertAll ( 20 | { assert process.success }, 21 | { assert snapshot(process.out).match() } 22 | ) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/local/viromeqc/install/tests/tags.yml: -------------------------------------------------------------------------------- 1 | viromeqc_install: 2 | - modules/local/viromeqc/install/** 3 | -------------------------------------------------------------------------------- /modules/local/viromeqc/viromeqc/environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - bioconda 4 | - defaults 5 | dependencies: 6 | - conda-forge::python=3.6 7 | - bioconda::bowtie2=2.3.4 8 | - bioconda::samtools=1.3.1 9 | - conda-forge::biopython=1.79 10 | - bioconda::pysam=0.19.1 11 | - bioconda::diamond=0.9.29 12 | - conda-forge::pandas=0.20 13 | -------------------------------------------------------------------------------- /modules/local/viromeqc/viromeqc/main.nf: -------------------------------------------------------------------------------- 1 | process VIROMEQC_VIROMEQC { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-b28a1a551d380ce8d57f9d83894ccb9559b44404:08a4cf815fcef0080ede5b3633202cbda8edf59b-0': 8 | 'biocontainers/mulled-v2-b28a1a551d380ce8d57f9d83894ccb9559b44404:08a4cf815fcef0080ede5b3633202cbda8edf59b-0' }" 9 | 10 | input: 11 | tuple val(meta), path(reads) 12 | path(viromeqc_index) 13 | 14 | output: 15 | tuple val(meta), path("${prefix}.viromeqc.tsv") , emit: enrichment 16 | path "versions.yml" , emit: versions 17 | 18 | when: 19 | task.ext.when == null || task.ext.when 20 | 21 | script: 22 | def args = task.ext.args ?: '' 23 | prefix = task.ext.prefix ?: "${meta.id}" 24 | """ 25 | viromeQC.py \\ 26 | --input ${reads[0]} ${reads[1]} \\ 27 | --index_dir $viromeqc_index \\ 28 | --output ${prefix}.viromeqc.tsv \\ 29 | --bowtie2_threads $task.cpus \\ 30 | --diamond_threads $task.cpus \\ 31 | --sample_name $prefix \\ 32 | $args 33 | 34 | cat <<-END_VERSIONS > versions.yml 35 | "${task.process}": 36 | viromeqc: \$(echo \$(viromeQC.py --version 2>&1 | sed 's/^.*viromeQC.py../ //; s/Using.*\$//' )) 37 | END_VERSIONS 38 | """ 39 | 40 | stub: 41 | def args = task.ext.args ?: '' 42 | prefix = task.ext.prefix ?: "${meta.id}" 43 | """ 44 | touch ${prefix}.viromeqc.tsv 45 | 46 | cat <<-END_VERSIONS > versions.yml 47 | "${task.process}": 48 | viromeqc: \$(echo \$(viromeQC.py --version 2>&1 | sed 's/^.*viromeQC.py //; s/Using.*\$//' )) 49 | END_VERSIONS 50 | """ 51 | } 52 | -------------------------------------------------------------------------------- /modules/local/viromeqc/viromeqc/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: VIROMEQC_VIROMEQC { 3 | publishDir = [ 4 | path: { "${params.outdir}/VirusEnrichment/viromeqc/viromeqc" }, 5 | mode: params.publish_dir_mode, 6 | pattern: '*.viromeqc.tsv', 7 | ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/local/viromeqc/viromeqc/tests/tags.yml: -------------------------------------------------------------------------------- 1 | viromeqc_viromeqc: 2 | - modules/local/viromeqc/viromeqc/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/environment.yml: -------------------------------------------------------------------------------- 1 | name: bacphlip 2 | 3 | channels: 4 | - conda-forge 5 | - bioconda 6 | - defaults 7 | 8 | dependencies: 9 | - bioconda::bacphlip=0.9.6 10 | - bioconda::hmmer=3.3.2 11 | - conda-forge::numpy=1.23.5 12 | -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/main.nf: -------------------------------------------------------------------------------- 1 | process BACPHLIP { 2 | tag "$meta.id" 3 | label 'process_high' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mulled-v2-e16bfb0f667f2f3c236b32087aaf8c76a0cd2864:c64689d7d5c51670ff5841ec4af982edbe7aa406-0': 8 | 'biocontainers/mulled-v2-e16bfb0f667f2f3c236b32087aaf8c76a0cd2864:c64689d7d5c51670ff5841ec4af982edbe7aa406-0' }" 9 | 10 | input: 11 | tuple val(meta), path(fasta) 12 | 13 | output: 14 | tuple val(meta), path("*.bacphlip") , emit: bacphlip_results 15 | tuple val(meta), path("*.hmmsearch.tsv") , emit: hmmsearch_results 16 | path "versions.yml" , emit: versions 17 | 18 | when: 19 | task.ext.when == null || task.ext.when 20 | 21 | script: 22 | def args = task.ext.args ?: '' 23 | def prefix = task.ext.prefix ?: "${meta.id}" 24 | def VERSION = '0.9.6' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. 25 | """ 26 | bacphlip \\ 27 | -i $fasta \\ 28 | $args 29 | 30 | cat <<-END_VERSIONS > versions.yml 31 | "${task.process}": 32 | bacphlip: $VERSION 33 | END_VERSIONS 34 | """ 35 | 36 | stub: 37 | def args = task.ext.args ?: '' 38 | def prefix = task.ext.prefix ?: "${meta.id}" 39 | def VERSION = '0.9.6' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. 40 | """ 41 | touch ${fasta}.bacphlip 42 | touch ${fasta}.hmmsearch.tsv 43 | 44 | cat <<-END_VERSIONS > versions.yml 45 | "${task.process}": 46 | bacphlip: $VERSION 47 | END_VERSIONS 48 | """ 49 | } 50 | -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/meta.yml: -------------------------------------------------------------------------------- 1 | name: "bacphlip" 2 | description: A bacteriophage lifestyle prediction tool 3 | keywords: 4 | - phage 5 | - lifestyle 6 | - temperate 7 | - virulent 8 | - bacphlip 9 | - hmmsearch 10 | tools: 11 | - "bacphlip": 12 | description: "A Random Forest classifier to predict bacteriophage lifestyle" 13 | homepage: https://github.com/adamhockenberry/bacphlip 14 | documentation: https://github.com/adamhockenberry/bacphlip 15 | tool_dev_url: https://github.com/adamhockenberry/bacphlip 16 | doi: 10.7717/peerj.11396 17 | licence: ["MIT"] 18 | input: 19 | - meta: 20 | type: map 21 | description: | 22 | Groovy Map containing sample information 23 | e.g. [ id:'test', single_end:false ] 24 | - fasta: 25 | type: file 26 | description: FASTA file containing phage contigs/scaffolds/chromosomes (if it is a multi-FASTA file be sure to add the `--multi_fasta` argument) 27 | pattern: "*.{fasta,fna,fa}" 28 | output: 29 | - meta: 30 | type: map 31 | description: | 32 | Groovy Map containing sample information 33 | e.g. [ id:'test', single_end:false ] 34 | - versions: 35 | type: file 36 | description: File containing software versions 37 | pattern: "versions.yml" 38 | - bacphlip_results: 39 | type: file 40 | description: TSV file containing Temperate and Virulent scores for each phage sequence 41 | pattern: "*.bacphlip" 42 | - hmmsearch_results: 43 | type: file 44 | description: TSV file containing binary output indicating gene presence/absence based on hmmsearch results 45 | pattern: "*.hmmsearch.tsv" 46 | authors: 47 | - "@CarsonJM" 48 | maintainers: 49 | - "@CarsonJM" 50 | -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BACPHLIP { 3 | publishDir = [ 4 | [ 5 | path: { "${params.outdir}/VirusLifestyle/bacphlip" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '*.bacphlip', 8 | ] 9 | ] 10 | ext.args = "--multi_fasta" 11 | } 12 | } -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process BACPHLIP" 4 | script "../main.nf" 5 | process "BACPHLIP" 6 | config "./nextflow.config" 7 | 8 | tag "modules" 9 | tag "modules_nfcore" 10 | tag "bacphlip" 11 | 12 | test("candidatus_portiera_aleyrodidarum - genome - fasta") { 13 | 14 | when { 15 | process { 16 | """ 17 | input[0] = [ 18 | [ id:'test', single_end:false ], // meta map 19 | file(params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) // genome.fasta 20 | ] 21 | """ 22 | } 23 | } 24 | 25 | then { 26 | assertAll( 27 | { assert process.success }, 28 | { assert snapshot(process.out).match() } 29 | ) 30 | } 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BACPHLIP { 3 | ext.args = null 4 | } 5 | } -------------------------------------------------------------------------------- /modules/nf-core/bacphlip/tests/tags.yml: -------------------------------------------------------------------------------- 1 | bacphlip: 2 | - "modules/nf-core/bacphlip/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/blast/blastn/environment.yml: -------------------------------------------------------------------------------- 1 | name: blast_blastn 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::blast=2.14.1 8 | -------------------------------------------------------------------------------- /modules/nf-core/blast/blastn/meta.yml: -------------------------------------------------------------------------------- 1 | name: blast_blastn 2 | description: Queries a BLAST DNA database 3 | keywords: 4 | - fasta 5 | - blast 6 | - blastn 7 | - DNA sequence 8 | tools: 9 | - blast: 10 | description: | 11 | BLAST finds regions of similarity between biological sequences. 12 | homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi 13 | documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs 14 | doi: 10.1016/S0022-2836(05)80360-2 15 | licence: ["US-Government-Work"] 16 | input: 17 | - meta: 18 | type: map 19 | description: | 20 | Groovy Map containing sample information 21 | e.g. [ id:'test', single_end:false ] 22 | - fasta: 23 | type: file 24 | description: Input fasta file containing queries sequences 25 | pattern: "*.{fa,fasta,fa.gz,fasta.gz}" 26 | - meta2: 27 | type: map 28 | description: | 29 | Groovy Map containing db information 30 | e.g. [ id:'test2', single_end:false ] 31 | - db: 32 | type: directory 33 | description: Directory containing the blast database 34 | pattern: "*" 35 | output: 36 | - meta: 37 | type: map 38 | description: | 39 | Groovy Map containing sample information 40 | e.g. [ id:'test', single_end:false ] 41 | - txt: 42 | type: file 43 | description: File containing blastn hits 44 | pattern: "*.txt" 45 | - versions: 46 | type: file 47 | description: File containing software versions 48 | pattern: "versions.yml" 49 | authors: 50 | - "@joseespinosa" 51 | - "@drpatelh" 52 | maintainers: 53 | - "@joseespinosa" 54 | - "@drpatelh" 55 | - "@vagkaratzas" 56 | -------------------------------------------------------------------------------- /modules/nf-core/blast/blastn/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BLAST_BLASTN { 3 | ext.args = [ 4 | params.blast_min_percent_identity ? "-perc_identity ${params.blast_min_percent_identity}" : "", 5 | params.blast_max_num_seqs ? "-max_target_seqs ${params.blast_max_num_seqs}" : "", 6 | "-outfmt '6 std qlen slen'", 7 | ].join(' ').trim() 8 | publishDir = [ 9 | enabled: false 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /modules/nf-core/blast/blastn/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "versions": { 3 | "content": [ 4 | [ 5 | "versions.yml:md5,2d5ffadc7035672f6a9e00b01d1751ea" 6 | ] 7 | ], 8 | "timestamp": "2023-12-11T07:20:03.54997013" 9 | }, 10 | "versions_zipped": { 11 | "content": [ 12 | [ 13 | "versions.yml:md5,2d5ffadc7035672f6a9e00b01d1751ea" 14 | ] 15 | ], 16 | "timestamp": "2023-12-11T07:20:12.925782708" 17 | } 18 | } -------------------------------------------------------------------------------- /modules/nf-core/blast/blastn/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BLAST_MAKEBLASTDB { 3 | ext.args = '-dbtype nucl' 4 | } 5 | 6 | withName: BLAST_BLASTN { 7 | ext.args = null 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /modules/nf-core/blast/blastn/tests/tags.yml: -------------------------------------------------------------------------------- 1 | blast/blastn: 2 | - modules/nf-core/blast/blastn/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/blast/makeblastdb/environment.yml: -------------------------------------------------------------------------------- 1 | name: blast_makeblastdb 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::blast=2.15.0 8 | -------------------------------------------------------------------------------- /modules/nf-core/blast/makeblastdb/meta.yml: -------------------------------------------------------------------------------- 1 | name: blast_makeblastdb 2 | description: Builds a BLAST database 3 | keywords: 4 | - fasta 5 | - blast 6 | - database 7 | tools: 8 | - blast: 9 | description: | 10 | BLAST finds regions of similarity between biological sequences. 11 | homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi 12 | documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs 13 | doi: 10.1016/S0022-2836(05)80360-2 14 | licence: ["US-Government-Work"] 15 | input: 16 | - meta: 17 | type: map 18 | description: | 19 | Groovy Map containing sample information 20 | e.g. [ id:'test', single_end:false ] 21 | - fasta: 22 | type: file 23 | description: Input fasta file 24 | pattern: "*.{fa,fasta,fa.gz,fasta.gz}" 25 | output: 26 | - meta: 27 | type: map 28 | description: | 29 | Groovy Map containing sample information 30 | e.g. [ id:'test', single_end:false ] 31 | - db: 32 | type: directory 33 | description: Output directory containing blast database files 34 | pattern: "*" 35 | - versions: 36 | type: file 37 | description: File containing software versions 38 | pattern: "versions.yml" 39 | authors: 40 | - "@joseespinosa" 41 | - "@drpatelh" 42 | maintainers: 43 | - "@joseespinosa" 44 | - "@drpatelh" 45 | - "@vagkaratzas" 46 | -------------------------------------------------------------------------------- /modules/nf-core/blast/makeblastdb/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BLAST_MAKEBLASTDB { 3 | ext.args = "-dbtype nucl" 4 | publishDir = [ 5 | enabled: false 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /modules/nf-core/blast/makeblastdb/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BLAST_MAKEBLASTDB { 3 | ext.args = '-dbtype nucl' 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/nf-core/blast/makeblastdb/tests/tags.yml: -------------------------------------------------------------------------------- 1 | blast/makeblastdb: 2 | - modules/nf-core/blast/makeblastdb/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/environment.yml: -------------------------------------------------------------------------------- 1 | name: bowtie2_align 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::bowtie2=2.5.2 8 | - bioconda::samtools=1.18 9 | - conda-forge::pigz=2.6 10 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BOWTIE2_ALIGN { 3 | publishDir = [ 4 | [ 5 | path: { "${params.outdir}/VirusAbundance/bowtie2/align" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '*.{bam,sam}', 8 | ], 9 | [ 10 | path: { "${params.outdir}/VirusAbundance/bowtie2/align" }, 11 | mode: params.publish_dir_mode, 12 | pattern: '*.log', 13 | ], 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/tests/cram_crai.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BOWTIE2_ALIGN { 3 | ext.args2 = '--output-fmt cram --write-index' 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/tests/large_index.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BOWTIE2_BUILD { 3 | ext.args = '--large-index' 4 | } 5 | } -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/tests/sam.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BOWTIE2_ALIGN { 3 | ext.args2 = '--output-fmt SAM' 4 | } 5 | } -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/tests/sam2.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BOWTIE2_ALIGN { 3 | ext.args2 = '-O SAM' 4 | } 5 | } -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/align/tests/tags.yml: -------------------------------------------------------------------------------- 1 | bowtie2/align: 2 | - modules/nf-core/bowtie2/align/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/build/environment.yml: -------------------------------------------------------------------------------- 1 | name: bowtie2_build 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::bowtie2=2.5.2 8 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/build/main.nf: -------------------------------------------------------------------------------- 1 | process BOWTIE2_BUILD { 2 | tag "$fasta" 3 | label 'process_high' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/bowtie2:2.5.2--py39h6fed5c7_0' : 8 | 'biocontainers/bowtie2:2.5.2--py39h6fed5c7_0' }" 9 | 10 | input: 11 | tuple val(meta), path(fasta) 12 | 13 | output: 14 | tuple val(meta), path('bowtie2') , emit: index 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | """ 23 | mkdir bowtie2 24 | bowtie2-build $args --threads $task.cpus $fasta bowtie2/${fasta.baseName} 25 | cat <<-END_VERSIONS > versions.yml 26 | "${task.process}": 27 | bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') 28 | END_VERSIONS 29 | """ 30 | 31 | stub: 32 | """ 33 | mkdir bowtie2 34 | touch bowtie2/${fasta.baseName}.{1..4}.bt2 35 | touch bowtie2/${fasta.baseName}.rev.{1,2}.bt2 36 | 37 | cat <<-END_VERSIONS > versions.yml 38 | "${task.process}": 39 | bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') 40 | END_VERSIONS 41 | """ 42 | } 43 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/build/meta.yml: -------------------------------------------------------------------------------- 1 | name: bowtie2_build 2 | description: Builds bowtie index for reference genome 3 | keywords: 4 | - build 5 | - index 6 | - fasta 7 | - genome 8 | - reference 9 | tools: 10 | - bowtie2: 11 | description: | 12 | Bowtie 2 is an ultrafast and memory-efficient tool for aligning 13 | sequencing reads to long reference sequences. 14 | homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml 15 | documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml 16 | doi: 10.1038/nmeth.1923 17 | licence: ["GPL-3.0-or-later"] 18 | input: 19 | - meta: 20 | type: map 21 | description: | 22 | Groovy Map containing reference information 23 | e.g. [ id:'test', single_end:false ] 24 | - fasta: 25 | type: file 26 | description: Input genome fasta file 27 | output: 28 | - meta: 29 | type: map 30 | description: | 31 | Groovy Map containing reference information 32 | e.g. [ id:'test', single_end:false ] 33 | - index: 34 | type: file 35 | description: Bowtie2 genome index files 36 | pattern: "*.bt2" 37 | - versions: 38 | type: file 39 | description: File containing software versions 40 | pattern: "versions.yml" 41 | authors: 42 | - "@joseespinosa" 43 | - "@drpatelh" 44 | maintainers: 45 | - "@joseespinosa" 46 | - "@drpatelh" 47 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/build/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: BOWTIE2_BUILD { 3 | publishDir = [ 4 | path: { "${params.outdir}/VirusAbundance/bowtie2/build" }, 5 | mode: params.publish_dir_mode, 6 | pattern: 'bowtie2' 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/build/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process BOWTIE2_BUILD" 4 | script "modules/nf-core/bowtie2/build/main.nf" 5 | process "BOWTIE2_BUILD" 6 | tag "modules" 7 | tag "modules_nfcore" 8 | tag "bowtie2" 9 | tag "bowtie2/build" 10 | 11 | test("Should run without failures") { 12 | 13 | when { 14 | process { 15 | """ 16 | input[0] = [ 17 | [ id:'test' ], 18 | file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) 19 | ] 20 | """ 21 | } 22 | } 23 | 24 | then { 25 | assert process.success 26 | assert snapshot(process.out).match() 27 | } 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /modules/nf-core/bowtie2/build/tests/tags.yml: -------------------------------------------------------------------------------- 1 | bowtie2/build: 2 | - modules/nf-core/bowtie2/build/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/cat/cat/environment.yml: -------------------------------------------------------------------------------- 1 | name: cat_cat 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - conda-forge::pigz=2.3.4 8 | -------------------------------------------------------------------------------- /modules/nf-core/cat/cat/meta.yml: -------------------------------------------------------------------------------- 1 | name: cat_cat 2 | description: A module for concatenation of gzipped or uncompressed files 3 | keywords: 4 | - concatenate 5 | - gzip 6 | - cat 7 | tools: 8 | - cat: 9 | description: Just concatenation 10 | documentation: https://man7.org/linux/man-pages/man1/cat.1.html 11 | licence: ["GPL-3.0-or-later"] 12 | input: 13 | - meta: 14 | type: map 15 | description: | 16 | Groovy Map containing sample information 17 | e.g. [ id:'test', single_end:false ] 18 | - files_in: 19 | type: file 20 | description: List of compressed / uncompressed files 21 | pattern: "*" 22 | output: 23 | - versions: 24 | type: file 25 | description: File containing software versions 26 | pattern: "versions.yml" 27 | - file_out: 28 | type: file 29 | description: Concatenated file. Will be gzipped if file_out ends with ".gz" 30 | pattern: "${file_out}" 31 | authors: 32 | - "@erikrikarddaniel" 33 | - "@FriederikeHanssen" 34 | maintainers: 35 | - "@erikrikarddaniel" 36 | - "@FriederikeHanssen" 37 | -------------------------------------------------------------------------------- /modules/nf-core/cat/cat/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: CAT_MASHSCREEN { 3 | publishDir = [ 4 | path: { "${params.outdir}/ReferenceContainment" }, 5 | mode: params.publish_dir_mode, 6 | pattern: '*.screen', 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config: -------------------------------------------------------------------------------- 1 | 2 | process { 3 | withName: CAT_CAT { 4 | ext.prefix = 'cat.txt.gz' 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config: -------------------------------------------------------------------------------- 1 | 2 | process { 3 | 4 | withName: CAT_CAT { 5 | ext.prefix = 'cat.txt' 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /modules/nf-core/cat/cat/tests/tags.yml: -------------------------------------------------------------------------------- 1 | cat/cat: 2 | - modules/nf-core/cat/cat/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/environment.yml: -------------------------------------------------------------------------------- 1 | name: checkv_downloaddatabase 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::checkv=1.0.1 8 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/main.nf: -------------------------------------------------------------------------------- 1 | process CHECKV_DOWNLOADDATABASE { 2 | label 'process_low' 3 | 4 | conda "${moduleDir}/environment.yml" 5 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 6 | 'https://depot.galaxyproject.org/singularity/checkv:1.0.1--pyhdfd78af_0': 7 | 'biocontainers/checkv:1.0.1--pyhdfd78af_0' }" 8 | 9 | output: 10 | path "${prefix}/*" , emit: checkv_db 11 | path "versions.yml" , emit: versions 12 | 13 | when: 14 | task.ext.when == null || task.ext.when 15 | 16 | script: 17 | def args = task.ext.args ?: '' 18 | prefix = task.ext.prefix ?: "checkv_db" 19 | 20 | """ 21 | checkv download_database \\ 22 | $args \\ 23 | ./$prefix/ 24 | 25 | cat <<-END_VERSIONS > versions.yml 26 | "${task.process}": 27 | checkv: \$(checkv -h 2>&1 | sed -n 's/^.*CheckV v//; s/: assessing.*//; 1p') 28 | END_VERSIONS 29 | """ 30 | 31 | stub: 32 | def args = task.ext.args ?: '' 33 | prefix = task.ext.prefix ?: "checkv_db" 34 | 35 | """ 36 | mkdir ${prefix} 37 | touch ${prefix}/README.txt 38 | mkdir ${prefix}/genome_db 39 | touch ${prefix}/genome_db/changelog.tsv 40 | touch ${prefix}/genome_db/checkv_error.tsv 41 | touch ${prefix}/genome_db/checkv_info.tsv 42 | touch ${prefix}/genome_db/checkv_reps.faa 43 | touch ${prefix}/genome_db/checkv_reps.fna 44 | touch ${prefix}/genome_db/checkv_reps.tsv 45 | mkdir ${prefix}/hmm_db 46 | touch ${prefix}/hmm_db/checkv_hmms.tsv 47 | touch ${prefix}/hmm_db/genome_lengths.tsv 48 | 49 | cat <<-END_VERSIONS > versions.yml 50 | "${task.process}": 51 | checkv: \$(checkv -h 2>&1 | sed -n 's/^.*CheckV v//; s/: assessing.*//; 1p') 52 | END_VERSIONS 53 | """ 54 | 55 | } 56 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/meta.yml: -------------------------------------------------------------------------------- 1 | name: "checkv_downloaddatabase" 2 | description: Construct the database necessary for checkv's quality assessment 3 | keywords: 4 | - checkv 5 | - checkm 6 | - mag 7 | - metagenome 8 | - quality 9 | - isolates 10 | - virus 11 | - completeness 12 | - contamination 13 | - download 14 | - database 15 | tools: 16 | - "checkv": 17 | description: Assess the quality of metagenome-assembled viral genomes. 18 | homepage: https://bitbucket.org/berkeleylab/checkv/src/master/ 19 | documentation: https://bitbucket.org/berkeleylab/checkv/src/master/ 20 | tool_dev_url: https://bitbucket.org/berkeleylab/checkv/src/master/ 21 | doi: "10.1038/s41587-020-00774-7" 22 | licence: ["BSD License"] 23 | output: 24 | - versions: 25 | type: file 26 | description: File containing software versions 27 | pattern: "versions.yml" 28 | - checkv_db: 29 | type: directory 30 | description: directory pointing to database 31 | pattern: "${prefix}/" 32 | authors: 33 | - "@Joon-Klaps" 34 | maintainers: 35 | - "@Joon-Klaps" 36 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: CHECKV_DOWNLOADDATABASE { 3 | publishDir = [ 4 | path: { "${params.outdir}/VirusQuality/" }, 5 | mode: params.publish_dir_mode, 6 | pattern: 'checkv_db/*', 7 | enabled: params.save_checkv_db 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process CHECKV_DOWNLOADDATABASE" 4 | script "../main.nf" 5 | process "CHECKV_DOWNLOADDATABASE" 6 | config "./nextflow.config" 7 | 8 | tag "modules" 9 | tag "modules_nfcore" 10 | tag "checkv" 11 | tag "checkv/downloaddatabase" 12 | 13 | test("No input: download only") { 14 | 15 | then { 16 | assertAll( 17 | { assert process.success }, 18 | { assert snapshot(process.out.versions).match() } 19 | ) 20 | } 21 | } 22 | 23 | test("No input: download only - stub") { 24 | 25 | options "-stub" 26 | 27 | then { 28 | assertAll( 29 | { assert process.success }, 30 | { assert snapshot(process.out.versions).match() } 31 | ) 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "No input: download only - stub": { 3 | "content": [ 4 | [ 5 | "versions.yml:md5,29c4fbe7a6cb8b6c0913363d718cce9f" 6 | ] 7 | ], 8 | "timestamp": "2024-01-17T16:40:56.505431212" 9 | }, 10 | "No input: download only": { 11 | "content": [ 12 | [ 13 | "versions.yml:md5,29c4fbe7a6cb8b6c0913363d718cce9f" 14 | ] 15 | ], 16 | "timestamp": "2023-12-11T16:24:08.049483097" 17 | } 18 | } -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | docker.fixOwnership = false 2 | docker.runOptions = '-u $(id -u):$(id -g)' 3 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/downloaddatabase/tests/tags.yml: -------------------------------------------------------------------------------- 1 | checkv/downloaddatabase: 2 | - "modules/nf-core/checkv/downloaddatabase/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/endtoend/environment.yml: -------------------------------------------------------------------------------- 1 | name: checkv_endtoend 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::checkv=1.0.1 8 | -------------------------------------------------------------------------------- /modules/nf-core/checkv/endtoend/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: CHECKV_ENDTOEND { 3 | publishDir = [ 4 | [ 5 | path: { "${params.outdir}/VirusQuality/checkv/endtoend" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '**/quality_summary.tsv' 8 | ], 9 | [ 10 | path: { "${params.outdir}/VirusQuality/checkv/endtoend" }, 11 | mode: params.publish_dir_mode, 12 | pattern: '**/*viruses.fna.gz' 13 | ] 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /modules/nf-core/checkv/endtoend/tests/tags.yml: -------------------------------------------------------------------------------- 1 | checkv/endtoend: 2 | - "modules/nf-core/checkv/endtoend/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/cobrameta/cobrameta.diff: -------------------------------------------------------------------------------- 1 | Changes in module 'nf-core/cobrameta' 2 | --- modules/nf-core/cobrameta/main.nf 3 | +++ modules/nf-core/cobrameta/main.nf 4 | @@ -46,8 +46,12 @@ 5 | --output ${prefix} \\ 6 | $args 7 | 8 | - gzip ${prefix}/*.fasta 9 | - cat ${prefix}/*fasta.gz > ${prefix}/COBRA_all_assemblies.fasta.gz 10 | + if [ -f ${prefix}/*.fasta ]; then 11 | + gzip ${prefix}/*.fasta 12 | + cat ${prefix}/*fasta.gz > ${prefix}/COBRA_all_assemblies.fasta.gz 13 | + else 14 | + mv ${fasta} ${prefix}/COBRA_all_assemblies.fasta.gz 15 | + fi 16 | 17 | cat <<-END_VERSIONS > versions.yml 18 | "${task.process}": 19 | 20 | ************************************************************ 21 | -------------------------------------------------------------------------------- /modules/nf-core/cobrameta/environment.yml: -------------------------------------------------------------------------------- 1 | name: cobrameta 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - "bioconda::cobra-meta=1.2.3" 8 | -------------------------------------------------------------------------------- /modules/nf-core/cobrameta/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: COBRAMETA { 3 | publishDir = [ 4 | [ 5 | path: { "${params.outdir}/VirusExtension/cobrameta" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '**/COBRA_joining_summary.txt' 8 | ] 9 | ] 10 | } 11 | } -------------------------------------------------------------------------------- /modules/nf-core/cobrameta/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: COBRAMETA { 3 | cpus = 1 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /modules/nf-core/cobrameta/tests/tags.yml: -------------------------------------------------------------------------------- 1 | cobrameta: 2 | - "modules/nf-core/cobrameta/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/fastqc/environment.yml: -------------------------------------------------------------------------------- 1 | name: fastqc 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::fastqc=0.12.1 8 | -------------------------------------------------------------------------------- /modules/nf-core/fastqc/meta.yml: -------------------------------------------------------------------------------- 1 | name: fastqc 2 | description: Run FastQC on sequenced reads 3 | keywords: 4 | - quality control 5 | - qc 6 | - adapters 7 | - fastq 8 | tools: 9 | - fastqc: 10 | description: | 11 | FastQC gives general quality metrics about your reads. 12 | It provides information about the quality score distribution 13 | across your reads, the per base sequence content (%A/C/G/T). 14 | You get information about adapter contamination and other 15 | overrepresented sequences. 16 | homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ 17 | documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ 18 | licence: ["GPL-2.0-only"] 19 | input: 20 | - meta: 21 | type: map 22 | description: | 23 | Groovy Map containing sample information 24 | e.g. [ id:'test', single_end:false ] 25 | - reads: 26 | type: file 27 | description: | 28 | List of input FastQ files of size 1 and 2 for single-end and paired-end data, 29 | respectively. 30 | output: 31 | - meta: 32 | type: map 33 | description: | 34 | Groovy Map containing sample information 35 | e.g. [ id:'test', single_end:false ] 36 | - html: 37 | type: file 38 | description: FastQC report 39 | pattern: "*_{fastqc.html}" 40 | - zip: 41 | type: file 42 | description: FastQC report archive 43 | pattern: "*_{fastqc.zip}" 44 | - versions: 45 | type: file 46 | description: File containing software versions 47 | pattern: "versions.yml" 48 | authors: 49 | - "@drpatelh" 50 | - "@grst" 51 | - "@ewels" 52 | - "@FelixKrueger" 53 | maintainers: 54 | - "@drpatelh" 55 | - "@grst" 56 | - "@ewels" 57 | - "@FelixKrueger" 58 | -------------------------------------------------------------------------------- /modules/nf-core/fastqc/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: FASTQC { 3 | ext.args = '--quiet' 4 | publishDir = [ 5 | path: { "${params.outdir}/ReadQuality/fastqc" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '*.html', 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /modules/nf-core/fastqc/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fastqc: 2 | - modules/nf-core/fastqc/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/genomad/download/environment.yml: -------------------------------------------------------------------------------- 1 | name: genomad_download 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::genomad=1.7.4 8 | -------------------------------------------------------------------------------- /modules/nf-core/genomad/download/meta.yml: -------------------------------------------------------------------------------- 1 | name: "genomad_download" 2 | description: Download geNomad databases and related files 3 | keywords: 4 | - metagenomics 5 | - genomad 6 | - database 7 | - download 8 | - phage 9 | - virus 10 | - plasmid 11 | tools: 12 | - "genomad": 13 | description: "Identification of mobile genetic elements" 14 | homepage: https://portal.nersc.gov/genomad/ 15 | documentation: https://portal.nersc.gov/genomad/ 16 | tool_dev_url: https://github.com/apcamargo/genomad/ 17 | doi: 10.1101/2023.03.05.531206 18 | licence: ["Lawrence Berkeley National Labs BSD variant license"] 19 | output: 20 | - versions: 21 | type: file 22 | description: File containing software versions 23 | pattern: "versions.yml" 24 | - genomad_db: 25 | type: directory 26 | description: Directory containing downloaded data with directory being named "genomad_db" 27 | pattern: "genomad_db" 28 | authors: 29 | - "@CarsonJM" 30 | maintainers: 31 | - "@CarsonJM" 32 | -------------------------------------------------------------------------------- /modules/nf-core/genomad/download/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: GENOMAD_DOWNLOAD { 3 | publishDir = [ 4 | path: { "${params.outdir}/VirusClassification/genomad" }, 5 | mode: params.publish_dir_mode, 6 | pattern: 'genomad_db', 7 | enabled: params.save_genomad_db 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /modules/nf-core/genomad/download/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process GENOMAD_DOWNLOAD" 4 | script "../main.nf" 5 | process "GENOMAD_DOWNLOAD" 6 | config "./nextflow.config" 7 | 8 | tag "modules" 9 | tag "modules_nfcore" 10 | tag "genomad" 11 | tag "genomad/download" 12 | 13 | test("No input") { 14 | 15 | then { 16 | assertAll( 17 | { assert process.success }, 18 | { assert snapshot(process.out).match() } 19 | ) 20 | } 21 | } 22 | 23 | test("No input - stub") { 24 | 25 | options "-stub" 26 | 27 | then { 28 | assertAll( 29 | { assert process.success }, 30 | { assert snapshot(process.out).match() } 31 | ) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /modules/nf-core/genomad/download/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | docker.fixOwnership = false 2 | docker.runOptions = '-u $(id -u):$(id -g)' 3 | -------------------------------------------------------------------------------- /modules/nf-core/genomad/download/tests/tags.yml: -------------------------------------------------------------------------------- 1 | genomad/download: 2 | - "modules/nf-core/genomad/download/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/genomad/endtoend/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: GENOMAD_ENDTOEND { 3 | ext.args = [ 4 | params.genomad_min_score ? "--min-score ${params.genomad_min_score}" : "", 5 | params.genomad_max_fdr ? "--enable-score-calibration --max-fdr ${params.genomad_max_fdr}" : "", 6 | params.genomad_splits ? "--splits ${params.genomad_splits}" : "", 7 | params.genomad_disable_nn ? "--disable-nn-classification" : "", 8 | params.genomad_sensitivity ? "--sensitivity ${params.genomad_sensitivity}" : "" 9 | ].join(' ').trim() 10 | publishDir = [ 11 | [ 12 | path: { "${params.outdir}/VirusClassification/genomad/endtoend" }, 13 | mode: params.publish_dir_mode, 14 | pattern: '*_summary/*_virus.fna.gz' 15 | ], 16 | [ 17 | path: { "${params.outdir}/VirusClassification/genomad/endtoend" }, 18 | mode: params.publish_dir_mode, 19 | pattern: '*_summary/*_virus_summary.tsv' 20 | ] 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /modules/nf-core/gunzip/environment.yml: -------------------------------------------------------------------------------- 1 | name: gunzip 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - conda-forge::sed=4.7 8 | -------------------------------------------------------------------------------- /modules/nf-core/gunzip/main.nf: -------------------------------------------------------------------------------- 1 | process GUNZIP { 2 | tag "$archive" 3 | label 'process_single' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : 8 | 'nf-core/ubuntu:20.04' }" 9 | 10 | input: 11 | tuple val(meta), path(archive) 12 | 13 | output: 14 | tuple val(meta), path("$gunzip"), emit: gunzip 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | gunzip = archive.toString() - '.gz' 23 | """ 24 | # Not calling gunzip itself because it creates files 25 | # with the original group ownership rather than the 26 | # default one for that user / the work directory 27 | gzip \\ 28 | -cd \\ 29 | $args \\ 30 | $archive \\ 31 | > $gunzip 32 | 33 | cat <<-END_VERSIONS > versions.yml 34 | "${task.process}": 35 | gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') 36 | END_VERSIONS 37 | """ 38 | 39 | stub: 40 | gunzip = archive.toString() - '.gz' 41 | """ 42 | touch $gunzip 43 | cat <<-END_VERSIONS > versions.yml 44 | "${task.process}": 45 | gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') 46 | END_VERSIONS 47 | """ 48 | } 49 | -------------------------------------------------------------------------------- /modules/nf-core/gunzip/meta.yml: -------------------------------------------------------------------------------- 1 | name: gunzip 2 | description: Compresses and decompresses files. 3 | keywords: 4 | - gunzip 5 | - compression 6 | - decompression 7 | tools: 8 | - gunzip: 9 | description: | 10 | gzip is a file format and a software application used for file compression and decompression. 11 | documentation: https://www.gnu.org/software/gzip/manual/gzip.html 12 | licence: ["GPL-3.0-or-later"] 13 | input: 14 | - meta: 15 | type: map 16 | description: | 17 | Optional groovy Map containing meta information 18 | e.g. [ id:'test', single_end:false ] 19 | - archive: 20 | type: file 21 | description: File to be compressed/uncompressed 22 | pattern: "*.*" 23 | output: 24 | - gunzip: 25 | type: file 26 | description: Compressed/uncompressed file 27 | pattern: "*.*" 28 | - versions: 29 | type: file 30 | description: File containing software versions 31 | pattern: "versions.yml" 32 | authors: 33 | - "@joseespinosa" 34 | - "@drpatelh" 35 | - "@jfy133" 36 | maintainers: 37 | - "@joseespinosa" 38 | - "@drpatelh" 39 | - "@jfy133" 40 | -------------------------------------------------------------------------------- /modules/nf-core/gunzip/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: GUNZIP { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /modules/nf-core/gunzip/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process GUNZIP" 4 | script "../main.nf" 5 | process "GUNZIP" 6 | tag "gunzip" 7 | tag "modules_nfcore" 8 | tag "modules" 9 | 10 | test("Should run without failures") { 11 | 12 | when { 13 | params { 14 | outdir = "$outputDir" 15 | } 16 | process { 17 | """ 18 | input[0] = Channel.of([ 19 | [], 20 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) 21 | ] 22 | ) 23 | """ 24 | } 25 | } 26 | 27 | then { 28 | assertAll( 29 | { assert process.success }, 30 | { assert snapshot(process.out).match() } 31 | ) 32 | } 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /modules/nf-core/gunzip/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "Should run without failures": { 3 | "content": [ 4 | { 5 | "0": [ 6 | [ 7 | [ 8 | 9 | ], 10 | "test_1.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" 11 | ] 12 | ], 13 | "1": [ 14 | "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" 15 | ], 16 | "gunzip": [ 17 | [ 18 | [ 19 | 20 | ], 21 | "test_1.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" 22 | ] 23 | ], 24 | "versions": [ 25 | "versions.yml:md5,54376d32aca20e937a4ec26dac228e84" 26 | ] 27 | } 28 | ], 29 | "timestamp": "2023-10-17T15:35:37.690477896" 30 | } 31 | } -------------------------------------------------------------------------------- /modules/nf-core/gunzip/tests/tags.yml: -------------------------------------------------------------------------------- 1 | gunzip: 2 | - modules/nf-core/gunzip/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/instrain/compare/environment.yml: -------------------------------------------------------------------------------- 1 | name: instrain_compare 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::instrain=1.6.1 8 | -------------------------------------------------------------------------------- /modules/nf-core/instrain/compare/meta.yml: -------------------------------------------------------------------------------- 1 | name: "instrain_compare" 2 | description: Strain-level comparisons across multiple inStrain profiles 3 | keywords: 4 | - instrain 5 | - compare 6 | - align 7 | - diversity 8 | - coverage 9 | tools: 10 | - "instrain": 11 | description: "Calculation of strain-level metrics" 12 | homepage: https://github.com/MrOlm/instrain 13 | documentation: https://instrain.readthedocs.io/en/latest/ 14 | tool_dev_url: https://github.com/MrOlm/instrain 15 | doi: 10.1038/s41587-020-00797-0 16 | licence: "['MIT']" 17 | input: 18 | - meta: 19 | type: map 20 | description: | 21 | Groovy Map containing sample information 22 | e.g. `[ id:'test', single_end:false ]` 23 | - meta2: 24 | type: map 25 | description: | 26 | Groovy Map containing sample information 27 | e.g. `[ id:'test', single_end:false ]` 28 | - profiles: 29 | type: directory 30 | description: InStrain profile folders 31 | pattern: "*.IS/" 32 | - bams: 33 | type: file 34 | description: Path to .bam files that were profiled 35 | pattern: "*.{bam,sam}" 36 | - stb_file: 37 | type: file 38 | description: Path to .stb (scaffold to bin) file that was profiled 39 | pattern: "*.stb" 40 | output: 41 | - meta: 42 | type: map 43 | description: | 44 | Groovy Map containing sample information 45 | e.g. `[ id:'test', single_end:false ]` 46 | - versions: 47 | type: file 48 | description: File containing software versions 49 | pattern: "versions.yml" 50 | - compare: 51 | type: directory 52 | description: inStrain compare folders 53 | pattern: "*.IS_compare/" 54 | authors: 55 | - "@margotl9" 56 | - "@CarsonJM" 57 | maintainers: 58 | - "@margotl9" 59 | - "@CarsonJM" 60 | -------------------------------------------------------------------------------- /modules/nf-core/instrain/compare/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: INSTRAIN_COMPARE { 3 | publishDir = [ 4 | [ 5 | path: { "${params.outdir}/VirusMicrodiversity/instrain/compare" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '*.IS_compare', 8 | ] 9 | ] 10 | ext.args = [ 11 | params.instrain_min_variant_cov ? "--min_cov ${params.instrain_min_variant_cov}" : "", 12 | params.instrain_min_snp_freq ? "--min_freq ${params.instrain_min_snp_freq}" : "", 13 | params.instrain_max_snp_fdr ? "--fdr ${params.instrain_max_snp_fdr}" : "", 14 | params.instrain_min_genome_breadth ? "--breadth ${params.instrain_min_genome_breadth}" : "", 15 | params.instrain_popani_thresh ? "--ani_threshold ${params.instrain_popani_thresh}" : "", 16 | params.instrain_min_genome_comp ? "--coverage_treshold ${params.instrain_min_genome_comp}" : "", 17 | "--skip_popANI --skip_plot_generation" 18 | ].join(' ').trim() 19 | } 20 | } -------------------------------------------------------------------------------- /modules/nf-core/instrain/profile/environment.yml: -------------------------------------------------------------------------------- 1 | name: instrain_profile 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::instrain=1.6.1 8 | -------------------------------------------------------------------------------- /modules/nf-core/instrain/profile/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: INSTRAIN_PROFILE { 3 | publishDir = [ 4 | [ 5 | path: { "${params.outdir}/VirusMicrodiversity/instrain/profile" }, 6 | mode: params.publish_dir_mode, 7 | pattern: '*.IS', 8 | ] 9 | ] 10 | ext.args = [ 11 | params.instrain_min_ani ? "--min_read_ani ${params.instrain_min_ani}" : "", 12 | params.instrain_min_mapq ? "--min_mapq ${params.instrain_min_mapq}" : "", 13 | params.instrain_min_variant_cov ? "--min_cov ${params.instrain_min_variant_cov}" : "", 14 | params.instrain_min_snp_freq ? "--min_freq ${params.instrain_min_snp_freq}" : "", 15 | params.instrain_max_snp_fdr ? "--fdr ${params.instrain_max_snp_fdr}" : "", 16 | params.instrain_min_genome_cov ? "--min_genome_cov ${params.instrain_min_genome_cov}" : "", 17 | ].join(' ').trim() 18 | } 19 | } -------------------------------------------------------------------------------- /modules/nf-core/instrain/profile/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | cpus = 1 3 | } 4 | 5 | -------------------------------------------------------------------------------- /modules/nf-core/instrain/profile/tests/tags.yml: -------------------------------------------------------------------------------- 1 | instrain/profile: 2 | - "modules/nf-core/instrain/profile/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/iphop/download/environment.yml: -------------------------------------------------------------------------------- 1 | name: iphop_download 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::iphop=1.3.2 8 | -------------------------------------------------------------------------------- /modules/nf-core/iphop/download/meta.yml: -------------------------------------------------------------------------------- 1 | name: "iphop_download" 2 | description: Download, extract, and check md5 of iPHoP databases 3 | keywords: 4 | - metagenomics 5 | - iphop 6 | - database 7 | - download 8 | - phage 9 | - bacteria 10 | - host 11 | tools: 12 | - "iphop": 13 | description: Predict host genus from genomes of uncultivated phages. 14 | homepage: https://bitbucket.org/srouxjgi/iphop/src/main/ 15 | documentation: https://bitbucket.org/srouxjgi/iphop/src/main/ 16 | tool_dev_url: https://bitbucket.org/srouxjgi/iphop/src/main/ 17 | doi: "10.1371/journal.pbio.3002083" 18 | licence: "['Modified GPL v3']" 19 | output: 20 | - iphop_db: 21 | type: directory 22 | description: Directory containing downloaded and md5 checked iPHoP database 23 | pattern: "iphop_db/" 24 | - versions: 25 | type: file 26 | description: File containing software versions 27 | pattern: "versions.yml" 28 | authors: 29 | - "@CarsonJM" 30 | maintainers: 31 | - "@CarsonJM" 32 | -------------------------------------------------------------------------------- /modules/nf-core/iphop/download/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: IPHOP_DOWNLOAD { 3 | publishDir = [ 4 | path: { "${params.outdir}/PhageHost/iphop" }, 5 | mode: params.publish_dir_mode, 6 | pattern: 'iphop_db', 7 | enabled: params.save_iphop_db 8 | ] 9 | ext.args = [ 10 | params.iphop_test_db ? "--db_version iPHoP_db_rw_for-test" : "" 11 | ].join(' ').trim() 12 | } 13 | } -------------------------------------------------------------------------------- /modules/nf-core/iphop/predict/environment.yml: -------------------------------------------------------------------------------- 1 | name: iphop_predict 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::iphop=1.3.2 8 | -------------------------------------------------------------------------------- /modules/nf-core/iphop/predict/iphop-predict.diff: -------------------------------------------------------------------------------- 1 | Changes in module 'nf-core/iphop/predict' 2 | --- /dev/null 3 | +++ modules/nf-core/iphop/predict/nextflow.config 4 | @@ -0,0 +1,12 @@ 5 | +process { 6 | + withName: IPHOP_PREDICT { 7 | + publishDir = [ 8 | + path: { "${params.outdir}/PhageHost/iphop" }, 9 | + mode: params.publish_dir_mode, 10 | + pattern: 'Host_prediction_to_genus_m*.csv', 11 | + ] 12 | + ext.args = [ 13 | + params.iphop_min_score ? "--min_score ${params.iphop_min_score}" : "" 14 | + ].join(' ').trim() 15 | + } 16 | +} 17 | --- modules/nf-core/iphop/predict/main.nf 18 | +++ modules/nf-core/iphop/predict/main.nf 19 | @@ -10,6 +10,7 @@ 20 | input: 21 | tuple val(meta), path(fasta) 22 | path iphop_db 23 | + path iphop_partial_input 24 | 25 | output: 26 | tuple val(meta), path("Host_prediction_to_genus_m*.csv") , emit: iphop_genus 27 | @@ -23,7 +24,10 @@ 28 | script: 29 | def args = task.ext.args ?: '' 30 | def prefix = task.ext.prefix ?: "${meta.id}" 31 | + def partial_run = params.iphop_partial_test ? "mkdir -p iphop_results/Wdir; cp -r ${iphop_partial_input}/* iphop_results/Wdir/" : "" 32 | """ 33 | + $partial_run 34 | + 35 | export PERL5LIB=/usr/local/lib/perl5/site_perl/5.22.0 36 | iphop \\ 37 | predict \\ 38 | 39 | ************************************************************ 40 | -------------------------------------------------------------------------------- /modules/nf-core/iphop/predict/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: IPHOP_PREDICT { 3 | publishDir = [ 4 | path: { "${params.outdir}/PhageHost/iphop" }, 5 | mode: params.publish_dir_mode, 6 | pattern: 'Host_prediction_to_genus_m*.csv', 7 | ] 8 | ext.args = [ 9 | params.iphop_min_score ? "--min_score ${params.iphop_min_score}" : "" 10 | ].join(' ').trim() 11 | } 12 | } -------------------------------------------------------------------------------- /modules/nf-core/mash/screen/environment.yml: -------------------------------------------------------------------------------- 1 | name: mash_screen 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::mash=2.3 8 | -------------------------------------------------------------------------------- /modules/nf-core/mash/screen/main.nf: -------------------------------------------------------------------------------- 1 | process MASH_SCREEN { 2 | tag "$meta.id" 3 | label 'process_medium' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/mash:2.3--he348c14_1': 8 | 'biocontainers/mash:2.3--he348c14_1' }" 9 | 10 | input: 11 | tuple val(meta) , path(query) 12 | tuple val(meta2), path(sequences_sketch) 13 | 14 | output: 15 | tuple val(meta), path("*.screen"), emit: screen 16 | path "versions.yml" , emit: versions 17 | 18 | when: 19 | task.ext.when == null || task.ext.when 20 | 21 | script: 22 | def args = task.ext.args ?: '' 23 | def prefix = task.ext.prefix ?: "${meta.id}" 24 | """ 25 | mash \\ 26 | screen \\ 27 | $args \\ 28 | -p $task.cpus \\ 29 | $sequences_sketch \\ 30 | $query \\ 31 | > ${prefix}.screen 32 | 33 | cat <<-END_VERSIONS > versions.yml 34 | "${task.process}": 35 | mash: \$( mash --version ) 36 | END_VERSIONS 37 | """ 38 | 39 | stub: 40 | def args = task.ext.args ?: '' 41 | def prefix = task.ext.prefix ?: "${meta.id}" 42 | """ 43 | touch ${prefix}.screen 44 | 45 | cat <<-END_VERSIONS > versions.yml 46 | "${task.process}": 47 | mash: \$( mash --version ) 48 | END_VERSIONS 49 | """ 50 | } 51 | -------------------------------------------------------------------------------- /modules/nf-core/mash/screen/meta.yml: -------------------------------------------------------------------------------- 1 | name: "mash_screen" 2 | description: Screens query sequences against large sequence databases 3 | keywords: 4 | - screen 5 | - containment 6 | - contamination 7 | - taxonomic assignment 8 | tools: 9 | - "mash": 10 | description: Fast sequence distance estimator that uses MinHash 11 | homepage: https://github.com/marbl/Mash 12 | documentation: https://mash.readthedocs.io/en/latest/sketches.html 13 | tool_dev_url: https://github.com/marbl/Mash 14 | doi: "10.1186/s13059-016-0997-x" 15 | licence: ["https://github.com/marbl/Mash/blob/master/LICENSE.txt"] 16 | input: 17 | - meta: 18 | type: map 19 | description: | 20 | Groovy Map containing sample information 21 | e.g. [ id:'test', single_end:false ] 22 | - query: 23 | type: file 24 | description: Query sequences 25 | pattern: "*.fastq.gz" 26 | - sequence_sketch: 27 | type: file 28 | description: Sequence files to match against 29 | pattern: "*.msh" 30 | output: 31 | - meta: 32 | type: map 33 | description: | 34 | Groovy Map containing sample information 35 | e.g. [ id:'test', single_end:false ] 36 | - versions: 37 | type: file 38 | description: File containing software versions 39 | pattern: "versions.yml" 40 | - screen: 41 | type: file 42 | description: List of sequences from fastx_db similar to query sequences 43 | pattern: "*.screen" 44 | authors: 45 | - "@mahesh-panchal" 46 | maintainers: 47 | - "@mahesh-panchal" 48 | -------------------------------------------------------------------------------- /modules/nf-core/mash/screen/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: MASH_SCREEN { 3 | ext.args = [ 4 | params.mash_screen_min_score ? "-i ${params.mash_screen_min_score}" : "", 5 | params.mash_screen_winner_take_all ? "-w" : "", 6 | ].join(' ').trim() 7 | publishDir = [ 8 | path: { "${params.outdir}/ReferenceContainment/mash/screen" }, 9 | mode: params.publish_dir_mode, 10 | pattern: '*.screen', 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /modules/nf-core/mash/screen/tests/tags.yml: -------------------------------------------------------------------------------- 1 | mash/screen: 2 | - "modules/nf-core/mash/screen/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/mash/sketch/environment.yml: -------------------------------------------------------------------------------- 1 | name: mash_sketch 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::mash=2.3 8 | -------------------------------------------------------------------------------- /modules/nf-core/mash/sketch/main.nf: -------------------------------------------------------------------------------- 1 | process MASH_SKETCH { 2 | tag "$meta.id" 3 | label 'process_medium' 4 | conda "${moduleDir}/environment.yml" 5 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 6 | 'https://depot.galaxyproject.org/singularity/mash:2.3--he348c14_1' : 7 | 'biocontainers/mash:2.3--he348c14_1' }" 8 | 9 | input: 10 | tuple val(meta), path(reads) 11 | 12 | output: 13 | tuple val(meta), path("*.msh") , emit: mash 14 | tuple val(meta), path("*.mash_stats") , emit: stats 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | mash \\ 25 | sketch \\ 26 | $args \\ 27 | $reads \\ 28 | -p $task.cpus \\ 29 | -o ${prefix} \\ 30 | 2> >(tee ${prefix}.mash_stats >&2) 31 | 32 | cat <<-END_VERSIONS > versions.yml 33 | "${task.process}": 34 | mash: \$(mash --version 2>&1) 35 | END_VERSIONS 36 | """ 37 | 38 | stub: 39 | def args = task.ext.args ?: '' 40 | def prefix = task.ext.prefix ?: "${meta.id}" 41 | """ 42 | touch ${prefix}.msh 43 | touch ${prefix}.mash_stats 44 | 45 | cat <<-END_VERSIONS > versions.yml 46 | "${task.process}": 47 | mash: \$(mash --version 2>&1) 48 | END_VERSIONS 49 | """ 50 | } 51 | -------------------------------------------------------------------------------- /modules/nf-core/mash/sketch/meta.yml: -------------------------------------------------------------------------------- 1 | name: mash_sketch 2 | description: Creates vastly reduced representations of sequences using MinHash 3 | keywords: 4 | - mash 5 | - mash/sketch 6 | - minhash 7 | - reduced 8 | - representations 9 | - sequences 10 | - sketch 11 | tools: 12 | - mash: 13 | description: Fast sequence distance estimator that uses MinHash 14 | homepage: https://github.com/marbl/Mash 15 | documentation: https://mash.readthedocs.io/en/latest/sketches.html 16 | tool_dev_url: https://github.com/marbl/Mash 17 | doi: "10.1186/s13059-016-0997-x" 18 | licence: ["https://github.com/marbl/Mash/blob/master/LICENSE.txt"] 19 | input: 20 | - meta: 21 | type: map 22 | description: | 23 | Groovy Map containing sample information 24 | e.g. [ id:'test', single_end:false ] 25 | - reads: 26 | type: file 27 | description: List of input paired-end FastQ files 28 | output: 29 | - meta: 30 | type: map 31 | description: | 32 | Groovy Map containing sample information 33 | e.g. [ id:'test', single_end:false ] 34 | - mash: 35 | type: file 36 | description: Sketch output 37 | pattern: "*.{mash}" 38 | - stats: 39 | type: file 40 | description: Sketch statistics 41 | pattern: "*.{mash_stats}" 42 | - versions: 43 | type: file 44 | description: File containing software versions 45 | pattern: "versions.yml" 46 | authors: 47 | - "@thanhleviet" 48 | maintainers: 49 | - "@thanhleviet" 50 | -------------------------------------------------------------------------------- /modules/nf-core/mash/sketch/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: MASH_SKETCH_ASSEMBLIES { 3 | ext.args = '-i' 4 | publishDir = [ 5 | enabled: false 6 | ] 7 | } 8 | 9 | withName: MASH_SKETCH_REFERENCES { 10 | ext.args = '-i' 11 | publishDir = [ 12 | path: { "${params.outdir}/ReferenceContainment/mash/sketch" }, 13 | mode: params.publish_dir_mode, 14 | pattern: '*.msh', 15 | enabled: params.save_reference_virus_sketch 16 | ] 17 | } 18 | } -------------------------------------------------------------------------------- /modules/nf-core/mash/sketch/tests/tags.yml: -------------------------------------------------------------------------------- 1 | mash/sketch: 2 | - "modules/nf-core/mash/sketch/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/multiqc/environment.yml: -------------------------------------------------------------------------------- 1 | name: multiqc 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::multiqc=1.21 8 | -------------------------------------------------------------------------------- /modules/nf-core/multiqc/main.nf: -------------------------------------------------------------------------------- 1 | process MULTIQC { 2 | label 'process_single' 3 | 4 | conda "${moduleDir}/environment.yml" 5 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 6 | 'https://depot.galaxyproject.org/singularity/multiqc:1.21--pyhdfd78af_0' : 7 | 'biocontainers/multiqc:1.21--pyhdfd78af_0' }" 8 | 9 | input: 10 | path multiqc_files, stageAs: "?/*" 11 | path(multiqc_config) 12 | path(extra_multiqc_config) 13 | path(multiqc_logo) 14 | 15 | output: 16 | path "*multiqc_report.html", emit: report 17 | path "*_data" , emit: data 18 | path "*_plots" , optional:true, emit: plots 19 | path "versions.yml" , emit: versions 20 | 21 | when: 22 | task.ext.when == null || task.ext.when 23 | 24 | script: 25 | def args = task.ext.args ?: '' 26 | def config = multiqc_config ? "--config $multiqc_config" : '' 27 | def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' 28 | def logo = multiqc_logo ? /--cl-config 'custom_logo: "${multiqc_logo}"'/ : '' 29 | """ 30 | multiqc \\ 31 | --force \\ 32 | $args \\ 33 | $config \\ 34 | $extra_config \\ 35 | $logo \\ 36 | . 37 | 38 | cat <<-END_VERSIONS > versions.yml 39 | "${task.process}": 40 | multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) 41 | END_VERSIONS 42 | """ 43 | 44 | stub: 45 | """ 46 | mkdir multiqc_data 47 | touch multiqc_plots 48 | touch multiqc_report.html 49 | 50 | cat <<-END_VERSIONS > versions.yml 51 | "${task.process}": 52 | multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) 53 | END_VERSIONS 54 | """ 55 | } 56 | -------------------------------------------------------------------------------- /modules/nf-core/multiqc/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: 'MULTIQC' { 3 | ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' 4 | publishDir = [ 5 | path: { "${params.outdir}/multiqc" }, 6 | mode: params.publish_dir_mode, 7 | saveAs: { filename -> filename.equals('versions.yml') ? null : filename } 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /modules/nf-core/multiqc/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "multiqc_versions_single": { 3 | "content": [ 4 | [ 5 | "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" 6 | ] 7 | ], 8 | "meta": { 9 | "nf-test": "0.8.4", 10 | "nextflow": "23.10.1" 11 | }, 12 | "timestamp": "2024-02-29T08:48:55.657331" 13 | }, 14 | "multiqc_stub": { 15 | "content": [ 16 | [ 17 | "multiqc_report.html", 18 | "multiqc_data", 19 | "multiqc_plots", 20 | "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" 21 | ] 22 | ], 23 | "meta": { 24 | "nf-test": "0.8.4", 25 | "nextflow": "23.10.1" 26 | }, 27 | "timestamp": "2024-02-29T08:49:49.071937" 28 | }, 29 | "multiqc_versions_config": { 30 | "content": [ 31 | [ 32 | "versions.yml:md5,21f35ee29416b9b3073c28733efe4b7d" 33 | ] 34 | ], 35 | "meta": { 36 | "nf-test": "0.8.4", 37 | "nextflow": "23.10.1" 38 | }, 39 | "timestamp": "2024-02-29T08:49:25.457567" 40 | } 41 | } -------------------------------------------------------------------------------- /modules/nf-core/multiqc/tests/tags.yml: -------------------------------------------------------------------------------- 1 | multiqc: 2 | - modules/nf-core/multiqc/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/installdatabases/environment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json 3 | name: "pharokka_installdatabases" 4 | channels: 5 | - conda-forge 6 | - bioconda 7 | - defaults 8 | dependencies: 9 | - "bioconda::pharokka=1.5.1" 10 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/installdatabases/meta.yml: -------------------------------------------------------------------------------- 1 | name: "pharokka_installdatabases" 2 | description: Install databases necessary for Pharokka's functional analysis 3 | keywords: 4 | - pharokka 5 | - prokka 6 | - bakta 7 | - phage 8 | - function 9 | - install 10 | - database 11 | 12 | tools: 13 | - "pharokka": 14 | description: "Fast Phage Annotation Program" 15 | homepage: "https://pharokka.readthedocs.io" 16 | documentation: "https://pharokka.readthedocs.io" 17 | tool_dev_url: "https://github.com/gbouras13/pharokka" 18 | doi: "10.1093/bioinformatics/btac776" 19 | licence: ["MIT"] 20 | 21 | output: 22 | - pharokka_db: 23 | type: directory 24 | description: Directory pointing to Pharokka's database 25 | pattern: "${prefix}/" 26 | - versions: 27 | type: file 28 | description: File containing software versions 29 | pattern: "versions.yml" 30 | 31 | authors: 32 | - "@CarsonJM" 33 | maintainers: 34 | - "@CarsonJM" 35 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/installdatabases/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | 3 | } -------------------------------------------------------------------------------- /modules/nf-core/pharokka/installdatabases/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process PHAROKKA_INSTALLDATABASES" 4 | script "../main.nf" 5 | process "PHAROKKA_INSTALLDATABASES" 6 | 7 | tag "modules" 8 | tag "modules_nfcore" 9 | tag "pharokka" 10 | tag "pharokka/installdatabases" 11 | 12 | test("No input required") { 13 | then { 14 | assertAll( 15 | { assert process.success }, 16 | { assert snapshot(process.out).match() } 17 | ) 18 | } 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/installdatabases/tests/tags.yml: -------------------------------------------------------------------------------- 1 | pharokka/installdatabases: 2 | - "modules/nf-core/pharokka/installdatabases/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/pharokka/environment.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json 3 | name: "pharokka_pharokka" 4 | channels: 5 | - conda-forge 6 | - bioconda 7 | - defaults 8 | dependencies: 9 | - "bioconda::pharokka=1.5.1" 10 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/pharokka/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: PHAROKKA_PHAROKKA { 3 | ext.args = [ 4 | "--meta", 5 | ].join(' ').trim() 6 | publishDir = [ 7 | path: { "${params.outdir}/PhageFunction/pharokka/pharokka" }, 8 | mode: params.publish_dir_mode, 9 | pattern: '*', 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /modules/nf-core/pharokka/pharokka/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process PHAROKKA_PHAROKKA" 4 | script "../main.nf" 5 | process "PHAROKKA_PHAROKKA" 6 | config "./nextflow.config" 7 | 8 | tag "modules" 9 | tag "modules_nfcore" 10 | tag "pharokka" 11 | tag "pharokka/pharokka" 12 | tag "pharokka/installdatabases" 13 | 14 | test("sarscov2 - genome - fasta") { 15 | setup { 16 | run("PHAROKKA_INSTALLDATABASES") { 17 | script "../../installdatabases/main.nf" 18 | } 19 | } 20 | 21 | when { 22 | process { 23 | """ 24 | input[0] = [ 25 | [ id:'test' ], // meta map 26 | file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) 27 | ] 28 | input[1] = PHAROKKA_INSTALLDATABASES.out.pharokka_db 29 | """ 30 | } 31 | } 32 | 33 | then { 34 | assertAll( 35 | { assert process.success }, 36 | { assert snapshot( 37 | process.out.cds_functions, 38 | process.out.length_gc_cds_density, 39 | process.out.versions 40 | ).match() 41 | }, 42 | { assert file(process.out.cds_final_merged_output[0][1]).exists() } 43 | ) 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/pharokka/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "sarscov2 - genome - fasta": { 3 | "content": [ 4 | [ 5 | [ 6 | { 7 | "id": "test" 8 | }, 9 | "test_cds_functions.tsv:md5,ba4bd022017c08732cc0d4605c6d3239" 10 | ] 11 | ], 12 | [ 13 | [ 14 | { 15 | "id": "test" 16 | }, 17 | "test_length_gc_cds_density.tsv:md5,cb1748de2145255ff21ede8047d727fe" 18 | ] 19 | ], 20 | [ 21 | "versions.yml:md5,6b7daa5df4b6038456d3c81f0cb4f960" 22 | ] 23 | ], 24 | "timestamp": "2023-12-27T21:20:12.003909628" 25 | } 26 | } -------------------------------------------------------------------------------- /modules/nf-core/pharokka/pharokka/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: PHAROKKA_PHAROKKA { 3 | ext.args = [ 4 | "--fast --skip_extra_annotations --skip_mash" 5 | ].join(' ').trim() 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /modules/nf-core/pharokka/pharokka/tests/tags.yml: -------------------------------------------------------------------------------- 1 | pharokka/pharokka: 2 | - "modules/nf-core/pharokka/pharokka/**" 3 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/environment.yml: -------------------------------------------------------------------------------- 1 | name: samtools_flagstat 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::samtools=1.19.2 8 | - bioconda::htslib=1.19.1 9 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/main.nf: -------------------------------------------------------------------------------- 1 | process SAMTOOLS_FLAGSTAT { 2 | tag "$meta.id" 3 | label 'process_single' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : 8 | 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" 9 | 10 | input: 11 | tuple val(meta), path(bam), path(bai) 12 | 13 | output: 14 | tuple val(meta), path("*.flagstat"), emit: flagstat 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | """ 24 | samtools \\ 25 | flagstat \\ 26 | --threads ${task.cpus} \\ 27 | $bam \\ 28 | > ${prefix}.flagstat 29 | 30 | cat <<-END_VERSIONS > versions.yml 31 | "${task.process}": 32 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 33 | END_VERSIONS 34 | """ 35 | 36 | stub: 37 | def prefix = task.ext.prefix ?: "${meta.id}" 38 | """ 39 | touch ${prefix}.flagstat 40 | 41 | cat <<-END_VERSIONS > versions.yml 42 | "${task.process}": 43 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 44 | END_VERSIONS 45 | """ 46 | } 47 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/meta.yml: -------------------------------------------------------------------------------- 1 | name: samtools_flagstat 2 | description: Counts the number of alignments in a BAM/CRAM/SAM file for each FLAG type 3 | keywords: 4 | - stats 5 | - mapping 6 | - counts 7 | - bam 8 | - sam 9 | - cram 10 | tools: 11 | - samtools: 12 | description: | 13 | SAMtools is a set of utilities for interacting with and post-processing 14 | short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. 15 | These files are generated as output by short read aligners like BWA. 16 | homepage: http://www.htslib.org/ 17 | documentation: http://www.htslib.org/doc/samtools.html 18 | doi: 10.1093/bioinformatics/btp352 19 | licence: ["MIT"] 20 | input: 21 | - meta: 22 | type: map 23 | description: | 24 | Groovy Map containing sample information 25 | e.g. [ id:'test', single_end:false ] 26 | - bam: 27 | type: file 28 | description: BAM/CRAM/SAM file 29 | pattern: "*.{bam,cram,sam}" 30 | - bai: 31 | type: file 32 | description: Index for BAM/CRAM/SAM file 33 | pattern: "*.{bai,crai,sai}" 34 | output: 35 | - meta: 36 | type: map 37 | description: | 38 | Groovy Map containing sample information 39 | e.g. [ id:'test', single_end:false ] 40 | - flagstat: 41 | type: file 42 | description: File containing samtools flagstat output 43 | pattern: "*.{flagstat}" 44 | - versions: 45 | type: file 46 | description: File containing software versions 47 | pattern: "versions.yml" 48 | authors: 49 | - "@drpatelh" 50 | maintainers: 51 | - "@drpatelh" 52 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SAMTOOLS_FLAGSTAT { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process SAMTOOLS_FLAGSTAT" 4 | script "../main.nf" 5 | process "SAMTOOLS_FLAGSTAT" 6 | tag "modules" 7 | tag "modules_nfcore" 8 | tag "samtools" 9 | tag "samtools/flagstat" 10 | 11 | test("BAM") { 12 | 13 | when { 14 | params { 15 | outdir = "$outputDir" 16 | } 17 | process { 18 | """ 19 | input[0] = Channel.of([ 20 | [ id:'test', single_end:false ], // meta map 21 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), 22 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) 23 | ]) 24 | """ 25 | } 26 | } 27 | 28 | then { 29 | assertAll ( 30 | { assert process.success }, 31 | { assert snapshot(process.out.flagstat).match("flagstat") }, 32 | { assert snapshot(process.out.versions).match("versions") } 33 | ) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "flagstat": { 3 | "content": [ 4 | [ 5 | [ 6 | { 7 | "id": "test", 8 | "single_end": false 9 | }, 10 | "test.flagstat:md5,4f7ffd1e6a5e85524d443209ac97d783" 11 | ] 12 | ] 13 | ], 14 | "meta": { 15 | "nf-test": "0.8.4", 16 | "nextflow": "23.04.3" 17 | }, 18 | "timestamp": "2024-02-12T18:31:37.783927" 19 | }, 20 | "versions": { 21 | "content": [ 22 | [ 23 | "versions.yml:md5,fd0030ce49ab3a92091ad80260226452" 24 | ] 25 | ], 26 | "meta": { 27 | "nf-test": "0.8.4", 28 | "nextflow": "24.01.0" 29 | }, 30 | "timestamp": "2024-02-13T16:11:44.299617452" 31 | } 32 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/flagstat/tests/tags.yml: -------------------------------------------------------------------------------- 1 | samtools/flagstat: 2 | - modules/nf-core/samtools/flagstat/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/environment.yml: -------------------------------------------------------------------------------- 1 | name: samtools_idxstats 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::samtools=1.19.2 8 | - bioconda::htslib=1.19.1 9 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/main.nf: -------------------------------------------------------------------------------- 1 | process SAMTOOLS_IDXSTATS { 2 | tag "$meta.id" 3 | label 'process_single' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : 8 | 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" 9 | 10 | input: 11 | tuple val(meta), path(bam), path(bai) 12 | 13 | output: 14 | tuple val(meta), path("*.idxstats"), emit: idxstats 15 | path "versions.yml" , emit: versions 16 | 17 | when: 18 | task.ext.when == null || task.ext.when 19 | 20 | script: 21 | def args = task.ext.args ?: '' 22 | def prefix = task.ext.prefix ?: "${meta.id}" 23 | 24 | """ 25 | samtools \\ 26 | idxstats \\ 27 | --threads ${task.cpus-1} \\ 28 | $bam \\ 29 | > ${prefix}.idxstats 30 | 31 | cat <<-END_VERSIONS > versions.yml 32 | "${task.process}": 33 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 34 | END_VERSIONS 35 | """ 36 | 37 | stub: 38 | def prefix = task.ext.prefix ?: "${meta.id}" 39 | 40 | """ 41 | touch ${prefix}.idxstats 42 | 43 | cat <<-END_VERSIONS > versions.yml 44 | "${task.process}": 45 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 46 | END_VERSIONS 47 | """ 48 | } 49 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/meta.yml: -------------------------------------------------------------------------------- 1 | name: samtools_idxstats 2 | description: Reports alignment summary statistics for a BAM/CRAM/SAM file 3 | keywords: 4 | - stats 5 | - mapping 6 | - counts 7 | - chromosome 8 | - bam 9 | - sam 10 | - cram 11 | tools: 12 | - samtools: 13 | description: | 14 | SAMtools is a set of utilities for interacting with and post-processing 15 | short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. 16 | These files are generated as output by short read aligners like BWA. 17 | homepage: http://www.htslib.org/ 18 | documentation: http://www.htslib.org/doc/samtools.html 19 | doi: 10.1093/bioinformatics/btp352 20 | licence: ["MIT"] 21 | input: 22 | - meta: 23 | type: map 24 | description: | 25 | Groovy Map containing sample information 26 | e.g. [ id:'test', single_end:false ] 27 | - bam: 28 | type: file 29 | description: BAM/CRAM/SAM file 30 | pattern: "*.{bam,cram,sam}" 31 | - bai: 32 | type: file 33 | description: Index for BAM/CRAM/SAM file 34 | pattern: "*.{bai,crai,sai}" 35 | output: 36 | - meta: 37 | type: map 38 | description: | 39 | Groovy Map containing sample information 40 | e.g. [ id:'test', single_end:false ] 41 | - idxstats: 42 | type: file 43 | description: File containing samtools idxstats output 44 | pattern: "*.{idxstats}" 45 | - versions: 46 | type: file 47 | description: File containing software versions 48 | pattern: "versions.yml" 49 | authors: 50 | - "@drpatelh" 51 | maintainers: 52 | - "@drpatelh" 53 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SAMTOOLS_IDXSTATS { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process SAMTOOLS_IDXSTATS" 4 | script "../main.nf" 5 | process "SAMTOOLS_IDXSTATS" 6 | tag "modules" 7 | tag "modules_nfcore" 8 | tag "samtools" 9 | tag "samtools/idxstats" 10 | 11 | test("bam") { 12 | 13 | when { 14 | params { 15 | outdir = "$outputDir" 16 | } 17 | process { 18 | """ 19 | input[0] = Channel.of([ 20 | [ id:'test', single_end:false ], // meta map 21 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), 22 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) 23 | ]) 24 | """ 25 | } 26 | } 27 | 28 | then { 29 | assertAll ( 30 | { assert process.success }, 31 | { assert snapshot(process.out.idxstats).match("idxstats") }, 32 | { assert snapshot(process.out.versions).match("versions") } 33 | ) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "versions": { 3 | "content": [ 4 | [ 5 | "versions.yml:md5,613dde56f108418039ffcdeeddba397a" 6 | ] 7 | ], 8 | "meta": { 9 | "nf-test": "0.8.4", 10 | "nextflow": "24.01.0" 11 | }, 12 | "timestamp": "2024-02-13T16:16:50.147462763" 13 | }, 14 | "idxstats": { 15 | "content": [ 16 | [ 17 | [ 18 | { 19 | "id": "test", 20 | "single_end": false 21 | }, 22 | "test.idxstats:md5,df60a8c8d6621100d05178c93fb053a2" 23 | ] 24 | ] 25 | ], 26 | "meta": { 27 | "nf-test": "0.8.4", 28 | "nextflow": "23.04.3" 29 | }, 30 | "timestamp": "2024-02-12T18:36:41.561026" 31 | } 32 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/idxstats/tests/tags.yml: -------------------------------------------------------------------------------- 1 | samtools/idxstats: 2 | - modules/nf-core/samtools/idxstats/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/index/environment.yml: -------------------------------------------------------------------------------- 1 | name: samtools_index 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::samtools=1.19.2 8 | - bioconda::htslib=1.19.1 9 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/index/main.nf: -------------------------------------------------------------------------------- 1 | process SAMTOOLS_INDEX { 2 | tag "$meta.id" 3 | label 'process_low' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : 8 | 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" 9 | 10 | input: 11 | tuple val(meta), path(input) 12 | 13 | output: 14 | tuple val(meta), path("*.bai") , optional:true, emit: bai 15 | tuple val(meta), path("*.csi") , optional:true, emit: csi 16 | tuple val(meta), path("*.crai"), optional:true, emit: crai 17 | path "versions.yml" , emit: versions 18 | 19 | when: 20 | task.ext.when == null || task.ext.when 21 | 22 | script: 23 | def args = task.ext.args ?: '' 24 | """ 25 | samtools \\ 26 | index \\ 27 | -@ ${task.cpus-1} \\ 28 | $args \\ 29 | $input 30 | 31 | cat <<-END_VERSIONS > versions.yml 32 | "${task.process}": 33 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 34 | END_VERSIONS 35 | """ 36 | 37 | stub: 38 | """ 39 | touch ${input}.bai 40 | touch ${input}.crai 41 | touch ${input}.csi 42 | 43 | cat <<-END_VERSIONS > versions.yml 44 | "${task.process}": 45 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 46 | END_VERSIONS 47 | """ 48 | } 49 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/index/meta.yml: -------------------------------------------------------------------------------- 1 | name: samtools_index 2 | description: Index SAM/BAM/CRAM file 3 | keywords: 4 | - index 5 | - bam 6 | - sam 7 | - cram 8 | tools: 9 | - samtools: 10 | description: | 11 | SAMtools is a set of utilities for interacting with and post-processing 12 | short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. 13 | These files are generated as output by short read aligners like BWA. 14 | homepage: http://www.htslib.org/ 15 | documentation: http://www.htslib.org/doc/samtools.html 16 | doi: 10.1093/bioinformatics/btp352 17 | licence: ["MIT"] 18 | input: 19 | - meta: 20 | type: map 21 | description: | 22 | Groovy Map containing sample information 23 | e.g. [ id:'test', single_end:false ] 24 | - bam: 25 | type: file 26 | description: BAM/CRAM/SAM file 27 | pattern: "*.{bam,cram,sam}" 28 | output: 29 | - meta: 30 | type: map 31 | description: | 32 | Groovy Map containing sample information 33 | e.g. [ id:'test', single_end:false ] 34 | - bai: 35 | type: file 36 | description: BAM/CRAM/SAM index file 37 | pattern: "*.{bai,crai,sai}" 38 | - crai: 39 | type: file 40 | description: BAM/CRAM/SAM index file 41 | pattern: "*.{bai,crai,sai}" 42 | - csi: 43 | type: file 44 | description: CSI index file 45 | pattern: "*.{csi}" 46 | - versions: 47 | type: file 48 | description: File containing software versions 49 | pattern: "versions.yml" 50 | authors: 51 | - "@drpatelh" 52 | - "@ewels" 53 | - "@maxulysse" 54 | maintainers: 55 | - "@drpatelh" 56 | - "@ewels" 57 | - "@maxulysse" 58 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/index/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SAMTOOLS_INDEX { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/index/tests/csi.nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | 3 | withName: SAMTOOLS_INDEX { 4 | ext.args = '-c' 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/index/tests/tags.yml: -------------------------------------------------------------------------------- 1 | samtools/index: 2 | - modules/nf-core/samtools/index/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/sort/environment.yml: -------------------------------------------------------------------------------- 1 | name: samtools_sort 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::samtools=1.19.2 8 | - bioconda::htslib=1.19.1 9 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/sort/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SAMTOOLS_SORT { 3 | ext.prefix = { "${meta.id}.sorted" } 4 | } 5 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/sort/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | 3 | withName: SAMTOOLS_SORT { 4 | ext.prefix = { "${meta.id}.sorted" } 5 | ext.args = "--write-index" 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/sort/tests/tags.yml: -------------------------------------------------------------------------------- 1 | samtools/sort: 2 | - modules/nf-core/samtools/sort/** 3 | - tests/modules/nf-core/samtools/sort/** 4 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/stats/environment.yml: -------------------------------------------------------------------------------- 1 | name: samtools_stats 2 | channels: 3 | - conda-forge 4 | - bioconda 5 | - defaults 6 | dependencies: 7 | - bioconda::samtools=1.19.2 8 | - bioconda::htslib=1.19.1 9 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/stats/main.nf: -------------------------------------------------------------------------------- 1 | process SAMTOOLS_STATS { 2 | tag "$meta.id" 3 | label 'process_single' 4 | 5 | conda "${moduleDir}/environment.yml" 6 | container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 7 | 'https://depot.galaxyproject.org/singularity/samtools:1.19.2--h50ea8bc_0' : 8 | 'biocontainers/samtools:1.19.2--h50ea8bc_0' }" 9 | 10 | input: 11 | tuple val(meta), path(input), path(input_index) 12 | tuple val(meta2), path(fasta) 13 | 14 | output: 15 | tuple val(meta), path("*.stats"), emit: stats 16 | path "versions.yml" , emit: versions 17 | 18 | when: 19 | task.ext.when == null || task.ext.when 20 | 21 | script: 22 | def args = task.ext.args ?: '' 23 | def prefix = task.ext.prefix ?: "${meta.id}" 24 | def reference = fasta ? "--reference ${fasta}" : "" 25 | """ 26 | samtools \\ 27 | stats \\ 28 | --threads ${task.cpus} \\ 29 | ${reference} \\ 30 | ${input} \\ 31 | > ${prefix}.stats 32 | 33 | cat <<-END_VERSIONS > versions.yml 34 | "${task.process}": 35 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 36 | END_VERSIONS 37 | """ 38 | 39 | stub: 40 | def prefix = task.ext.prefix ?: "${meta.id}" 41 | """ 42 | touch ${prefix}.stats 43 | 44 | cat <<-END_VERSIONS > versions.yml 45 | "${task.process}": 46 | samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') 47 | END_VERSIONS 48 | """ 49 | } 50 | -------------------------------------------------------------------------------- /modules/nf-core/samtools/stats/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SAMTOOLS_STATS { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /modules/nf-core/samtools/stats/tests/tags.yml: -------------------------------------------------------------------------------- 1 | samtools/stats: 2 | - modules/nf-core/samtools/stats/** 3 | -------------------------------------------------------------------------------- /modules/nf-core/untar/environment.yml: -------------------------------------------------------------------------------- 1 | name: untar 2 | 3 | channels: 4 | - conda-forge 5 | - bioconda 6 | - defaults 7 | 8 | dependencies: 9 | - conda-forge::grep=3.11 10 | - conda-forge::sed=4.7 11 | - conda-forge::tar=1.34 12 | -------------------------------------------------------------------------------- /modules/nf-core/untar/meta.yml: -------------------------------------------------------------------------------- 1 | name: untar 2 | description: Extract files. 3 | keywords: 4 | - untar 5 | - uncompress 6 | - extract 7 | tools: 8 | - untar: 9 | description: | 10 | Extract tar.gz files. 11 | documentation: https://www.gnu.org/software/tar/manual/ 12 | licence: ["GPL-3.0-or-later"] 13 | input: 14 | - meta: 15 | type: map 16 | description: | 17 | Groovy Map containing sample information 18 | e.g. [ id:'test', single_end:false ] 19 | - archive: 20 | type: file 21 | description: File to be untar 22 | pattern: "*.{tar}.{gz}" 23 | output: 24 | - meta: 25 | type: map 26 | description: | 27 | Groovy Map containing sample information 28 | e.g. [ id:'test', single_end:false ] 29 | - untar: 30 | type: directory 31 | description: Directory containing contents of archive 32 | pattern: "*/" 33 | - versions: 34 | type: file 35 | description: File containing software versions 36 | pattern: "versions.yml" 37 | authors: 38 | - "@joseespinosa" 39 | - "@drpatelh" 40 | - "@matthdsm" 41 | - "@jfy133" 42 | maintainers: 43 | - "@joseespinosa" 44 | - "@drpatelh" 45 | - "@matthdsm" 46 | - "@jfy133" 47 | -------------------------------------------------------------------------------- /modules/nf-core/untar/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: UNTAR { 3 | publishDir = [ 4 | enabled: false 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /modules/nf-core/untar/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_process { 2 | 3 | name "Test Process UNTAR" 4 | script "../main.nf" 5 | process "UNTAR" 6 | tag "modules" 7 | tag "modules_nfcore" 8 | tag "untar" 9 | test("test_untar") { 10 | 11 | when { 12 | process { 13 | """ 14 | input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) ] 15 | """ 16 | } 17 | } 18 | 19 | then { 20 | assertAll ( 21 | { assert process.success }, 22 | { assert snapshot(process.out.untar).match("test_untar") }, 23 | ) 24 | } 25 | 26 | } 27 | 28 | test("test_untar_onlyfiles") { 29 | 30 | when { 31 | process { 32 | """ 33 | input[0] = [ [], file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) ] 34 | """ 35 | } 36 | } 37 | 38 | then { 39 | assertAll ( 40 | { assert process.success }, 41 | { assert snapshot(process.out.untar).match("test_untar_onlyfiles") }, 42 | ) 43 | } 44 | 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /modules/nf-core/untar/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "test_untar_onlyfiles": { 3 | "content": [ 4 | [ 5 | [ 6 | [ 7 | 8 | ], 9 | [ 10 | "hello.txt:md5,e59ff97941044f85df5297e1c302d260" 11 | ] 12 | ] 13 | ] 14 | ], 15 | "meta": { 16 | "nf-test": "0.8.4", 17 | "nextflow": "23.10.1" 18 | }, 19 | "timestamp": "2024-02-28T11:49:41.320643" 20 | }, 21 | "test_untar": { 22 | "content": [ 23 | [ 24 | [ 25 | [ 26 | 27 | ], 28 | [ 29 | "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", 30 | "opts.k2d:md5,a033d00cf6759407010b21700938f543", 31 | "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" 32 | ] 33 | ] 34 | ] 35 | ], 36 | "meta": { 37 | "nf-test": "0.8.4", 38 | "nextflow": "23.10.1" 39 | }, 40 | "timestamp": "2024-02-28T11:49:33.795172" 41 | } 42 | } -------------------------------------------------------------------------------- /modules/nf-core/untar/tests/tags.yml: -------------------------------------------------------------------------------- 1 | untar: 2 | - modules/nf-core/untar/** 3 | -------------------------------------------------------------------------------- /nf-test.config: -------------------------------------------------------------------------------- 1 | config { 2 | // Location of nf-tests 3 | testsDir "." 4 | 5 | // nf-test directory used to create temporary files for each test 6 | workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" 7 | 8 | // location of an optional nextflow.config file specific for executing tests 9 | configFile "tests/nextflow.config" 10 | } 11 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | # Config file for Python. Mostly used to configure linting of bin/*.py with Ruff. 2 | # Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. 3 | [tool.ruff] 4 | line-length = 120 5 | target-version = "py38" 6 | cache-dir = "~/.cache/ruff" 7 | 8 | [tool.ruff.lint] 9 | select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"] 10 | 11 | [tool.ruff.lint.isort] 12 | known-first-party = ["nf_core"] 13 | 14 | [tool.ruff.lint.per-file-ignores] 15 | "__init__.py" = ["E402", "F401"] 16 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_all_v_all_blast/main.nf: -------------------------------------------------------------------------------- 1 | // 2 | // Compare sequences by performing an all-v-all BLAST 3 | // 4 | include { BLAST_MAKEBLASTDB } from '../../../modules/nf-core/blast/makeblastdb/main' 5 | include { BLAST_BLASTN } from '../../../modules/nf-core/blast/blastn/main' 6 | 7 | workflow FASTA_ALL_V_ALL_BLAST { 8 | 9 | take: 10 | fasta_gz // [ [ meta ], fasta.gz ] , assemblies/genomes (mandatory) 11 | 12 | main: 13 | ch_versions = Channel.empty() 14 | 15 | // 16 | // MODULE: Make BLASTN database 17 | // 18 | ch_blast_db = BLAST_MAKEBLASTDB ( fasta_gz ).db 19 | ch_versions = ch_versions.mix( BLAST_MAKEBLASTDB.out.versions ) 20 | 21 | // 22 | // MODULE: Perform BLAST 23 | // 24 | ch_blast_txt = BLAST_BLASTN ( fasta_gz , ch_blast_db ).txt 25 | ch_versions = ch_versions = ch_versions.mix( BLAST_MAKEBLASTDB.out.versions ) 26 | 27 | emit: 28 | blast_txt = ch_blast_txt // [ [ meta ], blast_output.tsv ] , TSV file containing BLAST results 29 | versions = ch_versions // [ versions.yml ] 30 | 31 | } 32 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_all_v_all_blast/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/gunzip/nextflow.config' 2 | includeConfig '../../../modules/nf-core/blast/makeblastdb/nextflow.config' 3 | includeConfig '../../../modules/nf-core/blast/blastn/nextflow.config' 4 | includeConfig '../../../modules/local/anicluster/anicalc/nextflow.config' 5 | includeConfig '../../../modules/local/anicluster/aniclust/nextflow.config' 6 | includeConfig '../../../modules/local/anicluster/extractreps/nextflow.config' 7 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_all_v_all_blast/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Subworkflow: FASTA_ALL_V_ALL_BLAST" 4 | script "subworkflows/local/fasta_all_v_all_blast/main.nf" 5 | workflow "FASTA_ALL_V_ALL_BLAST" 6 | 7 | // Dependencies 8 | tag "BLAST_MAKEBLASTDB" 9 | tag "BLAST_BLASTN" 10 | 11 | 12 | test("fasta.gz") { 13 | 14 | when { 15 | workflow { 16 | """ 17 | input[0] = Channel.of( 18 | [ 19 | [ id:'test' ], 20 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true) 21 | ] 22 | ) 23 | """ 24 | } 25 | } 26 | 27 | then { 28 | assertAll( 29 | { assert workflow.success }, 30 | { assert snapshot(workflow.out).match() } 31 | ) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_all_v_all_blast/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "fasta.gz": { 3 | "content": [ 4 | { 5 | "0": [ 6 | [ 7 | { 8 | "id": "test" 9 | }, 10 | "test.txt:md5,aa3f583ccce0464e25ced18c56760404" 11 | ] 12 | ], 13 | "1": [ 14 | "versions.yml:md5,3a67b197cc055b730a0f1aa4d0cd31c0", 15 | "versions.yml:md5,3a67b197cc055b730a0f1aa4d0cd31c0" 16 | ], 17 | "blast_txt": [ 18 | [ 19 | { 20 | "id": "test" 21 | }, 22 | "test.txt:md5,aa3f583ccce0464e25ced18c56760404" 23 | ] 24 | ], 25 | "versions": [ 26 | "versions.yml:md5,3a67b197cc055b730a0f1aa4d0cd31c0", 27 | "versions.yml:md5,3a67b197cc055b730a0f1aa4d0cd31c0" 28 | ] 29 | } 30 | ], 31 | "meta": { 32 | "nf-test": "0.8.4", 33 | "nextflow": "23.10.1" 34 | }, 35 | "timestamp": "2024-02-28T16:37:03.577392353" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_all_v_all_blast/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fasta_all_v_all_blast: 2 | - subworkflows/local/fasta_all_v_all_blast/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_microdiversity_instrain/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/instrain/profile/nextflow.config' 2 | includeConfig '../../../modules/nf-core/instrain/compare/nextflow.config' 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_microdiversity_instrain/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Subworkflow: FASTA_MICRODIVERSITY_INSTRAIN" 4 | script "../main.nf" 5 | workflow "FASTA_MICRODIVERSITY_INSTRAIN" 6 | 7 | // Dependencies 8 | tag "INSTRAIN_PROFILE" 9 | tag "INSTRAIN_COMPARE" 10 | 11 | test("bam & fasta & stb_file") { 12 | 13 | when { 14 | workflow { 15 | """ 16 | input[0] = Channel.of( 17 | [ 18 | [ id:'test' ], 19 | file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) 20 | ], 21 | [ 22 | [ id:'test2' ], 23 | file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) 24 | ] 25 | ) 26 | input[1] = Channel.of([ 27 | [ id: 'reference_fasta' ], 28 | file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) 29 | ] 30 | ) 31 | input[2] = null 32 | input[3] = Channel.of([ 33 | [ id: 'instrain_stb' ], 34 | file(params.pipelines_testdata_base_path + 'modules/nfcore/instrain/profile/instrain_stb.stb', checkIfExists: true) 35 | ] 36 | ) 37 | """ 38 | } 39 | } 40 | 41 | then { 42 | assertAll( 43 | { assert workflow.success }, 44 | { assert snapshot(workflow.out).match() } 45 | ) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_microdiversity_instrain/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "bam & fasta & stb_file": { 3 | "content": [ 4 | { 5 | "0": [ 6 | 7 | ], 8 | "1": [ 9 | "versions.yml:md5,4f3be9f56f69dcce1903598ad2fc9635", 10 | "versions.yml:md5,4f3be9f56f69dcce1903598ad2fc9635", 11 | "versions.yml:md5,816a6bc0dc4c7fe8dee2a3cd012b38e2" 12 | ], 13 | "gene_info_tsv": [ 14 | 15 | ], 16 | "versions": [ 17 | "versions.yml:md5,4f3be9f56f69dcce1903598ad2fc9635", 18 | "versions.yml:md5,4f3be9f56f69dcce1903598ad2fc9635", 19 | "versions.yml:md5,816a6bc0dc4c7fe8dee2a3cd012b38e2" 20 | ] 21 | } 22 | ], 23 | "meta": { 24 | "nf-test": "0.8.4", 25 | "nextflow": "23.10.1" 26 | }, 27 | "timestamp": "2024-03-08T20:15:50.456499453" 28 | } 29 | } -------------------------------------------------------------------------------- /subworkflows/local/fasta_microdiversity_instrain/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fasta_microdiversity_instrain: 2 | - subworkflows/local/fasta_microdiversity_instrain/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_function_pharokka/main.nf: -------------------------------------------------------------------------------- 1 | // 2 | // Functionally annotate phage sequences using Pharokka 3 | // 4 | 5 | include { PHAROKKA_INSTALLDATABASES } from '../../../modules/nf-core/pharokka/installdatabases/main' 6 | include { PHAROKKA_PHAROKKA } from '../../../modules/nf-core/pharokka/pharokka/main' 7 | 8 | workflow FASTA_PHAGE_FUNCTION_PHAROKKA { 9 | take: 10 | virus_fasta // [ [ meta ], fasta ] , virus sequences (mandatory) 11 | pharokka_db // [ pharokka_db ] , Pharokka database directory (optional) 12 | 13 | main: 14 | ch_versions = Channel.empty() 15 | 16 | // if pharokka_db exists, skip database download 17 | if ( pharokka_db ){ 18 | ch_pharokka_db = pharokka_db 19 | } else { 20 | // 21 | // MODULE: download standard pharokka database 22 | // 23 | ch_pharokka_db = PHAROKKA_INSTALLDATABASES( ).pharokka_db 24 | ch_versions = ch_versions.mix(PHAROKKA_INSTALLDATABASES.out.versions) 25 | } 26 | 27 | // 28 | // MODULE: Functionally annotate phages 29 | // 30 | ch_pharokka_gbk_gz = PHAROKKA_PHAROKKA ( virus_fasta, ch_pharokka_db ).gbk 31 | pharokka_final_output_tsv = PHAROKKA_PHAROKKA.out.cds_final_merged_output 32 | ch_versions = ch_versions.mix(PHAROKKA_PHAROKKA.out.versions.first()) 33 | 34 | emit: 35 | versions = ch_versions // [ versions.yml ] 36 | pharokka_gbk_gz = ch_pharokka_gbk_gz // [ [ meta ], gbk.gz ] 37 | pharokka_final_output_tsv = pharokka_final_output_tsv // [ [ meta ], tsv ] 38 | } 39 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_function_pharokka/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/pharokka/installdatabases/nextflow.config' 2 | includeConfig '../../../modules/nf-core/pharokka/pharokka/nextflow.config' 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_function_pharokka/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Subworkflow: FASTA_PHAGE_FUNCTION_PHAROKKA" 4 | script "../main.nf" 5 | workflow "FASTA_PHAGE_FUNCTION_PHAROKKA" 6 | config "./nextflow.config" 7 | 8 | // Dependencies 9 | tag "PHAROKKA_INSTALLDATABASES" 10 | tag "PHAROKKA_PHAROKKA" 11 | 12 | 13 | test("fasta") { 14 | 15 | when { 16 | workflow { 17 | """ 18 | input[0] = Channel.of( 19 | [ 20 | [ id:'test' ], 21 | file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) 22 | ] 23 | ) 24 | input[1] = null 25 | """ 26 | } 27 | } 28 | 29 | then { 30 | assertAll( 31 | { assert workflow.success }, 32 | { assert snapshot( 33 | workflow.out.versions, 34 | workflow.out.pharokka_final_output_tsv, 35 | path(workflow.out.pharokka_gbk_gz[0][1]).linesGzip[1..50] 36 | ).match() 37 | } 38 | ) 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_function_pharokka/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: PHAROKKA_PHAROKKA { 3 | ext.args = "--locustag TEST" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_function_pharokka/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fasta_phage_function_pharokka_default: 2 | - subworkflows/local/fasta_phage_function_pharokka/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_host_iphop/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/iphop/download/nextflow.config' 2 | includeConfig '../../../modules/nf-core/iphop/predict/nextflow.config' 3 | includeConfig '../../../modules/nf-core/untar/nextflow.config' 4 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_host_iphop/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Subworkflow: FASTA_PHAGE_HOST_IPHOP" 4 | script "../main.nf" 5 | workflow "FASTA_PHAGE_HOST_IPHOP" 6 | 7 | // Dependencies 8 | tag "IPHOP_DOWNLOAD" 9 | tag "UNTAR" 10 | tag "IPHOP_PREDICT" 11 | 12 | test("fasta") { 13 | 14 | when { 15 | params { 16 | iphop_test_db = true 17 | iphop_partial_test = true 18 | } 19 | workflow { 20 | """ 21 | input[0] = Channel.of( 22 | [ 23 | [ id:'test' ], 24 | file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) 25 | ] 26 | ) 27 | input[1] = null 28 | """ 29 | } 30 | } 31 | 32 | then { 33 | assertAll( 34 | { assert workflow.success }, 35 | { assert snapshot(workflow.out).match() } 36 | ) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_host_iphop/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "fasta": { 3 | "content": [ 4 | { 5 | "0": [ 6 | [ 7 | { 8 | "id": "test" 9 | }, 10 | "Host_prediction_to_genus_m90.csv:md5,528dcefb6a6c743b43f0dbc40bec3692" 11 | ] 12 | ], 13 | "1": [ 14 | "versions.yml:md5,41c2135a3578a7a52a23fd3243c22e80", 15 | "versions.yml:md5,6d962b190899f9580909b28917ffa748", 16 | "versions.yml:md5,c8e1743aa09ef3013ef7ddb1edc8c43e" 17 | ], 18 | "host_predictions_tsv": [ 19 | [ 20 | { 21 | "id": "test" 22 | }, 23 | "Host_prediction_to_genus_m90.csv:md5,528dcefb6a6c743b43f0dbc40bec3692" 24 | ] 25 | ], 26 | "versions": [ 27 | "versions.yml:md5,41c2135a3578a7a52a23fd3243c22e80", 28 | "versions.yml:md5,6d962b190899f9580909b28917ffa748", 29 | "versions.yml:md5,c8e1743aa09ef3013ef7ddb1edc8c43e" 30 | ] 31 | } 32 | ], 33 | "meta": { 34 | "nf-test": "0.8.4", 35 | "nextflow": "23.10.1" 36 | }, 37 | "timestamp": "2024-02-19T17:08:56.56407858" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_phage_host_iphop/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fasta_phage_host_iphop_default: 2 | - subworkflows/local/fasta_phage_host_iphop/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_classification_genomad/main.nf: -------------------------------------------------------------------------------- 1 | // 2 | // Classify and annotate sequences with geNomad 3 | // 4 | 5 | include { GENOMAD_DOWNLOAD } from '../../../modules/nf-core/genomad/download/main' 6 | include { GENOMAD_ENDTOEND } from '../../../modules/nf-core/genomad/endtoend/main' // TODO: Update nf-core module to gzip output files 7 | 8 | workflow FASTA_VIRUS_CLASSIFICATION_GENOMAD { 9 | take: 10 | fasta_gz // [ [ meta ], fasta.gz ] , assemblies/genomes (mandatory) 11 | genomad_db // [ genomad_db ] , genomad database directory (optional) 12 | 13 | main: 14 | ch_versions = Channel.empty() 15 | 16 | // if genomad_db exists, skip GENOMAD_DOWNLOAD 17 | if ( genomad_db ){ 18 | ch_genomad_db = genomad_db 19 | } else { 20 | // 21 | // MODULE: download geNomad database 22 | // 23 | ch_genomad_db = GENOMAD_DOWNLOAD( ).genomad_db 24 | ch_versions = ch_versions.mix(GENOMAD_DOWNLOAD.out.versions.first()) 25 | } 26 | 27 | // 28 | // MODULE: Classify/annotate viral sequences 29 | // 30 | ch_viruses_fna_gz = GENOMAD_ENDTOEND ( fasta_gz, ch_genomad_db ).virus_fasta 31 | ch_virus_summaries_tsv = GENOMAD_ENDTOEND.out.virus_summary 32 | ch_versions = ch_versions.mix(GENOMAD_ENDTOEND.out.versions.first()) 33 | 34 | emit: 35 | genomad_db = ch_genomad_db // [ genomad_db/ ] , directory containing genomad_db files 36 | viruses_fna_gz = ch_viruses_fna_gz // [ [ meta ], fna.gz ] , FASTA file containing viral sequences 37 | virus_summaries_tsv = ch_virus_summaries_tsv // [ [ meta ], virus_summary.tsv ] , TSV file containing virus information 38 | versions = ch_versions // [ versions.yml ] 39 | 40 | } 41 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_classification_genomad/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/genomad/download/nextflow.config' 2 | includeConfig '../../../modules/nf-core/genomad/endtoend/nextflow.config' 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_classification_genomad/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Subworkflow: FASTA_VIRUS_CLASSIFICATION_GENOMAD" 4 | script "subworkflows/local/fasta_virus_classification_genomad/main.nf" 5 | workflow "FASTA_VIRUS_CLASSIFICATION_GENOMAD" 6 | 7 | // Dependencies 8 | tag "GENOMAD_DOWNLOAD" 9 | tag "GENOMAD_ENDTOEND" 10 | 11 | 12 | test("fasta") { 13 | 14 | when { 15 | params { 16 | genomad_splits = 5 17 | } 18 | workflow { 19 | """ 20 | input[0] = Channel.of( 21 | [ 22 | [ id:'test' ], 23 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) 24 | ], 25 | [ 26 | [ id:'test2' ], 27 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) 28 | ] 29 | ) 30 | input[1] = null 31 | """ 32 | } 33 | } 34 | 35 | then { 36 | assertAll( 37 | { assert workflow.success }, 38 | { assert snapshot(workflow.out).match() } 39 | ) 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_classification_genomad/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fasta_virus_classification_genomad_default: 2 | - subworkflows/local/fasta_virus_classification_genomad/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_quality_checkv/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/checkv/downloaddatabase/nextflow.config' 2 | includeConfig '../../../modules/nf-core/checkv/endtoend/nextflow.config' 3 | includeConfig '../../../modules/nf-core/gunzip/nextflow.config' 4 | includeConfig '../../../modules/nf-core/untar/nextflow.config' 5 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_quality_checkv/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Subworkflow: FASTA_VIRUS_QUALITY_CHECKV" 4 | script "subworkflows/local/fasta_virus_quality_checkv/main.nf" 5 | workflow "FASTA_VIRUS_QUALITY_CHECKV" 6 | 7 | // Dependencies 8 | tag "CHECKV_DOWNLOADDATABASE" 9 | tag "UNTAR" 10 | tag "CHECKV_ENDTOEND" 11 | 12 | test("fasta.gz") { 13 | 14 | when { 15 | workflow { 16 | """ 17 | input[0] = Channel.of( 18 | [ 19 | [ id:'test' ], 20 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true) 21 | ], 22 | [ 23 | [ id:'test2' ], 24 | file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true) 25 | ] 26 | ) 27 | input[1] = null 28 | """ 29 | } 30 | } 31 | 32 | then { 33 | assertAll( 34 | { assert workflow.success }, 35 | { assert snapshot(workflow.out).match() } 36 | ) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /subworkflows/local/fasta_virus_quality_checkv/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fasta_virus_quality_checkv_default: 2 | - subworkflows/local/fasta_virus_quality_checkv/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_fasta_contig_extension_cobra/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/bowtie2/build/nextflow.config' 2 | includeConfig '../../../modules/nf-core/gunzip/nextflow.config' 3 | includeConfig '../../../modules/nf-core/cobrameta/nextflow.config' 4 | includeConfig '../../../modules/local/coverm/contig/nextflow.config' 5 | includeConfig '../../nf-core/fastq_align_bowtie2/nextflow.config' 6 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_fasta_contig_extension_cobra/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "fastq - fasta - viruses_tsv - metaspades - k=22 - k=127": { 3 | "content": [ 4 | [ 5 | "versions.yml:md5,2ae6371f345c3ed00f9a2abcdde4cd7c", 6 | "versions.yml:md5,3e74574fbfe0a90e2862245914d738e4", 7 | "versions.yml:md5,45ab424acfec849d28d8f8ab4a3af8f1", 8 | "versions.yml:md5,466c764b0ff156331507ba238e111bf2", 9 | "versions.yml:md5,64da2eecb8de1b06695a1d90486247b0", 10 | "versions.yml:md5,78a67cf0bf546994c775283ac774760a", 11 | "versions.yml:md5,7f61c2e84c088e886fef2f98710466b1", 12 | "versions.yml:md5,90c4e1c1c332a92141708a0be8ab2066", 13 | "versions.yml:md5,d464199cdf99a00939311c178e24c614", 14 | "versions.yml:md5,fc102771b3196a7b96fec4a6f1281a37" 15 | ] 16 | ], 17 | "timestamp": "2024-04-03T19:51:47.578170738" 18 | } 19 | } -------------------------------------------------------------------------------- /subworkflows/local/fastq_fasta_reference_containment_mash/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/mash/sketch/nextflow.config' 2 | includeConfig '../../../modules/nf-core/mash/screen/nextflow.config' 3 | includeConfig '../../../modules/local/mash/paste/nextflow.config' 4 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_fasta_reference_containment_mash/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fastq_fasta_reference_containment_mash: 2 | - subworkflows/local/fastq_fasta_reference_containment_mash/** 3 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_virus_enrichment_viromeqc/main.nf: -------------------------------------------------------------------------------- 1 | // 2 | // Estimate viral enrichment in reads 3 | // 4 | 5 | include { VIROMEQC_INSTALL } from '../../../modules/local/viromeqc/install/main' 6 | include { VIROMEQC_VIROMEQC } from '../../../modules/local/viromeqc/viromeqc/main' 7 | 8 | workflow FASTQ_VIRUS_ENRICHMENT_VIROMEQC { 9 | take: 10 | fastq_gz // [ [ meta.id ] , [ 1.fastq.gz, 2.fastq.gz ] , reads (mandatory) 11 | 12 | main: 13 | ch_versions = Channel.empty() 14 | 15 | // 16 | // MODULE: Install ViromeQC index 17 | // 18 | ch_viromeqc_index = VIROMEQC_INSTALL ( ).viromeqc_index 19 | ch_versions = ch_versions.mix(VIROMEQC_INSTALL.out.versions.first()) 20 | 21 | // 22 | // MODULE: Estimate viral enrichment 23 | // 24 | ch_enrichment_tsv = VIROMEQC_VIROMEQC ( fastq_gz, ch_viromeqc_index ).enrichment 25 | ch_versions = ch_versions.mix(VIROMEQC_VIROMEQC.out.versions.first()) 26 | 27 | emit: 28 | enrichment_tsv = ch_enrichment_tsv // [ [ meta.id ] , enrichment.tsv ] , viral enrichment estimates 29 | versions = ch_versions // [ versions.yml ] 30 | } 31 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_virus_enrichment_viromeqc/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/local/viromeqc/install/nextflow.config' 2 | includeConfig '../../../modules/local/viromeqc/viromeqc/nextflow.config' 3 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_virus_enrichment_viromeqc/tests/main.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test subworkflow: FASTQ_VIRUS_ENRICHMENT_VIROMEQC" 4 | script "subworkflows/local/fastq_virus_enrichment_viromeqc/main.nf" 5 | workflow "FASTQ_VIRUS_ENRICHMENT_VIROMEQC" 6 | 7 | // Dependencies 8 | tag "VIROMEQC_INSTALL" 9 | tag "VIROMEQC_VIROMEQC" 10 | 11 | 12 | test("fastq.gz") { 13 | 14 | when { 15 | workflow { 16 | """ 17 | input[0] = [ 18 | [ id:'test' ], // meta map 19 | [ 20 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkifExists: true), 21 | file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkifExists: true), 22 | ] 23 | ] 24 | """ 25 | } 26 | } 27 | 28 | then { 29 | assertAll( 30 | { assert workflow.success }, 31 | { assert snapshot(workflow.out).match() } 32 | ) 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_virus_enrichment_viromeqc/tests/main.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "fastq.gz": { 3 | "content": [ 4 | { 5 | "0": [ 6 | [ 7 | { 8 | "id": "test" 9 | }, 10 | "test.viromeqc.tsv:md5,6acbffc97f75774cf9fcc953b98913ed" 11 | ] 12 | ], 13 | "1": [ 14 | "versions.yml:md5,c26288b67351c3bdaad635c87a0249e7", 15 | "versions.yml:md5,f771871e8cbe81944f6d5fbbc56cc7a5" 16 | ], 17 | "enrichment_tsv": [ 18 | [ 19 | { 20 | "id": "test" 21 | }, 22 | "test.viromeqc.tsv:md5,6acbffc97f75774cf9fcc953b98913ed" 23 | ] 24 | ], 25 | "versions": [ 26 | "versions.yml:md5,c26288b67351c3bdaad635c87a0249e7", 27 | "versions.yml:md5,f771871e8cbe81944f6d5fbbc56cc7a5" 28 | ] 29 | } 30 | ], 31 | "meta": { 32 | "nf-test": "0.8.4", 33 | "nextflow": "23.10.1" 34 | }, 35 | "timestamp": "2024-02-28T17:22:41.423720896" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /subworkflows/local/fastq_virus_enrichment_viromeqc/tests/tags.yml: -------------------------------------------------------------------------------- 1 | fastq_virus_enrichment_viromeqc: 2 | - subworkflows/local/fastq_virus_enrichment_viromeqc/** 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/samtools/sort/nextflow.config' 2 | includeConfig '../../../modules/nf-core/samtools/index/nextflow.config' 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_sort_stats_samtools/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: SAMTOOLS_SORT { 3 | ext.prefix = null 4 | } 5 | } -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_sort_stats_samtools/tests/tags.yml: -------------------------------------------------------------------------------- 1 | subworkflows/bam_sort_stats_samtools: 2 | - subworkflows/nf-core/bam_sort_stats_samtools/** 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_stats_samtools/main.nf: -------------------------------------------------------------------------------- 1 | // 2 | // Run SAMtools stats, flagstat and idxstats 3 | // 4 | 5 | include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main' 6 | include { SAMTOOLS_IDXSTATS } from '../../../modules/nf-core/samtools/idxstats/main' 7 | include { SAMTOOLS_FLAGSTAT } from '../../../modules/nf-core/samtools/flagstat/main' 8 | 9 | workflow BAM_STATS_SAMTOOLS { 10 | take: 11 | ch_bam_bai // channel: [ val(meta), path(bam), path(bai) ] 12 | ch_fasta // channel: [ val(meta), path(fasta) ] 13 | 14 | main: 15 | ch_versions = Channel.empty() 16 | 17 | SAMTOOLS_STATS ( ch_bam_bai, ch_fasta ) 18 | ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions) 19 | 20 | SAMTOOLS_FLAGSTAT ( ch_bam_bai ) 21 | ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions) 22 | 23 | SAMTOOLS_IDXSTATS ( ch_bam_bai ) 24 | ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions) 25 | 26 | emit: 27 | stats = SAMTOOLS_STATS.out.stats // channel: [ val(meta), path(stats) ] 28 | flagstat = SAMTOOLS_FLAGSTAT.out.flagstat // channel: [ val(meta), path(flagstat) ] 29 | idxstats = SAMTOOLS_IDXSTATS.out.idxstats // channel: [ val(meta), path(idxstats) ] 30 | 31 | versions = ch_versions // channel: [ path(versions.yml) ] 32 | } 33 | -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_stats_samtools/meta.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json 2 | name: bam_stats_samtools 3 | description: Produces comprehensive statistics from SAM/BAM/CRAM file 4 | keywords: 5 | - statistics 6 | - counts 7 | - bam 8 | - sam 9 | - cram 10 | components: 11 | - samtools/stats 12 | - samtools/idxstats 13 | - samtools/flagstat 14 | input: 15 | - ch_bam_bai: 16 | description: | 17 | The input channel containing the BAM/CRAM and it's index 18 | Structure: [ val(meta), path(bam), path(bai) ] 19 | - ch_fasta: 20 | description: | 21 | Reference genome fasta file 22 | Structure: [ path(fasta) ] 23 | output: 24 | - stats: 25 | description: | 26 | File containing samtools stats output 27 | Structure: [ val(meta), path(stats) ] 28 | - flagstat: 29 | description: | 30 | File containing samtools flagstat output 31 | Structure: [ val(meta), path(flagstat) ] 32 | - idxstats: 33 | description: | 34 | File containing samtools idxstats output 35 | Structure: [ val(meta), path(idxstats)] 36 | - versions: 37 | description: | 38 | Files containing software versions 39 | Structure: [ path(versions.yml) ] 40 | authors: 41 | - "@drpatelh" 42 | maintainers: 43 | - "@drpatelh" 44 | -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_stats_samtools/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/samtools/stats/nextflow.config' 2 | includeConfig '../../../modules/nf-core/samtools/idxstats/nextflow.config' 3 | includeConfig '../../../modules/nf-core/samtools/flagstat/nextflow.config' 4 | -------------------------------------------------------------------------------- /subworkflows/nf-core/bam_stats_samtools/tests/tags.yml: -------------------------------------------------------------------------------- 1 | subworkflows/bam_stats_samtools: 2 | - subworkflows/nf-core/bam_stats_samtools/** 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/fastq_align_bowtie2/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../../modules/nf-core/bowtie2/align/nextflow.config' 2 | includeConfig '../../../modules/nf-core/bowtie2/build/nextflow.config' 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/fastq_align_bowtie2/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | process { 2 | withName: '.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_.*' { 3 | ext.prefix = { "${meta.id}.sorted" } 4 | } 5 | withName: '.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { 6 | ext.prefix = { "${meta.id}.sorted.bam" } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /subworkflows/nf-core/fastq_align_bowtie2/tests/tags.yml: -------------------------------------------------------------------------------- 1 | subworkflows/fastq_align_bowtie2: 2 | - subworkflows/nf-core/fastq_align_bowtie2/** 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/initialise/meta.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json 2 | name: "initialise" 3 | description: Validate input parameters and print help messages 4 | keywords: 5 | - admin 6 | - check 7 | - help 8 | - version 9 | components: [] 10 | input: 11 | - version: 12 | type: boolean 13 | description: | 14 | Structure: val(version) 15 | Boolean to show the pipeline version and exit. 16 | - help: 17 | type: boolean 18 | description: | 19 | Structure: val(help) 20 | Boolean to show the pipeline help message and exit. 21 | - validateParams: 22 | type: boolean 23 | description: | 24 | Structure: val(validateParams) 25 | Whether to validate the parameters prior to starting the pipeline. 26 | - logo: 27 | type: boolean 28 | description: | 29 | Structure: val(logo) 30 | Boolean to show the pipeline logo and exit. 31 | output: 32 | - summary_params: 33 | type: value 34 | description: | 35 | Structure: val(summary_params) 36 | A map of the parameters used in the pipeline. 37 | authors: 38 | - "@adamrtalbot" 39 | maintainers: 40 | - "@adamrtalbot" 41 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nextflow_pipeline/meta.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json 2 | name: "UTILS_NEXTFLOW_PIPELINE" 3 | description: Subworkflow with functionality that may be useful for any Nextflow pipeline 4 | keywords: 5 | - utility 6 | - pipeline 7 | - initialise 8 | - version 9 | components: [] 10 | input: 11 | - print_version: 12 | type: boolean 13 | description: | 14 | Print the version of the pipeline and exit 15 | - dump_parameters: 16 | type: boolean 17 | description: | 18 | Dump the parameters of the pipeline to a JSON file 19 | - output_directory: 20 | type: directory 21 | description: Path to output dir to write JSON file to. 22 | pattern: "results/" 23 | - check_conda_channel: 24 | type: boolean 25 | description: | 26 | Check if the conda channel priority is correct. 27 | output: 28 | - dummy_emit: 29 | type: boolean 30 | description: | 31 | Dummy emit to make nf-core subworkflows lint happy 32 | authors: 33 | - "@adamrtalbot" 34 | - "@drpatelh" 35 | maintainers: 36 | - "@adamrtalbot" 37 | - "@drpatelh" 38 | - "@maxulysse" 39 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test: -------------------------------------------------------------------------------- 1 | 2 | nextflow_function { 3 | 4 | name "Test Functions" 5 | script "subworkflows/nf-core/utils_nextflow_pipeline/main.nf" 6 | config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config" 7 | tag 'subworkflows' 8 | tag 'utils_nextflow_pipeline' 9 | tag 'subworkflows/utils_nextflow_pipeline' 10 | 11 | test("Test Function getWorkflowVersion") { 12 | 13 | function "getWorkflowVersion" 14 | 15 | then { 16 | assertAll( 17 | { assert function.success }, 18 | { assert snapshot(function.result).match() } 19 | ) 20 | } 21 | } 22 | 23 | test("Test Function dumpParametersToJSON") { 24 | 25 | function "dumpParametersToJSON" 26 | 27 | when { 28 | function { 29 | """ 30 | // define inputs of the function here. Example: 31 | input[0] = "$outputDir" 32 | """.stripIndent() 33 | } 34 | } 35 | 36 | then { 37 | assertAll( 38 | { assert function.success } 39 | ) 40 | } 41 | } 42 | 43 | test("Test Function checkCondaChannels") { 44 | 45 | function "checkCondaChannels" 46 | 47 | then { 48 | assertAll( 49 | { assert function.success }, 50 | { assert snapshot(function.result).match() } 51 | ) 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "Test Function getWorkflowVersion": { 3 | "content": [ 4 | "v9.9.9" 5 | ], 6 | "meta": { 7 | "nf-test": "0.8.4", 8 | "nextflow": "23.10.1" 9 | }, 10 | "timestamp": "2024-02-28T12:02:05.308243" 11 | }, 12 | "Test Function checkCondaChannels": { 13 | "content": null, 14 | "meta": { 15 | "nf-test": "0.8.4", 16 | "nextflow": "23.10.1" 17 | }, 18 | "timestamp": "2024-02-28T12:02:12.425833" 19 | } 20 | } -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | manifest { 2 | name = 'nextflow_workflow' 3 | author = """nf-core""" 4 | homePage = 'https://127.0.0.1' 5 | description = """Dummy pipeline""" 6 | nextflowVersion = '!>=23.04.0' 7 | version = '9.9.9' 8 | doi = 'https://doi.org/10.5281/zenodo.5070524' 9 | } 10 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml: -------------------------------------------------------------------------------- 1 | subworkflows/utils_nextflow_pipeline: 2 | - subworkflows/nf-core/utils_nextflow_pipeline/** 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfcore_pipeline/meta.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json 2 | name: "UTILS_NFCORE_PIPELINE" 3 | description: Subworkflow with utility functions specific to the nf-core pipeline template 4 | keywords: 5 | - utility 6 | - pipeline 7 | - initialise 8 | - version 9 | components: [] 10 | input: 11 | - nextflow_cli_args: 12 | type: list 13 | description: | 14 | Nextflow CLI positional arguments 15 | output: 16 | - success: 17 | type: boolean 18 | description: | 19 | Dummy output to indicate success 20 | authors: 21 | - "@adamrtalbot" 22 | maintainers: 23 | - "@adamrtalbot" 24 | - "@maxulysse" 25 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test: -------------------------------------------------------------------------------- 1 | nextflow_workflow { 2 | 3 | name "Test Workflow UTILS_NFCORE_PIPELINE" 4 | script "../main.nf" 5 | config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" 6 | workflow "UTILS_NFCORE_PIPELINE" 7 | tag "subworkflows" 8 | tag "subworkflows_nfcore" 9 | tag "utils_nfcore_pipeline" 10 | tag "subworkflows/utils_nfcore_pipeline" 11 | 12 | test("Should run without failures") { 13 | 14 | when { 15 | workflow { 16 | """ 17 | input[0] = [] 18 | """ 19 | } 20 | } 21 | 22 | then { 23 | assertAll( 24 | { assert workflow.success }, 25 | { assert snapshot(workflow.out).match() } 26 | ) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap: -------------------------------------------------------------------------------- 1 | { 2 | "Should run without failures": { 3 | "content": [ 4 | { 5 | "0": [ 6 | true 7 | ], 8 | "valid_config": [ 9 | true 10 | ] 11 | } 12 | ], 13 | "meta": { 14 | "nf-test": "0.8.4", 15 | "nextflow": "23.10.1" 16 | }, 17 | "timestamp": "2024-02-28T12:03:25.726491" 18 | } 19 | } -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config: -------------------------------------------------------------------------------- 1 | manifest { 2 | name = 'nextflow_workflow' 3 | author = """nf-core""" 4 | homePage = 'https://127.0.0.1' 5 | description = """Dummy pipeline""" 6 | nextflowVersion = '!>=23.04.0' 7 | version = '9.9.9' 8 | doi = 'https://doi.org/10.5281/zenodo.5070524' 9 | } 10 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml: -------------------------------------------------------------------------------- 1 | subworkflows/utils_nfcore_pipeline: 2 | - subworkflows/nf-core/utils_nfcore_pipeline/** 3 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json 2 | name: "UTILS_NFVALIDATION_PLUGIN" 3 | description: Use nf-validation to initiate and validate a pipeline 4 | keywords: 5 | - utility 6 | - pipeline 7 | - initialise 8 | - validation 9 | components: [] 10 | input: 11 | - print_help: 12 | type: boolean 13 | description: | 14 | Print help message and exit 15 | - workflow_command: 16 | type: string 17 | description: | 18 | The command to run the workflow e.g. "nextflow run main.nf" 19 | - pre_help_text: 20 | type: string 21 | description: | 22 | Text to print before the help message 23 | - post_help_text: 24 | type: string 25 | description: | 26 | Text to print after the help message 27 | - validate_params: 28 | type: boolean 29 | description: | 30 | Validate the parameters and error if invalid. 31 | - schema_filename: 32 | type: string 33 | description: | 34 | The filename of the schema to validate against. 35 | output: 36 | - dummy_emit: 37 | type: boolean 38 | description: | 39 | Dummy emit to make nf-core subworkflows lint happy 40 | authors: 41 | - "@adamrtalbot" 42 | maintainers: 43 | - "@adamrtalbot" 44 | - "@maxulysse" 45 | -------------------------------------------------------------------------------- /subworkflows/nf-core/utils_nfvalidation_plugin/tests/tags.yml: -------------------------------------------------------------------------------- 1 | subworkflows/utils_nfvalidation_plugin: 2 | - subworkflows/nf-core/utils_nfvalidation_plugin/** 3 | -------------------------------------------------------------------------------- /tests/nextflow.config: -------------------------------------------------------------------------------- 1 | params { 2 | // Input data 3 | input = 'https://github.com/nf-core/test-datasets/raw/phageannotator/assets/1.0.0/test_samplesheet.csv' 4 | 5 | // Tool options 6 | reference_virus_fasta = 'https://github.com/nf-core/test-datasets/raw/modules/data/genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz' 7 | genomad_splits = 5 8 | 9 | // Pipeline options 10 | publish_dir_mode = 'symlink' 11 | 12 | // Resource limiting 13 | max_cpus = 2//4 14 | max_memory = '7.GB'//'15.GB' 15 | max_time = '6.h' 16 | 17 | // Test data base path (S3) 18 | modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' 19 | 20 | // Test data base path (GitHub) 21 | test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' 22 | 23 | // Base directory for nf-core/phageannotator test data 24 | pipelines_testdata_base_path = "https://raw.githubusercontent.com/nf-core/test-datasets/phageannotator/" 25 | } 26 | 27 | // Impose sensible resource limits for testing 28 | process { 29 | withName: SAMTOOLS_SORT { 30 | cpus = 2 31 | } 32 | 33 | withName: SAMTOOLS_STATS { 34 | cpus = 2 35 | } 36 | 37 | withName: PHAROKKA_PHAROKKA { 38 | cpus = 1 39 | ext.args = "--locustag TEST" 40 | } 41 | } 42 | 43 | // Impose same minimum Nextflow version as the pipeline for testing 44 | manifest { 45 | nextflowVersion = '!>=23.04.0' 46 | } 47 | 48 | // Disable all Nextflow reporting options 49 | timeline { enabled = false } 50 | report { enabled = false } 51 | trace { enabled = false } 52 | dag { enabled = false } 53 | 54 | // Load modules test_data.config 55 | includeConfig 'https://github.com/nf-core/modules/raw/master/tests/config/test_data.config' 56 | -------------------------------------------------------------------------------- /tests/nf-test-local-db-params.json: -------------------------------------------------------------------------------- 1 | { 2 | "genomad_db": "/gscratch/pedslabs_hoffman/resources/genomad_db", 3 | "checkv_db": "/gscratch/pedslabs_hoffman/resources/checkv-db-v1.5", 4 | "iphop_db": "/gscratch/pedslabs_hoffman/carsonjm/apptainer/iphop/iphop_test_db/Test_db_rw/" 5 | } 6 | -------------------------------------------------------------------------------- /tests/tags.yml: -------------------------------------------------------------------------------- 1 | nfcore_phageannotator: 2 | - ./** 3 | -------------------------------------------------------------------------------- /tower.yml: -------------------------------------------------------------------------------- 1 | reports: 2 | multiqc_report.html: 3 | display: "MultiQC HTML report" 4 | samplesheet.csv: 5 | display: "Auto-created samplesheet with collated metadata and FASTQ paths" 6 | -------------------------------------------------------------------------------- /workflows/nextflow.config: -------------------------------------------------------------------------------- 1 | // Read in specific config relating to workflow. 2 | includeConfig './phageannotator/nextflow.config' 3 | -------------------------------------------------------------------------------- /workflows/phageannotator/nextflow.config: -------------------------------------------------------------------------------- 1 | includeConfig '../../modules/nf-core/fastqc/nextflow.config' 2 | includeConfig '../../subworkflows/local/fastq_virus_enrichment_viromeqc/nextflow.config' 3 | includeConfig '../../modules/local/seqkit/seq/nextflow.config' 4 | includeConfig '../../subworkflows/local/fastq_fasta_reference_containment_mash/nextflow.config' 5 | includeConfig '../../modules/local/appendscreenhits/nextflow.config' 6 | includeConfig '../../modules/nf-core/cat/cat/nextflow.config' 7 | includeConfig '../../subworkflows/local/fasta_virus_classification_genomad/nextflow.config' 8 | includeConfig '../../subworkflows/local/fastq_fasta_contig_extension_cobra/nextflow.config' 9 | includeConfig '../../subworkflows/local/fasta_virus_quality_checkv/nextflow.config' 10 | includeConfig '../../modules/local/qualityfilterviruses/nextflow.config' 11 | includeConfig '../../modules/nf-core/multiqc/nextflow.config' 12 | includeConfig '../../subworkflows/local/fasta_all_v_all_blast/nextflow.config' 13 | includeConfig '../../subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config' 14 | includeConfig '../../subworkflows/nf-core/bam_stats_samtools/nextflow.config' 15 | includeConfig '../../subworkflows/nf-core/fastq_align_bowtie2/nextflow.config' 16 | includeConfig '../../modules/local/coverm/contig/nextflow.config' 17 | includeConfig '../../subworkflows/local/fasta_phage_host_iphop/nextflow.config' 18 | includeConfig '../../modules/nf-core/gunzip/nextflow.config' 19 | includeConfig '../../modules/nf-core/bacphlip/nextflow.config' 20 | includeConfig '../../subworkflows/local/fasta_phage_function_pharokka/nextflow.config' 21 | includeConfig '../../modules/local/instrain/stb/nextflow.config' 22 | includeConfig '../../subworkflows/local/fasta_microdiversity_instrain/nextflow.config' 23 | -------------------------------------------------------------------------------- /workflows/phageannotator/tests/tags.yml: -------------------------------------------------------------------------------- 1 | phageannotator_default: 2 | - workflows/phageannotator/** 3 | phageannotator_no_reference: 4 | - workflows/phageannotator/** 5 | phageannotator_skip_bacphlip: 6 | - workflows/phageannotator/** 7 | phageannotator_skip_checkv: 8 | - workflows/phageannotator/** 9 | phageannotator_skip_genomad_taxonomy: 10 | - workflows/phageannotator/** 11 | phageannotator_skip_genomad: 12 | - workflows/phageannotator/** 13 | phageannotator_skip_instrain: 14 | - workflows/phageannotator/** 15 | phageannotator_skip_iphop: 16 | - workflows/phageannotator/** 17 | phageannotator_skip_pharokka: 18 | - workflows/phageannotator/** 19 | phageannotator_skip_reference_containment: 20 | - workflows/phageannotator/** 21 | phageannotator_skip_viromeqc: 22 | - workflows/phageannotator/** 23 | phageannotator_skip_virus_clustering: 24 | - workflows/phageannotator/** 25 | --------------------------------------------------------------------------------