Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@ process {
}
withName: '.*:LONGPHASE_HAPLOTAG*' {
ext.prefix = { "${meta.id}_${meta.type}" }
ext.args = {
[
params.longphase_tag_supplementary ? "--tagSupplementary" : ''
].join(' ').trim()
}
publishDir = [
path: { "${params.outdir}/${meta.id}/bamfiles" },
mode: params.publish_dir_mode,
Expand Down
8 changes: 7 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ If you want to run with a CHM13 reference without using `--genome CHM13` (for ex
| `--skip_modkit` | A boolean to skip the modkit pileup step. Default = `false` |
| `--skip_whatshapstats` | A boolean to skip WhatsHap phasing statistics. Default = `false` |

#### LONGPHASE options:

| Parameter | Description |
| ------------------------------- | ---------------------------------------------------------------------------------- |
| `--longphase_tag_supplementary` | Include supplementary alignments in Longphase haplotype tagging. Default = `false` |

#### VEP options:

| Parameter | Description |
Expand Down Expand Up @@ -200,7 +206,7 @@ If you want to run with a CHM13 reference without using `--genome CHM13` (for ex

| Parameter | Description |
| ---------------------- | ------------------------------------------------------------------------------------ |
| `--severus_minsupport` | Minimum number of supporting reads required for SEVERUS to call an SV. Default = `5` |
| `--severus_minsupport` | Minimum number of supporting reads required for SEVERUS to call an SV. Default = `3` |

#### WAKHAN Options

Expand Down
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ params {
prioritize_caller_somatic = 'deepsomatic'
generate_gvcf = false

// Longphase options
longphase_tag_supplementary = false

// PON Options
clairsto_pon_vcfs = null
clairsto_pon_flags = null
Expand Down
54 changes: 28 additions & 26 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
"type": "string",
"enum": ["deepvariant", "clair"]
},
Comment on lines +71 to 76
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

germline_var_keep now allows type: "string", but the allowed values are only constrained via items.enum (which applies only when the value is an array). As a result, any arbitrary string would validate successfully and bypass the intended [deepvariant, clair] restriction. Consider using oneOf/anyOf to separately validate the string form (e.g., enum/pattern) vs the array form, or keep this as an array-only parameter.

Copilot uses AI. Check for mistakes.
"minItems": 1
"minItems": 1,
"default": "['deepvariant', 'clair']"
},
Comment on lines 75 to 79
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

germline_var_keep is typed as an array, but the schema default is currently a string (and not valid JSON). This will break downstream tooling that reads defaults from the schema. Set default to a JSON array (e.g., ["deepvariant","clair"]) instead of a quoted string.

Copilot uses AI. Check for mistakes.
Comment on lines 70 to 79
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

germline_var_keep is used throughout the pipeline as a Groovy List (e.g., .contains(), .size(), and comparisons to ['clair'] / ['deepvariant']). Changing the schema type to string (and setting a string default like "['deepvariant', 'clair']") will encourage invalid user input and can break runtime logic; it also makes the schema invalid because items/minItems apply to arrays, not strings. Please revert this property to type: "array" with items.type: "string", keep minItems, and use a real JSON array for default (e.g. ["deepvariant","clair"]).

Copilot uses AI. Check for mistakes.
"somatic_var_keep": {
"type": "array",
Expand All @@ -83,7 +84,8 @@
"type": "string",
"enum": ["deepsomatic", "clair"]
},
"minItems": 1
"minItems": 1,
"default": "['deepsomatic', 'clair']"
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

somatic_var_keep is typed as an array, but the schema default is currently a string (and not valid JSON). This will confuse validation/docs generation that expects an array default. Change default to a JSON array (e.g., ["deepsomatic","clair"]).

Suggested change
"default": "['deepsomatic', 'clair']"
"default": ["deepsomatic", "clair"]

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

Same issue for somatic_var_keep: the workflow expects a List (uses .contains() / .size() patterns), but the schema now declares it as string with items/minItems and a stringified list default. This makes the schema inconsistent/invalid and can lead to runtime misbehavior if users supply a string. Please keep it as type: "array" with an enum-constrained items, and set default to a JSON array like ["deepsomatic","clair"].

Copilot uses AI. Check for mistakes.
},
Comment on lines -70 to 89
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

germline_var_keep and somatic_var_keep are typed as arrays, but their default values are currently JSON strings (e.g. "['deepvariant', 'clair']"). In JSON Schema, default should match the declared type; this will break schema validation / generated docs. Set these defaults to actual JSON arrays (e.g. ["deepvariant", "clair"]).

Copilot uses AI. Check for mistakes.
"germline_var_combine": {
"type": "string",
Expand Down Expand Up @@ -111,6 +113,18 @@
}
}
},
"longphase_options": {
"title": "Longphase options",
"type": "object",
"description": "Options for Longphase phasing of small variants",
"properties": {
Comment on lines +116 to +120
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

longphase_options is added under $defs, but it isn't referenced in the top-level allOf list. As a result, longphase_tag_supplementary defined there won't be part of the effective schema grouping/metadata. Add a $ref to #/$defs/longphase_options in allOf (and avoid duplicating the param elsewhere) so it shows up correctly in the schema-driven UI/docs.

Copilot uses AI. Check for mistakes.
"longphase_tag_supplementary": {
"type": "boolean",
"description": "Whether to include supplementary alignments in Longphase haplotype tagging.",
"default": false
}
}
},
Comment on lines +116 to +127
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

