diff --git a/nextflow.config b/nextflow.config index c4abafc8..7824fd44 100644 --- a/nextflow.config +++ b/nextflow.config @@ -14,6 +14,7 @@ params { scorefile = null pgs_id = null trait_efo = null + efo_id = null // synonym for trait_efo, which is deprecated pgp_id = null efo_direct = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 174ba51b..3a445d52 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -55,10 +55,14 @@ "description": "A comma separated list of PGS Catalog publications, e.g. PGP000001", "pattern": "PGP[0-9]{6}" }, - "trait_efo": { + "efo_id": { "type": "string", "description": "A comma separated list of PGS Catalog EFO traits, e.g. EFO_0004214" }, + "trait_efo": { + "type": "string", + "description": "DEPRECATED: A comma separated list of PGS Catalog EFO traits, e.g. EFO_0004214" + }, "efo_direct": { "type": "boolean", "description": "Return only PGS tagged with exact EFO term (e.g. no PGS for child/descendant terms in the ontology)" diff --git a/workflows/pgsc_calc.nf b/workflows/pgsc_calc.nf index 8a57e22e..7bded6e6 100644 --- a/workflows/pgsc_calc.nf +++ b/workflows/pgsc_calc.nf @@ -170,7 +170,16 @@ workflow PGSCCALC { // make sure accessions look sensible before querying PGS Catalog def pgs_id = WorkflowPgscCalc.prepareAccessions(params.pgs_id, "pgs_id") def pgp_id = WorkflowPgscCalc.prepareAccessions(params.pgp_id, "pgp_id") - def trait_efo = WorkflowPgscCalc.prepareAccessions(params.trait_efo, "trait_efo") + + // temporarily handle parameter synonym (--trait_efo -> --efo_id) + def traits = [params.trait_efo, params.efo_id].findAll { it != null }.join(",") + + if (params.trait_efo) { + println "WARNING: --trait_efo is deprecated and will be removed in a future release, please use --efo_id" + } + + def trait_efo = WorkflowPgscCalc.prepareAccessions(traits, "trait_efo") + def accessions = pgs_id + pgp_id + trait_efo if (!accessions.every { it.value == "" }) {