From 069823ccb0f90c554cef608781ae80d213fc9dd3 Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Wed, 10 Apr 2024 23:01:43 +0200 Subject: [PATCH 1/9] :zap: use bgzip to compress samtools/depth output --- modules/nf-core/samtools/depth/main.nf | 9 +++++--- .../samtools/depth/samtools-depth.diff | 22 ++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/samtools/depth/main.nf b/modules/nf-core/samtools/depth/main.nf index 86a77ba..bad3bbe 100644 --- a/modules/nf-core/samtools/depth/main.nf +++ b/modules/nf-core/samtools/depth/main.nf @@ -1,6 +1,6 @@ process SAMTOOLS_DEPTH { tag "$meta1.id" - label 'process_low' + label 'process_medium' conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -28,16 +28,19 @@ process SAMTOOLS_DEPTH { samtools \\ depth \\ - --threads ${task.cpus-1} \\ + --threads ${task.cpus} \\ $args \\ $positions \\ -H -a \\ -f ${prefix}.list.txt \\ - | gzip -c > ${prefix}.depth.tsv.gz + | bgzip \\ + --threads ${task.cpus} \\ + --stdout > ${prefix}.depth.tsv.gz cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/nf-core/samtools/depth/samtools-depth.diff b/modules/nf-core/samtools/depth/samtools-depth.diff index c5b4b3f..663b0c1 100644 --- a/modules/nf-core/samtools/depth/samtools-depth.diff +++ b/modules/nf-core/samtools/depth/samtools-depth.diff @@ -1,6 +1,14 @@ Changes in module 'nf-core/samtools/depth' --- modules/nf-core/samtools/depth/main.nf +++ modules/nf-core/samtools/depth/main.nf +@@ -1,6 +1,6 @@ + process SAMTOOLS_DEPTH { + tag "$meta1.id" +- label 'process_low' ++ label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -12,8 +12,9 @@ tuple val(meta2), path(intervals) @@ -13,7 +21,7 @@ Changes in module 'nf-core/samtools/depth' when: task.ext.when == null || task.ext.when -@@ -23,13 +24,16 @@ +@@ -23,17 +24,23 @@ def prefix = task.ext.prefix ?: "${meta1.id}" def positions = intervals ? "-b ${intervals}" : "" """ @@ -21,16 +29,24 @@ Changes in module 'nf-core/samtools/depth' + samtools \\ depth \\ - --threads ${task.cpus-1} \\ +- --threads ${task.cpus-1} \\ ++ --threads ${task.cpus} \\ $args \\ $positions \\ - -o ${prefix}.tsv \\ - $bam + -H -a \\ + -f ${prefix}.list.txt \\ -+ | gzip -c > ${prefix}.depth.tsv.gz ++ | bgzip \\ ++ --threads ${task.cpus} \\ ++ --stdout > ${prefix}.depth.tsv.gz cat <<-END_VERSIONS > versions.yml "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') ++ tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + } ************************************************************ From 68c27e807ff5cb8cf666d316d4e482ccad659503 Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 09:31:23 +0200 Subject: [PATCH 2/9] :rewind: Revert ":zap: use bgzip to compress samtools/depth output" Samtools depth seems to have no support for threads --- modules/nf-core/samtools/depth/main.nf | 9 +++----- .../samtools/depth/samtools-depth.diff | 22 +++---------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/modules/nf-core/samtools/depth/main.nf b/modules/nf-core/samtools/depth/main.nf index bad3bbe..86a77ba 100644 --- a/modules/nf-core/samtools/depth/main.nf +++ b/modules/nf-core/samtools/depth/main.nf @@ -1,6 +1,6 @@ process SAMTOOLS_DEPTH { tag "$meta1.id" - label 'process_medium' + label 'process_low' conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -28,19 +28,16 @@ process SAMTOOLS_DEPTH { samtools \\ depth \\ - --threads ${task.cpus} \\ + --threads ${task.cpus-1} \\ $args \\ $positions \\ -H -a \\ -f ${prefix}.list.txt \\ - | bgzip \\ - --threads ${task.cpus} \\ - --stdout > ${prefix}.depth.tsv.gz + | gzip -c > ${prefix}.depth.tsv.gz cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/nf-core/samtools/depth/samtools-depth.diff b/modules/nf-core/samtools/depth/samtools-depth.diff index 663b0c1..c5b4b3f 100644 --- a/modules/nf-core/samtools/depth/samtools-depth.diff +++ b/modules/nf-core/samtools/depth/samtools-depth.diff @@ -1,14 +1,6 @@ Changes in module 'nf-core/samtools/depth' --- modules/nf-core/samtools/depth/main.nf +++ modules/nf-core/samtools/depth/main.nf -@@ -1,6 +1,6 @@ - process SAMTOOLS_DEPTH { - tag "$meta1.id" -- label 'process_low' -+ label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -12,8 +12,9 @@ tuple val(meta2), path(intervals) @@ -21,7 +13,7 @@ Changes in module 'nf-core/samtools/depth' when: task.ext.when == null || task.ext.when -@@ -23,17 +24,23 @@ +@@ -23,13 +24,16 @@ def prefix = task.ext.prefix ?: "${meta1.id}" def positions = intervals ? "-b ${intervals}" : "" """ @@ -29,24 +21,16 @@ Changes in module 'nf-core/samtools/depth' + samtools \\ depth \\ -- --threads ${task.cpus-1} \\ -+ --threads ${task.cpus} \\ + --threads ${task.cpus-1} \\ $args \\ $positions \\ - -o ${prefix}.tsv \\ - $bam + -H -a \\ + -f ${prefix}.list.txt \\ -+ | bgzip \\ -+ --threads ${task.cpus} \\ -+ --stdout > ${prefix}.depth.tsv.gz ++ | gzip -c > ${prefix}.depth.tsv.gz cat <<-END_VERSIONS > versions.yml "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -+ tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') - END_VERSIONS - """ - } ************************************************************ From c2749839a6508cc00f5596c4d0adeafc56711d61 Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 10:44:11 +0200 Subject: [PATCH 3/9] :zap: calculate coverage depth by chromosome --- modules/nf-core/samtools/depth/main.nf | 9 +++++---- .../samtools/depth/samtools-depth.diff | 20 +++++++++++++------ .../local/cram_freebayes_parallel/main.nf | 12 +++++++++-- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/modules/nf-core/samtools/depth/main.nf b/modules/nf-core/samtools/depth/main.nf index 86a77ba..2101671 100644 --- a/modules/nf-core/samtools/depth/main.nf +++ b/modules/nf-core/samtools/depth/main.nf @@ -9,10 +9,11 @@ process SAMTOOLS_DEPTH { input: tuple val(meta1), path(bam) - tuple val(meta2), path(intervals) + tuple val(meta2), path(bai) + tuple val(meta3), val(chromosome) output: - tuple val(meta1), path("*.tsv.gz"), emit: depth + tuple val(meta3), path("*.tsv.gz"), emit: depth tuple val(meta1), path("*.list.txt"), emit: bam_list path "versions.yml", emit: versions @@ -22,7 +23,7 @@ process SAMTOOLS_DEPTH { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta1.id}" - def positions = intervals ? "-b ${intervals}" : "" + def positions = chromosome ? "-r ${chromosome}" : "" """ ls $bam | xargs -n1 > ${prefix}.list.txt @@ -33,7 +34,7 @@ process SAMTOOLS_DEPTH { $positions \\ -H -a \\ -f ${prefix}.list.txt \\ - | gzip -c > ${prefix}.depth.tsv.gz + | gzip -c > ${prefix}.${meta3.id}.depth.tsv.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/depth/samtools-depth.diff b/modules/nf-core/samtools/depth/samtools-depth.diff index c5b4b3f..c4080bd 100644 --- a/modules/nf-core/samtools/depth/samtools-depth.diff +++ b/modules/nf-core/samtools/depth/samtools-depth.diff @@ -1,21 +1,29 @@ Changes in module 'nf-core/samtools/depth' --- modules/nf-core/samtools/depth/main.nf +++ modules/nf-core/samtools/depth/main.nf -@@ -12,8 +12,9 @@ - tuple val(meta2), path(intervals) +@@ -9,11 +9,13 @@ + + input: + tuple val(meta1), path(bam) +- tuple val(meta2), path(intervals) ++ tuple val(meta2), path(bai) ++ tuple val(meta3), val(chromosome) output: - tuple val(meta1), path("*.tsv"), emit: tsv - path "versions.yml" , emit: versions -+ tuple val(meta1), path("*.tsv.gz"), emit: depth ++ tuple val(meta3), path("*.tsv.gz"), emit: depth + tuple val(meta1), path("*.list.txt"), emit: bam_list + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when -@@ -23,13 +24,16 @@ +@@ -21,15 +23,18 @@ + script: + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta1.id}" - def positions = intervals ? "-b ${intervals}" : "" +- def positions = intervals ? "-b ${intervals}" : "" ++ def positions = chromosome ? "-r ${chromosome}" : "" """ + ls $bam | xargs -n1 > ${prefix}.list.txt + @@ -28,7 +36,7 @@ Changes in module 'nf-core/samtools/depth' - $bam + -H -a \\ + -f ${prefix}.list.txt \\ -+ | gzip -c > ${prefix}.depth.tsv.gz ++ | gzip -c > ${prefix}.${meta3.id}.depth.tsv.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/subworkflows/local/cram_freebayes_parallel/main.nf b/subworkflows/local/cram_freebayes_parallel/main.nf index fb3ef3b..c5b7da3 100644 --- a/subworkflows/local/cram_freebayes_parallel/main.nf +++ b/subworkflows/local/cram_freebayes_parallel/main.nf @@ -18,8 +18,16 @@ workflow CRAM_FREEBAYES_PARALLEL { main: ch_versions = Channel.empty() - // calculate total coverage depth for all samples - SAMTOOLS_DEPTH( bam, [[], []] ) + // read chromosome list from fasta index + chromosome_ch = fai.map{ it -> it[1] } + .splitCsv(header: false, sep: '\t') + .map{ row -> [[id: row[0], length: row[1]], row[0]] } + // .view() + + // calculate total coverage depth for all samples by chromosome + // bam is a value channel; chromosome_ch is a queue channel + // for every chromosome + SAMTOOLS_DEPTH( bam, bai, chromosome_ch ) ch_versions = ch_versions.mix(SAMTOOLS_DEPTH.out.versions) // split fasta in chunks relying BAM size From 406bed1198b3b949ec0831f5c5bf922fabb19583 Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 11:20:26 +0200 Subject: [PATCH 4/9] :zap: split freebayes relying on depth without 0 coverage position --- .vscode/settings.json | 1 + bin/split_ref_by_depth.py | 59 ++++++++++--------- modules/local/freebayes_splitcram.nf | 4 +- modules/nf-core/samtools/depth/main.nf | 2 +- .../samtools/depth/samtools-depth.diff | 2 +- 5 files changed, 38 insertions(+), 30 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1b66a96..8ea95c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,6 +10,7 @@ "coverage", "cpus", "demultiplexing", + "depthfile", "downsampling", "fasta", "fastq", diff --git a/bin/split_ref_by_depth.py b/bin/split_ref_by_depth.py index 252862f..3758874 100755 --- a/bin/split_ref_by_depth.py +++ b/bin/split_ref_by_depth.py @@ -2,14 +2,19 @@ # -*- coding: utf-8 -*- """ + This script will write a list of region from a reference file relying on -coverage depth +coverage depth. Is supposed to work on a single chromosome at a time, it +requires chromosome length in order to work on sample depth with no 0 regions Author: Paolo Cozzi -Date: 2024/03/21 +Date: 2024/04/11 Usage: - python split_ref_by_depth.py --depth_file + python split_ref_by_depth.py --depth_file \ + --chromosome_length \ + [--min_length ] [--max_coverage ] \ + [--overlap_size ] [--verbose ] [--quiet ] Arguments: depth_file: The path of samtools depth output file @@ -126,7 +131,8 @@ def append_or_extend_region( def split_ref_by_coverage( - depthfile: str, max_coverage: int, min_length: int, overlap_size: int): + depthfile: str, chromosome_length: int, max_coverage: int, + min_length: int, overlap_size: int): with gzip.open(depthfile, "rt") as handle: reader = csv.reader(handle, delimiter="\t", lineterminator="\n") header = next(reader) @@ -134,10 +140,10 @@ def split_ref_by_coverage( # header: ["#CHROM", "POS", "Sample_1.bam", "Sample_2.bam", ...] logging.debug(f"Got header: {header}") - # Inizialize some variables + # Initialize some variables line = next(reader) start_chrom = line[0] - start_pos = int(line[1]) + start_pos = 0 old_pos = start_pos cumulative_coverage = 0 @@ -149,26 +155,8 @@ def split_ref_by_coverage( chrom, pos = line[0], int(line[1]) if chrom != start_chrom: - logging.debug(f"{i}: Got a new chromosome '{chrom}'") - logging.debug( - f"{i}: Test for a new region with: " - f"{[start_chrom, start_pos, old_pos]}" - f" ({old_pos-start_pos+1} bp; " - f"{cumulative_coverage:.2e} cumulative coverage)" - ) - - # add and open a new region - regions = append_or_extend_region( - regions, - [start_chrom, start_pos, old_pos], - min_length, - overlap_size - ) - - # reset variables - start_chrom = chrom - start_pos = pos - cumulative_coverage = 0 + logging.error(f"{i}: Got a new chromosome '{chrom}'") + raise Exception("This script works on a single chromosome at a time") # determine region size length = pos - start_pos @@ -219,6 +207,14 @@ def split_ref_by_coverage( overlap_size ) + # check for last region end + last_region = regions[-1] + if last_region[2] < chromosome_length: + logging.debug( + f"Extending the last region: {last_region} to {chromosome_length}" + ) + last_region[2] = chromosome_length + return regions @@ -232,6 +228,10 @@ def split_ref_by_coverage( '-d', '--depth_file', required=True, help="The output of samtools depth file for all samples" ) + parser.add_argument( + '-l', '--chromosome_length', required=True, type=int, + help="The length of the chromosome" + ) parser.add_argument( "--min_length", default=100_000, type=int, help="minimum fragment length in bp" @@ -263,7 +263,12 @@ def split_ref_by_coverage( # split reference by coverage depth regions = split_ref_by_coverage( - args.depth_file, args.max_coverage, args.min_length, args.overlap_size) + args.depth_file, + args.chromosome_length, + args.max_coverage, + args.min_length, + args.overlap_size + ) logging.info(f"Number of regions: {len(regions)}") diff --git a/modules/local/freebayes_splitcram.nf b/modules/local/freebayes_splitcram.nf index 97662a7..79c088b 100644 --- a/modules/local/freebayes_splitcram.nf +++ b/modules/local/freebayes_splitcram.nf @@ -23,7 +23,9 @@ process FREEBAYES_SPLITCRAM { def prefix = task.ext.prefix ?: "${meta.id}" """ split_ref_by_depth.py \\ - --depth_file ${depth} > ${prefix}.regions.txt + --depth_file ${depth} \\ + --chromosome_length ${meta.length} \\ + > ${prefix}.regions.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/depth/main.nf b/modules/nf-core/samtools/depth/main.nf index 2101671..005035c 100644 --- a/modules/nf-core/samtools/depth/main.nf +++ b/modules/nf-core/samtools/depth/main.nf @@ -32,7 +32,7 @@ process SAMTOOLS_DEPTH { --threads ${task.cpus-1} \\ $args \\ $positions \\ - -H -a \\ + -H \\ -f ${prefix}.list.txt \\ | gzip -c > ${prefix}.${meta3.id}.depth.tsv.gz diff --git a/modules/nf-core/samtools/depth/samtools-depth.diff b/modules/nf-core/samtools/depth/samtools-depth.diff index c4080bd..f7b8940 100644 --- a/modules/nf-core/samtools/depth/samtools-depth.diff +++ b/modules/nf-core/samtools/depth/samtools-depth.diff @@ -34,7 +34,7 @@ Changes in module 'nf-core/samtools/depth' $positions \\ - -o ${prefix}.tsv \\ - $bam -+ -H -a \\ ++ -H \\ + -f ${prefix}.list.txt \\ + | gzip -c > ${prefix}.${meta3.id}.depth.tsv.gz From 32f04777bf54834b974713cd48b9de539d0de33b Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 12:02:27 +0200 Subject: [PATCH 5/9] :bug: deal with 0 coverage chromosomes --- bin/split_ref_by_depth.py | 31 ++++++++++++++++++++-------- modules/local/freebayes_splitcram.nf | 1 + 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/bin/split_ref_by_depth.py b/bin/split_ref_by_depth.py index 3758874..a3a0e3c 100755 --- a/bin/split_ref_by_depth.py +++ b/bin/split_ref_by_depth.py @@ -12,7 +12,7 @@ Usage: python split_ref_by_depth.py --depth_file \ - --chromosome_length \ + --chromosome --chromosome_length \ [--min_length ] [--max_coverage ] \ [--overlap_size ] [--verbose ] [--quiet ] @@ -131,8 +131,8 @@ def append_or_extend_region( def split_ref_by_coverage( - depthfile: str, chromosome_length: int, max_coverage: int, - min_length: int, overlap_size: int): + depthfile: str, chromosome: str, chromosome_length: int, + max_coverage: int, min_length: int, overlap_size: int): with gzip.open(depthfile, "rt") as handle: reader = csv.reader(handle, delimiter="\t", lineterminator="\n") header = next(reader) @@ -140,22 +140,30 @@ def split_ref_by_coverage( # header: ["#CHROM", "POS", "Sample_1.bam", "Sample_2.bam", ...] logging.debug(f"Got header: {header}") + # test if I have reads aligned in this file + try: + line = next(reader) + + except StopIteration: + logging.error( + f"File '{depthfile}' has no coverage data" + ) + return [[chromosome, 0, chromosome_length]] + # Initialize some variables - line = next(reader) - start_chrom = line[0] - start_pos = 0 + regions = [] + start_chrom = chromosome + start_pos = 1 old_pos = start_pos cumulative_coverage = 0 - regions = [] - logging.debug(f"Starting from chrom: '{start_chrom}'") for i, line in enumerate(reader): chrom, pos = line[0], int(line[1]) if chrom != start_chrom: - logging.error(f"{i}: Got a new chromosome '{chrom}'") + logging.critical(f"{i}: Got a new chromosome '{chrom}'") raise Exception("This script works on a single chromosome at a time") # determine region size @@ -228,6 +236,10 @@ def split_ref_by_coverage( '-d', '--depth_file', required=True, help="The output of samtools depth file for all samples" ) + parser.add_argument( + '-c', '--chromosome', required=True, type=str, + help="The chromosome name" + ) parser.add_argument( '-l', '--chromosome_length', required=True, type=int, help="The length of the chromosome" @@ -264,6 +276,7 @@ def split_ref_by_coverage( # split reference by coverage depth regions = split_ref_by_coverage( args.depth_file, + args.chromosome, args.chromosome_length, args.max_coverage, args.min_length, diff --git a/modules/local/freebayes_splitcram.nf b/modules/local/freebayes_splitcram.nf index 79c088b..dc2b11c 100644 --- a/modules/local/freebayes_splitcram.nf +++ b/modules/local/freebayes_splitcram.nf @@ -24,6 +24,7 @@ process FREEBAYES_SPLITCRAM { """ split_ref_by_depth.py \\ --depth_file ${depth} \\ + --chromosome ${meta.id} \\ --chromosome_length ${meta.length} \\ > ${prefix}.regions.txt From 74f0ef77d07ae2d7530374375e73b99a7b6ddc4f Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 12:36:05 +0200 Subject: [PATCH 6/9] :bug: calculate freebayes chunk on all regions transforming SAMTOOLS_DEPTH.out.bam_list into a value channel to call freebayes on each regions --- modules/local/freebayes_splitcram.nf | 1 + subworkflows/local/cram_freebayes_parallel/main.nf | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/local/freebayes_splitcram.nf b/modules/local/freebayes_splitcram.nf index dc2b11c..cf867dc 100644 --- a/modules/local/freebayes_splitcram.nf +++ b/modules/local/freebayes_splitcram.nf @@ -23,6 +23,7 @@ process FREEBAYES_SPLITCRAM { def prefix = task.ext.prefix ?: "${meta.id}" """ split_ref_by_depth.py \\ + ${args} \\ --depth_file ${depth} \\ --chromosome ${meta.id} \\ --chromosome_length ${meta.length} \\ diff --git a/subworkflows/local/cram_freebayes_parallel/main.nf b/subworkflows/local/cram_freebayes_parallel/main.nf index c5b7da3..424a2c2 100644 --- a/subworkflows/local/cram_freebayes_parallel/main.nf +++ b/subworkflows/local/cram_freebayes_parallel/main.nf @@ -41,7 +41,15 @@ workflow CRAM_FREEBAYES_PARALLEL { .map{ it -> [[id: it.trim()], it.trim()]} // call freebayes on each region - FREEBAYES_CHUNK ( regions_ch, bam, bai, SAMTOOLS_DEPTH.out.bam_list, fasta, fai ) + FREEBAYES_CHUNK ( + regions_ch, + bam, + bai, + // converting to a value channel + SAMTOOLS_DEPTH.out.bam_list.first(), + fasta, + fai + ) ch_versions = ch_versions.mix(FREEBAYES_CHUNK.out.versions) // merge freebayes chunks From f3c69e549597ce61810e90023c9940b96722512c Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 12:52:56 +0200 Subject: [PATCH 7/9] :wrench: increase required time --- conf/base.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/base.config b/conf/base.config index 9ac0d4d..0595c1a 100644 --- a/conf/base.config +++ b/conf/base.config @@ -26,17 +26,17 @@ process { withLabel:process_single { cpus = { check_max( 1 , 'cpus' ) } memory = { check_max( 4.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + time = { check_max( 6.h * task.attempt, 'time' ) } } withLabel:process_low { cpus = { check_max( 2 * task.attempt, 'cpus' ) } memory = { check_max( 4.GB * task.attempt, 'memory' ) } - time = { check_max( 4.h * task.attempt, 'time' ) } + time = { check_max( 6.h * task.attempt, 'time' ) } } withLabel:process_medium { cpus = { check_max( 6 * task.attempt, 'cpus' ) } memory = { check_max( 12.GB * task.attempt, 'memory' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } + time = { check_max( 12.h * task.attempt, 'time' ) } } withLabel:process_high { cpus = { check_max( 12 * task.attempt, 'cpus' ) } From 3925b45a8bbea0a42a46926d5c57c934537847cd Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 12:53:12 +0200 Subject: [PATCH 8/9] :bookmark: release v0.6.1 --- CHANGELOG.md | 9 +++++++++ assets/multiqc_config.yml | 4 ++-- nextflow.config | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1856a9e..00782c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.6.1 - [2024-04-11] + +- Calculate `samtools/depth` on each chromosomes ([#73](https://github.com/cnr-ibba/nf-resequencing-mem/issues/73)) + +### `Fixed` + +- Passing args to `modules/local/freebayes_splitcram` +- Calculate `samtools/depth` without *0 coverage* regions + ## 0.6.0 - [2024-04-04] - Replace `*.bam` file format with `*.cram` ([#9](https://github.com/cnr-ibba/nf-resequencing-mem/issues/9)) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 4aad6b7..4017e02 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,7 +1,7 @@ report_comment: > - This report has been generated by the nf-resequencing-mem + This report has been generated by the nf-resequencing-mem analysis pipeline. For information about how to interpret these results, please see the - documentation. + documentation. report_section_order: "nf-resequencing-mem-methods-description": order: -1000 diff --git a/nextflow.config b/nextflow.config index df01003..84a3339 100644 --- a/nextflow.config +++ b/nextflow.config @@ -162,7 +162,7 @@ manifest { description = 'Nextflow Resequencing with BWA MEM' mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' - version = '0.6.0' + version = '0.6.1' } // Load modules.config for DSL2 module specific options From 0b841682e1e750ea206b856d269d37c2d3aaba1f Mon Sep 17 00:00:00 2001 From: Paolo Cozzi Date: Thu, 11 Apr 2024 15:40:28 +0200 Subject: [PATCH 9/9] :rotating_light: fix linter issue with prettier --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00782c6..e2cb4bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Fixed` - Passing args to `modules/local/freebayes_splitcram` -- Calculate `samtools/depth` without *0 coverage* regions +- Calculate `samtools/depth` without _0 coverage_ regions ## 0.6.0 - [2024-04-04]