This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Choose version of software (e.g. minimap2) in Linux

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?

Thank you in advance!

unix minimap2

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

2 answers

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).

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..

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.

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).

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.

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

Log in to answer this question.