diff --git a/software/bwameth/align/main.nf b/software/bwameth/align/main.nf index cdfb48b7..14ac1b0b 100644 --- a/software/bwameth/align/main.nf +++ b/software/bwameth/align/main.nf @@ -31,11 +31,13 @@ process BWAMETH_ALIGN { def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" def read_group = meta.read_group ? "-R ${meta.read_group}" : "" """ + INDEX=`find -L ./ -name "*bwameth.c2t" | sed 's/.bwameth.c2t//'` + bwameth.py \\ $options.args \\ $read_group \\ -t $task.cpus \\ - --reference ${index}/genome.fa \\ + --reference \$INDEX \\ $reads \\ | samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam - diff --git a/software/bwameth/align/meta.yml b/software/bwameth/align/meta.yml index d5234f4d..9d46e4cc 100644 --- a/software/bwameth/align/meta.yml +++ b/software/bwameth/align/meta.yml @@ -54,9 +54,6 @@ input: - index: type: dir description: Directory containing bwameth genome index - - fasta: - type: file - description: Input genome fasta file output: - meta: type: map diff --git a/software/bwameth/index/main.nf b/software/bwameth/index/main.nf index a5587371..1468e15c 100644 --- a/software/bwameth/index/main.nf +++ b/software/bwameth/index/main.nf @@ -19,10 +19,10 @@ process BWAMETH_INDEX { } input: - path fasta, stageAs: "index/genome.fa" + path fasta, stageAs: "bwameth/*" output: - path "index" , emit: index + path "bwameth" , emit: index path "*.version.txt", emit: version script: diff --git a/tests/software/bwameth/index/test.yml b/tests/software/bwameth/index/test.yml index 2b45c718..dac20ada 100644 --- a/tests/software/bwameth/index/test.yml +++ b/tests/software/bwameth/index/test.yml @@ -4,15 +4,15 @@ - bwameth - bwameth_index files: - - path: ./output/bwameth/index/genome.fa.bwameth.c2t.pac + - path: ./output/bwameth/bwameth/genome.fa.bwameth.c2t.pac md5sum: 7586c6a3be45c4dea15376a5c7bb9bf0 - - path: ./output/bwameth/index/genome.fa.bwameth.c2t.amb + - path: ./output/bwameth/bwameth/genome.fa.bwameth.c2t.amb md5sum: 87e019665cbb66bdee2bacccb26845c9 - - path: ./output/bwameth/index/genome.fa.bwameth.c2t.ann + - path: ./output/bwameth/bwameth/genome.fa.bwameth.c2t.ann md5sum: a4659a63572b6998c67457bd8e95790d - - path: ./output/bwameth/index/genome.fa.bwameth.c2t.bwt + - path: ./output/bwameth/bwameth/genome.fa.bwameth.c2t.bwt md5sum: 582854008bcbe99d5b51290773a7db5f - - path: ./output/bwameth/index/genome.fa.bwameth.c2t + - path: ./output/bwameth/bwameth/genome.fa.bwameth.c2t md5sum: db670853725f4a31080c991e9df6b330 - - path: ./output/bwameth/index/genome.fa.bwameth.c2t.sa + - path: ./output/bwameth/bwameth/genome.fa.bwameth.c2t.sa md5sum: 020db07e7e1544dc961c30c9936f3213