生信软件的好帮手-bioconda--转载

2023-06-05,,

http://mp.weixin.qq.com/s/nK1Kkf9lfZStoX25Y7SzHQ

这篇文章主要适用于Linux平台,当然MacOS也行,不过它有更好安装方法。

此外网上也会许多更好的关于biconda的教程,这里还是抛砖应用,提供一种除了编译源码和直接下载二进制文件外安装生信软件的一种思路

bioconda是什么

官方介绍是:

Bioconda is a channel for the conda package manager specializing in bioinformatics software. Bioconda consists of:

a repository of recipes hosted on GitHub

a build system that turns these recipes into conda packages

a repository of >1500 bioinformatics packagesready to use with conda install

Over 130 contributors that add, modify, update and maintain the recipes

也就会说,它类似于Ubuntu和或RedHat的apt-get或yum,通过它你可以快捷安装许多生物信息的软件,而无需自己解决软件之间的依赖关系。
目前已经有3000多个,包括bwa,tophat,fastqc,gatk等软件。

如何安装bioconda

安装bioconda其实就是安装anaconda的迷你版本,Miniconda。然后添加相应的channel,方法如下:

下载

# download package 2.7 or 3.6, x64 or x86# 3.6 
wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86.sh
# 2.7
wget -c https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
wget -c https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86.sh

安装
以3.6 x64为例

bash Miniconda3-latest-Linux-x86_64.sh

Enter同意

按Q结束,然后yes

安装路径,默认就行了

安装结束后,重启终端或者source ~/.bashrc
然后在终端设置channel,用于让conda寻找软件所在位置。

conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda

推荐新建工作环境下安装软件:

conda create -n aligners bwa bowtie hisat star -y
# create -n aligner:新建一个名为alinger的工作环境
# bwa bowite hista star: 同时安装这三个软件
# -y yes:和Linux的选项一样

安装软件后,使用source activate aligners进入虚拟环境进行操作,现在bwa就算装好了。

一般而言,Biostar课程里的大部分软件都可以通过conda install xxxx 来安装。

缺点:

bioconda镜像在国外,所以下载速度可能会很慢,尤其对一些体积比较大的软件就很容易中断,而且不能重连

推荐阅读:

    bioconda项目网站:https://bioconda.github.io/

    一篇比我更好的教程:https://zhuanlan.zhihu.com/p/25085567

    什么是虚拟环境:http://blog.csdn.net/pipisorry/article/details/39998317

生信软件的好帮手-bioconda--转载的相关教程结束。

《生信软件的好帮手-bioconda--转载.doc》

下载本文的Word格式文档,以方便收藏与打印。