Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 6 additions & 5 deletions modules/nf-core/gridss/assemble/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ process GRIDSS_ASSEMBLE {
def arg_config = gridss_config ? "-c ${gridss_config}" : ""

def bam_list = bam instanceof List ? bam : [bam]
def index_files = bwa_index instanceof List ? bwa_index : [bwa_index]
// GRIDSS requires all BWA index files to have the exact same basename as the reference fasta
def link_cmds = index_files.collect { idx -> "ln -sf ${idx} ./${fasta}.${idx.extension}" }.join('\n')
"""
${link_cmds}
"""
# GRIDSS requires the BWA index files to share the reference fasta basename
index_files=(\$(find -L "${bwa_index}" -regex '.*\\.\\(amb\\|ann\\|pac\\|gridsscache\\|sa\\|bwt\\|img\\|alt\\)\$'))
for index_file in "\${index_files[@]}"; do
ln -sf "\$index_file" "./${fasta}.\${index_file##*.}"
done

gridss ${args} \\
--jvmheap ${Math.round(task.memory.bytes * 0.95)} \\
Expand Down
10 changes: 5 additions & 5 deletions modules/nf-core/gridss/call/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ process GRIDSS_CALL {
def prefix = task.ext.prefix ?: "${meta.id}"
def arg_config = gridss_config ? "-c ${gridss_config}" : ""
def bam_list = bam instanceof List ? bam : [bam]

def index_files = bwa_index instanceof List ? bwa_index : [bwa_index]
// GRIDSS requires all BWA index files to have the exact same basename as the reference fasta
def link_cmds = index_files.collect { idx -> "ln -sf ${idx} ./${fasta}.${idx.extension}" }.join('\n')
"""
${link_cmds}
# GRIDSS requires the BWA index files to share the reference fasta basename
index_files=(\$(find -L "${bwa_index}" -regex '.*\\.\\(amb\\|ann\\|pac\\|gridsscache\\|sa\\|bwt\\|img\\|alt\\)\$'))
for index_file in "\${index_files[@]}"; do
ln -sf "\$index_file" "./${fasta}.\${index_file##*.}"
done

gridss ${args} \\
--jvmheap ${Math.round(task.memory.bytes * 0.95)} \\
Expand Down
Loading