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 ) +}