diff --git a/nextflow_schema.json b/nextflow_schema.json index 82303a4..e93113e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -80,6 +80,7 @@ "oma_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the OMA database.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the OMA database.", "fa_icon": "fas fa-database" @@ -87,6 +88,7 @@ "oma_uniprot_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the Uniprot-OMA ID map.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the OMA-Uniprot ID map.", "fa_icon": "fas fa-database" @@ -94,6 +96,7 @@ "oma_ensembl_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the Ensembl-OMA ID map.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the OMA-Ensembl ID map.", "fa_icon": "fas fa-database" @@ -101,6 +104,7 @@ "oma_refseq_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the RefSeq-OMA ID map.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the OMA-RefSeq ID map.", "fa_icon": "fas fa-database" @@ -115,6 +119,7 @@ "panther_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the PANTHER database.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the PANTHER database.", "fa_icon": "fas fa-database" @@ -136,6 +141,7 @@ "orthoinspector_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the OrthoInspector database.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the OrthoInspector database.", "fa_icon": "fas fa-database" @@ -150,6 +156,7 @@ "eggnog_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the EggNOG database.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the EggNOG database.", "fa_icon": "fas fa-database" @@ -157,6 +164,7 @@ "eggnog_idmap_path": { "type": "string", "format": "path", + "exists": true, "description": "Path to the EggNOG ID map.", "help_text": "If `local_databases` is set to `true`, the pipeline will use this path to the EggNOG ID map.", "fa_icon": "fas fa-database" diff --git a/subworkflows/local/get_orthologs.nf b/subworkflows/local/get_orthologs.nf index 22c0472..f94d36e 100644 --- a/subworkflows/local/get_orthologs.nf +++ b/subworkflows/local/get_orthologs.nf @@ -25,8 +25,16 @@ workflow GET_ORTHOLOGS { ch_samplesheet_fasta main: - ch_versions = Channel.empty() - ch_orthogroups = Channel.empty() + ch_versions = Channel.empty() + ch_orthogroups = Channel.empty() + + ch_oma_groups = params.oma_path ? Channel.value(file(params.oma_path)) : Channel.empty() + ch_oma_uniprot = params.oma_uniprot_path ? Channel.value(file(params.oma_uniprot_path)) : Channel.empty() + ch_oma_ensembl = params.oma_ensembl_path ? Channel.value(file(params.oma_ensembl_path)) : Channel.empty() + ch_oma_refseq = params.oma_refseq_path ? Channel.value(file(params.oma_refseq_path)) : Channel.empty() + ch_panther = params.panther_path ? Channel.value(file(params.panther_path)) : Channel.empty() + ch_eggnog = params.eggnog_path ? Channel.value(file(params.eggnog_path)) : Channel.empty() + ch_eggnog_idmap = params.eggnog_idmap_path ? Channel.value(file(params.eggnog_idmap_path)) : Channel.empty() fasta_input = true ch_samplesheet_fasta.ifEmpty { @@ -69,10 +77,10 @@ workflow GET_ORTHOLOGS { if (params.local_databases) { FETCH_OMA_GROUP_LOCAL ( ch_query, - params.oma_path, - params.oma_uniprot_path, - params.oma_ensembl_path, - params.oma_refseq_path + ch_oma_groups, + ch_oma_uniprot, + ch_oma_ensembl, + ch_oma_refseq ) ch_orthogroups @@ -96,7 +104,7 @@ workflow GET_ORTHOLOGS { if (params.local_databases) { FETCH_PANTHER_GROUP_LOCAL ( ch_query, - params.panther_path + ch_panther ) ch_orthogroups @@ -129,10 +137,10 @@ workflow GET_ORTHOLOGS { FETCH_EGGNOG_GROUP_LOCAL ( ch_query, - params.eggnog_path, - params.eggnog_idmap_path, - params.oma_ensembl_path, - params.oma_refseq_path, + ch_eggnog, + ch_eggnog_idmap, + ch_oma_ensembl, + ch_oma_refseq, params.offline_run ) @@ -148,10 +156,10 @@ workflow GET_ORTHOLOGS { if (!params.skip_oma) { FETCH_OMA_GROUP_LOCAL ( ch_query, - params.oma_path, - params.oma_uniprot_path, - params.oma_ensembl_path, - params.oma_refseq_path + ch_oma_groups, + ch_oma_uniprot, + ch_oma_ensembl, + ch_oma_refseq ) ch_orthogroups @@ -164,7 +172,7 @@ workflow GET_ORTHOLOGS { if (!params.skip_panther) { FETCH_PANTHER_GROUP_LOCAL ( ch_query, - params.panther_path + ch_panther ) ch_orthogroups @@ -177,10 +185,10 @@ workflow GET_ORTHOLOGS { if(!params.skip_eggnog) { FETCH_EGGNOG_GROUP_LOCAL ( ch_query, - params.eggnog_path, - params.eggnog_idmap_path, - params.oma_ensembl_path, - params.oma_refseq_path, + ch_eggnog, + ch_eggnog_idmap, + ch_oma_ensembl, + ch_oma_refseq, params.offline_run )