Choose version of software (e.g. minimap2) in Linux
2
0
Entering edit mode
14 months ago
tanya_fiskur ▴ 40

Dear all,

The question is the following:

I need to have a newer version of minimap2 on my computer, but also cannot remove the older one because it is a dependency of another program. If I just install the newer version in addition, the older one is still used as default. Is there a way to specify which version I want to use?

Unix minimap2 • 439 views
1
Entering edit mode

Do you use a package manager or did you compile from source?

0
Entering edit mode

The older version was installed as a part of another software installation. Newer one I tried to install by

git clone https://github.com/lh3/minimap2
cd minimap2 && make


as written in their tutorial ( https://github.com/lh3/minimap2 )

Upd. Installing via "conda install minimap2" helped!

3
Entering edit mode
14 months ago
GenoMax 102k

You could look into creating two separate conda environments for the two versions. Activate and use one you need.

Modules is the proper way of doing this for larger systems (clusters etc).

0
Entering edit mode

Thank you! I also thought about that. One version (older) is in "base" environment, and another - in "cogent" environment. Just installing them under different environments didn't help. I also tried to remove the location of older minimap from the path, but didn't help either.

I will try to understand the modules thing..

0
Entering edit mode

If you are a single user then modules may be overly complex for you to manage.

Just installing them under different environments didn't help.

Can you elaborate on this? As long as you have one environment active you should be able to use that specific version.

0
Entering edit mode

I tried to install it via

conda install minimap2


... and it worked! I have the needed version. Thank you and ATpoint for comments!

(excuse me, do you know what to press to close the question? I see only the "upvote" buttons).

0
Entering edit mode
14 months ago
Mensur Dlakic ★ 11k

Have you tried running it with full path to the executable? Say, if you have minimap2 in /usr/bin and in /usr/local/bin directories, both of them can stay in the \$PATH. Simply run as /usr/bin/minimap2 or /usr/local/bin/minimap2 to select which one you want.

0
Entering edit mode

I haven't, because I found out another way, but that's an interesting idea, maybe I'll use it later.