From 68b91ce33da08fcb93b54401291575cddda0ba89 Mon Sep 17 00:00:00 2001 From: fmartinez Date: Tue, 27 Jun 2023 12:38:17 +0200 Subject: [PATCH 1/3] Create incliva profile. --- .github/workflows/main.yml | 1 + README.md | 1 + conf/incliva.config | 52 ++++++++++++++++++++++++++++++++++++++ docs/incliva.md | 14 ++++++++++ nfcore_custom.config | 1 + 5 files changed, 69 insertions(+) create mode 100644 conf/incliva.config create mode 100644 docs/incliva.md diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86e9a1627..6b464ee4b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,6 +70,7 @@ jobs: - "icr_davros" - "ifb_core" - "imperial" + - "incliva" - "ipop_up" - "janelia" - "jax" diff --git a/README.md b/README.md index f96a910de..ba85c8565 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ Currently documentation is available for the following systems: - [ICR_DAVROS](docs/icr_davros.md) - [IFB](docs/ifb_core.md) - [IMPERIAL](docs/imperial.md) +- [INCLIVA](docs/incliva.md) - [iPOP-UP](docs/ipop_up.md) - [Janelia Research Campus](docs/janelia.md) - [JAX](docs/jax.md) diff --git a/conf/incliva.config b/conf/incliva.config new file mode 100644 index 000000000..e03370b5a --- /dev/null +++ b/conf/incliva.config @@ -0,0 +1,52 @@ +// Profile details +params { + config_profile_description = 'INCLIVA Health Research Institute profile for nf-core.' + config_profile_contact = 'Sheila Zúñiga Trejos - bioinfo@incliva.es' + config_profile_url = 'https://www.incliva.es/en/services/platforms/bioinformatics-unit/' +} + +// Function to get hostname +def getHostname() { + def process = 'hostname'.execute() + process.waitFor() + return process.text.trim() +} + +// Function to set singularity path according to which host nextflow is running on +def setHostConfig(String hostname) { + if (hostname == 'vlinuxcervantes3srv') { + System.out.println("\nINFO: working on ${hostname}\n") + + // Resources details + params.max_memory = 60.GB + params.max_cpus = 15 + singularity.cacheDir = "/nfs/home/software/singularity/nf_cacheDir" + + } else if (hostname == 'vlinuxcervantes4srv') { + System.out.println("\nINFO: working on ${hostname}.\n") + + // Resources details + params.max_memory = 120.GB + params.max_cpus = 19 + singularity.cacheDir = "/nfs/home/software/singularity/nf_cacheDir" + + } else { + System.err.println("\nERROR: unknown machine. Update incliva.config if you are working on other host.\n") + } +} + +def hostname = getHostname() + +setHostConfig(hostname) + +// Singularity details +singularity { + enabled = true + autoMounts = true +} + +// Process details +process { + executor = 'local' + maxRetries = 2 +} diff --git a/docs/incliva.md b/docs/incliva.md new file mode 100644 index 000000000..acbcc09db --- /dev/null +++ b/docs/incliva.md @@ -0,0 +1,14 @@ +# nf-core/configs: INCLIVA Configuration + +All nf-core pipelines have been successfully configured for use on the vlinuxcervantes3 & vlinuxcervantes4 servers at the INCLIVA Health Research Institute. + +To use, run the pipeline with `-profile incliva`. This will download and launch the [`incliva.config`](../conf/incliva.config) which has been pre-configured with a setup suitable for the vlinuxcervantes3 & vlinuxcervantes4 servers. When using this profile, if Singularity images have not been downloaded already, a docker image containing all of the required software will be downloaded, and converted to a Singularity image before execution of the pipeline. Downloaded images can be checked in the singularity_path directory defined in the config file. + +## Running the workflow on the INCLIVA vlinuxcervantes3 & vlinuxcervantes4 servers + +Nextflow and Singularity are needed to run any nf-core workflow: + +- Install Nextflow : [here](https://www.nextflow.io/docs/latest/getstarted.html#) +- Install Singularity : [here](https://docs.sylabs.io/guides/3.0/user-guide/installation.html) + +By default, Nextflow uses the local executor. The processes are parallelised by spawning multiple threads, taking advantage of the multi-core architecture of the CPU. diff --git a/nfcore_custom.config b/nfcore_custom.config index 642ddab90..2081cf9fb 100644 --- a/nfcore_custom.config +++ b/nfcore_custom.config @@ -52,6 +52,7 @@ profiles { icr_davros { includeConfig "${params.custom_config_base}/conf/icr_davros.config" } ifb_core { includeConfig "${params.custom_config_base}/conf/ifb_core.config" } imperial { includeConfig "${params.custom_config_base}/conf/imperial.config" } + incliva { includeConfig "${params.custom_config_base}/conf/incliva.config" } ipop_up { includeConfig "${params.custom_config_base}/conf/ipop_up.config" } janelia { includeConfig "${params.custom_config_base}/conf/janelia.config" } jax { includeConfig "${params.custom_config_base}/conf/jax.config" } From 2ccb04edca88eedddc12966e54c09023ee75b7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mart=C3=ADnez?= Date: Wed, 28 Jun 2023 13:17:54 +0200 Subject: [PATCH 2/3] Update conf/incliva.config Co-authored-by: James A. Fellows Yates --- conf/incliva.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/incliva.config b/conf/incliva.config index e03370b5a..6e8cc8d08 100644 --- a/conf/incliva.config +++ b/conf/incliva.config @@ -31,7 +31,7 @@ def setHostConfig(String hostname) { singularity.cacheDir = "/nfs/home/software/singularity/nf_cacheDir" } else { - System.err.println("\nERROR: unknown machine. Update incliva.config if you are working on other host.\n") + System.err.println("\nERROR: unknown machine. Update incliva.config on nf-core/configs if you are working on another host.\n") } } From 3ad51784537c1086a76d20943627baa3e3f90351 Mon Sep 17 00:00:00 2001 From: fmartinez Date: Wed, 28 Jun 2023 13:44:47 +0200 Subject: [PATCH 3/3] Update incliva profile --- conf/incliva.config | 2 +- docs/incliva.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/incliva.config b/conf/incliva.config index e03370b5a..ead0c7866 100644 --- a/conf/incliva.config +++ b/conf/incliva.config @@ -31,7 +31,7 @@ def setHostConfig(String hostname) { singularity.cacheDir = "/nfs/home/software/singularity/nf_cacheDir" } else { - System.err.println("\nERROR: unknown machine. Update incliva.config if you are working on other host.\n") + System.err.println("\nERROR: unknown machine. Update incliva.config if you are working on another host.\n") } } diff --git a/docs/incliva.md b/docs/incliva.md index acbcc09db..eceecbc49 100644 --- a/docs/incliva.md +++ b/docs/incliva.md @@ -1,6 +1,6 @@ # nf-core/configs: INCLIVA Configuration -All nf-core pipelines have been successfully configured for use on the vlinuxcervantes3 & vlinuxcervantes4 servers at the INCLIVA Health Research Institute. +All nf-core pipelines have been successfully configured for use on the vlinuxcervantes3 & vlinuxcervantes4 servers at the INCLIVA Health Research Institute. Using this config file will automatically detect which one you are working on, so you do not need to specify it yourself. To use, run the pipeline with `-profile incliva`. This will download and launch the [`incliva.config`](../conf/incliva.config) which has been pre-configured with a setup suitable for the vlinuxcervantes3 & vlinuxcervantes4 servers. When using this profile, if Singularity images have not been downloaded already, a docker image containing all of the required software will be downloaded, and converted to a Singularity image before execution of the pipeline. Downloaded images can be checked in the singularity_path directory defined in the config file.