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

Bowtie: fix single mapping and index parsing

parent ff9f90af
Branches
Tags
No related merge requests found
...@@ -25,6 +25,7 @@ process index_fasta { ...@@ -25,6 +25,7 @@ process index_fasta {
output: output:
file "*.index*" into index_files file "*.index*" into index_files
file "*_report.txt" into indexing_report
script: script:
""" """
...@@ -68,6 +69,7 @@ process mapping_fastq { ...@@ -68,6 +69,7 @@ process mapping_fastq {
output: output:
file "*.bam" into bam_files file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script: script:
index_id = index[0] index_id = index[0]
...@@ -119,6 +121,7 @@ process mapping_fastq { ...@@ -119,6 +121,7 @@ process mapping_fastq {
output: output:
file "*.bam" into bam_files file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script: script:
index_id = index[0] index_id = index[0]
......
...@@ -17,6 +17,7 @@ process index_fasta { ...@@ -17,6 +17,7 @@ process index_fasta {
output: output:
file "*.index*" into index_files file "*.index*" into index_files
file "*_report.txt" into indexing_report
script: script:
""" """
......
...@@ -24,11 +24,12 @@ process mapping_fastq { ...@@ -24,11 +24,12 @@ process mapping_fastq {
output: output:
file "*.bam" into bam_files file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script: script:
index_id = index[0] index_id = index[0]
for (index_file in index) { for (index_file in index) {
if (index_file =~ /.*\.1\.ebwt/) { if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) {
index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1] index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1]
} }
} }
......
...@@ -23,17 +23,18 @@ process mapping_fastq { ...@@ -23,17 +23,18 @@ process mapping_fastq {
output: output:
file "*.bam" into bam_files file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script: script:
index_id = index[0] index_id = index[0]
for (index_file in index) { for (index_file in index) {
if (index_file =~ /.*\.1\.ebwt/) { if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) {
index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1] index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1]
} }
} }
""" """
bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \ bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \
-U ${reads} 2> \ -q ${reads} 2> \
${reads.baseName}_bowtie_report.txt | \ ${reads.baseName}_bowtie_report.txt | \
samtools view -Sb - > ${reads.baseName}.bam samtools view -Sb - > ${reads.baseName}.bam
......
...@@ -25,6 +25,7 @@ process index_fasta { ...@@ -25,6 +25,7 @@ process index_fasta {
output: output:
file "*.index*" into index_files file "*.index*" into index_files
file "*_report.txt" into indexing_report
script: script:
""" """
......
...@@ -17,6 +17,7 @@ process index_fasta { ...@@ -17,6 +17,7 @@ process index_fasta {
output: output:
file "*.index*" into index_files file "*.index*" into index_files
file "*_report.txt" into indexing_report
script: script:
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment