####################
# install miniconda
####################
# if in linux
# if 64 bit
cd ~/
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
# if 32 bit
cd ~/
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86.sh
bash Miniconda3-latest-Linux-x86.sh
# follow the instructions - whereby install it locally in home.
成功安装后,您的 bash 现在可以识别所有 conda 命令。
############################
# create new environment for your R version
############################
conda create --name R361
############################
# enter the create environment by
############################
conda activate R361
# shell begins now always with (R361)...$
# to show you in which environment you are
############################
# Install your desired R version
############################
conda install -c bioconda R=3.6.1
# -c bioconda means: look into bioconda repository for this package
# commonly used other repositories are: -c anaconda
# -c conda-forge
如果你这样做:
# conda install r-base # or: conda install -c conda-forge r-base
# or: conda install -c bioconda r-base or: conda install -c r r-base
# very likely it installs newest R.
# with R=3.6.1 you can control exactly which version should be installed.
我个人首先尝试-c bioconda 获取所有与生物信息学相关的内容。
因为 bioconda 通常对于 R 包来说是最新的。
(嗯,我也是生物信息学家;) - 所以我有这方面的经验)。
############################
# biocLite() is now old. Install BiocManager
############################
# Start R
R
# install BiocManager
> install.packages("BiocManager")
> require(BiocManager) # or: libary(BiocManager)
# in BiocManager `install()` is like former `biocLite()` install command
> install("<your bioconductor package>")
一些生物导体包需要安装额外的非 R 包。
在全球范围内工作时,这些是sudo apt install r-cran-* 候选人。
但是,谷歌“conda install”,你会发现
那么您必须使用哪个 conda 命令(哪个子存储库)
(您必须将 -c ... 命令添加到 conda install)。
例如对于 bioconda,卷曲是必不可少的。但是如果你安装你最大的
bioconductor (bioconda) 包,那么他们的 conda 包将包含所有这些
必需品 - 你不必关心它们 - 安装将在
一会儿。
所以尝试安装最大的复杂包。如果有针对这些的 conda 包,
那么你的大部分安装将在包照顾的同时完成
所有依赖项。
# in current env show all installed packages $ conda list
# from outside any special environment, do: $ conda list --name R361
# show all environment $ conda info --envs
# remove your environment $ conda remove -n R361
# all these commands are preactically all you need.