From 16dbae0e2245b5e226b0248487f112223394eedb Mon Sep 17 00:00:00 2001 From: earx Date: Tue, 3 Jun 2025 14:24:39 +0200 Subject: [PATCH 1/2] redirect stderr to reditools3 log file --- modules/reditools3.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/reditools3.nf b/modules/reditools3.nf index 523aa6d..acd4bd2 100644 --- a/modules/reditools3.nf +++ b/modules/reditools3.nf @@ -31,6 +31,6 @@ process reditools3 { base_name = bam.BaseName """ - python -m reditools analyze ${bam} --reference ${genome} --strand ${strand_orientation} --output-file ${base_name}.site_edits_reditools3.txt --threads ${task.cpus} --verbose > ${base_name}.reditools3.log + python -m reditools analyze ${bam} --reference ${genome} --strand ${strand_orientation} --output-file ${base_name}.site_edits_reditools3.txt --threads ${task.cpus} --verbose &> ${base_name}.reditools3.log """ } From fc681fc7a97306ebf069d21c0b99104e41bc1e8b Mon Sep 17 00:00:00 2001 From: ascarrunz + eduardo + non-titulaire + 2025-04-05 Date: Thu, 5 Jun 2025 11:23:42 +0200 Subject: [PATCH 2/2] fix profile for itrop and executor check --- config/ressources/hpc.config | 4 ++++ config/softwares.config | 14 +++++++------- modules/bamutil.nf | 2 +- nextflow.config | 14 +++++++------- rain.nf | 8 ++++---- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/config/ressources/hpc.config b/config/ressources/hpc.config index 68cbf9b..96aed4f 100644 --- a/config/ressources/hpc.config +++ b/config/ressources/hpc.config @@ -32,4 +32,8 @@ process { cpus = 6 time = '4d' } + withName: 'bamutil' { + cpus = 8 + memory = '48G' + } } diff --git a/config/softwares.config b/config/softwares.config index f19ff02..1dfb71c 100644 --- a/config/softwares.config +++ b/config/softwares.config @@ -10,7 +10,7 @@ process { } withLabel: 'bowtie2' { container = 'quay.io/biocontainers/bowtie2:2.5.1--py38he00c5e5_2' - } + } withLabel: 'bwa' { container = 'quay.io/biocontainers/bwa:0.7.3a--he4a0461_9' } @@ -24,7 +24,7 @@ process { container = 'quay.io/biocontainers/hisat2:2.2.1--hdbdd923_6' } withLabel: "jacusa2" { - container = singularity.enabled ? "${sifPath}/jacusa2.sif" : "jacusa2" + container = singularity.enabled ? "${params.sifPath}/jacusa2.sif" : "jacusa2" containerOptions = '--ulimit nofile=1024:1024' // Limit number of file descriptors to avoid out of memory errors } withLabel: 'minimap2' { @@ -32,12 +32,12 @@ process { } withLabel: 'pigz' { container = 'quay.io/biocontainers/pigz:2.8' - } + } withLabel: "reditools2" { - container = singularity.enabled ? "${sifPath}/reditools2.sif" : "reditools2" + container = singularity.enabled ? "${params.sifPath}/reditools2.sif" : "reditools2" } withLabel: "reditools3" { - container = singularity.enabled ? "${sifPath}/reditools3.sif" : "reditools3" + container = singularity.enabled ? "${params.sifPath}/reditools3.sif" : "reditools3" } withLabel: 'rsem' { container = 'quay.io/biocontainers/rsem:1.3.3--pl5321h0033a41_7' @@ -49,12 +49,12 @@ process { container = 'quay.io/biocontainers/samtools:1.3.1--h0cf4675_11' } withLabel: "sapin" { - container = singularity.enabled ? "${sifPath}/sapin.sif" : "sapin" + container = singularity.enabled ? "${params.sifPath}/sapin.sif" : "sapin" } withLabel: 'multiqc' { container = 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' } withLabel: "pluviometer" { - container = singularity.enabled ? "${sifPath}/pluviometer.sif" : "pluviometer" + container = singularity.enabled ? "${params.sifPath}/pluviometer.sif" : "pluviometer" } } diff --git a/modules/bamutil.nf b/modules/bamutil.nf index bbbdd22..d67e0bf 100644 --- a/modules/bamutil.nf +++ b/modules/bamutil.nf @@ -13,7 +13,7 @@ process bamutil_clipoverlap { script: """ - bam clipOverlap --storeOrig CG --poolSize 5000000 --in ${bam} --out ${bam}_clipoverlap.bam --stats > ${meta.id}_bamutil_clipoverlap.log + bam clipOverlap --storeOrig CG --poolSize 5000000 --in ${bam} --out ${bam}_clipoverlap.bam --stats --excludeFlags 0x37 > ${meta.id}_bamutil_clipoverlap.log """ } diff --git a/nextflow.config b/nextflow.config index b17c07f..7d7e971 100644 --- a/nextflow.config +++ b/nextflow.config @@ -21,18 +21,18 @@ includeConfig "$baseDir/config/ressources/base.config" profiles { itrop { - executor { - name = 'slurm' - } process { - scratch = '/scratch-ib' - clusterOptions = "--constraint=infiniband" + executor = 'slurm' + queue = 'normal' + scratch = '/scratch-ib' + clusterOptions = "--constraint=infiniband" } + singularity.enabled = true - // singularity.envWhitelist = '' // Comma separated list of environment variable names to be included in the container environment. + params.sifPath = "${baseDir}/sif_images" + // singularity.envWhitelist = '' // Comma separated list of environment variable names to be included in the container environment. includeConfig "$baseDir/config/softwares.config" includeConfig "$baseDir/config/ressources/hpc.config" - scratch = '/scratch-ib' } debug { process.beforeScript = 'env' } diff --git a/rain.nf b/rain.nf index 3b74f59..544be72 100644 --- a/rain.nf +++ b/rain.nf @@ -176,10 +176,10 @@ if ( ! (params.edit_site_tool in edit_site_tools) ){ // check RAIN profile - /!\ profile must be sync with AliNe profile as much as possible if ( - workflow.profile.contains('singularity') || - workflow.profile.contains('docker') + workflow.containerEngine == "singularity" || + workflow.containerEngine == "docker" ) { "executer selected" } -else { exit 1, "No executer selected: -profile docker/singularity"} +else { exit 1, "No executer selected: please use a profile activating docker or singularity (e.g. -profile docker/singularity/itrop)"} // check AliNE profile def aline_profile_list=[] @@ -540,4 +540,4 @@ workflow.onComplete { ======================================================= ${c_reset} """ -} \ No newline at end of file +}