《学习小组Day3笔记--向伟》

今天是生信学习的第三天,学习了如何在Linux环境下安装软件。
Linux单纯作为一个系统是无法开展工作的,这就需要在系统上安装合适的软件程序。我们在使用Windows系统时,常常使用软件管家来安装自己需要的软件,那么Linux系统也肯定存在对应的应用商店。
conda就是Linux系统常用的“电脑管家”,但是由于conda管理的领域比较广泛,我们学习的生信只是其中的一个小领域,直接用conda管理就显得有点大材小用了。因此,我们使用与生信对应的miniconda来管理生信软件,会更加方便,而且在一定程度上也节省了计算机资源。安装号miniconda后我们就可以根据自己的需求来下载软件了。

1. 在Linux环境下下载miniconda

1.1 打开清华镜像,找到miniconda的最新版本(按自己需求)的安装包,然后复制下载链接。


复制下载链接

1.2 登入服务器,使用wget+复制的链接下载安装包到指定目录下。

 bio38@VM-0-10-ubuntu:~$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
--2020-03-04 16:38:03--  https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71785000 (68M) [application/octet-stream]
Saving to: ‘Miniconda3-latest-Linux-x86_64.sh’

 Miniconda3-latest-  16%[=>               ]  10.96M  1.64MB/s    eta 35s

1.2 使用bash+安装包名称安装程序
bash Miniconda3-latest-Linux-x86_64.sh
然后一路enter,遇到yes/no就输入yes,直到成功安装(由于putty闪退,未及时截图,安装成功后会提示Think you for install miniconda3的信息)
1.3 激活conda
输入source ~/.bashrc 激活conda后,如果在用户名前面出现(base)就表明激活成功,接下来就可以安装自己需要的软件了。
1.4 添加镜像

使用清华镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
conda config --set show_channel_urls yes
----来自生信星球

添加镜像是为了方便大家更快速的下载东西,因为有些软件来自国外网站,国内难以访问,有了镜像,就相当于在镜像中备份了软件,那么从镜像中下载就会更方便,快速。

2. 用miniconda安装生信软件(如对比序列的软件blast)

(base) bio38@VM-0-10-ubuntu:~$ conda search  blast
Loading channels: done
# Name                       Version           Build  Channel
blast                         2.2.31               1  anaconda/cloud/bioconda
blast                         2.2.31     boost1.60_2  anaconda/cloud/bioconda
blast                         2.2.31 pl526h3066fca_3  anaconda/cloud/bioconda
blast                          2.5.0     boost1.60_1  anaconda/cloud/bioconda
blast                          2.5.0     boost1.64_2  anaconda/cloud/bioconda
blast                          2.5.0      h3727419_3  anaconda/cloud/bioconda
blast                          2.5.0      hc0b0e79_3  anaconda/cloud/bioconda
blast                          2.6.0     boost1.60_0  anaconda/cloud/bioconda
blast                          2.6.0     boost1.61_0  anaconda/cloud/bioconda
blast                          2.6.0     boost1.61_1  anaconda/cloud/bioconda
blast                          2.6.0     boost1.64_2  anaconda/cloud/bioconda
blast                          2.7.1     boost1.64_1  anaconda/cloud/bioconda
blast                          2.7.1     boost1.64_2  anaconda/cloud/bioconda
blast                          2.7.1     boost1.64_3  anaconda/cloud/bioconda
blast                          2.7.1      h4422958_6  anaconda/cloud/bioconda
blast                          2.7.1      h96bfa4b_5  anaconda/cloud/bioconda
blast                          2.9.0      h20b68b9_0  anaconda/cloud/bioconda
blast                          2.9.0      h20b68b9_1  anaconda/cloud/bioconda
blast                          2.9.0 pl526h3066fca_4  anaconda/cloud/bioconda
blast                          2.9.0 pl526h979a64d_2  anaconda/cloud/bioconda
blast                          2.9.0 pl526h979a64d_3  anaconda/cloud/bioconda
(base) bio38@VM-0-10-ubuntu:~$ conda install blast

首先输入conda search blast检索blast的版本情况,若有就conda install blast -y安装程序,-y表明自动安装。



当出现上图情况就表明成功安装。
如果要卸载软件,运行指令conda remove 软件名 -y 就自动卸载了。
今天主要就学习了如何在Linux环境下安装软件,至于还有一些有关环境的只是暂时还未吃透,就不做介绍了。谢谢!

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容