diff --git a/modules/local/fastani.nf b/modules/local/fastani.nf index d2588a3..301b42e 100644 --- a/modules/local/fastani.nf +++ b/modules/local/fastani.nf @@ -25,12 +25,11 @@ process fastani { shell: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def ref = genomes.join(",") + def ends = genomes.collect { it.Name[-6..-1] }.flatten().unique().join(' *') """ mkdir -p fastani logs/${task.process} log_file=logs/${task.process}/${prefix}.${workflow.sessionId}.log - - echo ${ref} | tr "," "\\n" | sort > reference_list.txt + ls *${ends} | grep -v ${contigs} | sort > reference_list.txt fastANI ${args} \ --threads ${task.cpus} \