Commit 3d20b78c authored by amunoz's avatar amunoz
Browse files

read_group as optional parameter

parent c04f543d
......@@ -14,7 +14,8 @@ process BWA_MEM_PAIRED {
script:
def threadsArgument = params.threads_bwa_mem ? "-t $params.threads_bwa_mem" : ""
def read_group = params.read_group ? "-R $read_group" : ""
"""
bwa mem $threadsArgument -R "@RG\\tID:${srr_id}\\tSM:NA19206\\tPL:ILLUMINA\\tCN:CBRA\\tLB:Fragment" $reference_genome $paired1 $paired2 >> ${srr_id}.R1R2.sam
bwa mem $threadsArgument $read_group $reference_genome $paired1 $paired2 >> ${srr_id}.R1R2.sam
"""
}
\ No newline at end of file
}
......@@ -13,8 +13,9 @@ process BWA_MEM_UNPAIRED {
script:
def threadsArgument = params.threads_bwa_mem ? "-t $params.threads_bwa_mem" : ""
def read_group = params.read_group ? "-R $read_group" : ""
"""
nameReplaced=\$(echo ${unpaired.simpleName} | sed 's/_/.R/g')
bwa mem $threadsArgument -R "@RG\\tID:$srr_id\\tSM:NA19206\\tPL:ILLUMINA\\tCN:CBRA\\tLB:Fragment" $reference_genome $unpaired >> \$nameReplaced.sam
bwa mem $threadsArgument $read_group $reference_genome $unpaired >> \$nameReplaced.sam
"""
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment