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

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

 

推荐阅读:

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

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

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

  4.  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值