Skip to content
Snippets Groups Projects
Verified Commit 92f8f605 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

bowtie: nf, only keep 15 last lines of report

parent 0977ef07
No related branches found
No related tags found
No related merge requests found
......@@ -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
"""
}
......
......@@ -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
"""
}
......@@ -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
"""
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment