diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efc70c1..fa3a2c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,6 +128,29 @@ jobs: run: | nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results ${{ matrix.parameters }} + wfmash_sparse_map: + name: Run pipeline with wfmash_sparse_map parameters + # Only run on push if this is the nf-core dev branch (merged PRs) + if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/pangenome') }}" + runs-on: ubuntu-latest + strategy: + matrix: + parameters: + - "--wfmash_sparse_map auto" + - "--wfmash_sparse_map 0.5" + steps: + - name: Check out pipeline code + uses: actions/checkout@v3 + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v1 + with: + version: "23.04.0" + + - name: Run pipeline with test data and wfmash_only parameters + run: | + nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results ${{ matrix.parameters }} + communities: name: Run pipeline with community parameters # Only run on push if this is the nf-core dev branch (merged PRs) diff --git a/conf/modules.config b/conf/modules.config index f2846ae..9cb71e5 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -15,10 +15,10 @@ def generate_wfmash_sparse_map_cmd() { def wfmash_sparse_map_cmd = "" if (params.wfmash_sparse_map == "auto") { def n = params.n_haplotypes - def x = Math.log(n)/n * 10 - wfmash_sparse_map_frac = 1 - if (x < 1) { - def wfmash_sparse_map_frac = x + def x = Math.log(n)/n * 10.0 + wfmash_sparse_map_frac = 1.0 + if (x < 1.0) { + wfmash_sparse_map_frac = x } wfmash_sparse_map_cmd = "-x ${wfmash_sparse_map_frac}" } else { diff --git a/nextflow.config b/nextflow.config index a36f5e9..d6cd51c 100644 --- a/nextflow.config +++ b/nextflow.config @@ -101,7 +101,7 @@ params { // Schema validation default options validationFailUnrecognisedParams = false - validationLenientMode = false + validationLenientMode = true validationSchemaIgnoreParams = 'genomes' validationShowHiddenParams = false validate_params = true diff --git a/nextflow_schema.json b/nextflow_schema.json index 44f6c3f..ce320e9 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -54,7 +54,7 @@ "properties": { "wfmash_map_pct_id": { "type": "number", - "default": 90, + "default": 90.0, "description": "Percent identity in the wfmash mashmap step.", "help_text": "Use `mash dist` or `mash triangle` to explore the typical level of divergence between the sequences in your input (see https://pggb.readthedocs.io/en/latest/rst/tutorials/divergence_estimation.html#divergence-estimation for more information). Convert this to an approximate percent identity and provide it as --wfmash_map_pct_id . A list of examples can be found at https://github.com/pangenome/pggb#example-builds-for-diverse-species." }, @@ -81,9 +81,10 @@ "description": "Ignore the top % most-frequent kmers." }, "wfmash_sparse_map": { - "type": "number", - "default": "1.0", - "description": "Keep this fraction of mappings (\"auto\" for giant component heuristic)." + "default": 1.0, + "description": "Keep this fraction of mappings (\"auto\" for giant component heuristic).", + "type": "string", + "pattern": "(auto|[01]\\.\\d+)" }, "wfmash_merge_segments": { "type": "boolean", @@ -136,7 +137,7 @@ }, "seqwish_sparse_factor": { "type": "number", - "default": 0, + "default": 0.0, "description": "Keep this randomly selected fraction of input matches." }, "seqwish_temp_dir": { @@ -360,14 +361,12 @@ "type": "boolean", "description": "Display help text.", "fa_icon": "fas fa-question-circle", - "default": false, "hidden": true }, "version": { "type": "boolean", "description": "Display version and exit.", "fa_icon": "fas fa-question-circle", - "default": false, "hidden": true }, "publish_dir_mode": { @@ -391,7 +390,6 @@ "type": "boolean", "description": "Send plain-text email instead of HTML.", "fa_icon": "fas fa-remove-format", - "default": false, "hidden": true }, "max_multiqc_email_size": { @@ -406,7 +404,6 @@ "type": "boolean", "description": "Do not use coloured log outputs.", "fa_icon": "fas fa-palette", - "default": false, "hidden": true }, "hook_url": { @@ -445,7 +442,6 @@ "type": "boolean", "fa_icon": "far fa-eye-slash", "description": "Show all params when using `--help`", - "default": false, "hidden": true, "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters." }, @@ -453,7 +449,6 @@ "type": "boolean", "fa_icon": "far fa-check-circle", "description": "Validation of parameters fails when an unrecognised parameter is found.", - "default": false, "hidden": true, "help_text": "By default, when an unrecognised parameter is found, it returns a warinig." }, @@ -461,7 +456,6 @@ "type": "boolean", "fa_icon": "far fa-check-circle", "description": "Validation of parameters in lenient more.", - "default": false, "hidden": true, "help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)." }, @@ -469,7 +463,6 @@ "type": "boolean", "fa_icon": "far fa-check-circle", "description": "Do we want to display hidden parameters?", - "default": false, "hidden": true, "help_text": "Do we want to display hidden parameters?" },