Lunix Day 4

Linux软件安装

conda

删除频道用vim

$ vim ~/.condarc #然后dd删一行

实战演练:配置频道、创建小环境、安装软件

1.添加频道(北外或者清华皆可,方法1方法2任选其一即可)
2.创建名为rnaseq的小环境
3.激活rnaseq这个小环境
4.在rnaseq小环境中先安装fastqc,再一条命令安装fastp和hisat2
刚开始使用清华的频道镜像,创建rnaseq环境时很慢,就换成了北外的。直接删掉清华的,重新复制粘贴北外的就好。


image.png

http504报错,网络问题
换镜像

$ vim ~/.condarc

channels:
  - https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/
  - https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/
  - https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
~                                                                                                                                                                                                                                               
"~/.condarc" 7L, 268C 
$ rm ~/.condarc 
然后复制粘贴北外镜像                  
conda create -n rnaseq

课堂练习:

1.确认激活 rnaseq 小环境,使用mamba或者conda下载并安装以下软件
• sra-tools=2.10.7
• fastqc
• trim-galore
• hisat2
• subread
• multiqc
• samtools
• salmon
• fastp
2.调出所有安装的生信软件的帮助文档
尤其要注意salmon和fastp这两个软件

$ conda activate rnaseq
(rnaseq) Last2 09:43:33 ~
$ mamba install sra-tools=2.10.7 fastqc trim-galore hisat2 subread multiqc samtools salmon fastp

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.7.8) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['sra-tools=2.10.7', 'fastqc', 'trim-galore', 'hisat2', 'subread', 'multiqc', 'samtools', 'salmon', 'fastp']

anaconda/cloud/bioconda/ [====================] (00m:03s) Done
anaconda/cloud/bioconda/ [====================] (00m:05s) Done
pkgs/r/linux-64          [====================] (00m:00s) No change
anaconda/pkgs/main/noarc [====================] (00m:00s) Done
pkgs/r/noarch            [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:08s) Done
anaconda/pkgs/free/noarc [====================] (00m:00s) No change
anaconda/pkgs/free/linux [====================] (00m:00s) No change
pkgs/main/noarch         [====================] (00m:03s) Done
anaconda/cloud/conda-for [====================] (00m:15s) Done
anaconda/pkgs/main/linux [====================] (00m:21s) Done
pkgs/main/linux-64       [====================] (01m:53s) Done
Encountered problems while solving.
Problem: package trim-galore-0.4.1-0 requires cutadapt, but none of the providers can be installed

(rnaseq) Last2 09:50:36 ~

安装的时候使用了r,main这些频道,不出错不管,出错比如卡住,就删掉defaults.

$ vim ~/.condarc
dd
(rnaseq) Last2 10:03:23 ~

提示信息trim-galore-0.4.1-0 requires cutadapt,trim-galore并没有装成功
试过单独安装trim-galore,在anconda上找安装代码运行,结果都是同样的报错

换个思路,先手动装上cutadapt

$ mamba install cutadapt

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.7.8) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['cutadapt']

anaconda/cloud/bioconda/ [====================] (00m:00s) No change
anaconda/cloud/bioconda/ [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:00s) No change
anaconda/pkgs/main/linux [====================] (00m:00s) No change
anaconda/pkgs/free/noarc [====================] (00m:00s) No change
anaconda/pkgs/free/linux [====================] (00m:00s) No change
anaconda/pkgs/main/noarc [====================] (00m:00s) No change
Encountered problems while solving.
Problem: package cutadapt-2.10-py38h0213d0e_1 requires python >=3.8,<3.9.0a0, but none of the providers can be installed

(rnaseq) Last2 10:26:58 ~

发现是cutadapt依赖的python版本出问题,导致cutadapt装不上,cutadapt装不上又导致trim-galore装不上

$ mamba list

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.7.8) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

