From ae02e3dca13569b75e8ed72a56e53accb7bc552c Mon Sep 17 00:00:00 2001 From: nourmahfel Date: Mon, 23 Mar 2026 14:10:39 +0000 Subject: [PATCH 1/4] Add tests --- conf/base.config | 3 - conf/modules.config | 7 +- conf/test.config | 53 ++++++-- modules.json | 5 + .../local/spectre/cnvcaller/environment.yml | 14 -- modules/local/spectre/cnvcaller/main.nf | 24 ++-- modules/local/spectre/cnvcaller/meta.yml | 121 ++++++++++-------- .../spectre/cnvcaller/tests/main.nf.test | 101 +++++++++++++++ .../spectre/cnvcaller/tests/nextflow.config | 15 +++ .../local/svim/alignment/tests/.nf-test.log | 8 -- .../svim/alignment/environment.yml | 0 .../{local => nf-core}/svim/alignment/main.nf | 0 .../svim/alignment/meta.yml | 0 .../svim/alignment/tests/main.nf.test | 2 +- .../svim/alignment/tests/main.nf.test.snap | 8 +- .../svim/alignment/tests/nextflow.config | 0 subworkflows/local/call_sv/main.nf | 2 +- 17 files changed, 245 insertions(+), 118 deletions(-) delete mode 100644 modules/local/spectre/cnvcaller/environment.yml mode change 100644 => 100755 modules/local/spectre/cnvcaller/main.nf mode change 100644 => 100755 modules/local/spectre/cnvcaller/meta.yml create mode 100755 modules/local/spectre/cnvcaller/tests/main.nf.test create mode 100755 modules/local/spectre/cnvcaller/tests/nextflow.config delete mode 100755 modules/local/svim/alignment/tests/.nf-test.log rename modules/{local => nf-core}/svim/alignment/environment.yml (100%) rename modules/{local => nf-core}/svim/alignment/main.nf (100%) rename modules/{local => nf-core}/svim/alignment/meta.yml (100%) rename modules/{local => nf-core}/svim/alignment/tests/main.nf.test (99%) rename modules/{local => nf-core}/svim/alignment/tests/main.nf.test.snap (96%) rename modules/{local => nf-core}/svim/alignment/tests/nextflow.config (100%) mode change 100755 => 100644 diff --git a/conf/base.config b/conf/base.config index 269481c..c922d64 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,7 +10,6 @@ process { - // TODO nf-core: Check the defaults for all processes cpus = { 1 * task.attempt } memory = { 6.GB * task.attempt } time = { 4.h * task.attempt } @@ -24,8 +23,6 @@ process { // These labels are used and recognised by default in DSL2 files hosted on nf-core/modules. // If possible, it would be nice to keep the same label naming convention when // adding in your local modules too. - // TODO nf-core: Customise requirements for specific processes. - // See https://www.nextflow.io/docs/latest/config.html#config-process-selectors withLabel:process_single { cpus = { 1 } memory = { 5.GB * task.attempt } diff --git a/conf/modules.config b/conf/modules.config index 8e395d3..1b52781 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -65,7 +65,7 @@ process { path: { "${params.outdir}/${meta.id}/filtered_bam" }, mode: 'copy' ] - cpus = 4 // Set the number of CPUs here + cpus = 4 } @@ -92,7 +92,6 @@ process { hifi: 'map-hifi', pacbio: 'map-pb' ] - // Use manual model if provided, otherwise use platform-based preset def preset = params.minimap2_model ?: (presets[params.sequencing_platform] ?: 'map-ont') "-Y -y -ax ${preset} -R '@RG\\tID:${meta.id}\\tSM:${meta.id}\\tPL:${params.sequencing_platform.toUpperCase()}'" } @@ -477,7 +476,6 @@ process { withName: 'DEEPVARIANT_RUNDEEPVARIANT' { ext.args = { - // Define model type presets based on sequencing platform def model_types = [ ont: 'ONT_R104', hifi: 'PACBIO', @@ -485,11 +483,10 @@ process { ] def model_type = model_types[params.sequencing_platform] ?: 'ONT_R104' - // Build arguments list def args_list = [ "--model_type=${model_type}", "--sample_name=${meta.id}", - "--regions=${params.deepvariant_regions}", + params.deepvariant_regions ? "--regions=${params.deepvariant_regions}" : "", "--make_examples_extra_args=${params.deepvariant_make_examples_extra_args}" ] diff --git a/conf/test.config b/conf/test.config index acd02da..ede3268 100644 --- a/conf/test.config +++ b/conf/test.config @@ -4,31 +4,62 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ executor { - name = 'local' - cpus = 8 - memory = '16.GB' + name = 'local' + cpus = 12 + memory = '24.GB' queueSize = 10 } + process { - resourceLimits = [ - cpus: 1, - memory: '10.GB' - ] + // nf-core standard process labels + withLabel: 'process_single' { + cpus = 1 + memory = 2.GB + time = 4.h + } + withLabel: 'process_low' { + cpus = 2 + memory = 4.GB + time = 6.h + } + withLabel: 'process_medium' { + cpus = 2 // ← REDUCED from 4 + memory = 4.GB // ← REDUCED from 8 + time = 8.h + } + withLabel: 'process_high' { + cpus = 4 // ← REDUCED from 8 + memory = 8.GB // ← REDUCED from 16 + time = 10.h + } + + // CRITICAL: Force MINIMAP2_ALIGN to use minimal resources + withName: 'MINIMAP2_ALIGN' { + cpus = 2 + memory = 4.GB + // Now 4 samples can run in parallel: 8 CPUs / 2 = 4 parallel tasks + } + + withName: 'MINIMAP2_INDEX' { + cpus = 2 + memory = 4.GB + } } -trace.fields = "task_id,hash,native_id,script" + + params { // ======================================== // MAIN ANALYSIS TOGGLES // ======================================== - input = "https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/samplesheet_ubam.csv" + input = "/home/nmahfel/nf-training/test_data_ubams/samplesheet_ubam.csv" input_type = 'ubam' // Skip alignment step if input BAM/CRAM files are already aligned sequencing_platform = 'ont' // Sequencing platform (e.g. 'ont', 'hifi', 'pacbio'). You can also define the parameters through the minimap2_model or winnowmap_model minimap2_model = null use_winnowmap = false // Use Winnowmap for alignment instead of Minimap2 winnowmap_model = null haplotag_bam = true - trio_analysis = false // Enable trio analysis for SNV calling and phasing + trio_analysis = true // Enable trio analysis for SNV calling and phasing filter_targets = false // Enable filtering of alignments to target regions (e.g. for gene panels or exomes) targets_bed = null generate_bam_stats = true // Enable generation of BAM statistics @@ -44,7 +75,7 @@ params { straglr_bed = "https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/straglr/str.test.bed" trgt_bed = "${projectDir}/assets/data/trgt_repeat_catalog.hg38.bed" chromosome_codes = ['chr22'] - deepvariant_regions = 'chr22' + deepvariant_regions = null outdir = './results' annotate_sv = false unify_vcf = false diff --git a/modules.json b/modules.json index 884834f..e5b1634 100644 --- a/modules.json +++ b/modules.json @@ -210,6 +210,11 @@ "git_sha": "72717e1f3feabaa57a6a71ba5a85d9c4ceeba514", "installed_by": ["modules"] }, + "svim/alignment": { + "branch": "master", + "git_sha": "040e62715d9e5a54c962338426e02718f19abee6", + "installed_by": ["modules"] + }, "tabix/bgzip": { "branch": "master", "git_sha": "f2cfcf9d3f6a2d123e6c44aefa788aa232204a7a", diff --git a/modules/local/spectre/cnvcaller/environment.yml b/modules/local/spectre/cnvcaller/environment.yml deleted file mode 100644 index aec7793..0000000 --- a/modules/local/spectre/cnvcaller/environment.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: spectre -channels: - - conda-forge - - bioconda -dependencies: - - python=3.11 - - pysam=0.22.0 - - pandas=2.0.1 - - numpy=1.24.3 - - scipy=1.10.1 - - matplotlib=3.7.1 - - pip - - pip: - - spectre-cnv diff --git a/modules/local/spectre/cnvcaller/main.nf b/modules/local/spectre/cnvcaller/main.nf old mode 100644 new mode 100755 index 3003ea9..334e45f --- a/modules/local/spectre/cnvcaller/main.nf +++ b/modules/local/spectre/cnvcaller/main.nf @@ -2,11 +2,12 @@ process SPECTRE_CNVCALLER { tag "$meta.id" label 'process_high' - conda "${moduleDir}/environment.yml" - container "ghcr.io/nourmahfel/spectre-ont:0.3.2" + // FIXME Conda is not supported at the moment + + container "community.wave.seqera.io/library/ont-spectre:0.3.2--adfae189059be3d9" input: - tuple val(meta), path(summary), path(regions_bed), path(regions_csi), path(vcf) + tuple val(meta), path(mosdepth_summary), path(mosdepth_regions_bed), path(mosdepth_regions_csi), path(vcf) tuple val(meta2), path(fasta) path(metadata_file) path(blacklist) @@ -18,7 +19,7 @@ process SPECTRE_CNVCALLER { tuple val(meta), path("*.spc.gz") , emit: spc tuple val(meta), path("predicted_karyotype.txt") , emit: txt tuple val(meta), path("windows_stats", type: 'dir') , emit: winstats - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('spectre'), eval('spectre version 2>&1 | grep -oP "Spectre version: \\K[0-9.]+"'), emit: versions_spectre, topic: versions when: task.ext.when == null || task.ext.when @@ -32,9 +33,9 @@ process SPECTRE_CNVCALLER { mkdir -p ${coverage_dir} # Stage the mosdepth files into the directory with proper naming - cp -L ${summary} ${coverage_dir}/${meta.id}.mosdepth.summary.txt - cp -L ${regions_bed} ${coverage_dir}/${meta.id}.regions.bed.gz - cp -L ${regions_csi} ${coverage_dir}/${meta.id}.regions.bed.gz.csi + cp -L ${mosdepth_summary} ${coverage_dir}/${meta.id}.mosdepth.summary.txt + cp -L ${mosdepth_regions_bed} ${coverage_dir}/${meta.id}.regions.bed.gz + cp -L ${mosdepth_regions_csi} ${coverage_dir}/${meta.id}.regions.bed.gz.csi # Now run spectre with the directory - use bin_size input parameter, not params spectre CNVCaller \\ @@ -42,16 +43,11 @@ process SPECTRE_CNVCALLER { --snv ${vcf} \\ --reference ${fasta} \\ --output-dir . \\ - --sample-id=${prefix} \\ --metadata ${metadata_file} \\ --blacklist ${blacklist} \\ --bin-size ${bin_size} \\ ${args} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - spectre: \$(spectre --version 2>&1 | grep -oP 'version \\K[0-9.]+' || spectre --help 2>&1 | grep -oP 'v[0-9.]+' | sed 's/v//' || echo "1.0.0") - END_VERSIONS """ stub: @@ -63,9 +59,5 @@ process SPECTRE_CNVCALLER { touch predicted_karyotype.txt mkdir windows_stats - cat <<-END_VERSIONS > versions.yml - "${task.process}": - spectre: 0.3.2 - END_VERSIONS """ } diff --git a/modules/local/spectre/cnvcaller/meta.yml b/modules/local/spectre/cnvcaller/meta.yml old mode 100644 new mode 100755 index dbcfca9..eb69c18 --- a/modules/local/spectre/cnvcaller/meta.yml +++ b/modules/local/spectre/cnvcaller/meta.yml @@ -1,94 +1,105 @@ -name: "spectre" -description: "Copy number variant calling using SPECTRE for long-read sequencing data" +name: "spectre_cnvcaller" +description: Call copy number variants from Oxford Nanopore sequencing data using Spectre keywords: - cnv - - copy number variants - - long-read - - nanopore + - copy number - structural variants + - nanopore + - ont + - spectre tools: - - "spectre": - description: "Copy number caller for long read data including SNV utilization" - homepage: "https://github.com/fritzsedlazeck/Spectre" - documentation: "https://github.com/fritzsedlazeck/Spectre" - tool_dev_url: "https://github.com/fritzsedlazeck/Spectre" - licence: "['MIT']" + - spectre: + description: A tool for identifying somatic copy number variations (CNVs) from low-pass whole genome sequencing (LP-WGS) + homepage: https://github.com/fritzsedlazeck/Spectre + documentation: https://github.com/fritzsedlazeck/Spectre/blob/main/README.md + tool_dev_url: https://github.com/fritzsedlazeck/Spectre + doi: "10.1101/2021.10.27.466189" + licence: ["MIT"] + - bcftools: + description: BCFtools is a set of utilities that manipulate variant calls in VCF and BCF format + homepage: https://samtools.github.io/bcftools/ + documentation: https://samtools.github.io/bcftools/bcftools.html + tool_dev_url: https://github.com/samtools/bcftools + doi: "10.1093/gigascience/giab008" + licence: ["MIT"] input: - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - mosdepth_dir: - type: directory - description: Directory containing mosdepth output files - pattern: "*" - - meta2: - type: map - description: | - Groovy Map containing reference information - e.g. [ id:'reference' ] - - reference: + e.g. `[ id:'sample1' ]` + - mosdepth_summary: type: file - description: Reference genome FASTA file - pattern: "*.{fa,fasta,fa.gz,fasta.gz}" - - meta3: - type: map - description: | - Groovy Map containing SNV VCF information - e.g. [ id:'snv' ] - - snv_vcf: + description: Mosdepth summary file from coverage analysis + pattern: "*.mosdepth.summary.txt" + - mosdepth_regions_bed: + type: file + description: Mosdepth regions bed file (compressed) + pattern: "*.regions.bed.gz" + - mosdepth_regions_csi: type: file - description: SNV VCF file (optional) - pattern: "*.{vcf,vcf.gz}" - - meta4: + description: Index for mosdepth regions bed file + pattern: "*.regions.bed.gz.csi" + - vcf: + type: file + description: VCF file containing SNV calls (e.g., from Clair3) + pattern: "*.vcf.gz" + - meta2: type: map description: | - Groovy Map containing metadata file information - e.g. [ id:'metadata' ] + Groovy Map containing reference genome metadata + e.g. `[ id:'reference' ]` + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fa,fasta}" - metadata_file: type: file - description: Metadata file for N regions (optional) - pattern: "*.mdr" - - meta5: - type: map - description: | - Groovy Map containing blacklist information - e.g. [ id:'blacklist' ] + description: Metadata file for Spectre CNV calling + pattern: "*.txt" - blacklist: type: file - description: Blacklist BED file (optional) + description: Blacklist regions to exclude from CNV calling pattern: "*.bed" + - bin_size: + type: integer + description: Bin size for CNV calling (typically 1000) output: - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + e.g. `[ id:'sample1' ]` - vcf: type: file - description: CNV calls in VCF format + description: Compressed and sorted VCF file containing CNV calls pattern: "*.vcf.gz" - tbi: type: file - description: Index for VCF file + description: Index file for the VCF pattern: "*.vcf.gz.tbi" - bed: type: file - description: CNV calls in BED format + description: BED file with CNV regions pattern: "*.bed" - spc: type: file - description: SPECTRE intermediate file for population mode - pattern: "*.spc" - - versions: + description: Spectre compressed output file + pattern: "*.spc.gz" + - txt: type: file - description: File containing software versions - pattern: "versions.yml" - + description: Predicted karyotype information + pattern: "predicted_karyotype.txt" + - winstats: + type: directory + description: Directory containing window statistics + pattern: "windows_stats" + - versions_spectre: + type: string + description: Version information for Spectre authors: - - "@your_github_username" + - "@nmahfel" maintainers: - - "@your_github_username" + - "@nmahfel" diff --git a/modules/local/spectre/cnvcaller/tests/main.nf.test b/modules/local/spectre/cnvcaller/tests/main.nf.test new file mode 100755 index 0000000..6f643ab --- /dev/null +++ b/modules/local/spectre/cnvcaller/tests/main.nf.test @@ -0,0 +1,101 @@ +nextflow_process { + + name "Test Process SPECTRE_CNVCALLER" + script "../main.nf" + process "SPECTRE_CNVCALLER" + config "./nextflow.config" + + tag "modules" + tag "modules_local" + tag "spectre" + tag "spectre/cnvcaller" + + test("Run SPECTRE CNV with real data") { + when { + process { + """ + input[0] = Channel.of([ + [ id:'test_sample'], + file('https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/spectre/test.mosdepth.summary.txt', checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/spectre/test.regions.bed.gz', checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/spectre/test.regions.bed.gz.csi', checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/spectre/test_clair3.vcf.gz', checkIfExists: true) + ]) + + input[1] = Channel.of([ + [ id:'reference' ], + file('s3://ngi-igenomes/igenomes/Homo_sapiens/NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa', checkIfExists: true) + ]) + + input[2] = params.spectre_metadata + + input[3] = params.spectre_blacklist + + input[4] = 1000 + """ + } + } + then { + assertAll( + { assert process.success }, + // Check VCF output + { assert process.out.vcf.size() > 0 }, + { assert process.out.vcf.get(0).get(1).toString().endsWith("vcf") }, + // Check BED output + { assert process.out.bed.size() > 0 }, + { assert process.out.bed.get(0).get(1).toString().endsWith("bed") }, + // Check SPC output + { assert process.out.spc.size() > 0 }, + { assert process.out.spc.get(0).get(1).toString().endsWith("spc.gz") }, + // Check winstats directory + { assert process.out.winstats.size() > 0 }, + // Check version + { assert process.out.versions_spectre.get(0).get(0) == "SPECTRE_CNVCALLER" }, + { assert process.out.versions_spectre.get(0).get(1) == "spectre" }, + { assert process.out.versions_spectre.get(0).get(2) == "0.3.2" } + ) + } + } + + test("Run SPECTRE CNV minimal test - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test_sample'], + file('test.mosdepth.summary.txt'), + file('test.regions.bed.gz'), + file('test.regions.bed.gz.csi'), + file('test_snv.vcf.gz') + ]) + + input[1] = Channel.of([ + [ id:'reference' ], + file('genome.fa') + ]) + + input[2] = file('metadata.txt') + + input[3] = file('blacklist.bed') + + input[4] = 1000 + """ + } + } + + then { + assertAll( + { assert process.success }, + // Check stub outputs exist + { assert process.out.vcf.size() > 0 }, + { assert process.out.bed.size() > 0 }, + { assert process.out.spc.size() > 0 }, + { assert process.out.txt.size() > 0 }, + { assert process.out.winstats.size() > 0 } + ) + } + } +} diff --git a/modules/local/spectre/cnvcaller/tests/nextflow.config b/modules/local/spectre/cnvcaller/tests/nextflow.config new file mode 100755 index 0000000..4bbfb3f --- /dev/null +++ b/modules/local/spectre/cnvcaller/tests/nextflow.config @@ -0,0 +1,15 @@ +params { + spectre_metadata = "https://raw.githubusercontent.com/nanoporetech/ont-spectre/master/spectre/data/hg38_metadata.mdr" + spectre_blacklist = "https://raw.githubusercontent.com/nanoporetech/ont-spectre/master/spectre/data/hg38_blacklist_v1.0.bed" +} + +docker { + enabled = true + runOptions = '-u $(id -u):$(id -g)' +} + +process { +withName: 'SPECTRE_CNVCALLER' { + ext.args = {"--sample-id=${meta.id}"} + } +} diff --git a/modules/local/svim/alignment/tests/.nf-test.log b/modules/local/svim/alignment/tests/.nf-test.log deleted file mode 100755 index 5da9364..0000000 --- a/modules/local/svim/alignment/tests/.nf-test.log +++ /dev/null @@ -1,8 +0,0 @@ -Mar-12 11:35:06.586 [main] INFO com.askimed.nf.test.App - nf-test 0.9.4 -Mar-12 11:35:06.599 [main] INFO com.askimed.nf.test.App - Arguments: [test, svim/alignment] -Mar-12 11:35:07.377 [main] INFO com.askimed.nf.test.App - Nextflow Version: 25.04.6 -Mar-12 11:35:07.381 [main] WARN com.askimed.nf.test.commands.RunTestsCommand - No nf-test config file found. -Mar-12 11:35:07.387 [main] INFO com.askimed.nf.test.lang.dependencies.DependencyResolver - Loaded 2 files from directory /home/nmahfel/modules/modules/nf-core/svim/alignment/tests in 0.005 sec -Mar-12 11:35:07.388 [main] INFO com.askimed.nf.test.lang.dependencies.DependencyResolver - Found 0 files containing tests. -Mar-12 11:35:07.389 [main] DEBUG com.askimed.nf.test.lang.dependencies.DependencyResolver - Found files: [] -Mar-12 11:35:07.390 [main] INFO com.askimed.nf.test.commands.RunTestsCommand - Found 0 tests to execute. diff --git a/modules/local/svim/alignment/environment.yml b/modules/nf-core/svim/alignment/environment.yml similarity index 100% rename from modules/local/svim/alignment/environment.yml rename to modules/nf-core/svim/alignment/environment.yml diff --git a/modules/local/svim/alignment/main.nf b/modules/nf-core/svim/alignment/main.nf similarity index 100% rename from modules/local/svim/alignment/main.nf rename to modules/nf-core/svim/alignment/main.nf diff --git a/modules/local/svim/alignment/meta.yml b/modules/nf-core/svim/alignment/meta.yml similarity index 100% rename from modules/local/svim/alignment/meta.yml rename to modules/nf-core/svim/alignment/meta.yml diff --git a/modules/local/svim/alignment/tests/main.nf.test b/modules/nf-core/svim/alignment/tests/main.nf.test similarity index 99% rename from modules/local/svim/alignment/tests/main.nf.test rename to modules/nf-core/svim/alignment/tests/main.nf.test index 43ff907..24fb49d 100755 --- a/modules/local/svim/alignment/tests/main.nf.test +++ b/modules/nf-core/svim/alignment/tests/main.nf.test @@ -42,7 +42,7 @@ nextflow_process { ).match() }, { assert snapshot(process.out.versions).match("versions") } ) - } + } } diff --git a/modules/local/svim/alignment/tests/main.nf.test.snap b/modules/nf-core/svim/alignment/tests/main.nf.test.snap similarity index 96% rename from modules/local/svim/alignment/tests/main.nf.test.snap rename to modules/nf-core/svim/alignment/tests/main.nf.test.snap index 13bd51b..022f290 100755 --- a/modules/local/svim/alignment/tests/main.nf.test.snap +++ b/modules/nf-core/svim/alignment/tests/main.nf.test.snap @@ -37,7 +37,7 @@ "timestamp": "2026-03-12T11:57:34.244109114", "meta": { "nf-test": "0.9.4", - "nextflow": "25.04.6" + "nextflow": "25.10.4" } }, "versions": { @@ -45,7 +45,7 @@ "timestamp": "2026-03-12T10:26:34.291718026", "meta": { "nf-test": "0.9.4", - "nextflow": "25.04.6" + "nextflow": "25.10.4" } }, "homo_sapiens - [bam, bai], fasta - vcf": { @@ -78,7 +78,7 @@ "timestamp": "2026-03-12T09:14:54.283504851", "meta": { "nf-test": "0.9.4", - "nextflow": "25.04.6" + "nextflow": "25.10.4" } } -} +} \ No newline at end of file diff --git a/modules/local/svim/alignment/tests/nextflow.config b/modules/nf-core/svim/alignment/tests/nextflow.config old mode 100755 new mode 100644 similarity index 100% rename from modules/local/svim/alignment/tests/nextflow.config rename to modules/nf-core/svim/alignment/tests/nextflow.config diff --git a/subworkflows/local/call_sv/main.nf b/subworkflows/local/call_sv/main.nf index a7fe6ce..6838665 100644 --- a/subworkflows/local/call_sv/main.nf +++ b/subworkflows/local/call_sv/main.nf @@ -3,7 +3,7 @@ include { SNIFFLES } from '../../../modules/nf include { GUNZIP as GUNZIP_SNIFFLES_PLOT } from '../../../modules/nf-core/gunzip/main.nf' include { SNIFFLES_GENERATE_PLOTS } from '../../../modules/local/sniffles/generate_plots/main.nf' // Run svim SV calling -include { SVIM_ALIGNMENT } from '../../../modules/local/svim/alignment/main.nf' +include { SVIM_ALIGNMENT } from '../../../modules/nf-core/svim/alignment/main.nf' include { BCFTOOLS_SORT as BCFTOOLS_SORT_SVIM } from '../../../modules/nf-core/bcftools/sort/main.nf' // Run cutesv SV calling include { CUTESV } from '../../../modules/nf-core/cutesv/main.nf' From c8e173f01e5d98af29151c5b99d29ecbee3c007a Mon Sep 17 00:00:00 2001 From: nourmahfel Date: Mon, 23 Mar 2026 14:14:22 +0000 Subject: [PATCH 2/4] Add tests --- conf/modules.config | 2 +- fix_editorconfig.py | 2 +- modules/local/spectre/cnvcaller/main.nf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 1b52781..a8f32e6 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -65,7 +65,7 @@ process { path: { "${params.outdir}/${meta.id}/filtered_bam" }, mode: 'copy' ] - cpus = 4 + cpus = 4 } diff --git a/fix_editorconfig.py b/fix_editorconfig.py index 2fbcf9f..55eb095 100755 --- a/fix_editorconfig.py +++ b/fix_editorconfig.py @@ -100,7 +100,7 @@ def fix_nextflow_formatting(filepath): 'assets/snpeff_db.txt', 'nextflow.config', 'conf/modules.config', - 'modules/local/svim/alignment/tests/main.nf.test', + 'modules/local/spectre/cnvcaller/main.nf', 'subworkflows/local/call_str/tests/main.nf.test', 'subworkflows/local/annotate_sv/main.nf', 'subworkflows/local/align/main.nf', diff --git a/modules/local/spectre/cnvcaller/main.nf b/modules/local/spectre/cnvcaller/main.nf index 334e45f..e38404d 100755 --- a/modules/local/spectre/cnvcaller/main.nf +++ b/modules/local/spectre/cnvcaller/main.nf @@ -3,7 +3,7 @@ process SPECTRE_CNVCALLER { label 'process_high' // FIXME Conda is not supported at the moment - + container "community.wave.seqera.io/library/ont-spectre:0.3.2--adfae189059be3d9" input: From 69931d41dd03a3d5a6cb11d4ba4c7deafa1b97b0 Mon Sep 17 00:00:00 2001 From: nourmahfel Date: Mon, 23 Mar 2026 14:25:34 +0000 Subject: [PATCH 3/4] Add tests --- conf/modules.config | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index a8f32e6..7483f56 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -483,23 +483,18 @@ process { ] def model_type = model_types[params.sequencing_platform] ?: 'ONT_R104' - def args_list = [ + def regions_arg = "" + if (params.deepvariant_regions) { + regions_arg = "--regions=${params.deepvariant_regions}" + } + + return [ "--model_type=${model_type}", "--sample_name=${meta.id}", - params.deepvariant_regions ? "--regions=${params.deepvariant_regions}" : "", + regions_arg, "--make_examples_extra_args=${params.deepvariant_make_examples_extra_args}" - ] - - return args_list.findAll { it }.join(' ').trim() + ].findAll { it }.join(' ').trim() } - - ext.prefix = { "${meta.id}_deepvariant" } - - publishDir = [ - path: { "${params.outdir}/${meta.id}/deepvariant" }, - mode: 'copy' - ] - } withName: 'DEEPVARIANT_VCFSTATSREPORT'{ From d603bf312611311d725963f615b75313b18ab1ee Mon Sep 17 00:00:00 2001 From: nourmahfel Date: Mon, 23 Mar 2026 14:30:25 +0000 Subject: [PATCH 4/4] Add tests --- conf/test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/test.config b/conf/test.config index ede3268..a8801fe 100644 --- a/conf/test.config +++ b/conf/test.config @@ -52,7 +52,7 @@ params { // ======================================== // MAIN ANALYSIS TOGGLES // ======================================== - input = "/home/nmahfel/nf-training/test_data_ubams/samplesheet_ubam.csv" + input = "https://raw.githubusercontent.com/nf-core/test-datasets/longraredisease/samplesheet_ubam.csv" input_type = 'ubam' // Skip alignment step if input BAM/CRAM files are already aligned sequencing_platform = 'ont' // Sequencing platform (e.g. 'ont', 'hifi', 'pacbio'). You can also define the parameters through the minimap2_model or winnowmap_model minimap2_model = null