meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
general:computerenvironment:conda [2024/03/27 09:00] freyageneral:computerenvironment:conda [2024/04/15 12:45] (current) freya
Line 24: Line 24:
  
   * You can follow the installation guide on the official [[https://mamba.readthedocs.io/en/latest/mamba-installation.html#mamba-install|Mamba documentation page]] or refer to the steps below   * You can follow the installation guide on the official [[https://mamba.readthedocs.io/en/latest/mamba-installation.html#mamba-install|Mamba documentation page]] or refer to the steps below
-  - Download the latest ''x86_64 Linux'' installer from the [[https://github.com/conda-forge/miniforge#mambaforge|miniforge GitHub page]]<WRAP><code>wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh ~/Downloads</code></WRAP>+  - Download the latest ''x86_64 Linux'' installer from the [[https://github.com/conda-forge/miniforge#mambaforge|miniforge GitHub page]]<WRAP><code>wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh</code></WRAP>
     - Start the installation by typing<WRAP>     - Start the installation by typing<WRAP>
 <code> <code>
Line 36: Line 36:
     - Check if the set up was successful:     - Check if the set up was successful:
       - In the new terminal that you have just opened, it should say something like: <code>(base) francisca@workstation1:~$</code> This "(base)" indicates the base conda environment is activated. Now type:<code>conda -h</code>This should print some basic help to your terminal. If all is good, proceed to the next step.       - In the new terminal that you have just opened, it should say something like: <code>(base) francisca@workstation1:~$</code> This "(base)" indicates the base conda environment is activated. Now type:<code>conda -h</code>This should print some basic help to your terminal. If all is good, proceed to the next step.
-  - **Creating a Conda environment.** We will now create a [[https://conda.io/docs/user-guide/tasks/manage-environments.html|working environment]] for your analyses. This step is optional, but it has the advantage of keeping software that you installed via the package manager together in one spot((There is a sweet spot about the package manager, which you should be aware of. Each time you install a program, conda will ask you if it is ok to install, update, or sometimes downgrade a number of packages. This can lead to almost unforeseeable incompatibilities between different programs installed in the same environment. To avoid this, some people go as far as creating for each program its own environment...)). Moreover, it helps to have different - and even conflicting - set-ups at the same time on your computer. For example, you can have two environments using different versions of [[wp>Python_(programming_language)|python]], and you can easily switch between them. +  - **Creating a Conda environment.** We will now create a [[https://conda.io/docs/user-guide/tasks/manage-environments.html|working environment]] for your analyses. It has the advantage of keeping software that you installed via the package manager together in one spot((There is a sweet spot about the package manager, which you should be aware of. Each time you install a program, conda will ask you if it is ok to install, update, or sometimes downgrade a number of packages. This can lead to almost unforeseeable incompatibilities between different programs installed in the same environment. To avoid this, some people go as far as creating for each program its own environment...)). Moreover, it helps to have different - and even conflicting - set-ups at the same time on your computer. For example, you can have two environments using different versions of [[wp>Python_(programming_language)|python]], and you can easily switch between them. 
-    - To create a working environment named **//compgen//**  with python 3.9((In case you require both python 2.7 and 3.8, then simply generate an environment for each python version)), type<code>+    - To create a working environment named **//compgen//**  with python 3.9((In case you require both python 2.7 and 3.9, then simply generate an environment for each python version)), type<code>
 mamba create --name compgen python=3.9</code>  mamba create --name compgen python=3.9</code> 
     - To activate the environment, type<code>conda activate compgen</code>     - To activate the environment, type<code>conda activate compgen</code>
Line 56: Line 56:
   - If the installation was successful, you can ask for further help with the individual commands,such as, //e.g. //**//install//**  , **//update//**  , **//remove//**  by typing<code>conda install --help</code>   - If the installation was successful, you can ask for further help with the individual commands,such as, //e.g. //**//install//**  , **//update//**  , **//remove//**  by typing<code>conda install --help</code>
   - <wrap important>Do not install anything in your ''base'' environment. This might cause Mamba/Anaconda to malfunction. Always create a new environment and install packages in there</wrap>   - <wrap important>Do not install anything in your ''base'' environment. This might cause Mamba/Anaconda to malfunction. Always create a new environment and install packages in there</wrap>
-  - You are now ready to install any software that is distributed via the [[http://conda.io/docs/index.html|conda package manager]] using the following command<code>mamba install -c CHANNELNAME PACKAGENAME</code>+  - You are now ready to install any software that is distributed via the [[http://conda.io/docs/index.html|conda package manager]] using the following command<code>mamba install CHANNELNAME::PACKAGENAME</code>
   - The software packages are distributed via different channels. We will mainly use the channels [[https://anaconda.org/bioconda|bioconda]] and [[https://anaconda.org/conda-forge|conda-forge]].   - The software packages are distributed via different channels. We will mainly use the channels [[https://anaconda.org/bioconda|bioconda]] and [[https://anaconda.org/conda-forge|conda-forge]].
   - To simplify your life, it might be a good idea to add frequently used channels to a list of channels where [[http://conda.io/docs/index.html|conda]] searches for your package by default. Use the following syntax to add the channels [[https://bioconda.github.io|bioconda]] and [[https://bioconda.github.io|conda-forge]] to your default channel list<code>   - To simplify your life, it might be a good idea to add frequently used channels to a list of channels where [[http://conda.io/docs/index.html|conda]] searches for your package by default. Use the following syntax to add the channels [[https://bioconda.github.io|bioconda]] and [[https://bioconda.github.io|conda-forge]] to your default channel list<code>