mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00: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:
|
||||
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}":
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue