
生信星球?qū)W習day3
學習內(nèi)容
安裝miniconda3、安裝軟件、環(huán)境
一、安裝miniconda3
#下載miniconda3
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh```
#安裝,一路按enter或yes
bash Miniconda3-latest-Linux-x86_64.sh
#加入環(huán)境變量
echo 'export PATH=~/miniconda3/bin:$PATH' >> ~/.bashrc
#刷新
source ~/.bashrc
#驗證
conda
#出現(xiàn)以下內(nèi)容,說明安裝成功
usage: conda [-h] [-V] command ...
conda is a tool for managing and deploying applications, environments and packages.
Options:
positional arguments:
command
clean Remove unused packages and caches.
compare Compare packages between conda environments.
config Modify configuration values in .condarc. This is modeled after the git config command.
Writes to the user .condarc file (/home/bio05/.condarc) by default.
create Create a new conda environment from a list of specified packages.
help Displays a list of available conda commands and their help strings.
info Display information about current conda install.
init Initialize conda for shell interaction. [Experimental]
install Installs a list of packages into a specified conda environment.
list List linked packages in a conda environment.
package Low-level conda package utility. (EXPERIMENTAL)
remove Remove a list of packages from a specified conda environment.
uninstall Alias for conda remove.
run Run an executable in a conda environment. [Experimental]
search Search for packages and display associated information. The input is a MatchSpec, a
query language for conda packages. See examples below.
update Updates conda packages to the latest compatible version.
upgrade Alias for conda update.
optional arguments:
-h, --help Show this help message and exit.
-V, --version Show the conda version number and exit.
conda commands available from other packages:
env
二、安裝軟件
#添加頻道, 使用清華鏡像,可提高軟件下載速度
bio05@VM-0-6-ubuntu:~/biosoft$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
du.cn/anaconda/cloud/bioconda
conda config --set show_channel_urls yesbio05@VM-0-6-ubuntu:~/biosoft$ conda config --add channels https://oud/conda-forgeinghua.edu.cn/anaconda/clo
bio05@VM-0-6-ubuntu:~/biosoft$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
bio05@VM-0-6-ubuntu:~/biosoft$ conda config --set show_channel_urls yes
#查看軟件列表
bio05@VM-0-6-ubuntu:~/biosoft$ conda list
# packages in environment at /home/bio05/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
brotlipy 0.7.0 py38h27cfd23_1003 defaults
ca-certificates 2020.10.14 0 defaults
certifi 2020.6.20 pyhd3eb1b0_3 defaults
cffi 1.14.3 py38h261ae71_2 defaults
chardet 3.0.4 py38h06a4308_1003 defaults
#搜索fastqc軟件
bio05@VM-0-6-ubuntu:~/biosoft$ conda search fastqc
Loading channels: done
# Name Version Build Channel
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
fastqc 0.11.9 hdfd78af_1 anaconda/cloud/bioconda
#安裝fastqc
bio05@VM-0-6-ubuntu:~/biosoft$ conda install fastqc -y
#驗證是否安裝成功
bio05@VM-0-6-ubuntu:~/biosoft$ fastqc -h
FastQC - A high throughput sequence QC analysis tool
SYNOPSIS
fastqc seqfile1 seqfile2 .. seqfileN
fastqc [-o output dir] [--(no)extract] [-f fastq|bam|sam]
[-c contaminant file] seqfile1 .. seqfileN
#卸載fastqc
bio05@VM-0-6-ubuntu:~/biosoft$ conda remove fastqc -y
#直到出現(xiàn)
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#驗證是否卸載完成
bio05@VM-0-6-ubuntu:~/biosoft$ fastqc -h
-bash: /home/bio05/miniconda3/bin/fastqc: No such file or directory #卸載成功
三、環(huán)境
#查看環(huán)境
bio05@VM-0-6-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base * /home/bio05/miniconda3
#新建一個叫“rna-seq”的環(huán)境,python版本為3,同時安裝fastqc和trimmomatic軟件
bio05@VM-0-6-ubuntu:~/biosoft$ conda create -n rna-seq python=3 fastqc trimmomatic -y
#查看新環(huán)境是否建立成功
bio05@VM-0-6-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base * /home/bio05/miniconda3
rna-seq /home/bio05/miniconda3/envs/rna-seq
#激活新環(huán)境,使用conda activate不能成功激活,使用source activate激活,前面出現(xiàn)(rna-seq)說明激活成功
bio05@VM-0-6-ubuntu:~/biosoft$ source activate rna-seq
#查看fastqc是否成功安裝,出現(xiàn)很多幫助信息,安裝成功
(rna-seq) bio05@VM-0-6-ubuntu:~/biosoft$ fastqc -h
FastQC - A high throughput sequence QC analysis tool
SYNOPSIS
fastqc seqfile1 seqfile2 .. seqfileN
fastqc [-o output dir] [--(no)extract] [-f fastq|bam|sam]
[-c contaminant file] seqfile1 .. seqfileN
#轉(zhuǎn)換環(huán)境
(rna-seq) bio05@VM-0-6-ubuntu:~/biosoft$ source activate base
(base) bio05@VM-0-6-ubuntu:~/biosoft$ conda deactivate
#退出環(huán)境
(rna-seq) bio05@VM-0-6-ubuntu:~/biosoft$ conda deactivate
bio05@VM-0-6-ubuntu:~/biosoft$