Skip to content

Commit 0e8e907

Browse files
author
jlboat
committed
Clarification
1 parent eec927c commit 0e8e907

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

how-to-set-up-a-bioinformatics-environment.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ <h1 class="header-title">How-to: Set up a Bioinformatics Environment</h1>
9090
</pre></div>
9191

9292

93-
<p>You'll want to add important channels. This essentially adds repositories. The order matters such that the later the channel is added the
94-
higher the priority (it looks in conda-forge first). Do note, however, that while adding these channels will increase the number of identified packages, it will also increase the time it takes to look through all of those packages for updates/dependency resolution/etc.</p>
93+
<p>You'll want to add important channels. This essentially adds repositories. The order matters such that the later the channel is added the higher the priority (it looks in conda-forge first). Do note, however, that while adding these channels will increase the number of identified packages, it will also increase the time it takes to look through all of those packages for updates/dependency resolution/etc.</p>
9594
<div class="highlight"><pre><span></span>conda config --add channels defaults
9695
conda config --add channels bioconda
9796
conda config --add channels conda-forge
@@ -105,9 +104,8 @@ <h1 class="header-title">How-to: Set up a Bioinformatics Environment</h1>
105104
</pre></div>
106105

107106

108-
<p>Now, I don't recommend you install all of your packages to a single environment. For instance, I like to have one environment for python3, one
109-
for python2, one for R, etc.</p>
110-
<p>As an example, let's create an R environment. Now, my by base environment is python3 (since it's my primary tool), but you may make R your primary and python a secondary.</p>
107+
<p>Now, I don't recommend you install all of your packages to a single environment. For instance, I like to have one environment for python3, one for python2, one for R, etc.</p>
108+
<p>As an example, let's create an R environment. Now, my by base environment is python3 (since it's my primary tool), but you may make R your primary and python a secondary. <em>Warning: Installing R in conda works great except if you already have R/R libraries installed the traditional way. It seems that the R libraries are the biggest issue and removing them allows the conda R to work properly.</em></p>
111109
<div class="highlight"><pre><span></span>conda create -n mro_env r-essentials mro-base
112110
</pre></div>
113111

@@ -117,19 +115,16 @@ <h1 class="header-title">How-to: Set up a Bioinformatics Environment</h1>
117115
</pre></div>
118116

119117

120-
<p>On my Linux system, I had to add one line to by .bashrc file so I could activate my environments. You can try activating without adding this
121-
line, and conda will tell you if you need it. Conda used to add a path export to your .bashrc, but that is no longer recommended.</p>
118+
<p>On my Linux system, I had to add one line to by .bashrc file so I could activate my environments. You can try activating without adding this line, and conda will tell you if you need it. Conda used to add a path export to your .bashrc, but that is no longer recommended.</p>
122119
<div class="highlight"><pre><span></span><span class="nb">echo</span> <span class="s2">&quot;. /home/lboat/anaconda3/etc/profile.d/conda.sh&quot;</span> &gt;&gt; ~/.bashrc
123120

124121
<span class="c1"># Now activate your new environment</span>
125122
conda activate mro_env
126123
</pre></div>
127124

128125

129-
<p>This has changed the paths to all of the installed conda libraries such that you are now only looking at those programs/packages installed in
130-
this environment. This is very helpful if there are package conflicts or if a program requires an older version that you don't typically use.</p>
131-
<p>From here, you can install any library you like (even ones you installed in a different environment). Since this is an example of my R
132-
environment, I'm going to install some Bioconductor packages.</p>
126+
<p>This has changed the paths to all of the installed conda libraries such that you are now only looking at those programs/packages installed in this environment. This is very helpful if there are package conflicts or if a program requires an older version that you don't typically use.</p>
127+
<p>From here, you can install any library you like (even ones you installed in a different environment). Since this is an example of my R environment, I'm going to install some Bioconductor packages.</p>
133128
<div class="highlight"><pre><span></span><span class="c1"># Install Bioconductor -- if you set the channels above the channel parameter (-c) is optional</span>
134129
conda install -c bioconda bioconductor-biocinstaller
135130
</pre></div>
@@ -145,11 +140,16 @@ <h1 class="header-title">How-to: Set up a Bioinformatics Environment</h1>
145140
<p>Now, in my case, the edgeR package had an outdated limma dependencies that prevented me from loading edgeR. This provides a great opportunity to describe an alternate way to install packages.</p>
146141
<p>Most people work with RStudio if they work in R. It can also be installed using conda.</p>
147142
<div class="highlight"><pre><span></span>conda install rstudio
143+
144+
rstudio
148145
</pre></div>
149146

150147

151148
<p>Now, you can run RStudio and install any package you like as you normally would, but you should designate the library location specific to your conda installation.</p>
152-
<div class="highlight"><pre><span></span>biocLite<span class="p">(</span><span class="s">&quot;edgeR&quot;</span><span class="p">,</span> lib<span class="o">=</span><span class="s">&quot;~/anaconda3/envs/mro_env/lib/R/library&quot;</span><span class="p">)</span>
149+
<div class="highlight"><pre><span></span><span class="c1"># Whether that be from CRAN</span>
150+
install.packages<span class="p">(</span><span class="s">&quot;ggplot2&quot;</span><span class="p">)</span>
151+
<span class="c1"># Or Bioconductor</span>
152+
biocLite<span class="p">(</span><span class="s">&quot;edgeR&quot;</span><span class="p">,</span> lib<span class="o">=</span><span class="s">&quot;~/anaconda3/envs/mro_env/lib/R/library&quot;</span><span class="p">)</span>
153153
</pre></div>
154154

155155

0 commit comments

Comments
 (0)