diff --git a/src/nf_modules/bowtie/mapping_paired.nf b/src/nf_modules/bowtie/mapping_paired.nf index a24291670b2e3b67ed874e5b833172bb372cde7d..ae533a410b683bc1c88644e46c4673a557070e82 100644 --- a/src/nf_modules/bowtie/mapping_paired.nf +++ b/src/nf_modules/bowtie/mapping_paired.nf @@ -47,7 +47,7 @@ samtools view -Sb - > ${pair_id}.bam if grep -q "Error" ${pair_id}_bowtie_report_tmp.txt; then exit 1 fi -tail -n 15 ${file_id}_bowtie2_report_tmp.txt > ${file_id}_bowtie2_report.txt +tail -n 15 ${file_id}_bowtie_report_tmp.txt > ${file_id}_bowtie_report.txt """ } diff --git a/src/nf_modules/bowtie/mapping_single.nf b/src/nf_modules/bowtie/mapping_single.nf index 490cb1d06bf829e024f4e9d5b7186d071c44e617..a86e424c1dc5b9aba049dfc164786ef0bfab820e 100644 --- a/src/nf_modules/bowtie/mapping_single.nf +++ b/src/nf_modules/bowtie/mapping_single.nf @@ -39,11 +39,12 @@ for (index_file in index) { """ bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \ -q ${reads} 2> \ -${file_id}_bowtie_report.txt | \ +${file_id}_bowtie_report_tmp.txt | \ samtools view -Sb - > ${file_id}.bam -if grep -q "Error" ${file_id}_bowtie_report.txt; then +if grep -q "Error" ${file_id}_bowtie_report_tmp.txt; then exit 1 fi +tail -n 15 ${file_id}_bowtie_report_tmp.txt > ${file_id}_bowtie_report.txt """ } diff --git a/src/nf_modules/bowtie2/mapping_paired.nf b/src/nf_modules/bowtie2/mapping_paired.nf index dc4667400ec33eed593b1b93decf42994d8777ad..2a97ed6259f98b11f439f7c2c2cd8d63ae192f1c 100644 --- a/src/nf_modules/bowtie2/mapping_paired.nf +++ b/src/nf_modules/bowtie2/mapping_paired.nf @@ -35,12 +35,13 @@ process mapping_fastq { """ bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \ -1 ${reads[0]} -2 ${reads[1]} 2> \ -${pair_id}_bowtie2_report.txt | \ +${pair_id}_bowtie2_report_tmp.txt | \ samtools view -Sb - > ${pair_id}.bam -if grep -q "Error" ${pair_id}_bowtie2_report.txt; then +if grep -q "Error" ${pair_id}_bowtie2_report_tmp.txt; then exit 1 fi +tail -n 15 ${file_id}_bowtie2_report_tmp.txt > ${file_id}_bowtie2_report.txt """ }