Skip to content

Commit

Permalink
Merge branch 'master' into kul_gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Joon-Klaps authored Dec 5, 2024
2 parents bf23846 + 304c9e4 commit c4a9594
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
- "jex"
- "unsw_katana"
- "ku_sund_danhead"
- "kaust"
- "leicester"
- "lugh"
- "m3c"
Expand Down Expand Up @@ -171,7 +172,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install Nextflow
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: "temurin"
java-version: "17"
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "latest-everything"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Currently documentation is available for the following systems:
- [Jex](docs/jex.md)
- [UNSW_Katana](docs/unsw_katana.md)
- [KU SUND DANHEAD](docs/ku_sund_danhead.md)
- [KAUST](docs/kaust.md)
- [LUGH](docs/lugh.md)
- [M3C](docs/m3c.md)
- [MAESTRO](docs/maestro.md)
Expand Down
12 changes: 11 additions & 1 deletion conf/daisybio.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@ params {
// define workDir in /nfs/scratch/nf-core_work/ named after the launch dir
def work_dir = "/nfs/scratch/nf-core_work/"
if(new File(work_dir).exists() && System.getenv("PWD")) {
workDir = work_dir+System.getenv("PWD").tokenize('/').join('.')
work_dir = work_dir+System.getenv("PWD").tokenize('/').join('.')
workDir = work_dir

// if directory does not exist, create it and set the group to the group launch dir
if(!new File(work_dir).exists()) {
"mkdir -p ${work_dir}".execute()
def pwd = System.getenv("PWD")
def group = "stat -c %g ${pwd}".execute().text.trim()
"chgrp -R ${group} ${work_dir}".execute()
"chmod -R g+s ${work_dir}".execute()
}
}

process {
Expand Down
67 changes: 67 additions & 0 deletions conf/kaust.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// KAUST Config Profile
params {
config_profile_name = 'KAUST'
config_profile_description = 'Profile for use on King Abdullah Univesity of Science and Technology (KAUST) Ibex Cluster.'
config_profile_contact = 'Husen Umer (@kaust.edu.sa)'
config_profile_url = 'https://docs.hpc.kaust.edu.sa/quickstart/ibex.html'
save_reference = false
igenomes_ignore = true
}

// Load genome resources and assets hosted by the Bioinformatics team on IBEX cluster
// includeConfig '/biocorelab/BIX/resources/configs/genomes.yaml'

singularity {
enabled = true
autoMounts = true
pullTimeout = '60 min'
// Use existing images from the centralized library, if available
libraryDir = "/biocorelab/BIX/resources/singularity/images/"
// Download images that are missing from the library to user space
cacheDir = "/home/$USER/.singularity/nf_images/"
}

process {
executor = 'slurm'
clusterOptions = "-p batch"
maxRetries = 5
errorStrategy = { task.exitStatus in [143,137,104,134,139,151,140,247,12] ? 'retry' : 'finish' }
beforeScript = 'module load singularity'
// Max allowed resources per process on Ibex
resourceLimits = [
memory: 1600.GB,
cpus: 200,
time: 10.d
]
}

process {

withLabel:process_single {
time = 20.h
}

withLabel:process_low {
cpus = { 4 * task.attempt }
memory = { 16.GB * task.attempt }
time = { 6.h * task.attempt }
}

withLabel:process_medium {
cpus = { 20 * task.attempt }
memory = { 96.GB * task.attempt }
time = { 12.h * task.attempt }
}

withLabel:process_high {
cpus = { 40 * task.attempt }
memory = { 256.GB * task.attempt }
time = { 20.h * task.attempt }
}

withLabel:process_long {
cpus = { 12 * task.attempt }
memory = { 128.GB * task.attempt }
time = { 96.h * task.attempt }
}
}
43 changes: 43 additions & 0 deletions docs/kaust.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# nf-core/configs: KAUST Configuration

manage the pipeline jobs via the nf-core/configs: KAUST Configuration

The purpose of this custom configurations is to streamline executing nf-core pipelines on the KAUST Ibex cluster.

## Getting help

We have a wiki page dedicated to the Bioinformatics team at KAUST to help users: [Bioinformatics Workflows](https://bclwiki.kaust.edu.sa/en/bix/analysis/public/bioinformatics-workflows).

## Using the KAUST config profile

The recommended way to activate `Nextflow`, that is needed to run the `nf-core` workflows on Ibex,
is to use the [module system](https://docs.hpc.kaust.edu.sa/soft_env/prog_env/modulesystem/basic_commands.html):

```bash
# Log in to the desired cluster
ssh <USER>@ilogin.kaust.edu.sa

# Activate the modules, you can also choose to use a specific version with e.g. `Nextflow/24.04.4`.
module load nextflow
```

Launch the pipeline with `-profile kaust` (one hyphen) to run the workflows using the KAUST profile.
This will download and launch the [`kaust.config`](../conf/kaust.config) which has been pre-configured with a setup suitable for the KAUST servers.
It will enable `Nextflow` to manage the pipeline jobs via the `Slurm` job scheduler and `Singularity` to run the tasks.
Using the KAUST profile, `Docker` image(s) containing required software(s) will be downloaded, and converted to `Singularity` image(s) if needed before execution of the pipeline. To avoid downloading same images by multiple users, we provide a singularity `libraryDir` that is configured to use images already downloaded in our central container library. Images missing from our library will be downloaded to your home directory path as defined by `cacheDir`.

The KAUST profile makes running the nf-core workflows as simple as:

```bash

module load nextflow
module load singularity

# Launch nf-core pipeline with the kaust profile, e.g. for analyzing human data:
$ nextflow run nf-core/<PIPELINE> -profile kaust -r <PIPELINE_VERSION> --genome GRCh38.p14 --samplesheet input.csv [...]
```

Where `input_csv` contains information about the samples and datafile paths.

Remember to use `-bg` to launch `Nextflow` in the background, so that the pipeline doesn't exit if you leave your terminal session.
Alternatively, you can also launch `Nextflow` in a `tmux` or a `screen` session.
3 changes: 3 additions & 0 deletions nfcore_custom.config
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ profiles {
ku_sund_danhead {
includeConfig "${params.custom_config_base}/conf/ku_sund_danhead.config"
}
kaust {
includeConfig "${params.custom_config_base}/conf/kaust.config"
}
leicester {
includeConfig "${params.custom_config_base}/conf/leicester.config"
}
Expand Down
12 changes: 12 additions & 0 deletions pipeline/tumourevo.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* -------------------------------------------------
* nfcore/tumourevo custom profile Nextflow config file
* -------------------------------------------------
* Config options for custom environments.
* Cluster-specific config options should be saved
* in the conf/pipeline/tumourevo folder and imported
* under a profile name here.
*/

profiles {
}

0 comments on commit c4a9594

Please sign in to comment.