PR title/description indicate this is only about adding a Longphase supplementary-alignment haplotag option, but this PR also changes schema defaults for *_var_keep, adds new schema properties for generate_gvcf / skip_modkit, and updates the documented default for severus_minsupport. Please update the PR description (or split into separate PRs) so reviewers understand the full scope and rationale for these additional changes.

Copilot uses AI. Check for mistakes.
"reference_genome_options": {
"title": "Reference genome options",
"type": "object",
Expand All @@ -126,7 +140,6 @@
},
"igenomes_ignore": {
"type": "boolean",
"default": false,
"description": "Do not load the iGenomes reference config.",
"fa_icon": "fas fa-ban",
"hidden": true,
Expand Down Expand Up @@ -202,7 +215,6 @@
},
"download_vep_cache": {
"type": "boolean",
"default": false,
"description": "Download the VEP cache if not already present"
},
"vep_custom": {
Expand Down Expand Up @@ -283,7 +295,6 @@
},
"ascat_pdf_plots": {
"type": "boolean",
"default": false,
"description": "Boolean for ASCAT production of pdf plots (entered as string)"
}
}
Expand All @@ -307,72 +318,58 @@
"properties": {
"skip_qc": {
"type": "boolean",
"default": false,
"description": "Skips all QC steps"
},
"skip_cramino": {
Comment on lines 319 to 323
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

A number of boolean parameters had their default: false removed from the schema (e.g. all skip_* flags, use_gpu, plus others elsewhere like igenomes_ignore, download_vep_cache, ascat_pdf_plots, and generic help/version flags). Even though JSON Schema default is informational, nf-core tooling/docs and UI generation typically rely on it to display correct defaults and keep the schema aligned with nextflow.config. Please restore the default values (at least for the params that are explicitly defaulted in nextflow.config).

Copilot uses AI. Check for mistakes.
"type": "boolean",
"default": false,
"description": "Skips Cramino"
},
"skip_mosdepth": {
"type": "boolean",
"default": false,
"description": "Skips Mosdepth"
},
"skip_bamstats": {
"type": "boolean",
"default": false,
"description": "Skips samtools flagstat, stats, and idxstats"
},
"skip_wakhan": {
"type": "boolean",
"default": false,
"description": "Skips wakhan"
},
"skip_fiber": {
"type": "boolean",
"default": false,
"description": "Skip Fibertools steps"
},
"skip_ascat": {
"type": "boolean",
"default": false,
"description": "Skip ASCAT"
},
"skip_m6a": {
"type": "boolean",
"default": false,
"description": "Skip m6a calling by Fibertools"
},
"skip_vep": {
"type": "boolean",
"default": false,
"description": "Skip VEP annotation"
},
"skip_normalfiber": {
"type": "boolean",
"default": false,
"description": "Skip Fibertools steps for the normal sample"
},
"skip_nanoplot": {
"type": "boolean",
"default": false,
"description": "Skip Nanoplot"
},
"skip_whatshapstats": {
"type": "boolean",
"default": false,
"description": "Skip WhatsHap stats"
},
"skip_modcall": {
"type": "boolean",
"default": false,
"description": "Skip modification calling"
},
"use_gpu": {
"type": "boolean",
"default": false,
"description": "Use GPU for supported tools (e.g. DeepVariant, DeepSomatic, Clair3)"
}
}
Expand Down Expand Up @@ -434,7 +431,6 @@
"properties": {
"version": {
"type": "boolean",
"default": false,
"description": "Display version and exit.",
"fa_icon": "fas fa-question-circle",
"hidden": true
Expand All @@ -458,7 +454,6 @@
},
"plaintext_email": {
"type": "boolean",
"default": false,
"description": "Send plain-text email instead of HTML.",
"fa_icon": "fas fa-remove-format",
"hidden": true
Expand All @@ -473,7 +468,6 @@
},
"monochrome_logs": {
"type": "boolean",
"default": false,
"description": "Do not use coloured log outputs.",
"fa_icon": "fas fa-palette",
"hidden": true
Expand Down Expand Up @@ -525,17 +519,14 @@
},
"help": {
"type": "boolean",
"default": false,
"description": "Display the help message."
},
"help_full": {
"type": "boolean",
"default": false,
"description": "Display the full detailed help message."
},
"show_hidden": {
"type": "boolean",
"default": false,
"description": "Display hidden parameters in the help message (only works when --help or --help_full are provided)."
}
}
Expand All @@ -551,6 +542,9 @@
{
"$ref": "#/$defs/small_variant_calling_options"
},
{
"$ref": "#/$defs/longphase_options"
},
{
"$ref": "#/$defs/reference_genome_options"
},
Expand Down Expand Up @@ -581,5 +575,13 @@
{
"$ref": "#/$defs/generic_options"
}
]
],
"properties": {
"generate_gvcf": {
"type": "boolean"
},
Comment on lines +580 to +582
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

Top-level properties.generate_gvcf is missing a description/help_text/default and is not grouped with the other small variant calling options in $defs. This makes the schema inconsistent and may cause nf-core schema docs / UI grouping to omit or misplace the parameter metadata.

Suggested change
"generate_gvcf": {
"type": "boolean"
},

Copilot uses AI. Check for mistakes.
"skip_modkit": {
"type": "boolean"
Comment on lines +582 to +584
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

Top-level properties.skip_modkit is defined without description/help_text/default and outside the existing skip_options group. To keep schema validation + rendered docs consistent, this should be defined alongside the other skip parameters (with matching metadata) rather than as a bare root property.

Suggested change
},
"skip_modkit": {
"type": "boolean"

Copilot uses AI. Check for mistakes.
}
Comment on lines +579 to +585
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The new top-level properties block defines generate_gvcf, longphase_tag_supplementary, and skip_modkit with only type, dropping their descriptions/defaults and bypassing the existing $defs grouping pattern used elsewhere in this schema. Instead, define these parameters in the appropriate $defs sections (e.g., generate_gvcf in small-variant options, skip_modkit in skip options, longphase_tag_supplementary in longphase options) and reference those groups from allOf, removing this partial top-level properties block.

Copilot uses AI. Check for mistakes.
}
Comment on lines +579 to +586
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

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

The new top-level properties entries for generate_gvcf and skip_modkit are incomplete (no description/default) and also bypass the existing parameter grouping via $defs/allOf (e.g. skip_modkit should live under #/$defs/skip_options). This will make schema-generated docs/UI inconsistent with docs/usage.md and other params. Consider moving these definitions into the appropriate $defs sections and adding description (and default if the schema is intended to carry defaults).

Copilot uses AI. Check for mistakes.
}
Loading