mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-03 04:52:09 -05:00
add test + fix issues
This commit is contained in:
parent
f9ac4e28e9
commit
97e66015ca
4 changed files with 40 additions and 15 deletions
|
@ -10,7 +10,6 @@ process TIDDIT_SV {
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(input), path(index)
|
tuple val(meta), path(input), path(index)
|
||||||
path fasta
|
path fasta
|
||||||
path fai
|
|
||||||
path bwa_index
|
path bwa_index
|
||||||
|
|
||||||
output:
|
output:
|
||||||
|
@ -24,7 +23,6 @@ process TIDDIT_SV {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
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
|
[[ -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 \\
|
--sv \\
|
||||||
$args \\
|
$args \\
|
||||||
--bam $input \\
|
--bam $input \\
|
||||||
$reference \\
|
--ref $fasta \\
|
||||||
-o $prefix
|
-o $prefix
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
@ -45,8 +43,7 @@ process TIDDIT_SV {
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
"""
|
"""
|
||||||
touch ${prefix}.vcf
|
touch ${prefix}.vcf
|
||||||
touch ${prefix}.ploidy.tab
|
touch ${prefix}.ploidies.tab
|
||||||
touch ${prefix}.signals.tab
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
|
|
|
@ -17,14 +17,22 @@ input:
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
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:
|
- fasta:
|
||||||
type: file
|
type: file
|
||||||
description: Input FASTA file
|
description: Input FASTA file
|
||||||
pattern: "*.{fasta,fa}"
|
pattern: "*.{fasta,fa}"
|
||||||
- fai:
|
- bwa_index:
|
||||||
type: file
|
type: file
|
||||||
description: FASTA index file
|
description: BWA genome index files
|
||||||
pattern: "*.{fai}"
|
pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}"
|
||||||
output:
|
output:
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
|
@ -38,11 +46,7 @@ output:
|
||||||
- ploidy:
|
- ploidy:
|
||||||
type: file
|
type: file
|
||||||
description: tab
|
description: tab
|
||||||
pattern: "*.{ploidy.tab}"
|
pattern: "*.{ploidies.tab}"
|
||||||
- signals:
|
|
||||||
type: file
|
|
||||||
description: tab
|
|
||||||
pattern: "*.{signals.tab}"
|
|
||||||
- versions:
|
- versions:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software versions
|
description: File containing software versions
|
||||||
|
|
|
@ -13,9 +13,22 @@ workflow test_tiddit_sv_bam {
|
||||||
]
|
]
|
||||||
|
|
||||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], 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)
|
|
||||||
|
|
||||||
BWA_INDEX( fasta )
|
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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,3 +8,14 @@
|
||||||
md5sum: 6319d3611f7b6b94425a184d274b3dfc
|
md5sum: 6319d3611f7b6b94425a184d274b3dfc
|
||||||
- path: output/tiddit/test.vcf
|
- path: output/tiddit/test.vcf
|
||||||
md5sum: 41d3f8746f0420f894104321b7e64f67
|
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
|
||||||
|
|
Loading…
Reference in a new issue