├── presentation_conda.pdf ├── presentation_conda ├── krona.png ├── conda_logo.png ├── conda_env_list.png └── default_path.png ├── presentation_conda-figure ├── unnamed-chunk-1-1.png ├── unnamed-chunk-2-1.png ├── unnamed-chunk-3-1.png ├── unnamed-chunk-4-1.png └── unnamed-chunk-5-1.png ├── README.md ├── presentation_conda.md ├── presentation_conda.Rpres └── index.html /presentation_conda.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda.pdf -------------------------------------------------------------------------------- /presentation_conda/krona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda/krona.png -------------------------------------------------------------------------------- /presentation_conda/conda_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda/conda_logo.png -------------------------------------------------------------------------------- /presentation_conda/conda_env_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda/conda_env_list.png -------------------------------------------------------------------------------- /presentation_conda/default_path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda/default_path.png -------------------------------------------------------------------------------- /presentation_conda-figure/unnamed-chunk-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda-figure/unnamed-chunk-1-1.png -------------------------------------------------------------------------------- /presentation_conda-figure/unnamed-chunk-2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda-figure/unnamed-chunk-2-1.png -------------------------------------------------------------------------------- /presentation_conda-figure/unnamed-chunk-3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda-figure/unnamed-chunk-3-1.png -------------------------------------------------------------------------------- /presentation_conda-figure/unnamed-chunk-4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda-figure/unnamed-chunk-4-1.png -------------------------------------------------------------------------------- /presentation_conda-figure/unnamed-chunk-5-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/conda-presentation/master/presentation_conda-figure/unnamed-chunk-5-1.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Presentation of Conda for SHH 2 | Presentation here [maxibor.github.io/conda-presentation/#](https://maxibor.github.io/conda-presentation) 3 | 4 | Conda is a package and environment manager. 5 | -------------------------------------------------------------------------------- /presentation_conda.md: -------------------------------------------------------------------------------- 1 | --- 2 | output: 3 | pdf_document: default 4 | html_document: default 5 | --- 6 | Easy installations and virtual environments with conda 7 | ======================================================== 8 | author: Maxime Borry 9 | date: 24/01/2020 10 | width: 1440 11 | 12 | Follow the presentation 13 | ========================================================= 14 | ## [maxibor.github.io/conda-presentation](https://maxibor.github.io/conda-presentation) 15 | 16 | What does it mean to install a program ? 17 | ======================================================== 18 | 19 | ### -> Copy/move the executable of the program in the `PATH` 20 | 21 | ### What is the `PATH` ? 22 | 23 | 24 | ```bash 25 | borry@mpi-sdag1:~$ echo $PATH 26 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 27 | games:/usr/local/games:/opt/dell/srvadmin/bin 28 | ``` 29 | 30 | - `/usr/local/sbin` 31 | - `/usr/local/bin` 32 | - `/usr/sbin` 33 | - `/usr/bin` 34 | - ... 35 | 36 | ### When can't "install" programms on a computer, it's because you don't have write access to these directories 37 | 38 | What's in my path ? 39 | ======================================================== 40 | 41 | For example, let's have a look at `/usr/bin` ! 42 | 43 | 44 | ```bash 45 | borry@mpi-sdag1:~$ ls -1 /usr/bin 46 | ... 47 | head 48 | headerdoc2html 49 | heap 50 | heap32 51 | hexdump 52 | hidutil 53 | hiutil 54 | host 55 | ... 56 | ``` 57 | 58 | Great, but what about Conda ? 59 | ======================================================== 60 | 61 | 62 | ### I have a confession: this is not my real path 63 | 64 | ```bash 65 | borry@mpi-sdag1:~$ echo $PATH 66 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 67 | games:/usr/local/games:/opt/dell/srvadmin/bin 68 | ``` 69 | 70 | ### Here is my real path 71 | 72 | ```bash 73 | borry@mpi-sdag1:~$ echo $PATH 74 | /projects1/clusterhomes/borry/miniconda3/bin:/usr/local/ 75 | sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 76 | games:/usr/local/games:/opt/dell/srvadmin/bin 77 | ``` 78 | 79 | ### The location where executables will be installed by Conda 80 | ``` 81 | /projects1/clusterhomes/borry/miniconda3/bin 82 | ``` 83 | Conda 84 | ======================================================== 85 | 86 | "Conda is an open source, **cross-platform**, **language-agnostic** **package and environment management system** distributed by Continuum Analytics." 87 | 88 | - Free 89 | - **No admin rights required** 90 | - Tons of bioinformatic packages available 91 | - Easy to install 92 | 93 | Install conda 94 | ======================================================== 95 | 96 | ### Two distributions: 97 | - Anaconda (fully featured, heavy) 98 | - **Miniconda** (bare minimum) 99 | 100 | ### Installation for Mac 101 | 102 | ```bash 103 | borry@maxime:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh 104 | borry@maxime:~$ bash ~/miniconda.sh 105 | ``` 106 | ### Installation for Linux 107 | 108 | ```bash 109 | borry@mpi-sdag1:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh 110 | borry@maxime:~$ bash ~/miniconda.sh 111 | ``` 112 | 113 | Using conda 114 | ======================================================== 115 | 116 | ## Install a package 117 | ##### When you install a package, conda automatically handles the installation of all its dependancies 118 | 119 | ### Jupyter/IPython notebook 120 | 121 | ```bash 122 | (base)borry@mpi-sdag1:~$ conda install jupyter 123 | ``` 124 | ## Install a package from a specific channel 125 | ##### BWA 126 | 127 | ```bash 128 | (base)borry@mpi-sdag1:~$ conda install -c bioconda bwa 129 | ``` 130 | ### [Bioconda](https://bioconda.github.io/recipes.html): Channel for bioinformatics packages 131 | ##### [Bioconda: sustainable and comprehensive software distribution for the life sciences](https://www.nature.com/articles/s41592-018-0046-7) 132 | ### [conda-forge](https://conda-forge.org/feedstocks/): community-led (huge) collection of recipes 133 | 134 | Everything with conda is an environment 135 | ======================================================== 136 | 137 | ## An environement is an isolated sandbox that allows a fine control on program's versions and dependancies 138 | 139 | ##### By default, you're in the **base** environment 140 | 141 | ```bash 142 | (base)borry@mpi-sdag1:~$ conda env list 143 | # conda environments: 144 | # 145 | base * /projects1/clusterhomes/borry/miniconda3 146 | ``` 147 | 148 | ##### But can create new environments... 149 | 150 | ```bash 151 | (base)borry@mpi-sdag1:~$ conda create -n myEnvName 152 | ``` 153 | Everything with conda is an environment(2) 154 | ======================================================== 155 | 156 | 157 | ##### Change your current environemnt (activate) 158 | 159 | ```bash 160 | (base)borry@mpi-sdag1:~$ conda activate myEnvName 161 | ``` 162 | 163 | ##### **Note that your prompt now includes the name of the active environment** 164 | 165 | ##### Install a package in this environment, for example, RStudio 166 | 167 | ```bash 168 | (myEnvName) borry@mpi-sdag1:~$ conda install -c r rstudio 169 | ``` 170 | 171 | ##### And go back to the **base** environment 172 | 173 | ```bash 174 | (myEnvName) borry@mpi-sdag1:~$ conda deactivate 175 | ``` 176 | 177 | ##### **The packages installed in one environement are not accessible from outside !** 178 | 179 | Let's create an environment for MetaPhlan2 and Krona 180 | ======================================================== 181 | 182 | 183 | [Krona plots](http://marbl.github.io/Krona/examples/rdp.krona.html) 184 | 185 | 186 | ```bash 187 | (base)borry@mpi-sdag1:~$ conda create -n metaphlan 188 | (base)borry@mpi-sdag1:~$ conda activate metaphlan 189 | (metaphlan) borry@mpi-sdag1:~$ conda install -c bioconda metaphlan2 190 | # Now you can use metaphlan ! 191 | (metaphlan) conda install -c bioconda krona 192 | ``` 193 | 194 | Now let's share our environement ! 195 | 196 | ```bash 197 | (metaphlan) borry@mpi-sdag1:~$ conda env export > metaphlan_env.yml 198 | ``` 199 | 200 | And recreate it on another machine from the environment file 201 | 202 | ```bash 203 | (base)borry@maxime:~$ conda env create -f metaphlan_env.yml 204 | ``` 205 | 206 | Other useful conda commands 207 | ======================================================== 208 | 209 | ##### List installed packages and versions in an environment 210 | 211 | ```bash 212 | (metaphlan) borry@mpi-sdag1:~$ conda list 213 | ``` 214 | 215 | ##### Uninstall a package (here Krona) 216 | 217 | ```bash 218 | (metaphlan) borry@mpi-sdag1:~$ conda remove krona 219 | ``` 220 | 221 | ##### Delete an environment 222 | 223 | ```bash 224 | (base)borry@mpi-sdag1:~$ conda env remove -n metaphlan 225 | ``` 226 | 227 | ### Conda documentation: [conda.io/docs](https://conda.io/docs) 228 | 229 | 230 | -------------------------------------------------------------------------------- /presentation_conda.Rpres: -------------------------------------------------------------------------------- 1 | Easy installations and virtual environments with conda 2 | ======================================================== 3 | author: Maxime Borry 4 | date: 24/01/2020 5 | width: 1440 6 | 7 | Follow the presentation 8 | ========================================================= 9 | ## [maxibor.github.io/conda-presentation](https://maxibor.github.io/conda-presentation) 10 | 11 | What does it mean to install a program ? 12 | ======================================================== 13 | incremental: true 14 | ### -> Copy/move the executable of the program in the `PATH` 15 | 16 | ### What is the `PATH` ? 17 | 18 | ```{bash, eval=FALSE} 19 | borry@mpi-sdag1:~$ echo $PATH 20 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 21 | games:/usr/local/games:/opt/dell/srvadmin/bin 22 | ``` 23 | 24 | - `/usr/local/sbin` 25 | - `/usr/local/bin` 26 | - `/usr/sbin` 27 | - `/usr/bin` 28 | - ... 29 | 30 | ### When can't "install" programms on a computer, it's because you don't have write access to these directories 31 | 32 | What's in my path ? 33 | ======================================================== 34 | incremental: true 35 | For example, let's have a look at `/usr/bin` ! 36 | 37 | ```{bash, eval=FALSE} 38 | borry@mpi-sdag1:~$ ls -1 /usr/bin 39 | ... 40 | head 41 | headerdoc2html 42 | heap 43 | heap32 44 | hexdump 45 | hidutil 46 | hiutil 47 | host 48 | ... 49 | ``` 50 | 51 | Great, but what about Conda ? 52 | ======================================================== 53 | incremental: true 54 | 55 | ### I have a confession: this is not my real path 56 | ```{bash, eval=FALSE} 57 | borry@mpi-sdag1:~$ echo $PATH 58 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 59 | games:/usr/local/games:/opt/dell/srvadmin/bin 60 | ``` 61 | 62 | ### Here is my real path 63 | ```{bash, eval=FALSE} 64 | borry@mpi-sdag1:~$ echo $PATH 65 | /projects1/clusterhomes/borry/miniconda3/bin:/usr/local/ 66 | sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/ 67 | games:/usr/local/games:/opt/dell/srvadmin/bin 68 | ``` 69 | 70 | ### The location where executables will be installed by Conda 71 | ``` 72 | /projects1/clusterhomes/borry/miniconda3/bin 73 | ``` 74 | Conda 75 | ======================================================== 76 | incremental: true 77 | "Conda is an open source, **cross-platform**, **language-agnostic** **package and environment management system** distributed by Continuum Analytics." 78 | 79 | - Free 80 | - **No admin rights required** 81 | - Tons of bioinformatic packages available 82 | - Easy to install 83 | 84 | Install conda 85 | ======================================================== 86 | incremental: true 87 | ### Two distributions: 88 | - Anaconda (fully featured, heavy) 89 | - **Miniconda** (bare minimum) 90 | 91 | ### Installation for Mac 92 | ```{bash, eval=FALSE} 93 | borry@maxime:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh 94 | borry@maxime:~$ bash ~/miniconda.sh 95 | ``` 96 | ### Installation for Linux 97 | ```{bash, eval=FALSE} 98 | borry@mpi-sdag1:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh 99 | borry@maxime:~$ bash ~/miniconda.sh 100 | ``` 101 | 102 | Using conda 103 | ======================================================== 104 | incremental: true 105 | ## Install a package 106 | ##### When you install a package, conda automatically handles the installation of all its dependancies 107 | 108 | ### Jupyter/IPython notebook 109 | ```{bash, eval=FALSE} 110 | (base)borry@mpi-sdag1:~$ conda install jupyter 111 | ``` 112 | ## Install a package from a specific channel 113 | ##### BWA 114 | ```{bash, eval=FALSE} 115 | (base)borry@mpi-sdag1:~$ conda install -c bioconda bwa 116 | ``` 117 | ### [Bioconda](https://bioconda.github.io/recipes.html): Channel for bioinformatics packages 118 | ##### [Bioconda: sustainable and comprehensive software distribution for the life sciences](https://www.nature.com/articles/s41592-018-0046-7) 119 | ### [conda-forge](https://conda-forge.org/feedstocks/): community-led (huge) collection of recipes 120 | 121 | Everything with conda is an environment 122 | ======================================================== 123 | incremental: true 124 | ## An environement is an isolated sandbox that allows a fine control on program's versions and dependancies 125 | 126 | ##### By default, you're in the **base** environment 127 | ```{bash, eval=FALSE} 128 | (base)borry@mpi-sdag1:~$ conda env list 129 | # conda environments: 130 | # 131 | base * /projects1/clusterhomes/borry/miniconda3 132 | ``` 133 | 134 | ##### But can create new environments... 135 | ```{bash, eval=FALSE} 136 | (base)borry@mpi-sdag1:~$ conda create -n myEnvName 137 | ``` 138 | Everything with conda is an environment(2) 139 | ======================================================== 140 | incremental: true 141 | 142 | ##### Change your current environemnt (activate) 143 | ```{bash, eval=FALSE} 144 | (base)borry@mpi-sdag1:~$ conda activate myEnvName 145 | ``` 146 | 147 | ##### **Note that your prompt now includes the name of the active environment** 148 | 149 | ##### Install a package in this environment, for example, RStudio 150 | ```{bash, eval=FALSE} 151 | (myEnvName) borry@mpi-sdag1:~$ conda install -c r rstudio 152 | ``` 153 | 154 | ##### And go back to the **base** environment 155 | ```{bash, eval=FALSE} 156 | (myEnvName) borry@mpi-sdag1:~$ conda deactivate 157 | ``` 158 | 159 | ##### **The packages installed in one environement are not accessible from outside !** 160 | 161 | Let's create an environment for MetaPhlan2 and Krona 162 | ======================================================== 163 | incremental: true 164 | 165 | [Krona plots](http://marbl.github.io/Krona/examples/rdp.krona.html) 166 | 167 | ```{bash, eval=FALSE} 168 | (base)borry@mpi-sdag1:~$ conda create -n metaphlan 169 | (base)borry@mpi-sdag1:~$ conda activate metaphlan 170 | (metaphlan) borry@mpi-sdag1:~$ conda install -c bioconda metaphlan2 171 | # Now you can use metaphlan ! 172 | (metaphlan) conda install -c bioconda krona 173 | ``` 174 | 175 | Now let's share our environement ! 176 | ```{bash, eval=FALSE} 177 | (metaphlan) borry@mpi-sdag1:~$ conda env export > metaphlan_env.yml 178 | ``` 179 | 180 | And recreate it on another machine from the environment file 181 | ```{bash, eval=FALSE} 182 | (base)borry@maxime:~$ conda env create -f metaphlan_env.yml 183 | ``` 184 | 185 | Other useful conda commands 186 | ======================================================== 187 | incremental: true 188 | ##### List installed packages and versions in an environment 189 | ```{bash, eval=FALSE} 190 | (metaphlan) borry@mpi-sdag1:~$ conda list 191 | ``` 192 | 193 | ##### Uninstall a package (here Krona) 194 | ```{bash, eval=FALSE} 195 | (metaphlan) borry@mpi-sdag1:~$ conda remove krona 196 | ``` 197 | 198 | ##### Delete an environment 199 | ```{bash, eval=FALSE} 200 | (base)borry@mpi-sdag1:~$ conda env remove -n metaphlan 201 | ``` 202 | 203 | ### Conda documentation: [conda.io/docs](https://conda.io/docs) 204 | 205 | 206 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Easy installations and virtual environments with conda 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 55 | 56 | 57 | 66 | 199 | 200 | 565 | 566 | 567 | 734 | 735 | 736 | 766 | 767 | 768 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 |
784 |
785 | 786 |
787 |

Easy installations and virtual environments with conda

Maxime Borry
24/01/2020

788 | 789 |
790 | 791 |
792 | 793 |
794 |
795 |

Follow the presentation

796 | 800 | 801 |
802 |
803 |

What does it mean to install a program ?

804 |
805 |

-> Copy/move the executable of the program in the PATH

806 | 807 |

What is the PATH ?

808 | 809 |
borry@mpi-sdag1:~$ echo $PATH
 810 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
 811 | games:/usr/local/games:/opt/dell/srvadmin/bin
 812 | 
813 | 814 |
    815 |
  • /usr/local/sbin
  • 816 |
  • /usr/local/bin
  • 817 |
  • /usr/sbin
  • 818 |
  • /usr/bin
  • 819 |
  • 820 |
821 | 822 |

When can't “install” programms on a computer, it's because you don't have write access to these directories

823 | 824 |
825 | 826 |
827 |
828 |

What's in my path ?

829 |
830 |

For example, let's have a look at /usr/bin !

831 | 832 |
borry@mpi-sdag1:~$ ls -1 /usr/bin
 833 | ...
 834 | head
 835 | headerdoc2html
 836 | heap
 837 | heap32
 838 | hexdump
 839 | hidutil
 840 | hiutil
 841 | host
 842 | ...
 843 | 
844 | 845 |
846 | 847 |
848 |
849 |

Great, but what about Conda ?

850 |
851 |

I have a confession: this is not my real path

852 | 853 |
borry@mpi-sdag1:~$ echo $PATH
 854 | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
 855 | games:/usr/local/games:/opt/dell/srvadmin/bin
 856 | 
857 | 858 |

Here is my real path

859 | 860 |
borry@mpi-sdag1:~$ echo $PATH
 861 | /projects1/clusterhomes/borry/miniconda3/bin:/usr/local/
 862 | sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
 863 | games:/usr/local/games:/opt/dell/srvadmin/bin
 864 | 
865 | 866 |

The location where executables will be installed by Conda

867 | 868 |
/projects1/clusterhomes/borry/miniconda3/bin
 869 | 
870 | 871 |
872 | 873 |
874 |
875 |

Conda

876 |
877 |

“Conda is an open source, cross-platform, language-agnostic package and environment management system distributed by Continuum Analytics.”

878 | 879 |
    880 |
  • Free
  • 881 |
  • No admin rights required
  • 882 |
  • Tons of bioinformatic packages available
  • 883 |
  • Easy to install
  • 884 |
885 | 886 |
887 | 888 |
889 |
890 |

Install conda

891 |
892 |

Two distributions:

893 | 894 |
    895 |
  • Anaconda (fully featured, heavy)
  • 896 |
  • Miniconda (bare minimum)
  • 897 |
898 | 899 |

Installation for Mac

900 | 901 |
borry@maxime:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh
 902 | borry@maxime:~$ bash ~/miniconda.sh
 903 | 
904 | 905 |

Installation for Linux

906 | 907 |
borry@mpi-sdag1:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
 908 | borry@maxime:~$ bash ~/miniconda.sh
 909 | 
910 | 911 |
912 | 913 |
914 |
915 |

Using conda

916 |
917 |

Install a package

918 | 919 |
When you install a package, conda automatically handles the installation of all its dependancies
920 | 921 |

Jupyter/IPython notebook

922 | 923 |
(base)borry@mpi-sdag1:~$ conda install jupyter
 924 | 
925 | 926 |

Install a package from a specific channel

927 | 928 |
BWA
929 | 930 |
(base)borry@mpi-sdag1:~$ conda install -c bioconda bwa
 931 | 
932 | 933 |

Bioconda: Channel for bioinformatics packages

934 | 935 |
Bioconda: sustainable and comprehensive software distribution for the life sciences
936 | 937 |

conda-forge: community-led (huge) collection of recipes

938 | 939 |
940 | 941 |
942 |
943 |

Everything with conda is an environment

944 |
945 |

An environement is an isolated sandbox that allows a fine control on program's versions and dependancies

946 | 947 |
By default, you're in the base environment
948 | 949 |
(base)borry@mpi-sdag1:~$ conda env list
 950 | # conda environments:
 951 | #
 952 | base          *  /projects1/clusterhomes/borry/miniconda3
 953 | 
954 | 955 |
But can create new environments…
956 | 957 |
(base)borry@mpi-sdag1:~$ conda create -n myEnvName
 958 | 
959 | 960 |
961 | 962 |
963 |
964 |

Everything with conda is an environment(2)

965 |
966 |
Change your current environemnt (activate)
967 | 968 |
(base)borry@mpi-sdag1:~$ conda activate myEnvName
 969 | 
970 | 971 |
Note that your prompt now includes the name of the active environment
972 | 973 |
Install a package in this environment, for example, RStudio
974 | 975 |
(myEnvName) borry@mpi-sdag1:~$ conda install -c r rstudio
 976 | 
977 | 978 |
And go back to the base environment
979 | 980 |
(myEnvName) borry@mpi-sdag1:~$ conda deactivate
 981 | 
982 | 983 |
The packages installed in one environement are not accessible from outside !
984 | 985 |
986 | 987 |
988 |
989 |

Let's create an environment for MetaPhlan2 and Krona

990 |
991 |

Krona plots

992 | 993 |
(base)borry@mpi-sdag1:~$ conda create -n metaphlan
 994 | (base)borry@mpi-sdag1:~$ conda activate metaphlan
 995 | (metaphlan) borry@mpi-sdag1:~$ conda install -c bioconda metaphlan2
 996 | # Now you can use metaphlan !
 997 | (metaphlan) conda install -c bioconda krona
 998 | 
999 | 1000 |

Now let's share our environement !

1001 | 1002 |
(metaphlan) borry@mpi-sdag1:~$ conda env export > metaphlan_env.yml
1003 | 
1004 | 1005 |

And recreate it on another machine from the environment file

1006 | 1007 |
(base)borry@maxime:~$ conda env create -f metaphlan_env.yml
1008 | 
1009 | 1010 |
1011 | 1012 |
1013 |
1014 |

Other useful conda commands

1015 |
1016 |
List installed packages and versions in an environment
1017 | 1018 |
(metaphlan) borry@mpi-sdag1:~$ conda list
1019 | 
1020 | 1021 |
Uninstall a package (here Krona)
1022 | 1023 |
(metaphlan) borry@mpi-sdag1:~$ conda remove krona
1024 | 
1025 | 1026 |
Delete an environment
1027 | 1028 |
(base)borry@mpi-sdag1:~$ conda env remove -n metaphlan
1029 | 
1030 | 1031 |

Conda documentation: conda.io/docs

1032 | 1033 |
1034 | 1035 |
1036 | 1037 | 1038 |
1039 |
1040 | 1041 | 1051 | 1052 | 1062 | 1063 | 1142 | 1143 | 1144 | 1145 | 1146 | --------------------------------------------------------------------------------