学习小组Day3笔记- 邬阳

生信星球学习day3

学习内容

安装miniconda3、安装软件、环境

一、安装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 

#加入环境变量
echo 'export PATH=~/miniconda3/bin:$PATH' >> ~/.bashrc

#刷新
source ~/.bashrc

#验证
conda 

#出现以下内容,说明安装成功
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
#直到出现
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 #卸载成功

三、环境

#查看环境
bio05@VM-0-6-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base                  *  /home/bio05/miniconda3

#新建一个叫“rna-seq”的环境,python版本为3,同时安装fastqc和trimmomatic软件
bio05@VM-0-6-ubuntu:~/biosoft$ conda create -n rna-seq python=3 fastqc trimmomatic -y

#查看新环境是否建立成功
bio05@VM-0-6-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base                  *  /home/bio05/miniconda3
rna-seq                  /home/bio05/miniconda3/envs/rna-seq

#激活新环境,使用conda activate不能成功激活,使用source activate激活,前面出现(rna-seq)说明激活成功
bio05@VM-0-6-ubuntu:~/biosoft$ source activate rna-seq

#查看fastqc是否成功安装,出现很多帮助信息,安装成功
(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


#转换环境  
(rna-seq) bio05@VM-0-6-ubuntu:~/biosoft$ source activate base
(base) bio05@VM-0-6-ubuntu:~/biosoft$ conda deactivate

#退出环境
(rna-seq) bio05@VM-0-6-ubuntu:~/biosoft$ conda deactivate
bio05@VM-0-6-ubuntu:~/biosoft$ 

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容