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

bwa: fix file_id definition

parent 801d4f6a
No related branches found
No related tags found
No related merge requests found
...@@ -37,16 +37,18 @@ process mapping_fastq { ...@@ -37,16 +37,18 @@ process mapping_fastq {
script: script:
if (file_id.containsKey('library')) { if (file_id.containsKey('library')) {
library = file_id.library library = file_id.library
id = file_id.id
} else { } else {
library = file_id library = file_id
id = file_id
} }
bwa_mem_R = "@RG\\tID:${library}\\tSM:${library}\\tLB:lib_${library}\\tPL:illumina" bwa_mem_R = "@RG\\tID:${library}\\tSM:${library}\\tLB:lib_${library}\\tPL:illumina"
""" """
bwa mem -t ${task.cpus} \ bwa mem -t ${task.cpus} \
-R '${bwa_mem_R}' \ -R '${bwa_mem_R}' \
${index_id} ${reads[0]} ${reads[1]} 2> \ ${index_id} ${reads[0]} ${reads[1]} 2> \
${file_id}_bwa_report.txt | \ ${id}_bwa_report.txt | \
samtools view -@ ${task.cpus} -Sb - > ${file_id}.bam samtools view -@ ${task.cpus} -Sb - > ${id}.bam
""" """
} }
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