Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove hacky INDEX #1222

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/bwa/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process BWA_INDEX {
path fasta

output:
path "bwa" , emit: index
path "bwa/*" , emit: index
path "versions.yml", emit: versions

script:
Expand Down
4 changes: 1 addition & 3 deletions modules/bwa/mem/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ process BWA_MEM {
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
def samtools_command = sort_bam ? 'sort' : 'view'
"""
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`

bwa mem \\
$args \\
$read_group \\
-t $task.cpus \\
\$INDEX \\
${index[0].baseName} \\
$reads \\
| samtools $samtools_command $args2 --threads $task.cpus -o ${prefix}.bam -

Expand Down
7 changes: 4 additions & 3 deletions modules/bwamem2/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process BWAMEM2_INDEX {
path fasta

output:
path "bwamem2" , emit: index
path "versions.yml" , emit: versions
path "bwamem2/*" , emit: index
path "versions.yml", emit: versions

script:
def args = task.ext.args ?: ''
Expand All @@ -21,7 +21,8 @@ process BWAMEM2_INDEX {
bwa-mem2 \\
index \\
$args \\
$fasta -p bwamem2/${fasta}
-p bwamem2/${fasta} \\
$fasta

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 1 addition & 3 deletions modules/bwamem2/mem/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ process BWAMEM2_MEM {
def read_group = meta.read_group ? "-R ${meta.read_group}" : ""
def samtools_command = sort_bam ? 'sort' : 'view'
"""
INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'`

bwa-mem2 \\
mem \\
$args \\
$read_group \\
-t $task.cpus \\
\$INDEX \\
${index[0].baseName} \\
$reads \\
| samtools $samtools_command $args2 -@ $task.cpus -o ${prefix}.bam -

Expand Down