From 680b6c5b0433ff31d162b5ef3cc098745609c14a Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Mon, 13 Jun 2022 16:24:34 +0200 Subject: [PATCH 1/2] Update tiddit to 3.1.0 (#1767) * update TIDDIT to 3.1.0 * update VCF too as version is in file --- modules/tiddit/sv/main.nf | 6 +++--- tests/modules/tiddit/sv/test.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 275ceb3f..2622963c 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -2,10 +2,10 @@ process TIDDIT_SV { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::tiddit=3.0.0" : null) + conda (params.enable_conda ? "bioconda::tiddit=3.1.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/tiddit:3.0.0--py39h59fae87_1' : - 'quay.io/biocontainers/tiddit:3.0.0--py39h59fae87_1' }" + 'https://depot.galaxyproject.org/singularity/tiddit:3.1.0--py39h59fae87_1' : + 'quay.io/biocontainers/tiddit:3.1.0--py39h59fae87_1' }" input: tuple val(meta), path(input), path(input_index) diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index 557a0913..dbc8e353 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -7,7 +7,7 @@ - path: output/tiddit/test.ploidies.tab md5sum: 6319d3611f7b6b94425a184d274b3dfc - path: output/tiddit/test.vcf - md5sum: 41d3f8746f0420f894104321b7e64f67 + md5sum: 157907671297c34bacfd3e73eff9bbdf - 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 @@ -18,4 +18,4 @@ - path: output/tiddit/test.ploidies.tab md5sum: f1162a940ddc8b963f6e0e506bb5c136 - path: output/tiddit/test.vcf - md5sum: 34db59578991285d6b62dc1500272fca + md5sum: 56687eeffa452f78f18d54a69dd17c78 From b689b8ed88a9f89eb2f7c75d3eb0bace77ade109 Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Mon, 13 Jun 2022 17:02:59 +0200 Subject: [PATCH 2/2] TIDDIT - add --skip_assembly when no bwa specified (#1769) add --skip_assembly when no bwa specified --- modules/tiddit/sv/main.nf | 4 +++- tests/modules/tiddit/sv/main.nf | 29 +++++++++++++++++++++++-- tests/modules/tiddit/sv/nextflow.config | 4 ++++ tests/modules/tiddit/sv/test.yml | 22 +++++++++++++++++++ 4 files changed, 56 insertions(+), 3 deletions(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 2622963c..2e876ef1 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -23,8 +23,10 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def bwa_command = bwa_index ? "[[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! \"\$i\" =~ .*\"$fasta\".* ]] && ln -s \$i ${fasta}.\${i##*.} || ln -s \$i .; done" : "" + """ - [[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! "\$i" =~ .*"$fasta".* ]] && ln -s \$i ${fasta}.\${i##*.} || ln -s \$i .; done + $bwa_command tiddit \\ --sv \\ diff --git a/tests/modules/tiddit/sv/main.nf b/tests/modules/tiddit/sv/main.nf index c9dbf4ea..2f944129 100644 --- a/tests/modules/tiddit/sv/main.nf +++ b/tests/modules/tiddit/sv/main.nf @@ -2,8 +2,9 @@ nextflow.enable.dsl = 2 -include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' -include { TIDDIT_SV } from '../../../../modules/tiddit/sv/main.nf' +include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' +include { TIDDIT_SV } from '../../../../modules/tiddit/sv/main.nf' +include { TIDDIT_SV as TIDDIT_SV_NOBWA } from '../../../../modules/tiddit/sv/main.nf' workflow test_tiddit_sv_bam { input = [ @@ -32,3 +33,27 @@ workflow test_tiddit_sv_cram { TIDDIT_SV ( input, fasta, BWA_INDEX.out.index) } + +workflow test_tiddit_sv_nobwa_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_bai'], checkIfExists: true) ] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + TIDDIT_SV_NOBWA ( input, fasta, []) +} + +workflow test_tiddit_sv_nobwa_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) + + TIDDIT_SV_NOBWA ( input, fasta, []) +} diff --git a/tests/modules/tiddit/sv/nextflow.config b/tests/modules/tiddit/sv/nextflow.config index 8730f1c4..d9a85fd3 100644 --- a/tests/modules/tiddit/sv/nextflow.config +++ b/tests/modules/tiddit/sv/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: TIDDIT_SV_NOBWA { + ext.args = '--skip_assembly' + } + } diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index dbc8e353..5bbfe4ae 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -19,3 +19,25 @@ md5sum: f1162a940ddc8b963f6e0e506bb5c136 - path: output/tiddit/test.vcf md5sum: 56687eeffa452f78f18d54a69dd17c78 + +- name: tiddit sv test_tiddit_sv_nobwa_bam + command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_nobwa_bam -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config + tags: + - tiddit + - tiddit/sv + files: + - path: output/tiddit/test.ploidies.tab + md5sum: 6319d3611f7b6b94425a184d274b3dfc + - path: output/tiddit/test.vcf + md5sum: ddac94f9cd4f991b6ce2052d7f78a525 + +- name: tiddit sv test_tiddit_sv_nobwa_cram + command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_nobwa_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: 680e60574cc28d38c9673a916ecd675c