学习小组Day3笔记——Kururu
2020-03-08 本文已影响0人
Kururu1799
学习内容
- 了解conda—— Linux的APP store
- 下载canda的精华版 miniconda
- 安装配置miniconda
- 使用miniconda
- 了解conda环境,制作分身
准备工作
下载
cd biosoft
可以使用自动补全
wget
+下载的链接
bio01@VM-0-10-ubuntu:~$ cd biosoft/
bio01@VM-0-10-ubuntu:~/biosoft$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
--2020-03-08 14:50:52-- 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-L 100%[===================>] 68.46M 3.85MB/s in 17s
2020-03-08 14:51:09 (4.01 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [71785000/71785000]
安装
bio01@VM-0-10-ubuntu:~/biosoft$ bash Miniconda3-latest-Linux-x86_64.sh
Welcome to Miniconda3 4.7.12
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
===================================
Miniconda End User License Agreement
###遇到more 就按enter
Please answer 'yes' or 'no':'
>>> yes
[/home/bio01/miniconda3] >>>
###按enter
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes
Thank you for installing Miniconda3!
###成功
激活
bio01@VM-0-10-ubuntu:~/biosoft$ source ~/.bashrc
(base) bio01@VM-0-10-ubuntu:~/biosoft$ conda
复制代码
# 使用清华镜像
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
开始使用conda
1. 查看当前所有软件列表conda list
(base) bio01@VM-0-10-ubuntu:~/biosoft$ conda list
# packages in environment at /home/bio01/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
asn1crypto 1.2.0 py37_0 defaults
ca-certificates 2019.10.16 0 defaults
certifi 2019.9.11 py37_0 defaults
cffi 1.13.0 py37h2e261b9_0 defaults
chardet 3.0.4 py37_1003 defaults
conda 4.7.12 py37_0 defaults
conda-package-handling 1.6.0 py37h7b6447c_0 defaults
cryptography 2.8 py37h1ba5d50_0 defaults
idna 2.8 py37_0 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 9.1.0 hdf63c60_0 defaults
libstdcxx-ng 9.1.0 hdf63c60_0 defaults
ncurses 6.1 he6710b0_1 defaults
openssl 1.1.1d h7b6447c_3 defaults
pip 19.3.1 py37_0 defaults
pycosat 0.6.3 py37h14c3975_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pysocks 1.7.1 py37_0 defaults
python 3.7.4 h265db76_1 defaults
readline 7.0 h7b6447c_5 defaults
requests 2.22.0 py37_0 defaults
ruamel_yaml 0.15.46 py37h14c3975_0 defaults
setuptools 41.4.0 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.30.0 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
tqdm 4.36.1 py_0 defaults
urllib3 1.24.2 py37_0 defaults
wheel 0.33.6 py37_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
zlib 1.2.11 h7b6447c_3 defaults
2. 搜索软件 conda search fastqc
【这里以数据质控软件fastqc为例】
(base) bio01@VM-0-10-ubuntu:~/biosoft$ conda search fastqc
Loading channels:
done
# Name Version Build Channel
fastqc 0.10.1 0 anaconda/cloud/bioconda
fastqc 0.10.1 1 anaconda/cloud/bioconda
fastqc 0.11.2 1 anaconda/cloud/bioconda
fastqc 0.11.2 pl5.22.0_0 anaconda/cloud/bioconda
fastqc 0.11.3 0 anaconda/cloud/bioconda
fastqc 0.11.3 1 anaconda/cloud/bioconda
fastqc 0.11.4 0 anaconda/cloud/bioconda
fastqc 0.11.4 1 anaconda/cloud/bioconda
fastqc 0.11.4 2 anaconda/cloud/bioconda
fastqc 0.11.5 1 anaconda/cloud/bioconda
fastqc 0.11.5 4 anaconda/cloud/bioconda
fastqc 0.11.5 pl5.22.0_2 anaconda/cloud/bioconda
fastqc 0.11.5 pl5.22.0_3 anaconda/cloud/bioconda
fastqc 0.11.6 2 anaconda/cloud/bioconda
fastqc 0.11.6 pl5.22.0_0 anaconda/cloud/bioconda
fastqc 0.11.6 pl5.22.0_1 anaconda/cloud/bioconda
fastqc 0.11.7 4 anaconda/cloud/bioconda
fastqc 0.11.7 5 anaconda/cloud/bioconda
fastqc 0.11.7 6 anaconda/cloud/bioconda
fastqc 0.11.7 pl5.22.0_0 anaconda/cloud/bioconda
fastqc 0.11.7 pl5.22.0_2 anaconda/cloud/bioconda
fastqc 0.11.8 0 anaconda/cloud/bioconda
fastqc 0.11.8 1 anaconda/cloud/bioconda
fastqc 0.11.8 2 anaconda/cloud/bioconda
fastqc 0.11.9 0 anaconda/cloud/bioconda
###可能是因为网速问题,等待时间有点长
3. 安装软件 conda install fastqc -y
加上-y是自动安装
4. 卸载软件 conda remove fastqc -y
conda 环境
不同的项目需要不同的版本,所以要定制不同的分身
查看当前conda的环境
前面带*的就是默认的conda info --envs
(base) bio01@VM-0-10-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base * /home/bio01/miniconda3
新建一个conda环境
先建立一个名叫rnaseq的conda环境,然后指定python版本是3,安装软件fastqc、trimmomatic(这两个可以一步完成)conda create -n rna-seq python=3 fastqc trimmomatic -y
再次查看一下我们的conda环境
(base) bio01@VM-0-10-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base * /home/bio01/miniconda3
rna-seq /home/bio01/miniconda3/envs/rna-seq
激活新的conda环境
conda activate rna-seq
默认的*会转移到rna-seq前面,用户名前面也增加了(rna-seq)
(base) bio01@VM-0-10-ubuntu:~/biosoft$ conda activate rna-seq
(rna-seq) bio01@VM-0-10-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base /home/bio01/miniconda3
rna-seq * /home/bio01/miniconda3/envs/rna-seq
参考生物技能树的微信公众号文章
补充:
conda search bwa查看可选版本
在安装时输入conda install bwa=版本号
conda list 查看所有安装的软件
conda update 软件名 可以对软件进行升级:eg. conda update bwa
conda remove 卸载已经安装的软件