diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 1161630..e082f69 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,9 +9,8 @@ Please use the pre-filled template to save time. However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;) -:::info -If you need help using or modifying nf-core/reportho then the best place to ask is on the nf-core Slack [#reportho](https://nfcore.slack.com/channels/reportho) channel ([join our Slack here](https://nf-co.re/join/slack)). -::: +> [!NOTE] +> If you need help using or modifying nf-core/reportho then the best place to ask is on the nf-core Slack [#reportho](https://nfcore.slack.com/channels/reportho) channel ([join our Slack here](https://nf-co.re/join/slack)). ## Contribution workflow @@ -27,8 +26,11 @@ If you're not used to this workflow with git, you can start with some [docs from ## Tests -You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to -receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir `. +You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command: + +```bash +nf-test test --profile debug,test,docker --verbose +``` When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests. Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then. @@ -90,7 +92,7 @@ Once there, use `nf-core schema build` to add to `nextflow_schema.json`. Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. -The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block. +The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block. ### Naming schemes diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e4d2a64..acc0149 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -18,7 +18,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/repo - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/reportho/tree/master/.github/CONTRIBUTING.md) - [ ] If necessary, also make a PR on the nf-core/reportho _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository. - [ ] Make sure your code lints (`nf-core lint`). -- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). +- [ ] Ensure the test suite passes (`nf-test test main.nf.test -profile test,docker`). - [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). - [ ] Usage Documentation in `docs/usage.md` is updated. - [ ] Output Documentation in `docs/output.md` is updated. diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 748b431..073e187 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Install Nextflow - uses: nf-core/setup-nextflow@b9f764e8ba5c76b712ace14ecbfcef0e40ae2dd8 # v1 + uses: nf-core/setup-nextflow@v1 - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 with: diff --git a/.vscode/settings.json b/.vscode/settings.json index 3df0161..324a961 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, + "editor.formatOnSave": true } diff --git a/conf/modules.config b/conf/modules.config index a81954b..f7989d5 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -46,7 +46,7 @@ process { ] } - withName: 'FETCH_INSPECTOR_GROUP_LOCAL|FETCH_INSPECTOR_GROUP_ONLINE' { + withName: 'FETCH_INSPECTOR_GROUP_ONLINE' { publishDir = [ path: { "${params.outdir}/orthologs/orthoinspector" }, mode: params.publish_dir_mode, diff --git a/conf/test.config b/conf/test.config index fc9ded3..2a67104 100644 --- a/conf/test.config +++ b/conf/test.config @@ -29,3 +29,4 @@ params { skip_iqtree = true fastme_bootstrap = 0 } + diff --git a/docs/images/nf-core-reportho_logo_light.png b/docs/images/nf-core-reportho_logo_light.png index 2ccb82d..f02910f 100644 Binary files a/docs/images/nf-core-reportho_logo_light.png and b/docs/images/nf-core-reportho_logo_light.png differ diff --git a/modules.json b/modules.json index 1e87009..251ab94 100644 --- a/modules.json +++ b/modules.json @@ -56,7 +56,7 @@ }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "262b17ed2aad591039f914951659177e6c39a8d8", + "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", "installed_by": ["subworkflows"] }, "utils_nfvalidation_plugin": { diff --git a/modules/local/convert_fasta.nf b/modules/local/convert_fasta.nf index 7b32950..434e047 100644 --- a/modules/local/convert_fasta.nf +++ b/modules/local/convert_fasta.nf @@ -28,4 +28,16 @@ process CONVERT_FASTA { Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fa + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/convert_phylip.nf b/modules/local/convert_phylip.nf index 11dab37..a574b65 100644 --- a/modules/local/convert_phylip.nf +++ b/modules/local/convert_phylip.nf @@ -28,4 +28,16 @@ process CONVERT_PHYLIP { Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.phy + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Biopython: \$(pip show biopython | grep Version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/create_tcoffeetemplate.nf b/modules/local/create_tcoffeetemplate.nf index 071c3bf..0b8b7d3 100644 --- a/modules/local/create_tcoffeetemplate.nf +++ b/modules/local/create_tcoffeetemplate.nf @@ -20,7 +20,10 @@ process CREATE_TCOFFEETEMPLATE { prefix = task.ext.prefix ?: "${meta.id}" """ # Prep templates - for structure in \$(ls *.pdb); do id=`echo \$structure| awk {'gsub(".pdb", "", \$0); print'}`; echo -e ">"\$id "_P_" "\${id}" >>${prefix}_template.txt ; done + for structure in \$(ls *.pdb); do + id=`echo \$structure | awk {'gsub(".pdb", "", \$0); print'}`; + echo -e ">"\$id "_P_" "\${id}" >> ${prefix}_template.txt; + done """ stub: diff --git a/modules/local/dump_params.nf b/modules/local/dump_params.nf index f354fe2..323189b 100644 --- a/modules/local/dump_params.nf +++ b/modules/local/dump_params.nf @@ -8,6 +8,13 @@ process DUMP_PARAMS { input: tuple val(meta), path(exact) + val uniprot_query + val use_structures + val use_centroid + val min_score + val skip_downstream + val use_iqtree + val use_fastme output: tuple val(meta), path("params.yml"), emit: params @@ -19,14 +26,19 @@ process DUMP_PARAMS { """ cat <<- END_PARAMS > params.yml id: ${meta.id} - uniprot_query: ${params.uniprot_query} + uniprot_query: ${uniprot_query} exact_match: \$(cat $exact) - use_structures: ${params.use_structures} - use_centroid: ${params.use_centroid} - min_score: ${params.min_score} - skip_downstream: ${params.skip_downstream} - use_iqtree: ${params.use_iqtree} - use_fastme: ${params.use_fastme} + use_structures: ${use_structures} + use_centroid: ${use_centroid} + min_score: ${min_score} + skip_downstream: ${skip_downstream} + use_iqtree: ${use_iqtree} + use_fastme: ${use_fastme} END_PARAMS """ + + stub: + """ + touch params.yml + """ } diff --git a/modules/local/fetch_afdb_structures.nf b/modules/local/fetch_afdb_structures.nf index d560887..92ceae5 100644 --- a/modules/local/fetch_afdb_structures.nf +++ b/modules/local/fetch_afdb_structures.nf @@ -31,4 +31,16 @@ process FETCH_AFDB_STRUCTURES { Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.phy + + cat <<- END_VERSIONS > versions.yml + "${task.process}" + Python: \$(python --version | cut -d ' ' -f 2) + Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/fetch_eggnog_group_local.nf b/modules/local/fetch_eggnog_group_local.nf index 32df3da..c1786f8 100644 --- a/modules/local/fetch_eggnog_group_local.nf +++ b/modules/local/fetch_eggnog_group_local.nf @@ -2,6 +2,11 @@ process FETCH_EGGNOG_GROUP_LOCAL { tag "$meta.id" label 'process_single' + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : + 'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }" + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : @@ -33,4 +38,15 @@ process FETCH_EGGNOG_GROUP_LOCAL { END_VERSIONS """ + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_eggnog_group.txt + touch ${prefix}_eggnog_group.csv + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -f2) + END_VERSIONS + """ } diff --git a/modules/local/fetch_inspector_group_online.nf b/modules/local/fetch_inspector_group_online.nf index aaff6cb..a0f51d4 100644 --- a/modules/local/fetch_inspector_group_online.nf +++ b/modules/local/fetch_inspector_group_online.nf @@ -32,4 +32,17 @@ process FETCH_INSPECTOR_GROUP_ONLINE { OrthoInspector Database: $inspector_version END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_inspector_group.csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) + OrthoInspector Database: $inspector_version + END_VERSIONS + """ } diff --git a/modules/local/fetch_oma_group_local.nf b/modules/local/fetch_oma_group_local.nf index db08c55..07a813e 100644 --- a/modules/local/fetch_oma_group_local.nf +++ b/modules/local/fetch_oma_group_local.nf @@ -2,6 +2,11 @@ process FETCH_OMA_GROUP_LOCAL { tag "$meta.id" label 'process_single' + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : + 'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }" + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : @@ -36,4 +41,14 @@ process FETCH_OMA_GROUP_LOCAL { END_VERSIONS """ + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_oma_group.csv + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -f2) + END_VERSIONS + """ } diff --git a/modules/local/fetch_oma_group_online.nf b/modules/local/fetch_oma_group_online.nf index 7335b98..470612b 100644 --- a/modules/local/fetch_oma_group_online.nf +++ b/modules/local/fetch_oma_group_online.nf @@ -33,4 +33,17 @@ process FETCH_OMA_GROUP_ONLINE { \$(get_oma_version.py) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_oma_group.csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) + \$(get_oma_version.py) + END_VERSIONS + """ } diff --git a/modules/local/fetch_panther_group_local.nf b/modules/local/fetch_panther_group_local.nf index aa178dd..60d4979 100644 --- a/modules/local/fetch_panther_group_local.nf +++ b/modules/local/fetch_panther_group_local.nf @@ -7,6 +7,11 @@ process FETCH_PANTHER_GROUP_LOCAL { 'https://depot.galaxyproject.org/singularity/python:3.10' : 'biocontainers/python:3.10' }" + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : + 'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }" + input: tuple val(meta), path(uniprot_id), path(taxid), path(exact) path panther_db @@ -30,4 +35,15 @@ process FETCH_PANTHER_GROUP_LOCAL { Python: \$(python --version | cut -f2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_panther_group.csv + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -f2) + END_VERSIONS + """ } diff --git a/modules/local/fetch_panther_group_online.nf b/modules/local/fetch_panther_group_online.nf index 525746b..7df1363 100644 --- a/modules/local/fetch_panther_group_online.nf +++ b/modules/local/fetch_panther_group_online.nf @@ -32,4 +32,17 @@ process FETCH_PANTHER_GROUP_ONLINE { Panther Database: \$(cat panther_version.txt) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_panther_group.csv + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) + Panther Database: \$(cat panther_version.txt) + END_VERSIONS + """ } diff --git a/modules/local/fetch_sequences_online.nf b/modules/local/fetch_sequences_online.nf index 5242abe..eec8581 100644 --- a/modules/local/fetch_sequences_online.nf +++ b/modules/local/fetch_sequences_online.nf @@ -33,4 +33,19 @@ process FETCH_SEQUENCES_ONLINE { \$(get_oma_version.py) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_orthologs.fa + touch ${prefix}_seq_hits.txt + touch ${prefix}_seq_misses.txt + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) + \$(get_oma_version.py) + END_VERSIONS + """ } diff --git a/modules/local/filter_fasta.nf b/modules/local/filter_fasta.nf index ecfd20e..35d7181 100644 --- a/modules/local/filter_fasta.nf +++ b/modules/local/filter_fasta.nf @@ -2,6 +2,11 @@ process FILTER_FASTA { tag "$meta.id" label 'process_single' + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : + 'biocontainers/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' }" + conda "conda-forge::python=3.11.0 conda-forge::biopython=1.83.0 conda-forge::requests=2.31.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-bc54124b36864a4af42a9db48b90a404b5869e7e:5258b8e5ba20587b7cbf3e942e973af5045a1e59-0' : @@ -27,4 +32,15 @@ process FILTER_FASTA { Python: \$(python --version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_filtered.fa + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -f2) + END_VERSIONS + """ } diff --git a/modules/local/filter_hits.nf b/modules/local/filter_hits.nf index c99b67f..5f0d78d 100644 --- a/modules/local/filter_hits.nf +++ b/modules/local/filter_hits.nf @@ -32,4 +32,17 @@ process FILTER_HITS { Python: \$(python --version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_minscore_000.txt + touch ${prefix}_centroid.txt + touch ${prefix}_filtered_hits.txt + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -f2) + END_VERSIONS + """ } diff --git a/modules/local/identify_seq_online.nf b/modules/local/identify_seq_online.nf index e61bb0b..2ada143 100644 --- a/modules/local/identify_seq_online.nf +++ b/modules/local/identify_seq_online.nf @@ -29,4 +29,18 @@ process IDENTIFY_SEQ_ONLINE { Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_id.txt + touch ${prefix}_taxid.txt + touch ${prefix}_exact.txt + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + Python Requests: \$(pip show requests | grep Version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/make_report.nf b/modules/local/make_report.nf index 4d5aacd..cfcdd97 100644 --- a/modules/local/make_report.nf +++ b/modules/local/make_report.nf @@ -6,7 +6,6 @@ process MAKE_REPORT { 'docker://itrujnara/orthologs-report:1.0.0' : 'itrujnara/orthologs-report:1.0.0' }" - input: tuple val(meta), path(id), path(taxid), path(exact), path(score_table), path(filtered_hits), path(support_plot), path(venn_plot), path(jaccard_plot), path(orthostats), path(seq_hits), path(seq_misses), path(str_hits), path(str_misses), path(alignment), path(iqtree), path(fastme), path(params_file) @@ -59,4 +58,19 @@ process MAKE_REPORT { Python: \$(python --version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir ${prefix}_dist + touch ${prefix}_dist/${prefix}_run.sh + + cat <<- END_VERSIONS > versions.yml + ${task.process}: + Node: \$(node --version) + Yarn: \$(yarn --version) + React: \$(yarn view react version) + Python: \$(python --version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/make_score_table.nf b/modules/local/make_score_table.nf index 6f86bff..bf5d23a 100644 --- a/modules/local/make_score_table.nf +++ b/modules/local/make_score_table.nf @@ -27,4 +27,15 @@ process MAKE_SCORE_TABLE { Python: \$(python3 --version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_score_table.csv + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python3 --version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/make_stats.nf b/modules/local/make_stats.nf index f1e7b3d..5d29f49 100644 --- a/modules/local/make_stats.nf +++ b/modules/local/make_stats.nf @@ -27,4 +27,15 @@ process MAKE_STATS { Python: \$(python3 --version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_stats.yml + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python3 --version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/modules/local/plot_orthologs.nf b/modules/local/plot_orthologs.nf index a79ac89..e7f4b0e 100644 --- a/modules/local/plot_orthologs.nf +++ b/modules/local/plot_orthologs.nf @@ -25,7 +25,20 @@ process PLOT_ORTHOLOGS { cat <<- END_VERSIONS > versions.yml "${task.process}" - R: \$(R --version | head -n 1 | cut -d ' ' -f 3) + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_supports.png + touch ${prefix}_venn.png + touch ${prefix}_jaccard.png + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/local/plot_tree.nf b/modules/local/plot_tree.nf index 238df56..f05177d 100644 --- a/modules/local/plot_tree.nf +++ b/modules/local/plot_tree.nf @@ -24,7 +24,18 @@ process PLOT_TREE { cat <<- END_VERSIONS > versions.yml "${task.process}": - R: \$(R --version | head -n 1 | cut -d ' ' -f 3) + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: meta.id + """ + touch ${prefix}_${method}_tree.png + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/local/stats2csv.nf b/modules/local/stats2csv.nf index 362ff42..8f2dc05 100644 --- a/modules/local/stats2csv.nf +++ b/modules/local/stats2csv.nf @@ -28,4 +28,16 @@ process STATS2CSV { PyYAML: \$(pip show pyyaml | grep Version | cut -d ' ' -f 2) END_VERSIONS """ + + stub: + prefix = task.ext.prefix ?: meta.id + """ + touch ${prefix}_stats.csv + + cat <<- END_VERSIONS > versions.yml + "${task.process}": + Python: \$(python --version | cut -d ' ' -f 2) + PyYAML: \$(pip show pyyaml | grep Version | cut -d ' ' -f 2) + END_VERSIONS + """ } diff --git a/out/pipeline_info/execution_trace_2024-02-29_10-26-50.txt b/out/pipeline_info/execution_trace_2024-02-29_10-26-50.txt deleted file mode 100644 index 6b739ac..0000000 --- a/out/pipeline_info/execution_trace_2024-02-29_10-26-50.txt +++ /dev/null @@ -1 +0,0 @@ -task_id hash native_id name status exit submit duration realtime %cpu peak_rss peak_vmem rchar wchar diff --git a/out/pipeline_info/params_2024-02-29_10-26-54.json b/out/pipeline_info/params_2024-02-29_10-26-54.json deleted file mode 100644 index 3a5a755..0000000 --- a/out/pipeline_info/params_2024-02-29_10-26-54.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "input": "samplesheet_id.csv", - "uniprot_query": true, - "merge_strategy": "union", - "inspector_version": "Eukaryota2019", - "use_structures": true, - "multiqc_config": null, - "multiqc_title": null, - "multiqc_logo": null, - "max_multiqc_email_size": "25.MB", - "multiqc_methods_description": null, - "outdir": "out", - "publish_dir_mode": "copy", - "email": null, - "email_on_fail": null, - "plaintext_email": false, - "monochrome_logs": false, - "hook_url": null, - "help": false, - "version": false, - "config_profile_name": null, - "config_profile_description": null, - "custom_config_version": "master", - "custom_config_base": "https://raw.githubusercontent.com/nf-core/configs/master", - "config_profile_contact": null, - "config_profile_url": null, - "max_memory": "128.GB", - "max_cpus": 16, - "max_time": "240.h", - "validationFailUnrecognisedParams": false, - "validation-fail-unrecognised-params": false, - "validationLenientMode": false, - "validation-lenient-mode": false, - "validationSchemaIgnoreParams": "genomes,igenomes_base", - "validation-schema-ignore-params": "genomes,igenomes_base", - "validationShowHiddenParams": false, - "validation-show-hidden-params": false, - "validate_params": true -} \ No newline at end of file diff --git a/subworkflows/local/get_orthologs.nf b/subworkflows/local/get_orthologs.nf index 4db3d00..86fb6c2 100644 --- a/subworkflows/local/get_orthologs.nf +++ b/subworkflows/local/get_orthologs.nf @@ -145,8 +145,8 @@ workflow GET_ORTHOLOGS { ch_versions .mix(FETCH_EGGNOG_GROUP_LOCAL.out.versions) .set { ch_versions } - - } else { // online/local separation is used + } + else { // online/local separation is used // local only if (params.local_databases) { if (!params.skip_oma) { diff --git a/subworkflows/local/report.nf b/subworkflows/local/report.nf index a1ea745..47e061d 100644 --- a/subworkflows/local/report.nf +++ b/subworkflows/local/report.nf @@ -3,7 +3,15 @@ include { MAKE_REPORT } from "../../modules/local/make_report" include { CONVERT_FASTA } from "../../modules/local/convert_fasta" workflow REPORT { + take: + uniprot_query + use_structures + use_centroid + min_score + skip_downstream + use_iqtree + use_fastme ch_seqinfo ch_scoretable ch_filtered @@ -43,7 +51,14 @@ workflow REPORT { } DUMP_PARAMS( - ch_seqinfo.map { [it[0], it[3]] } + ch_seqinfo.map { [it[0], it[3]] }, + params.uniprot_query, + params.use_structures, + params.use_centroid, + params.min_score, + params.skip_downstream, + params.skip_iqtree, + params.skip_fastme ) if(!params.skip_downstream) { diff --git a/subworkflows/local/utils_nfcore_reportho_pipeline/main.nf b/subworkflows/local/utils_nfcore_reportho_pipeline/main.nf index 3526ccc..be134bc 100644 --- a/subworkflows/local/utils_nfcore_reportho_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_reportho_pipeline/main.nf @@ -72,10 +72,6 @@ workflow PIPELINE_INITIALISATION { UTILS_NFCORE_PIPELINE ( nextflow_cli_args ) - // - // Custom validation for pipeline parameters - // - validateInputParameters() // // Create channel from input file provided through params.input @@ -135,12 +131,9 @@ workflow PIPELINE_COMPLETION { FUNCTIONS ======================================================================================== */ + + // -// Check and validate pipeline parameters -// -def validateInputParameters() { - genomeExistsError() -}// // Validate channels from input samplesheet // def validateInputSamplesheet(input) { @@ -156,31 +149,8 @@ def validateInputSamplesheet(input) { return input } -// -// Get attribute from genome config file e.g. fasta -// -def getGenomeAttribute(attribute) { - if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { - if (params.genomes[ params.genome ].containsKey(attribute)) { - return params.genomes[ params.genome ][ attribute ] - } - } - return null -} // -// Exit pipeline if incorrect --genome key provided -// -def genomeExistsError() { - if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + - " Currently, the available genome keys are:\n" + - " ${params.genomes.keySet().join(", ")}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - error(error_string) - } -}// // Generate methods description for MultiQC // def toolCitationText() { diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index a8b55d6..14558c3 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -65,9 +65,15 @@ def checkProfileProvided(nextflow_cli_args) { // Citation string for pipeline // def workflowCitation() { + def temp_doi_ref = "" + String[] manifest_doi = workflow.manifest.doi.tokenize(",") + // Using a loop to handle multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + for (String doi_ref: manifest_doi) temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + - " ${workflow.manifest.doi}\n\n" + + temp_doi_ref + "\n" + "* The nf-core framework\n" + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + "* Software dependencies\n" + diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap index 10f948e..1037232 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap @@ -1,25 +1,41 @@ { "Test Function checkProfileProvided": { "content": null, - "timestamp": "2024-02-09T15:43:55.145717" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:03.360873" }, "Test Function checkConfigProvided": { "content": [ true ], - "timestamp": "2024-01-19T11:34:13.548431224" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:59.729647" }, "Test Function nfCoreLogo": { "content": [ "\n\n-\u001b[2m----------------------------------------------------\u001b[0m-\n \u001b[0;32m,--.\u001b[0;30m/\u001b[0;32m,-.\u001b[0m\n\u001b[0;34m ___ __ __ __ ___ \u001b[0;32m/,-._.--~'\u001b[0m\n\u001b[0;34m |\\ | |__ __ / ` / \\ |__) |__ \u001b[0;33m} {\u001b[0m\n\u001b[0;34m | \\| | \\__, \\__/ | \\ |___ \u001b[0;32m\\`-._,-`-,\u001b[0m\n \u001b[0;32m`._,._,'\u001b[0m\n\u001b[0;35m nextflow_workflow v9.9.9\u001b[0m\n-\u001b[2m----------------------------------------------------\u001b[0m-\n" ], - "timestamp": "2024-01-19T11:34:38.840454873" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:10.562934" }, "Test Function workflowCitation": { "content": [ "If you use nextflow_workflow for your analysis please cite:\n\n* The pipeline\n https://doi.org/10.5281/zenodo.5070524\n\n* The nf-core framework\n https://doi.org/10.1038/s41587-020-0439-x\n\n* Software dependencies\n https://github.com/nextflow_workflow/blob/master/CITATIONS.md" ], - "timestamp": "2024-01-19T11:34:22.24352016" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:07.019761" }, "Test Function without logColours": { "content": [ @@ -73,13 +89,21 @@ "biwhite": "" } ], - "timestamp": "2024-01-19T11:35:04.418416984" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:17.969323" }, "Test Function dashedLine": { "content": [ "-\u001b[2m----------------------------------------------------\u001b[0m-" ], - "timestamp": "2024-01-19T11:34:55.420000755" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:14.366181" }, "Test Function with logColours": { "content": [ @@ -133,6 +157,10 @@ "biwhite": "\u001b[1;97m" } ], - "timestamp": "2024-01-19T11:35:13.436366565" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:21.714424" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap index d07ce54..859d103 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap @@ -10,6 +10,10 @@ ] } ], - "timestamp": "2024-01-19T11:35:22.538940073" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:25.726491" } } \ No newline at end of file diff --git a/workflows/reportho.nf b/workflows/reportho.nf index b5b26a1..88328b4 100644 --- a/workflows/reportho.nf +++ b/workflows/reportho.nf @@ -107,6 +107,13 @@ workflow REPORTHO { if(!params.skip_report) { REPORT ( + params.uniprot_query, + params.use_structures, + params.use_centroid, + params.min_score, + params.skip_downstream, + params.skip_iqtree, + params.skip_fastme, GET_ORTHOLOGS.out.seqinfo, GET_ORTHOLOGS.out.score_table, GET_ORTHOLOGS.out.orthologs,