seqaln does not properly detect clustalo using exefile

Issue #205 resolved
hectormj created an issue

Although clustalo program is detected by seqaln if only the name "clustalo" is given, when a more complex path is provided, the function fails:

> tmp <- seqaln(aln, exefile="clustalo")
> Sys.which("clustalo")
           clustalo 
"/usr/bin/clustalo" 
> tmp <- seqaln(aln, exefile=Sys.which("clustalo"))
Error en seqaln(aln, exefile = Sys.which("clustalo")) : 
  An error occurred while running command
 '/usr/bin/clustalo'

I think that changing the line:

if (length(grep(tolower(exefile), "clustalo")) > 0) {

to something like

if (length(grep("clustalo", tolower(exefile))) > 0) {

or

if (grepl("clustalo", tolower(exefile))) {

should mitigate the problem.

Comments (3)

  1. Log in to comment