# packages in environment at /trainee1/Last2/miniconda3/envs/rnaseq:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
_openmp_mutex             4.5                       1_gnu    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
alsa-lib                  1.2.3                h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
ca-certificates           2020.12.5            ha878542_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
cairo                     1.16.0            h7979940_1007    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
certifi                   2020.12.5        py39hf3d152e_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
fastp                     0.20.1               h8b12597_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
fastqc                    0.11.9                        0    https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
fontconfig                2.13.1            hba837de_1004    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
freetype                  2.10.4               h0708190_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
gettext                   0.19.8.1          h0b5b191_1005    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
giflib                    5.2.1                h516909a_2    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
graphite2                 1.3.14               h23475e2_0    https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
harfbuzz                  2.7.4                h5cf4720_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
hisat2                    2.2.1                he1b5a44_2    https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda
icu                       68.1                 h58526e2_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
jpeg                      9d                   h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
lcms2                     2.11                 hcbb858e_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libffi                    3.3                  h58526e2_2    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libgcc-ng                 9.3.0               h2828fa1_18    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libglib                   2.66.4               hf9edacf_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libgomp                   9.3.0               h2828fa1_18    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libiconv                  1.16                 h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libpng                    1.6.37               hed695b0_2    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libstdcxx-ng              9.3.0               h6de172a_18    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libtiff                   4.2.0                hdc55705_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libuuid                   2.32.1            h14c3975_1000    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libwebp-base              1.1.0                h516909a_3    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
libxcb                    1.14                 h7b6447c_0    https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
libxml2                   2.9.10               h72842e0_3    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
lz4-c                     1.9.3                h9c3ff4c_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
ncurses                   6.2                  h58526e2_4    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
openjdk                   11.0.8               hacce0ff_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
openssl                   1.1.1i               h7f98852_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
pcre                      8.44                 he1b5a44_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
perl                      5.32.0               h36c2ea0_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
pip                       20.3.3             pyhd8ed1ab_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
pixman                    0.40.0               h36c2ea0_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
python                    3.9.1           hffdb5ce_3_cpython    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge #现在的python版本3.9.1
python_abi                3.9                      1_cp39    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
readline                  8.0                  he28a2e2_2    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
setuptools                49.6.0           py39hf3d152e_3    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
sqlite                    3.34.0               h74cdb3f_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
tk                        8.6.10               h21135ba_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
tzdata                    2020f                he74cb21_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
wheel                     0.36.2             pyhd3deb0d_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-fixesproto           5.0               h14c3975_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-inputproto           2.3.2             h14c3975_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-kbproto              1.0.7             h14c3975_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libice               1.0.10               h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libsm                1.2.3             h84519dc_1000    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libx11               1.6.12               h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libxext              1.3.4                h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libxfixes            5.0.3             h516909a_1004    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libxi                1.7.10               h516909a_0    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libxrender           0.9.10            h516909a_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-libxtst              1.2.3             h516909a_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-recordproto          1.14.2            h516909a_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-renderproto          0.11.1            h14c3975_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-xextproto            7.3.0             h14c3975_1002    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xorg-xproto               7.0.31            h14c3975_1007    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
xz                        5.2.5                h516909a_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
zlib                      1.2.11            h516909a_1010    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
zstd                      1.4.8                ha95c52a_1    https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge
(rnaseq) Last2 10:32:06 ~
$ mamba install python=3.8

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.7.8) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['python=3.8']

anaconda/cloud/bioconda/ [====================] (00m:00s) No change
anaconda/cloud/bioconda/ [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:00s) No change
anaconda/pkgs/main/linux [====================] (00m:00s) No change
anaconda/pkgs/free/noarc [====================] (00m:00s) No change
anaconda/pkgs/free/linux [====================] (00m:00s) No change
anaconda/pkgs/main/noarc [====================] (00m:00s) No change
Transaction

  Prefix: /trainee1/Last2/miniconda3/envs/rnaseq

  Updating specs:

   - python==3.8


  Package            Version  Build               Channel                                                       Size
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Change:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  certifi          2020.12.5  py39hf3d152e_1      installed                                                         
  certifi          2020.12.5  py38h578d9bd_1      mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/linux-64     Cached

  Upgrade:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  ca-certificates  2020.12.5  ha878542_0          installed                                                         
  ca-certificates  2021.1.19  h06a4308_0          mirrors.bfsu.edu.cn/anaconda/pkgs/main/linux-64             121 KB
  setuptools          49.6.0  py39hf3d152e_3      installed                                                         
  setuptools          51.3.3  py38h06a4308_4      mirrors.bfsu.edu.cn/anaconda/pkgs/main/linux-64             727 KB

  Downgrade:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  python               3.9.1  hffdb5ce_3_cpython  installed                                                         
  python               3.8.6  hffdb5ce_4_cpython  mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/linux-64      26 MB
  python_abi             3.9  1_cp39              installed                                                         
  python_abi             3.8  1_cp38              mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/linux-64     Cached

  Summary:

  Change: 1 packages
  Upgrade: 2 packages
  Downgrade: 2 packages

  Total download: 27 MB

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Confirm changes: [Y/n] y
Finished ca-certificates                      (00m:00s)             121 KB    473 KB/s
Finished setuptools                           (00m:00s)             727 KB      2 MB/s
Finished python                               (00m:05s)              26 MB     18 MB/s
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(rnaseq) Last2 10:39:20 ~
$ mamba install trim-galore

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.7.8) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['trim-galore']

