From 4c3fd2227cf44bf007d6c10f6d3ef4bfc507abf8 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Date: Fri, 11 Jul 2025 11:48:24 -0300 Subject: [PATCH 1/3] up: mv human blood parameters to yaml files --- parameters/human_blood/basecall.yaml | 5 +++++ parameters/human_blood/modkit.yaml | 4 ++++ parameters/human_blood/qc.yaml | 4 ++++ src/configs/human_blood.config | 28 ---------------------------- src/nextflow.config | 3 --- 5 files changed, 13 insertions(+), 31 deletions(-) create mode 100644 parameters/human_blood/basecall.yaml create mode 100644 parameters/human_blood/modkit.yaml create mode 100644 parameters/human_blood/qc.yaml delete mode 100644 src/configs/human_blood.config diff --git a/parameters/human_blood/basecall.yaml b/parameters/human_blood/basecall.yaml new file mode 100644 index 0000000..4e47609 --- /dev/null +++ b/parameters/human_blood/basecall.yaml @@ -0,0 +1,5 @@ +project_name: "human_blood" +step: 1 +basecall_path: "./data/pod5" +reference_file: "./references/Homo_sapiens.GRCh38.dna.primary_assembly.fa" +out_dir: "results_human_blood/" \ No newline at end of file diff --git a/parameters/human_blood/modkit.yaml b/parameters/human_blood/modkit.yaml new file mode 100644 index 0000000..5149ad8 --- /dev/null +++ b/parameters/human_blood/modkit.yaml @@ -0,0 +1,4 @@ +project_name: "results_human_blood" +step: 3 +steps_2_and_3_input_directory: "./results/results_human_blood/" +out_dir: "results_human_blood/" \ No newline at end of file diff --git a/parameters/human_blood/qc.yaml b/parameters/human_blood/qc.yaml new file mode 100644 index 0000000..c72858e --- /dev/null +++ b/parameters/human_blood/qc.yaml @@ -0,0 +1,4 @@ +project_name: "results_human_blood" +step: "2_from_step_1" +steps_2_and_3_input_directory: "./results/results_human_blood/" +out_dir: "results_human_blood/" \ No newline at end of file diff --git a/src/configs/human_blood.config b/src/configs/human_blood.config deleted file mode 100644 index 9560781..0000000 --- a/src/configs/human_blood.config +++ /dev/null @@ -1,28 +0,0 @@ -// Human Blood profile -profiles { - human_blood_basecall { - params { - project_name = "human_blood" - step = 1 - basecall_path = "./data/pod5" - reference_file = "./references/Homo_sapiens.GRCh38.dna.primary_assembly.fa" - out_dir = "results_human_blood/" - } - } - human_blood_qc { - params { - project_name = "results_human_blood" - step = "2_from_step_1" - steps_2_and_3_input_directory = "./results/results_human_blood/" - out_dir = "results_human_blood/" - } - } - human_blood_modkit { - params { - project_name = "results_human_blood" - step = 3 - steps_2_and_3_input_directory = "./results/results_human_blood/" - out_dir = "results_human_blood/" - } - } -} \ No newline at end of file diff --git a/src/nextflow.config b/src/nextflow.config index 1c4f7aa..41d2239 100755 --- a/src/nextflow.config +++ b/src/nextflow.config @@ -75,6 +75,3 @@ apptainer { enabled = true pullTimeout = '60m' } - -// include one or more profiles from the configs subdir -includeConfig "./configs/human_blood.config" -- GitLab From 932e65f8bdf07dfff34f72e8656fcef18090a202 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Date: Fri, 11 Jul 2025 11:57:09 -0300 Subject: [PATCH 2/3] up: params-file usage --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5219af8..6f06cc5 100755 --- a/README.md +++ b/README.md @@ -222,9 +222,9 @@ Many of the parameters for this step are based on dorado basecaller, see their [ ``` -### Config Profiles +### Parameter Files -The pipeline also supports running [pre-configured profiles](https://www.nextflow.io/docs/latest/config.html#config-profiles). The currently supported profiles are under the `src/configs/` dir and can be used via the parameter `-profile ` option in `nextflow run`. All such profiles make assumptions about the type of data to be used and where they are being stored/output. +The pipeline also supports running [pre-configured parameter files](https://www.nextflow.io/docs/latest/cli.html#pipeline-parameters). The currently supported analyses are under the `parameters/` subdir and can be used via the option `-params-file "./parameters//.yaml"` in `nextflow run`. All such files make assumptions about the type of data to be used and where they are being stored. [top](#table-of-contents) @@ -315,10 +315,10 @@ The following examples assume your current directory is the root directory of th -resume ``` -Alternatively, you can make use of an existing [configuration profile](#config-profiles) to run one or more of the mentioned steps without the need to specify all parameters (the profiles are optimized for specific types of analysis). For example, the `src/configs/human_blood.config` file implements the `human_blood_basecall` profile, which can be executed from the project root directory as follows: +Alternatively, you can make use of an existing [parameter file](#parameter-files) to run one or more of the mentioned steps without the need to specify all parameters (each file is optimized for specific types of analysis). For example, the `parameters/human_blood/basecall.yaml` file runs the basecall analysis for a human blood sample, which can be executed from the project root directory as follows: ```sh -nextflow ./src/main.nf -profile human_blood_basecall +nextflow ./src/main.nf -params-file ./parameters/human_blood/basecall.yaml ``` [top](#table-of-contents) -- GitLab From 8014695c516cf7aefb7f265420d368bc315e090b Mon Sep 17 00:00:00 2001 From: Carlos Gomes Date: Sat, 12 Jul 2025 17:33:23 -0300 Subject: [PATCH 3/3] fix: slurm example using profiles insead of params-file --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d691b1..47834be 100755 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ NextFlow pipeline used by the Developmental Cognitive Neuroscience Lab (DCNL) to images/debian-nanopore.sif \ containers/debian-nanopore.def ``` + If the container build fails due to size, it may be related to limitations in the **tmp/** folder, change it with ``export APPTAINER_TMPDIR="path/"``. See [documentation](https://apptainer.org/docs/user/1.0/build_env.html#temporary-folders) for details. 1. You should now be able to run the `nextflow` pipeline (`src/main.nf`). See [Pipeline parameters](#pipeline-parameters) and [Examples](#examples) for details. @@ -323,7 +324,7 @@ nextflow ./src/main.nf -params-file ./parameters/human_blood/basecall.yaml ### Slurm script -The pipeline can be executed in an HPC environment using [Slurm](https://slurm.schedmd.com/). A job submission template for basecalling with the `human_blood_basecall` profile is provided below. +The pipeline can be executed in an HPC environment using [Slurm](https://slurm.schedmd.com/). A job submission template for basecalling with the `human_blood_basecall` parameters is provided below. 1. Create a shell script: @@ -342,7 +343,7 @@ The pipeline can be executed in an HPC environment using [Slurm](https://slurm.s #SBATCH --cpus-per-task 12 #SBATCH --gpus 3 srun nextflow run ./src/main.nf \ - -profile human_blood_basecall \ + -params-file ./parameters/human_blood/basecall.yaml \ --basecall_mods "5mC_5hmC,6mA" ``` -- GitLab