diff --git a/conf/modules.config b/conf/modules.config index 212bdca..e0ab60d 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -211,30 +211,28 @@ process { withName: INTERPROSCAN { cpus = 16 memory = { 12.GB * task.attempt } - ext.args = - "--iprlookup " + - "--goterms " + - "--applications " + [ + ext.args = { + def applications = [ "TIGRFAM", "SFLD", "SUPERFAMILY", - "Gene3D", - "Hamap", - "Coils", + "GENE3D", + "HAMAP", + "COILS", "CDD", "PRINTS", "PIRSF", - "ProSiteProfiles", - "ProSitePatterns", - "PfamA", - "MobiDBLite", - "SMART", - //"SignalP_GRAM_POSITIVE", - //"SignalP_GRAM_NEGATIVE", - //"SignalP_EUK", - //"Phobius", - //"TMHMM", - ].join(",") + "PROSITEPROFILES", + "PROSITEPATTERNS", + "PFAM", + "MOBIDBLITE", + "SMART" + ] + if ( params.interpro_licensed_software ) { + applications << "SIGNALP" + } + return "--iprlookup --goterms --pathways --applications " + applications.join(",") + } // We override the prefix of the output here because the input is chunked and joined with CAT_CAT // and to avoid naming collisions we use the name of the input (which comes from SEQKIT_SPLIT2) that diff --git a/conf/test_full.config b/conf/test_full.config index bf62638..b58b5f9 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -28,7 +28,7 @@ params { rfam_cm = "${projectDir}/tests/reference_databases/rrnas_rfam/ribo.cm" rfam_claninfo = "${projectDir}/tests/reference_databases/rrnas_rfam/ribo.clan_info" - interproscan_database = "${projectDir}/modules/ebi-metagenomics/interproscan/tests/fixtures/interproscan_db/data" + interproscan_database = "${projectDir}/modules/ebi-metagenomics/interproscan/tests/fixtures/interproscan_db" interproscan_database_version = "5.73-104.0" eggnog_data_dir = "${projectDir}/tests/reference_databases/eggnog_mapper/" diff --git a/modules/ebi-metagenomics/interproscan/main.nf b/modules/ebi-metagenomics/interproscan/main.nf index c38f74e..7d3b189 100644 --- a/modules/ebi-metagenomics/interproscan/main.nf +++ b/modules/ebi-metagenomics/interproscan/main.nf @@ -5,11 +5,19 @@ process INTERPROSCAN { container 'microbiome-informatics/interproscan:5.73-104.0' containerOptions { - if (workflow.containerEngine == 'singularity') { - return "--bind ${interproscan_db}:/opt/interproscan/data" - } else { - return "-v ${task.workDir}/${interproscan_db}:/opt/interproscan/data" + def containerArgs = [] + def mountArg = (workflow.containerEngine == 'singularity') ? "--bind" : "--volume" + + containerArgs << "${mountArg} ${task.workDir}/${interproscan_db}/data:/opt/interproscan/data" + + if ( params.interpro_licensed_software ) { + def licensedSoftwarePath = "${task.workDir}/${interproscan_db}/licensed" + containerArgs << "${mountArg} ${licensedSoftwarePath}:/opt/interproscan/licensed" + // This override is needed otherwise it fails because this path seems to be hardcoded in the container + containerArgs << "${mountArg} ${licensedSoftwarePath}/signalp:/usr/opt/www/pub/CBS/services/SignalP-4.1/signalp-4.1" } + + return containerArgs.join(' ') } input: diff --git a/nextflow.config b/nextflow.config index 8f84ec7..56d3b13 100644 --- a/nextflow.config +++ b/nextflow.config @@ -32,6 +32,7 @@ params { // TODO: cat db version from @Sonya interproscan_database = null interproscan_database_version = "5.73-104.0" + interpro_licensed_software = false eggnog_database = null eggnog_diamond_database = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 7ef332c..6fb4782 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -129,6 +129,12 @@ "description": "The version of the interproscan database.", "fa_icon": "fas fa-code-branch" }, + "interpro_licensed_software": { + "type": "boolean", + "default": false, + "description": "Enables the use of licensed software in InterProScan. Set to true if the required licensed software is in the licensed database folder, https://interproscan-docs.readthedocs.io/en/v5/HowToRun.html#included-analyses.", + "fa_icon": "fas fa-file-contract" + }, "eggnog_database": { "type": "string", "format": "file-path",