anaconda/cloud/bioconda/ [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:00s) No change
anaconda/cloud/conda-for [====================] (00m:00s) No change
anaconda/pkgs/main/linux [====================] (00m:00s) No change
anaconda/cloud/bioconda/ [====================] (00m:00s) No change
anaconda/pkgs/free/noarc [====================] (00m:00s) No change
anaconda/pkgs/free/linux [====================] (00m:00s) No change
anaconda/pkgs/main/noarc [====================] (00m:00s) No change
Transaction

  Prefix: /trainee1/Last2/miniconda3/envs/rnaseq

  Updating specs:

   - trim-galore


  Package      Version  Build           Channel                                                       Size
────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
────────────────────────────────────────────────────────────────────────────────────────────────────────────

  cutadapt         3.2  py38h0213d0e_0  mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/linux-64        191 KB
  dnaio          0.5.0  py38h0213d0e_0  mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/linux-64        130 KB
  isa-l         2.30.0  h7f98852_1      mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/linux-64     295 KB
  pigz             2.4  h84994c4_0      mirrors.bfsu.edu.cn/anaconda/pkgs/main/linux-64              64 KB
  python-isal    0.3.0  py38h497a2fe_0  mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/linux-64     100 KB
  trim-galore    0.6.6  0               mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/noarch           42 KB
  xopen          1.1.0  py38h578d9bd_0  mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/linux-64      20 KB

  Summary:

  Install: 7 packages

  Total download: 842 KB

────────────────────────────────────────────────────────────────────────────────────────────────────────────

Confirm changes: [Y/n] y
Finished pigz                                 (00m:00s)              64 KB    294 KB/s
Finished python-isal                          (00m:00s)             100 KB    287 KB/s
Finished xopen                                (00m:00s)              20 KB     55 KB/s
Finished trim-galore                          (00m:00s)              42 KB    104 KB/s
Finished dnaio                                (00m:00s)             130 KB    308 KB/s
Finished cutadapt                             (00m:00s)             191 KB    449 KB/s
Finished isa-l                                (00m:00s)             295 KB    660 KB/s
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(rnaseq) Last2 10:44:59 ~

发现跟安装软件的顺序有关,这样就不会报错

image.png

误区:装什么软件就调用什么软件是不对的,装的可能是个软件包或子程序的集合
python版本降低,有可能其他软件用不了。所以用help来试。安装成功出现三个done + 成功调取这个软件的帮助文档=软件安装成功
分清软件名和命令名
sra-tools是一个软件包,真正使用的是prefetch。因为sra-tools是软件包的名字,我们后面要调用的是这个软件包里面的prefetch之类的子程序,所以测试一下prefetch或者fastq-dump的帮助文档能否调用即可。这个sratools就不是通过-h之类的方式调用帮助文档的。如果是打错了,它报的错应该是command not found。
subread是软件名,用featureCounts

$ prefetch -h

Usage: prefetch [ options ] [ accessions(s)... ]

Parameters:

  accessions(s)                    list of accessions to process


Options:

  -T|--type             Specify file type to download. Default: sra
  -N|--min-size              Minimum file size to download in KB
                                     (inclusive).
  -X|--max-size              Maximum file size to download in KB
                                     (exclusive). Default: 20G
  -f|--force       Force object download - one of: no, yes,
                                     all, ALL. no [default]: skip download if
                                     the object if found and complete; yes:
                                     download it even if it is found and is
                                     complete; all: ignore lock files (stale
                                     locks or it is being downloaded by
                                     another process - use at your own
                                     risk!); ALL: ignore lock files, restart
                                     download from beginning
  -p|--progress                    Show progress
  -r|--resume              Resume partial downloads - one of: no, yes
                                     [default]
  -C|--verify              Verify after download - one of: no, yes
                                     [default]
  -c|--check-all                   Double-check all refseqs
  -o|--output-file           Write file to  when downloading
                                     single file
  -O|--output-directory 
                                   Save files to /
     --ngc                    to ngc file
     --perm                   to permission file
     --location          location in cloud
     --cart                   to cart file
     --disable-multithreading      disable multithreading
  -V|--version                     Display the version of the program
  -L|--log-level            Logging level as number or enum string.
                                     One of
                                     (fatal|sys|int|err|warn|info|debug) or
                                     (0-6) Current/default is warn
     --option-file file            Read more options and parameters from the
                                     file.
  -h|--help                        print this message

"prefetch" version 2.10.7

(rnaseq) Last2 11:05:29 ~
$ 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

