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

bowtie2: nf, only keep last 15 lines of report

parent b2d7e719
No related branches found
No related tags found
No related merge requests found
......@@ -41,12 +41,13 @@ process mapping_fastq {
# reads
bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \
-1 ${reads[0]} -2 ${reads[1]} 2> \
${pair_id}_bowtie_report.txt | \
${pair_id}_bowtie_report_tmp.txt | \
samtools view -Sb - > ${pair_id}.bam
if grep -q "Error" ${pair_id}_bowtie_report.txt; then
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
"""
}
......
......@@ -35,11 +35,12 @@ process mapping_fastq {
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \
-U ${reads} 2> \
${file_id}_bowtie2_report.txt | \
${file_id}_bowtie2_report_tmp.txt | \
samtools view -Sb - > ${file_id}.bam
if grep -q "Error" ${file_id}_bowtie2_report.txt; then
if grep -q "Error" ${file_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