From 2c9e2f5e73e5a802a6cfca6d72e51f297a372fb1 Mon Sep 17 00:00:00 2001 From: Rike Date: Fri, 3 Jun 2022 10:52:50 +0200 Subject: [PATCH 1/7] Update TIDDIT to 3.0.0 --- modules/tiddit/sv/main.nf | 13 ++++++++----- tests/modules/tiddit/sv/main.nf | 27 +++++++++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index b3e3813c..cff3dbfb 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -2,15 +2,16 @@ process TIDDIT_SV { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::tiddit=2.12.1" : null) + conda (params.enable_conda ? "bioconda::tiddit=3.0.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tiddit:2.12.1--py38h1773678_0' : - 'quay.io/biocontainers/tiddit:2.12.1--py38h1773678_0' }" + 'https://depot.galaxyproject.org/singularity/tiddit:3.0.0--py39h59fae87_1' : + 'quay.io/biocontainers/tiddit:3.0.0--py39h59fae87_1' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(input) path fasta path fai + path bwa_index output: tuple val(meta), path("*.vcf") , emit: vcf @@ -26,10 +27,12 @@ process TIDDIT_SV { def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--ref $fasta" : "" """ + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + tiddit \\ --sv \\ $args \\ - --bam $bam \\ + --bam $input \\ $reference \\ -o $prefix diff --git a/tests/modules/tiddit/sv/main.nf b/tests/modules/tiddit/sv/main.nf index 8dae4950..72113427 100644 --- a/tests/modules/tiddit/sv/main.nf +++ b/tests/modules/tiddit/sv/main.nf @@ -2,25 +2,40 @@ nextflow.enable.dsl = 2 +include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' include { TIDDIT_SV } from '../../../../modules/tiddit/sv/main.nf' workflow test_tiddit_sv { - input = [ + input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] ] - + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - TIDDIT_SV ( input, fasta, fai ) + BWA_INDEX( fasta ) + + TIDDIT_SV ( input, fasta, fai , BWA_INDEX.out.index) } workflow test_tiddit_sv_no_ref { - input = [ + input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] ] TIDDIT_SV ( input, [], [] ) } + +workflow test_tiddit_sv_cram { + input = [ + [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + TIDDIT_SV ( input, fasta, fai ) +} From 40996cdbe1874f9c2ba693fee76d2b4f316f95f2 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Fri, 3 Jun 2022 12:07:16 +0200 Subject: [PATCH 2/7] update tiddit/cov + more tests --- modules/tiddit/cov/main.nf | 16 +++++------ modules/tiddit/cov/meta.yml | 2 +- tests/modules/tiddit/cov/main.nf | 35 ++++++++++++++++++------ tests/modules/tiddit/cov/nextflow.config | 4 +++ tests/modules/tiddit/cov/test.yml | 34 +++++++++++++++++------ 5 files changed, 66 insertions(+), 25 deletions(-) diff --git a/modules/tiddit/cov/main.nf b/modules/tiddit/cov/main.nf index 578c4043..4d7e2827 100644 --- a/modules/tiddit/cov/main.nf +++ b/modules/tiddit/cov/main.nf @@ -2,17 +2,17 @@ process TIDDIT_COV { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::tiddit=2.12.1" : null) + conda (params.enable_conda ? "bioconda::tiddit=3.0.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tiddit:2.12.1--py38h1773678_0' : - 'quay.io/biocontainers/tiddit:2.12.1--py38h1773678_0' }" + 'https://depot.galaxyproject.org/singularity/tiddit:3.0.0--py39h59fae87_1' : + 'quay.io/biocontainers/tiddit:3.0.0--py39h59fae87_1' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(input) path fasta output: - tuple val(meta), path("*.tab"), optional: true, emit: cov + tuple val(meta), path("*.bed"), optional: true, emit: cov tuple val(meta), path("*.wig"), optional: true, emit: wig path "versions.yml" , emit: versions @@ -28,12 +28,12 @@ process TIDDIT_COV { --cov \\ -o $prefix \\ $args \\ - --bam $bam \\ + --bam $input \\ $reference cat <<-END_VERSIONS > versions.yml "${task.process}": - tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') + tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*tiddit-//; s/ .*\$//') END_VERSIONS """ @@ -45,7 +45,7 @@ process TIDDIT_COV { cat <<-END_VERSIONS > versions.yml "${task.process}": - tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') + tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*tiddit-//; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/tiddit/cov/meta.yml b/modules/tiddit/cov/meta.yml index d925b783..98ea27c2 100644 --- a/modules/tiddit/cov/meta.yml +++ b/modules/tiddit/cov/meta.yml @@ -19,7 +19,7 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bam: + - input: type: file description: BAM/CRAM file pattern: "*.{bam,cram}" diff --git a/tests/modules/tiddit/cov/main.nf b/tests/modules/tiddit/cov/main.nf index 1bb35145..0032c759 100644 --- a/tests/modules/tiddit/cov/main.nf +++ b/tests/modules/tiddit/cov/main.nf @@ -2,22 +2,41 @@ nextflow.enable.dsl = 2 -include { TIDDIT_COV } from '../../../../modules/tiddit/cov/main.nf' +include { TIDDIT_COV as TIDDIT_COV_BED } from '../../../../modules/tiddit/cov/main.nf' +include { TIDDIT_COV as TIDDIT_COV_WIG } from '../../../../modules/tiddit/cov/main.nf' -workflow test_tiddit_cov { +workflow test_tiddit_cov_cram_bed { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - TIDDIT_COV ( input, fasta ) + TIDDIT_COV_BED ( input, fasta ) } -workflow test_tiddit_cov_no_ref { +workflow test_tiddit_cov_bam_bed { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - TIDDIT_COV ( input, [] ) + TIDDIT_COV_BED ( input, [] ) +} + +workflow test_tiddit_cov_cram_wig { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + TIDDIT_COV_WIG ( input, fasta ) +} + +workflow test_tiddit_cov_bam_wig { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + + TIDDIT_COV_WIG ( input, [] ) } diff --git a/tests/modules/tiddit/cov/nextflow.config b/tests/modules/tiddit/cov/nextflow.config index 8730f1c4..e185a5cf 100644 --- a/tests/modules/tiddit/cov/nextflow.config +++ b/tests/modules/tiddit/cov/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: TIDDIT_COV_WIG { + ext.args = '-w' + } + } diff --git a/tests/modules/tiddit/cov/test.yml b/tests/modules/tiddit/cov/test.yml index 90c4cbb3..916cc9e3 100644 --- a/tests/modules/tiddit/cov/test.yml +++ b/tests/modules/tiddit/cov/test.yml @@ -1,17 +1,35 @@ -- name: tiddit cov test_tiddit_cov - command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config +- name: tiddit cov test_tiddit_cov_cram_bed + command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_cram_bed -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config tags: - tiddit - tiddit/cov files: - - path: output/tiddit/test.tab - md5sum: f7974948f809f94879d8a60b726194f5 + - path: output/tiddit/test.bed + md5sum: 3b1a28c62a5f25bbba77c1042e9abdf7 -- name: tiddit cov test_tiddit_cov_no_ref - command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config +- name: tiddit cov test_tiddit_cov_bam_bed + command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_bam_bed -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config tags: - tiddit - tiddit/cov files: - - path: output/tiddit/test.tab - md5sum: f7974948f809f94879d8a60b726194f5 + - path: output/tiddit/test.bed + md5sum: 9d1474f1c7c6516205254077087bb026 + +- name: tiddit cov test_tiddit_cov_cram_wig + command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_cram_wig -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config + tags: + - tiddit + - tiddit/cov + files: + - path: output/tiddit/test.wig + md5sum: ca3645fd0c3491c86c075c91d16d57c4 + +- name: tiddit cov test_tiddit_cov_bam_wig + command: nextflow run ./tests/modules/tiddit/cov -entry test_tiddit_cov_bam_wig -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/cov/nextflow.config + tags: + - tiddit + - tiddit/cov + files: + - path: output/tiddit/test.wig + md5sum: 44bea2ac6a56774738e65773065da670 From f1a5cc07dbcf173654c793ac4eb63e3fb83281ab Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Fri, 3 Jun 2022 13:00:29 +0200 Subject: [PATCH 3/7] restructure tiddit/sv + test (just one for now) --- modules/tiddit/sv/main.nf | 19 +++++++++++-------- tests/modules/tiddit/sv/main.nf | 26 +++----------------------- tests/modules/tiddit/sv/test.yml | 25 +++++-------------------- 3 files changed, 19 insertions(+), 51 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index cff3dbfb..d0d5362e 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -8,16 +8,15 @@ process TIDDIT_SV { 'quay.io/biocontainers/tiddit:3.0.0--py39h59fae87_1' }" input: - tuple val(meta), path(input) + tuple val(meta), path(input), path(index) path fasta path fai path bwa_index output: - tuple val(meta), path("*.vcf") , emit: vcf - tuple val(meta), path("*.ploidy.tab") , emit: ploidy - tuple val(meta), path("*.signals.tab"), emit: signals - path "versions.yml" , emit: versions + tuple val(meta), path("*.vcf") , emit: vcf + tuple val(meta), path("*.ploidies.tab"), emit: ploidy + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -27,7 +26,11 @@ process TIDDIT_SV { def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--ref $fasta" : "" """ - INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + for i in `ls ${bwa_index}` + do + ln -s ${bwa_index}/\$i ${fasta}.\${i##*.} + done + tiddit \\ --sv \\ @@ -38,7 +41,7 @@ process TIDDIT_SV { cat <<-END_VERSIONS > versions.yml "${task.process}": - tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') + tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*tiddit-//; s/ .*\$//') END_VERSIONS """ @@ -51,7 +54,7 @@ process TIDDIT_SV { cat <<-END_VERSIONS > versions.yml "${task.process}": - tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//') + tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*tiddit-//; s/ .*\$//') END_VERSIONS """ } diff --git a/tests/modules/tiddit/sv/main.nf b/tests/modules/tiddit/sv/main.nf index 72113427..2c09404e 100644 --- a/tests/modules/tiddit/sv/main.nf +++ b/tests/modules/tiddit/sv/main.nf @@ -5,10 +5,11 @@ nextflow.enable.dsl = 2 include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' include { TIDDIT_SV } from '../../../../modules/tiddit/sv/main.nf' -workflow test_tiddit_sv { +workflow test_tiddit_sv_bam { input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ], + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) @@ -18,24 +19,3 @@ workflow test_tiddit_sv { TIDDIT_SV ( input, fasta, fai , BWA_INDEX.out.index) } - -workflow test_tiddit_sv_no_ref { - input = [ - [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - ] - - TIDDIT_SV ( input, [], [] ) -} - -workflow test_tiddit_sv_cram { - input = [ - [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ] - ] - - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - - TIDDIT_SV ( input, fasta, fai ) -} diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index 40ea5b4d..732b8434 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -1,25 +1,10 @@ -- name: tiddit sv - command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config +- name: tiddit sv test_tiddit_sv_bam + command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_bam -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config tags: - tiddit - tiddit/sv files: - - path: output/tiddit/test.ploidy.tab - md5sum: 45e050b0e204f0a5a3a99627cc440eaa - - path: output/tiddit/test.signals.tab - md5sum: dab4b2fec4ddf8eb1c23005b0770150e + - path: output/tiddit/test.ploidies.tab + md5sum: 6319d3611f7b6b94425a184d274b3dfc - path: output/tiddit/test.vcf - md5sum: bdce14ae8292bf3deb81f6f255baf859 - -- name: tiddit sv no ref - command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config - tags: - - tiddit - - tiddit/sv - files: - - path: output/tiddit/test.ploidy.tab - md5sum: 45e050b0e204f0a5a3a99627cc440eaa - - path: output/tiddit/test.signals.tab - md5sum: dab4b2fec4ddf8eb1c23005b0770150e - - path: output/tiddit/test.vcf - md5sum: 3d0e83a8199b2bdb81cfe3e6b12bf64b + md5sum: 41d3f8746f0420f894104321b7e64f67 From f9ac4e28e99d3fdd499d15bfb82ec529f35aacb4 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Fri, 3 Jun 2022 15:37:10 +0200 Subject: [PATCH 4/7] cover all use cases --- modules/tiddit/sv/main.nf | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index d0d5362e..712f364b 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -26,11 +26,7 @@ process TIDDIT_SV { def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--ref $fasta" : "" """ - for i in `ls ${bwa_index}` - do - ln -s ${bwa_index}/\$i ${fasta}.\${i##*.} - done - + [[ -d $bwa_index ]] && for i in `ls $bwa_index`; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s $bwa_index/\$i ${fasta}.\${i##*.} || ln -s $bwa_index/\$i \$i; done tiddit \\ --sv \\ From 97e66015caec35f7fd6d095b9fc797549fee9efc Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Fri, 3 Jun 2022 15:51:02 +0200 Subject: [PATCH 5/7] add test + fix issues --- modules/tiddit/sv/main.nf | 7 ++----- modules/tiddit/sv/meta.yml | 20 ++++++++++++-------- tests/modules/tiddit/sv/main.nf | 17 +++++++++++++++-- tests/modules/tiddit/sv/test.yml | 11 +++++++++++ 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 712f364b..ee2a8d75 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -10,7 +10,6 @@ process TIDDIT_SV { input: tuple val(meta), path(input), path(index) path fasta - path fai path bwa_index output: @@ -24,7 +23,6 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta ? "--ref $fasta" : "" """ [[ -d $bwa_index ]] && for i in `ls $bwa_index`; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s $bwa_index/\$i ${fasta}.\${i##*.} || ln -s $bwa_index/\$i \$i; done @@ -32,7 +30,7 @@ process TIDDIT_SV { --sv \\ $args \\ --bam $input \\ - $reference \\ + --ref $fasta \\ -o $prefix cat <<-END_VERSIONS > versions.yml @@ -45,8 +43,7 @@ process TIDDIT_SV { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.vcf - touch ${prefix}.ploidy.tab - touch ${prefix}.signals.tab + touch ${prefix}.ploidies.tab cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/tiddit/sv/meta.yml b/modules/tiddit/sv/meta.yml index fc307081..8b41c69c 100644 --- a/modules/tiddit/sv/meta.yml +++ b/modules/tiddit/sv/meta.yml @@ -17,14 +17,22 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - index: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" - fasta: type: file description: Input FASTA file pattern: "*.{fasta,fa}" - - fai: + - bwa_index: type: file - description: FASTA index file - pattern: "*.{fai}" + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" output: - meta: type: map @@ -38,11 +46,7 @@ output: - ploidy: type: file description: tab - pattern: "*.{ploidy.tab}" - - signals: - type: file - description: tab - pattern: "*.{signals.tab}" + pattern: "*.{ploidies.tab}" - versions: type: file description: File containing software versions diff --git a/tests/modules/tiddit/sv/main.nf b/tests/modules/tiddit/sv/main.nf index 2c09404e..c9dbf4ea 100644 --- a/tests/modules/tiddit/sv/main.nf +++ b/tests/modules/tiddit/sv/main.nf @@ -13,9 +13,22 @@ workflow test_tiddit_sv_bam { ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) BWA_INDEX( fasta ) - TIDDIT_SV ( input, fasta, fai , BWA_INDEX.out.index) + TIDDIT_SV ( input, fasta, BWA_INDEX.out.index) +} + +workflow test_tiddit_sv_cram { + input = [ + [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) ], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true) ] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX( fasta ) + + TIDDIT_SV ( input, fasta, BWA_INDEX.out.index) } diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index 732b8434..557a0913 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -8,3 +8,14 @@ md5sum: 6319d3611f7b6b94425a184d274b3dfc - path: output/tiddit/test.vcf md5sum: 41d3f8746f0420f894104321b7e64f67 + +- name: tiddit sv test_tiddit_sv_cram + command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_cram -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config + tags: + - tiddit + - tiddit/sv + files: + - path: output/tiddit/test.ploidies.tab + md5sum: f1162a940ddc8b963f6e0e506bb5c136 + - path: output/tiddit/test.vcf + md5sum: 34db59578991285d6b62dc1500272fca From 4935bb98cbc05472da3e89a0b0f04423a105f94f Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Wed, 8 Jun 2022 11:38:02 +0200 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Mahesh Binzer-Panchal --- modules/tiddit/sv/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index ee2a8d75..ec4affe3 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -8,7 +8,7 @@ process TIDDIT_SV { 'quay.io/biocontainers/tiddit:3.0.0--py39h59fae87_1' }" input: - tuple val(meta), path(input), path(index) + tuple val(meta), path(input), path(input_index) path fasta path bwa_index @@ -24,7 +24,7 @@ process TIDDIT_SV { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - [[ -d $bwa_index ]] && for i in `ls $bwa_index`; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s $bwa_index/\$i ${fasta}.\${i##*.} || ln -s $bwa_index/\$i \$i; done + [[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s $bwa_index/\$i ${fasta}.\${i##*.} || ln -s $bwa_index/\$i \$i; done tiddit \\ --sv \\ From 07eff4346f3ccf0990dd785f95a02059d18a3b64 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Wed, 8 Jun 2022 11:46:45 +0200 Subject: [PATCH 7/7] fix path to symbolic links --- modules/tiddit/sv/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index ec4affe3..275ceb3f 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -24,7 +24,7 @@ process TIDDIT_SV { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - [[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s $bwa_index/\$i ${fasta}.\${i##*.} || ln -s $bwa_index/\$i \$i; done + [[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s \$i ${fasta}.\${i##*.} || ln -s \$i .; done tiddit \\ --sv \\