DESCRIPTION

    FastQC reads a set of sequence files and produces from each one a quality
    control report consisting of a number of different modules, each one of 
    which will help to identify a different potential type of problem in your
    data.
    
    If no files to process are specified on the command line then the program
    will start as an interactive graphical application.  If files are provided
    on the command line then the program will run with no user interaction
    required.  In this mode it is suitable for inclusion into a standardised
    analysis pipeline.
    
    The options for the program as as follows:
    
    -h --help       Print this help file and exit
    
    -v --version    Print the version of the program and exit
    
    -o --outdir     Create all output files in the specified output directory.
                    Please note that this directory must exist as the program
                    will not create it.  If this option is not set then the 
                    output file for each sequence file is created in the same
                    directory as the sequence file which was processed.
                    
    --casava        Files come from raw casava output. Files in the same sample
                    group (differing only by the group number) will be analysed
                    as a set rather than individually. Sequences with the filter
                    flag set in the header will be excluded from the analysis.
                    Files must have the same names given to them by casava
                    (including being gzipped and ending with .gz) otherwise they
                    won't be grouped together correctly.
                    
    --nano          Files come from nanopore sequences and are in fast5 format. In
                    this mode you can pass in directories to process and the program
                    will take in all fast5 files within those directories and produce
                    a single output file from the sequences found in all files.                    
                    
    --nofilter      If running with --casava then don't remove read flagged by
                    casava as poor quality when performing the QC analysis.
                   
    --extract       If set then the zipped output file will be uncompressed in
                    the same directory after it has been created.  By default
                    this option will be set if fastqc is run in non-interactive
                    mode.
                    
    -j --java       Provides the full path to the java binary you want to use to
                    launch fastqc. If not supplied then java is assumed to be in
                    your path.
                   
    --noextract     Do not uncompress the output file after creating it.  You
                    should set this option if you do not wish to uncompress
                    the output when running in non-interactive mode.
                    
    --nogroup       Disable grouping of bases for reads >50bp. All reports will
                    show data for every base in the read.  WARNING: Using this
                    option will cause fastqc to crash and burn if you use it on
                    really long reads, and your plots may end up a ridiculous size.
                    You have been warned!
                    
    --min_length    Sets an artificial lower limit on the length of the sequence
                    to be shown in the report.  As long as you set this to a value
                    greater or equal to your longest read length then this will be
                    the sequence length used to create your read groups.  This can
                    be useful for making directly comaparable statistics from 
                    datasets with somewhat variable read lengths.
                    
    -f --format     Bypasses the normal sequence file format detection and
                    forces the program to use the specified format.  Valid
                    formats are bam,sam,bam_mapped,sam_mapped and fastq
                    
    -t --threads    Specifies the number of files which can be processed
                    simultaneously.  Each thread will be allocated 250MB of
                    memory so you shouldn't run more threads than your
                    available memory will cope with, and not more than
                    6 threads on a 32 bit machine
                  
    -c              Specifies a non-default file which contains the list of
    --contaminants  contaminants to screen overrepresented sequences against.
                    The file must contain sets of named contaminants in the
                    form name[tab]sequence.  Lines prefixed with a hash will
                    be ignored.

    -a              Specifies a non-default file which contains the list of
    --adapters      adapter sequences which will be explicity searched against
                    the library. The file must contain sets of named adapters
                    in the form name[tab]sequence.  Lines prefixed with a hash
                    will be ignored.
                    
    -l              Specifies a non-default file which contains a set of criteria
    --limits        which will be used to determine the warn/error limits for the
                    various modules.  This file can also be used to selectively 
                    remove some modules from the output all together.  The format
                    needs to mirror the default limits.txt file found in the
                    Configuration folder.
                    
   -k --kmers       Specifies the length of Kmer to look for in the Kmer content
                    module. Specified Kmer length must be between 2 and 10. Default
                    length is 7 if not specified.
                    
   -q --quiet       Supress all progress messages on stdout and only report errors.
   
   -d --dir         Selects a directory to be used for temporary files written when
                    generating report images. Defaults to system temp directory if
                    not specified.
                    
BUGS

    Any bugs in fastqc should be reported either to [email protected]
    or in www.bioinformatics.babraham.ac.uk/bugzilla/
                   
    
(rnaseq) Last2 11:05:56 ~

trim-galore --help不行,用trim_galore

$ trim-galore --help
trim-galore: command not found
(rnaseq) Last2 11:07:35 ~

$ trim_galore --help

 USAGE:

trim_galore [options] 


-h/--help               Print this help message and exits.

-v/--version            Print the version information and exits.

