Commit ad399cc9 authored by lrodrig1's avatar lrodrig1
Browse files

minor changes on bwa mem and samtools view+sort of Nextflow modules

parent cfc8d12a
process BWA_MEM_PAIRED {
tag { "bwa-mem paired" }
tag { "bwa mem" }
container 'quay.io/biocontainers/bwa:0.7.17--h84994c4_5'
input:
......
process BWA_MEM_UNPAIRED {
tag { "bwa-mem unpaired" }
tag { "bwa mem" }
container 'quay.io/biocontainers/bwa:0.7.17--h84994c4_5'
input:
......
......@@ -4,10 +4,10 @@ process SAMTOOLS_VIEW {
input:
path input
output:
path '*.filtered.bam', emit: output
script:
def min_mapping_qualityArgument = params.min_mapping_quality ? "-q $params.min_mapping_quality" : ''
def bits_setArgument = params.bits_set ? "-F $params.bits_set" : ''
......@@ -18,4 +18,4 @@ process SAMTOOLS_VIEW {
samtools view $threadsArgument $min_mapping_qualityArgument $bits_setArgument $input -o \$outputName.filtered.bam
"""
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@
* Include for bwa_mem
*/
include {
BWA_MEM_PAIRED as BWA_MEM_READS
BWA_MEM_PAIRED as BWA_MEM_PAIRED
} from "../modules/bwa_mem_paired"
include {
BWA_MEM_UNPAIRED as BWA_MEM_UNPAIRED1
......@@ -27,12 +27,12 @@ workflow SUB_BWA_MEM {
unpaired1 = reads.map{it[3]}
unpaired2 = reads.map{it[4]}
BWA_MEM_READS(srr_id, paired1, paired2, indexFiles)
BWA_MEM_PAIRED(srr_id, paired1, paired2, indexFiles)
BWA_MEM_UNPAIRED1(srr_id, unpaired1, indexFiles)
BWA_MEM_UNPAIRED2(srr_id, unpaired2, indexFiles)
emit:
output_paired = BWA_MEM_READS.out
output_unpairedR1 = BWA_MEM_UNPAIRED1.out
output_unpairedR2 = BWA_MEM_UNPAIRED2.out
paired = BWA_MEM_PAIRED.out
unpairedR1 = BWA_MEM_UNPAIRED1.out
unpairedR2 = BWA_MEM_UNPAIRED2.out
}
......@@ -29,4 +29,4 @@ workflow SUB_SAMTOOLS_SORT {
paired = SAMTOOLS_SORT_PAIRED.out
unpairedR1 = SAMTOOLS_SORT_UNPAIRED_R1.out
unpairedR2 = SAMTOOLS_SORT_UNPAIRED_R2.out
}
\ No newline at end of file
}
/*
* Include for samtools_view_sam2bam
* Include for samtools_view_sam2bam
*/
include {
SAMTOOLS_VIEW_SAM2BAM as SAMTOOLS_VIEW_SAM2BAM_READS
SAMTOOLS_VIEW_SAM2BAM as SAMTOOLS_VIEW_SAM2BAM_PAIRED
} from "../modules/samtools_view_sam2bam"
include {
SAMTOOLS_VIEW_SAM2BAM as SAMTOOLS_VIEW_SAM2BAM_UNPAIRED1
......@@ -22,12 +22,12 @@ workflow SUB_SAMTOOLS_VIEW_SAM2BAM {
unpairedR2
main:
SAMTOOLS_VIEW_SAM2BAM_READS(paired)
SAMTOOLS_VIEW_SAM2BAM_PAIRED(paired)
SAMTOOLS_VIEW_SAM2BAM_UNPAIRED1(unpairedR1)
SAMTOOLS_VIEW_SAM2BAM_UNPAIRED2(unpairedR2)
emit:
reads = SAMTOOLS_VIEW_SAM2BAM_READS.out
paired = SAMTOOLS_VIEW_SAM2BAM_PAIRED.out
unpairedR1 = SAMTOOLS_VIEW_SAM2BAM_UNPAIRED1.out
unpairedR2 = SAMTOOLS_VIEW_SAM2BAM_UNPAIRED2.out
}
\ 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