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
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ process index_fasta {
output:
file "*.index*" into index_files
file "*_report.txt" into indexing_report
script:
"""
......@@ -68,6 +69,7 @@ process mapping_fastq {
output:
file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
......@@ -119,6 +121,7 @@ process mapping_fastq {
output:
file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
......
......@@ -17,6 +17,7 @@ process index_fasta {
output:
file "*.index*" into index_files
file "*_report.txt" into indexing_report
script:
"""
......
......@@ -24,11 +24,12 @@ process mapping_fastq {
output:
file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
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]
}
}
......
......@@ -23,17 +23,18 @@ process mapping_fastq {
output:
file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
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]
}
}
"""
bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \
-U ${reads} 2> \
-q ${reads} 2> \
${reads.baseName}_bowtie_report.txt | \
samtools view -Sb - > ${reads.baseName}.bam
......
......@@ -25,6 +25,7 @@ process index_fasta {
output:
file "*.index*" into index_files
file "*_report.txt" into indexing_report
script:
"""
......
......@@ -17,6 +17,7 @@ process index_fasta {
output:
file "*.index*" into index_files
file "*_report.txt" into indexing_report
script:
"""
......
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