added tests for bowtie paired-end alignment; resolved index bug

This commit is contained in:
kevinmenden 2020-12-09 16:39:05 +01:00
parent cc72028d3d
commit 42020ce5ac
2 changed files with 14 additions and 3 deletions

View file

@ -28,13 +28,13 @@ process BOWTIE_ALIGN {
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def unaligned = params.save_unaligned ? "--un ${prefix}.unmapped" : ''
"""
INDEX=`find -L ./ -name "*.1.ebwt" | sed 's/.1.ebwt//'`
INDEX=`find -L ./ -name "*.3.ebwt" | sed 's/.3.ebwt//'`
bowtie \\
--threads $task.cpus \\
$options.args \\
$INDEX \\
\$INDEX \\
-q ${reads} \\
$unaligned \\
$unaligned \\
> ${prefix}.sam 2> ${prefix}.out
bowtie --version | head -n 1 | cut -d" " -f3 > ${software}.version.txt

View file

@ -23,3 +23,14 @@ workflow test_bowtie_alignment_single_end {
BOWTIE_ALIGN ( input, BOWTIE_INDEX.out.index )
}
workflow test_bowtie_alignment_paired_end {
fasta = file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true)
BOWTIE_INDEX ( fasta )
def input = []
input = [ [ id:'test', single_end:false ], // meta map
[ file("${launchDir}/tests/data/fastq/dna/Ecoli_DNA_R1.fastq.gz", checkIfExists: true),
file("${launchDir}/tests/data/fastq/dna/Ecoli_DNA_R2.fastq.gz", checkIfExists: true) ] ]
BOWTIE_ALIGN ( input, BOWTIE_INDEX.out.index )
}