Velvetoptimiser Can'T Find Velveth
2
1
Entering edit mode
12.1 years ago
sohadb1357 ▴ 640

Hi

I'm trying to use velvet optimiser, but for some reason I get the message: "Unable to find velveth, please ensure that velvet executables are in your PATH"", despite the fact that I copied velveth to the same directory.

I searched answers on the web for hours, and so far this is the only answer to the problem I found: http://www.dolphing.com/author/dolphing/page/139, yet I failed to fully understand/implement the suggested solution there (where should I write the line PATH=$PATH, and what exactly should I write if velveth is under ~\velvet and velvetOptimiser is under ~\velvetOptimiser?)

Sorry for the stuped question but I'm pretty newbie to both velvet and Linux.

Thanks in advance Ohad

velvet • 4.9k views
ADD COMMENT
2
Entering edit mode

What is your output of

[prompt]$ echo $PATH
ADD REPLY
0
Entering edit mode

/home/ohad/per15/bin:/usr/lib/lightdm/lightdm:usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

ADD REPLY
0
Entering edit mode

Please make this post a "Question" and not "Tool"

ADD REPLY
5
Entering edit mode
12.1 years ago
Irsan ★ 7.8k

Assuming you have velveth and velvetOptimiser scripts:

~/velvet/velveth

~/velvetOptimiser

Make them executable and make a symbolic link to one of the directories in your PATH:

chmod 755 ~/velvet/velveth ~/velvetOptimiser
sudo ln -s /home/ohad/velvet/velveth /usr/local/bin/velveth
sudo ln -s /home/ohad/velvetOptimiser /usr/local/bin/velvetOptimiser

when you do

ls /usr/local/bin

you see that you have links to the velvet executables in directory /usr/local/bin (which is in your PATH)

ADD COMMENT
0
Entering edit mode

BTW, why dont you put velvetOptimiser in your velvet directory?

mv ~/velvetOptimiser ~/velvet/velvetOptimiser
sudo ln -s /home/ohad/velvet/velvetOptimiser /usr/local/bin/velvetOptimiser
ADD REPLY
2
Entering edit mode
12.1 years ago
SES 8.6k

There is already an accepted answer but this is a very common issue and I want to show that there are numerous possible solutions. Also, I think it's better to edit your PATH rather than creating links in some root directory.

Here's a couple of reasons why:

1) You have to be root to create these links, so it's not a general solution.

2) Those links will hang around even if you move or delete the executables those links point to.

I find it easier to update a path in my .bashrc when I install/update a program or just append something to my PATH from the command line if I need to edit the PATH for just one session. All you have to do is close the shell and the changes go away! Of course, it's easy to make them permanent too.

I know that sometimes it seems impossible to avoid creating links this way when configuring/compiling software when a build script doesn’t find what it wants but you can almost always solve that problem as well by editing your PATH or the Makefile/configure script. To that end, you could also just edit the one line in hwrap.pm to the full path to your velveth. Both of these approaches obviate the need to mess with your root directories.

ADD COMMENT
0
Entering edit mode

Hi SES, +1 for your additions :-). I opted for making links to /usr/local/bin (root priviledges required) because then it works for all users (/usr/local/bin is in a users PATH by default). If that is not important I would extend PATH in bashrc indeed.

ADD REPLY
0
Entering edit mode

That is a very good reason to use your approach and I would do the same in that case.

ADD REPLY

Login before adding your answer.

Traffic: 1560 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6