-q/--quality       Trim low-quality ends from reads in addition to adapter removal. For
                        RRBS samples, quality trimming will be performed first, and adapter
                        trimming is carried in a second round. Other files are quality and adapter
                        trimmed in a single pass. The algorithm is the same as the one used by BWA
                        (Subtract INT from all qualities; compute partial sums from all indices
                        to the end of the sequence; cut sequence at the index at which the sum is
                        minimal). Default Phred score: 20.

$ hisat2 -h
HISAT2 version 2.2.1 by Daehwan Kim ([email protected], www.ccb.jhu.edu/people/infphilo)
Usage: 
  hisat2 [options]* -x  {-1  -2  | -U } [-S ]

    Index filename prefix (minus trailing .X.ht2).
         Files with #1 mates, paired with files in .
             Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
         Files with #2 mates, paired with files in .
             Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
          Files with unpaired reads.
             Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
        File for SAM output (default: stdout)

  , ,  can be comma-separated lists (no whitespace) and can be
  specified many times.  E.g. '-U file1.fq,file2.fq -U file3.fq'.

Options (defaults in parentheses):

 Input:
  -q                 query input files are FASTQ .fq/.fastq (default)
  --qseq             query input files are in Illumina's qseq format
  -f                 query input files are (multi-)FASTA .fa/.mfa

subread用featureCounts -h

$ featureCounts -h
featureCounts: invalid option -- 'h'

Version 2.0.1

Usage: featureCounts [options] -a  -o  input_file1 [input_file2] ... 

## Mandatory arguments:

  -a          Name of an annotation file. GTF/GFF format by default. See
                      -F option for more format information. Inbuilt annotations
                      (SAF format) is available in 'annotation' directory of the
                      package. Gzipped file is also accepted.

$ multiqc -h
Usage: multiqc [OPTIONS] 

  Main MultiQC run command for use with the click command line, complete
  with all click function decorators. To make it easy to use MultiQC within
  notebooks and other locations that don't need click, we simply pass the
  parsed variables on to a vanilla python function.

Options:
  -f, --force                     Overwrite any existing reports
  -d, --dirs                      Prepend directory to sample names
  -dd, --dirs-depth INTEGER       Prepend [INT] directories to sample names.
                                  Negative number to take from start of path.
$ samtools

Program: samtools (Tools for alignments in the SAM format)
Version: 1.11 (using htslib 1.11)

Usage:   samtools  [options]

Commands:
  -- Indexing
     dict           create a sequence dictionary file
     faidx          index/extract FASTA
     fqidx          index/extract FASTQ
     index          index alignment

  -- Editing
     calmd          recalculate MD/NM tags and '=' bases
     fixmate        fix mate information
     reheader       replace BAM header
     targetcut      cut fosmid regions (for fosmid pool only)
     addreplacerg   adds or replaces RG tags
     markdup        mark duplicates
     ampliconclip   clip oligos from the end of reads
$ salmon
salmon v1.4.0

Usage:  salmon -h|--help or 
        salmon -v|--version or 
        salmon -c|--cite or 
        salmon [--no-version-check]  [-h | options]

Commands:
     index      : create a salmon index
     quant      : quantify a sample
     alevin     : single cell analysis
     swim       : perform super-secret operation
     quantmerge : merge multiple quantifications into a single file
(rnaseq) Last2 12:01:07 ~
$ fastp
fastp: an ultra-fast all-in-one FASTQ preprocessor
version 0.20.1
usage: fastp [options] ... 
options:
  -i, --in1                            read1 input file name (string [=])
  -o, --out1                           read1 output file name (string [=])
  -I, --in2                            read2 input file name (string [=])
  -O, --out2                           read2 output file name (string [=])
      --unpaired1                      for PE input, if read1 passed QC but read2 not, it will be written to unpaired1. Default is to discard it. (string [=])
      --unpaired2                      for PE input, if read2 passed QC but read1 not, it will be written to unpaired2. If --unpaired2 is same as --unpaired1 (default mode), both unpaired reads will be written to this same file. (string [=])
      --failed_out                     specify the file to store reads that cannot pass the filters. (string [=])

环境变量

加引号或不加引号都是原模原样输出

$ echo '123'
123
(rnaseq) Last2 12:23:18 ~
$ echo 123
123
(rnaseq) Last2 12:23:24 ~

不可以空格,会被当成命令

$ a = 10 #不可以空格,会被当成命令
a: command not found
(rnaseq) Last2 12:21:17 ~
$ a=10
(rnaseq) Last2 12:21:24 ~
$ echo a
a
(rnaseq) Last2 12:21:29 ~
$ echo $a
10
(rnaseq) Last2 12:21:39 ~

你可能感兴趣的:(Lunix Day 4)