Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- isMain: false
profile: "singularity"
NXF_VER:
- "25.10.4"
- "26.04.0"
- "latest-everything"
env:
NXF_ANSI_LOG: false
Expand Down
4 changes: 2 additions & 2 deletions .nf-core.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
lint:
nextflow_config: false # TODO: Remove when tools supports parameter types
schema_params: false # TODO: Remove when tools supports parameter types
files_exist:
- conf/igenomes.config
- conf/igenomes_ignored.config
Expand All @@ -11,8 +13,6 @@ lint:
- docs/images/nf-core-phyloplace_logo_dark.png
- .github/workflows/branch.yml
- .github/workflows/linting.yml
nextflow_config:
- params.input
nf_core_version: 4.1.0
repository_type: pipeline
template:
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Changed`

- [#77](https://github.com/nf-core/phyloplace/pull/77) - Adopt typed `params` blocks for pipeline-specific parameters, fixing boolean options (e.g. `--save_domtblout false`) that couldn't be turned off from the command line ([#74](https://github.com/nf-core/phyloplace/issues/74)) (by @erikrikarddaniel). Raises the minimum required Nextflow version to `26.04.0`.
- [#73](https://github.com/nf-core/phyloplace/pull/73) - Update `seqtk/subseq` and `fasta_hmmsearch_rank_fastas` to fix output filenames glomming the input sequence filename onto the prefix ([nf-core/modules#12779](https://github.com/nf-core/modules/issues/12779)) (by @erikrikarddaniel)
- [#68](https://github.com/nf-core/phyloplace/pull/68) - Template update to 4.1.0 (by @erikrikarddaniel)

### `Dependencies`

| software | previously | now |
| -------- | ---------- | --- |
| software | previously | now |
| --------- | ---------- | --------- |
| Nextflow | >=25.10.4 | >=26.04.0 |
| nf-schema | 2.7.2 | 2.8.0 |

### `Deprecated`

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![GitHub Actions Linting Status](https://github.com/nf-core/phyloplace/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/phyloplace/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/phyloplace/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7643941-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7643941)
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)

[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.4-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/version-%E2%89%A526.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)
[![nf-core template version](https://img.shields.io/badge/nf--core_template-4.1.0-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/4.1.0)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
Expand Down
52 changes: 52 additions & 0 deletions main.nf

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was hesitant to review due to lack of experience on this. But given you posted twice.

Shouldn't these String? need to be Path? ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it against real Nextflow (26.04.6): a Path?-typed param given an HTTPS URL fails with Input file '...' does not exist -- Nextflow resolves it as a local filesystem path rather than a remote URL. Since phyloplace's own test profiles pass file params as HTTPS URLs, Path? would break them, so String? is intentional here.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,58 @@
----------------------------------------------------------------------------------------
*/

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PARAMS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Typed declarations for every param only ever read from within a script (this file,
workflows/, subworkflows/local/). Params read directly inside nextflow.config itself --
at config-parse time, before this file exists -- can't use this syntax and stay declared
there instead (see the comment above that params block, and #74).
*/

params {
// Input options
phyloplace_input: String? = null
phylosearch_input: String? = null
id: String = 'placement'
alignmethod: String = 'hmmer'
queryseqfile: String? = null
refseqfile: String? = null
hmmfile: String? = null
refphylogeny: String? = null
model: String? = null
taxonomy: String? = null
search_fasta: String? = null
save_domtblout: Boolean = false

// MultiQC options
multiqc_config: String? = null
multiqc_title: String? = null
multiqc_logo: String? = null
max_multiqc_email_size: String = '25.MB'
multiqc_methods_description: String? = null

// Boilerplate options
email: String? = null
email_on_fail: String? = null
plaintext_email: Boolean = false
monochrome_logs: Boolean = false
help_full: Boolean = false
show_hidden: Boolean = false
version: Boolean = false
pipelines_testdata_base_path: String = 'https://raw.githubusercontent.com/nf-core/test-datasets/'

// Config options
config_profile_name: String? = null
config_profile_description: String? = null
config_profile_contact: String? = null
config_profile_url: String? = null

// Schema validation default options
validate_params: Boolean = true
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
Expand Down
49 changes: 8 additions & 41 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,22 @@
----------------------------------------------------------------------------------------
*/

// Global default params, used in configs
// Params read directly within this config file (config-parse time, before any script such as
// main.nf is read) cannot use Nextflow's typed `params` block -- that syntax is script-only, see
// https://github.com/nf-core/phyloplace/issues/74. Everything else is declared with types in
// main.nf instead.
params {

// Input options
phyloplace_input = null
phylosearch_input = null
id = 'placement'
alignmethod = 'hmmer'
queryseqfile = null
refseqfile = null
hmmfile = null
refphylogeny = null
model = null
taxonomy = null
search_fasta = null
save_domtblout = false

// MultiQC options
multiqc_config = null
multiqc_title = null
multiqc_logo = null
max_multiqc_email_size = '25.MB'
multiqc_methods_description = null

// Boilerplate options
outdir = null
publish_dir_mode = 'copy'
Comment on lines 15 to 16

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't add typed inputs here and in the other remaining ones of params scope in the config?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good push -- made us look again at what was actually still there and why.

Verified: a typed params { } block still hard-fails inside a .config file on current Nextflow (Unexpected input: '='), it's script-only syntax. That's why outdir, publish_dir_mode, custom_config_base/custom_config_version and trace_report_suffix stay here: they're all read directly by nextflow.config itself (or by conf/modules.config, included from it) at config-parse time, before main.nf -- where the typed block lives -- is even parsed. No restructuring moves those out. help stays for a separate reason: a boolean-or-string schema type with no single matching Nextflow type.

But your comment did make us re-check whether everything remaining here actually needed to stay, and it turned up a real one: monochrome_logs is a genuine Boolean that, apart from validation.monochromeLogs, isn't read at config-parse time at all, so it didn't need to be here. Moved it into the typed block (ff6966f), which fixes the exact same --foo false coercion bug for it too -- confirmed --monochrome_logs false was still evaluating truthy before that. Nothing else left in this params block is a Boolean, so there's nothing further to move.

email = null
email_on_fail = null
plaintext_email = false
monochrome_logs = false
// `help` has a boolean-or-string schema type (bare `--help` vs `--help <topic>`) that doesn't
// map to a single Nextflow type, so it stays untyped too.
help = false
help_full = false
show_hidden = false
version = false
pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'
trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')

// Config options
config_profile_name = null
config_profile_description = null

custom_config_version = 'master'
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
config_profile_contact = null
config_profile_url = null

// Schema validation default options
validate_params = true
}

// Backwards compatibility for publishDir syntax
Expand Down Expand Up @@ -276,14 +243,14 @@ manifest {
description = """Performs phylogenetic placement with EPA-NG"""
mainScript = 'main.nf'
defaultBranch = 'master'
nextflowVersion = '!>=25.10.4'
nextflowVersion = '!>=26.04.0'
version = '2.2.0dev'
doi = ''
}

// Nextflow plugins
plugins {
id 'nf-schema@2.7.2' // Validation of pipeline parameters and creation of an input channel from a sample sheet
id 'nf-schema@2.8.0' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}

validation {
Expand Down
Loading
Loading