Jun Aruga's Blog

Output, activities, memo and etc.

Miniconda, Bioconda on Fedora and Galaxy

This page is the memo about installing miniconda (conda command) on Fedora Linux. I referred the document [1]. I wanted to install a bioconda package. Because I wanted to build a Galaxy tool using Planemo [2]. The tutorial is using bioconda. I am also trying to create my first bioconda package seeing this document [3].

The conda is command. bioconda is a repository. As a note, I was told that conda has open source license.

Anyway, when installing conda, we need to decide we install miniconda or anaconda. Seeing this document [4], Anaconda is conda command + some conda packages. So, I selected miniconda as a small start.

Download the installer.

$ wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh

$ sha256sum Miniconda3-py39_4.10.3-Linux-x86_64.sh
1ea2f885b4dbc3098662845560bc64271eb17085387a70c2ba3f29fff6f8d52f  Miniconda3-py39_4.10.3-Linux-x86_64.sh

Execute the installer.

$ bash Miniconda3-py39_4.10.3-Linux-x86_64.sh

Welcome to Miniconda3 py39_4.10.3

In order to continue the installation process, please review the license
Please, press ENTER to continue

Do you accept the license terms? [yes|no]
[no] >>> yes

Miniconda3 will now be installed into this location:

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/jaruga/miniconda3] >>> [Enter]
installation finished.
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes

no change     /home/jaruga/miniconda3/condabin/conda
no change     /home/jaruga/miniconda3/bin/conda
no change     /home/jaruga/miniconda3/bin/conda-env
no change     /home/jaruga/miniconda3/bin/activate
no change     /home/jaruga/miniconda3/bin/deactivate
no change     /home/jaruga/miniconda3/etc/profile.d/conda.sh
no change     /home/jaruga/miniconda3/etc/fish/conf.d/conda.fish
no change     /home/jaruga/miniconda3/shell/condabin/Conda.psm1
no change     /home/jaruga/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/jaruga/miniconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change     /home/jaruga/miniconda3/etc/profile.d/conda.csh
modified      /home/jaruga/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,-
   set the auto_activate_base parameter to false:-

conda config --set auto_activate_base false

Thank you for installing Miniconda3!

Now the .bashrc was modified adding the following code at the end of the file. I want to move this logic to another file, calling it as source foo.sh.

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/jaruga/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    if [ -f "/home/jaruga/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/home/jaruga/miniconda3/etc/profile.d/conda.sh"
        export PATH="/home/jaruga/miniconda3/bin:$PATH"
unset __conda_setup
# <<< conda initialize <<<

I wanted to avoid calling conda initially. So, I executed the following command.

$ conda config --set auto_activate_base false

Here are the commands to activate and deactivate the conda mode. It's like virtualenv.

$ conda activate

(base) $ conda deactivate