grunwaldlab / effectR

An R package to call oomycete effectors
10 stars 7 forks source link

Tests fail when mafft is not installed. #7

Closed knausb closed 7 years ago

knausb commented 7 years ago

When running tests I receive:

Error: MAFFT not found in the specified path: '//mafft'
 Please check your MAFFT installation.
In addition: Warning messages:
1: running command 'which mafft' had status 1 
2: running command 'which hmmsearch' had status 1 
Execution halted

Exited with status 1.

This is reproduced as follows.

source('~/gits/effectR/tests/testthat/test_effector_summary.R')

Which dumps me into the browser on my system. Here I see:

Browse[1]> mafft.path
[1] "/"

which may be an unanticipated value?

zachary-foster commented 7 years ago

This is due to this line:

https://github.com/grunwaldlab/effectR/blob/d72fae3e6a37a93a6ed42d4dceff3d47b616f12a/tests/testthat/test_effector_summary.R#L8

dirname(system("which mafft", intern = T)) is returning nothing, which is then appended to "/" and passed to get_mafft_path, which interprets it as a user-defined path to a directory and adds "mafft" to it.

Tabima commented 7 years ago

@knausb Can you test again? The new commit should address that