学习小组Day3笔记--尤书书

生信星球Day3-Linux环境下的软件安装.png

linux如何安装软件?

1. 了解conda--“linux的应用商店”

1.1软件管理Miniconda

1.2conda介绍

生信小白第3天-linux的App Store

2. 如何下载miniconda

miniconda 清华
这里犯了个错误:应该下载“Miniconda3-latest-Linux-x86_64.sh”,而不是“Miniconda3-latest-Windows-x86_64.exe

bio04@VM-0-6-ubuntu:~/biosoft$ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
--2021-04-21 17:58:48--  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: 94235922 (90M) [application/octet-stream]
Saving to: ‘Miniconda3-latest-Linux-x86_64.sh’

Miniconda3-latest-Li 100%[======================>]  89.87M  8.37MB/s    in 15s     

2021-04-21 17:59:04 (6.10 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [94235922/94235922]

3. 怎么安装miniconda

bio04@VM-0-6-ubuntu:~/biosoft$ bash Miniconda3-latest-Linux-x86_64.sh

Welcome to Miniconda3 py38_4.9.2

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 
===================================
End User License Agreement - Anaconda Individual Edition
===================================

Copyright 2015-2020, Anaconda, Inc.

All rights reserved under the 3-clause BSD License:

This End User License Agreement (the "Agreement") is a legal agreement between you a
nd Anaconda, Inc. ("Anaconda") and governs your use of Anaconda Individual Edition (
which was formerly known as Anaconda Distribution).

Subject to the terms of this Agreement, Anaconda hereby grants you a non-exclusive, 
non-transferable license to:


...skipping 1 line
  * Modify and create derivative works of sample source code delivered in Anaconda I
ndividual Edition from Anaconda's repository; and
  * Redistribute code files in source (if provided to you by Anaconda as source) and
 binary forms, with or without modification subject to the requirements set forth be
low.

Anaconda may, at its option, make available patches, workarounds or other updates to
 Anaconda Individual Edition. Unless the updates are provided with their separate go
verning terms, they are deemed part of Anaconda Individual Edition licensed to you a
s provided in this Agreement.  This Agreement does not entitle you to any support fo
r Anaconda Individual Edition.

Anaconda reserves all rights not expressly granted to you in this Agreement.

Redistribution and use in source and binary forms, with or without modification, are
 permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, this list
 of conditions and the following disclaimer.
  * Redistributions in binary form must reproduce the above copyright notice, this l
ist of conditions and the following disclaimer in the documentation and/or other mat
erials provided with the distribution.
  * Neither the name of Anaconda nor the names of its contributors may be used to en
dorse or promote products derived from this software without specific prior written 
permission.

You acknowledge that, as between you and Anaconda, Anaconda owns all right, title, a
nd interest, including all intellectual property rights, in and to Anaconda Individu
al Edition and, with respect to third-party products distributed with or through Ana
conda Individual Edition, the applicable third-party licensors own all right, title 
and interest, including all intellectual property rights, in and to such products.  
If you send or transmit any communications or materials to Anaconda suggesting or re
commending changes to the software or documentation, including without limitation, n
ew features or functionality relating thereto, or any comments, questions, suggestio
ns or the like ("Feedback"), Anaconda is free to use such Feedback. You hereby assig
n to Anaconda all right, title, and interest in, and Anaconda is free to use, withou
t any attribution or compensation to any party, any ideas, know-how, concepts, techn
iques or other intellectual property rights contained in the Feedback, for any purpo
se whatsoever, although Anaconda is not required to use any Feedback.

THIS SOFTWARE IS PROVIDED BY ANACONDA AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS O
R IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCH
ANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AN
ACONDA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQ
UENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR S
ERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDI
NG NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

TO THE MAXIMUM EXTENT PERMITTED BY LAW, ANACONDA AND ITS AFFILIATES SHALL NOT BE LIA
BLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROF
ITS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTI
TUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT OR THE USE OR PER
FORMANCE OF ANACONDA INDIVIDUAL EDITION, WHETHER SUCH LIABILITY ARISES FROM ANY CLAI
M BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PR
ODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY. IN NO EVENT WIL
L THE TOTAL CUMULATIVE LIABILITY OF ANACONDA AND ITS AFFILIATES UNDER OR ARISING OUT
 OF THIS AGREEMENT EXCEED US0.00.

If you want to terminate this Agreement, you may do so by discontinuing use of Anaco
nda Individual Edition.  Anaconda may, at any time, terminate this Agreement and the
 license granted hereunder if you fail to comply with any term of this Agreement.   
Upon any termination of this Agreement, you agree to promptly discontinue use of the
 Anaconda Individual Edition and destroy all copies in your possession or control. U
pon any termination of this Agreement all provisions survive except for the licenses
 granted to you.

This Agreement is governed by and construed in accordance with the internal laws of 
the State of Texas without giving effect to any choice or conflict of law provision 
or rule that would require or permit the application of the laws of any jurisdiction
 other than those of the State of Texas. Any legal suit, action, or proceeding arisi
ng out of or related to this Agreement or the licenses granted hereunder by you must
 be instituted exclusively in the federal courts of the United States or the courts 
of the State of Texas in each case located in Travis County, Texas, and you irrevoca
bly submit to the jurisdiction of such courts in any such suit, action, or proceedin
g.


Notice of Third Party Software Licenses
=======================================

Anaconda Individual Edition provides access to a repository which contains software 
packages or tools licensed on an open source basis from third parties and binary pac
kages of these third party tools. These third party software packages or tools are p
rovided on an "as is" basis and are subject to their respective license agreements a
s well as this Agreement and the Terms of Service for the Repository located at http
s://know.anaconda.com/TOS.html; provided, however, no restriction contained in the T
erms of Service shall be construed so as to limit your ability to download the packa
ges contained in Anaconda Individual Edition provided you comply with the license fo
r each such package.  These licenses may be accessed from within the Anaconda Indivi
dual Edition software or at https://docs.anaconda.com/anaconda/pkg-docs. Information
 regarding which license is applicable is available from within many of the third pa
rty software packages and tools and at https://repo.anaconda.com/pkgs/main/ and http
s://repo.anaconda.com/pkgs/r/. Anaconda reserves the right, in its sole discretion, 
to change which third party tools are included in the repository accessible through 
Anaconda Individual Edition.

Intel Math Kernel Library
-------------------------

Anaconda Individual Edition provides access to re-distributable, run-time, shared-li
brary files from the Intel Math Kernel Library ("MKL binaries").

Copyright 2018 Intel Corporation.  License available at https://software.intel.com/e
n-us/license/intel-simplified-software-license (the "MKL License").

You may use and redistribute the MKL binaries, without modification, provided the fo
llowing conditions are met:

  * Redistributions must reproduce the above copyright notice and the following term
s of use in the MKL binaries and in the documentation and/or other materials provide
d with the distribution.
  * Neither the name of Intel nor the names of its suppliers may be used to endorse 
or promote products derived from the MKL binaries without specific prior written per
mission.
  * No reverse engineering, decompilation, or disassembly of the MKL binaries is per
mitted.

You are specifically authorized to use and redistribute the MKL binaries with your i
nstallation of Anaconda Individual Edition subject to the terms set forth in the MKL
 License. You are also authorized to redistribute the MKL binaries with Anaconda Ind
ividual Edition or in the Anaconda package that contains the MKL binaries. If needed
, instructions for removing the MKL binaries after installation of Anaconda Individu
al Edition are available at https://docs.anaconda.com.

cuDNN Software
--------------

Anaconda Individual Edition also provides access to cuDNN software binaries ("cuDNN 
binaries") from NVIDIA Corporation. You are specifically authorized to use the cuDNN
 binaries with your installation of Anaconda Individual Edition subject to your comp
liance with the license agreement located at https://docs.nvidia.com/deeplearning/sd
k/cudnn-sla/index.html. You are also authorized to redistribute the cuDNN binaries w
ith an Anaconda Individual Edition package that contains the cuDNN binaries. You can
 add or remove the cuDNN binaries utilizing the install and uninstall features in An
aconda Individual Edition.

cuDNN binaries contain source code provided by NVIDIA Corporation.


Export; Cryptography Notice
===========================

You must comply with all domestic and international export laws and regulations that
 apply to the software, which include restrictions on destinations, end users, and e
nd use.  Anaconda Individual Edition includes cryptographic software. The country in
 which you currently reside may have restrictions on the import, possession, use, an
d/or re-export to another country, of encryption software. BEFORE using any encrypti
on software, please check your country's laws, regulations and policies concerning t
he import, possession, or use, and re-export of encryption software, to see if this 
is permitted. See the Wassenaar Arrangement http://www.wassenaar.org/ for more infor
mation.

Anaconda has self-classified this software as Export Commodity Control Number (ECCN)
 5D992.c, which includes mass market information security software using or performi
ng cryptographic functions with asymmetric algorithms. No license is required for ex
port of this software to non-embargoed countries.

The Intel Math Kernel Library contained in Anaconda Individual Edition is classified
 by Intel as ECCN 5D992.c with no license required for export to non-embargoed count
ries.

The following packages are included in the repository accessible through Anaconda In
dividual Edition that relate to cryptography:

openssl
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-gr
ade, full-featured, and Open Source toolkit implementing the Transport Layer Securit
y (TLS) and Secure Sockets Layer (SSL) protocols as well as a full-strength general 
purpose cryptography library.

pycrypto
    A collection of both secure hash functions (such as SHA256 and RIPEMD160), and v
arious encryption algorithms (AES, DES, RSA, ElGamal, etc.).

pyopenssl
    A thin Python wrapper around (a subset of) the OpenSSL library.

kerberos (krb5, non-Windows platforms)
    A network authentication protocol designed to provide strong authentication for 
client/server applications by using secret-key cryptography.

cryptography
    A Python library which exposes cryptographic recipes and primitives.

pycryptodome
    A fork of PyCrypto. It is a self-contained Python package of low-level cryptogra
phic primitives.

pycryptodomex
    A stand-alone version of pycryptodome.

libsodium
    A software library for encryption, decryption, signatures, password hashing and 
more.

pynacl
    A Python binding to the Networking and Cryptography library, a crypto library wi
th the stated goal of improving usability, security and speed.


Last updated September 28, 2020


Do you accept the license terms? [yes|no]
[no] >>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> 
Please answer 'yes' or 'no':'
>>> yes

Miniconda3 will now be installed into this location:
/home/bio04/miniconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/bio04/miniconda3] >>> 
PREFIX=/home/bio04/miniconda3
Unpacking payload ...
Collecting package metadata (current_repodata.json): done                           
Solving environment: done

## Package Plan ##

  environment location: /home/bio04/miniconda3

  added / updated specs:
    - _libgcc_mutex==0.1=main
    - brotlipy==0.7.0=py38h27cfd23_1003
    - ca-certificates==2020.10.14=0
    - certifi==2020.6.20=pyhd3eb1b0_3
    - cffi==1.14.3=py38h261ae71_2
    - chardet==3.0.4=py38h06a4308_1003
    - conda-package-handling==1.7.2=py38h03888b9_0
    - conda==4.9.2=py38h06a4308_0
    - cryptography==3.2.1=py38h3c74f83_1
    - idna==2.10=py_0
    - ld_impl_linux-64==2.33.1=h53a641e_7
    - libedit==3.1.20191231=h14c3975_1
    - libffi==3.3=he6710b0_2
    - libgcc-ng==9.1.0=hdf63c60_0
    - libstdcxx-ng==9.1.0=hdf63c60_0
    - ncurses==6.2=he6710b0_1
    - openssl==1.1.1h=h7b6447c_0
    - pip==20.2.4=py38h06a4308_0
    - pycosat==0.6.3=py38h7b6447c_1
    - pycparser==2.20=py_2
    - pyopenssl==19.1.0=pyhd3eb1b0_1
    - pysocks==1.7.1=py38h06a4308_0
    - python==3.8.5=h7579374_1
    - readline==8.0=h7b6447c_0
    - requests==2.24.0=py_0
    - ruamel_yaml==0.15.87=py38h7b6447c_1
    - setuptools==50.3.1=py38h06a4308_1
    - six==1.15.0=py38h06a4308_0
    - sqlite==3.33.0=h62c20be_0
    - tk==8.6.10=hbc83047_0
    - tqdm==4.51.0=pyhd3eb1b0_0
    - urllib3==1.25.11=py_0
    - wheel==0.35.1=pyhd3eb1b0_0
    - xz==5.2.5=h7b6447c_0
    - yaml==0.2.5=h7b6447c_0
    - zlib==1.2.11=h7b6447c_3


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  brotlipy           pkgs/main/linux-64::brotlipy-0.7.0-py38h27cfd23_1003
  ca-certificates    pkgs/main/linux-64::ca-certificates-2020.10.14-0
  certifi            pkgs/main/noarch::certifi-2020.6.20-pyhd3eb1b0_3
  cffi               pkgs/main/linux-64::cffi-1.14.3-py38h261ae71_2
  chardet            pkgs/main/linux-64::chardet-3.0.4-py38h06a4308_1003
  conda              pkgs/main/linux-64::conda-4.9.2-py38h06a4308_0
  conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.7.2-py38h03888b9_0
  cryptography       pkgs/main/linux-64::cryptography-3.2.1-py38h3c74f83_1
  idna               pkgs/main/noarch::idna-2.10-py_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libedit            pkgs/main/linux-64::libedit-3.1.20191231-h14c3975_1
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1h-h7b6447c_0
  pip                pkgs/main/linux-64::pip-20.2.4-py38h06a4308_0
  pycosat            pkgs/main/linux-64::pycosat-0.6.3-py38h7b6447c_1
  pycparser          pkgs/main/noarch::pycparser-2.20-py_2
  pyopenssl          pkgs/main/noarch::pyopenssl-19.1.0-pyhd3eb1b0_1
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py38h06a4308_0
  python             pkgs/main/linux-64::python-3.8.5-h7579374_1
  readline           pkgs/main/linux-64::readline-8.0-h7b6447c_0
  requests           pkgs/main/noarch::requests-2.24.0-py_0
  ruamel_yaml        pkgs/main/linux-64::ruamel_yaml-0.15.87-py38h7b6447c_1
  setuptools         pkgs/main/linux-64::setuptools-50.3.1-py38h06a4308_1
  six                pkgs/main/linux-64::six-1.15.0-py38h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.33.0-h62c20be_0
  tk                 pkgs/main/linux-64::tk-8.6.10-hbc83047_0
  tqdm               pkgs/main/noarch::tqdm-4.51.0-pyhd3eb1b0_0
  urllib3            pkgs/main/noarch::urllib3-1.25.11-py_0
  wheel              pkgs/main/noarch::wheel-0.35.1-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  yaml               pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /home/bio04/miniconda3/condabin/conda
no change     /home/bio04/miniconda3/bin/conda
no change     /home/bio04/miniconda3/bin/conda-env
no change     /home/bio04/miniconda3/bin/activate
no change     /home/bio04/miniconda3/bin/deactivate
no change     /home/bio04/miniconda3/etc/profile.d/conda.sh
no change     /home/bio04/miniconda3/etc/fish/conf.d/conda.fish
no change     /home/bio04/miniconda3/shell/condabin/Conda.psm1
no change     /home/bio04/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/bio04/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /home/bio04/miniconda3/etc/profile.d/conda.csh
modified      /home/bio04/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Miniconda3!
  • 激活
bio04@VM-0-6-ubuntu:~/biosoft$ source ~/.bashrc
(base) bio04@VM-0-6-ubuntu:~/biosoft$ 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/bio04/.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

  • 添加镜像
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
bioconda
conda config --set show_channel_urls yes(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda na.tsinghua.edu.cn/anaconda/cloud/conda-forge
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda config --set show_channel_urls yes

4. (重点)使用miniconda

也就是查看已安装的软件、搜索、安装、卸载(生信需要的)软件,我们以fastqc为例,其实安装软件很复杂,甚至有专门的一门课来讲这个,今天这里仅是入门操作。

  • 查看当前服务器上安装的所有软件列表 conda list
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda list
# packages in environment at /home/bio04/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
conda                     4.9.2            py38h06a4308_0    defaults
conda-package-handling    1.7.2            py38h03888b9_0    defaults
cryptography              3.2.1            py38h3c74f83_1    defaults
idna                      2.10                       py_0    defaults
ld_impl_linux-64          2.33.1               h53a641e_7    defaults
libedit                   3.1.20191231         h14c3975_1    defaults
libffi                    3.3                  he6710b0_2    defaults
libgcc-ng                 9.1.0                hdf63c60_0    defaults
libstdcxx-ng              9.1.0                hdf63c60_0    defaults
ncurses                   6.2                  he6710b0_1    defaults
openssl                   1.1.1h               h7b6447c_0    defaults
pip                       20.2.4           py38h06a4308_0    defaults
pycosat                   0.6.3            py38h7b6447c_1    defaults
pycparser                 2.20                       py_2    defaults
pyopenssl                 19.1.0             pyhd3eb1b0_1    defaults
pysocks                   1.7.1            py38h06a4308_0    defaults
python                    3.8.5                h7579374_1    defaults
readline                  8.0                  h7b6447c_0    defaults
requests                  2.24.0                     py_0    defaults
ruamel_yaml               0.15.87          py38h7b6447c_1    defaults
setuptools                50.3.1           py38h06a4308_1    defaults
six                       1.15.0           py38h06a4308_0    defaults
sqlite                    3.33.0               h62c20be_0    defaults
tk                        8.6.10               hbc83047_0    defaults
tqdm                      4.51.0             pyhd3eb1b0_0    defaults
urllib3                   1.25.11                    py_0    defaults
wheel                     0.35.1             pyhd3eb1b0_0    defaults
xz                        5.2.5                h7b6447c_0    defaults
yaml                      0.2.5                h7b6447c_0    defaults
zlib                      1.2.11               h7b6447c_3    defaults
  • 搜索conda软件 conda search xxx(软件名)
  • 安装软件 conda install xxx(软件名) -y
    • 不加-y版
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda install fastqc
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.9.2
  latest version: 4.10.1

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/bio04/miniconda3

  added / updated specs:
    - fastqc


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.12.5  |       ha878542_0         137 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    certifi-2020.12.5          |   py38h578d9bd_1         143 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    conda-4.10.1               |   py38h578d9bd_0         3.1 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    fastqc-0.11.9              |       hdfd78af_1         9.7 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
    font-ttf-dejavu-sans-mono-2.37|       hab24e00_0         388 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    fontconfig-2.13.1          |    h7e3eb15_1002         324 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    freetype-2.10.4            |       h7ca028e_0         912 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    icu-67.1                   |       he1b5a44_0        12.9 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libiconv-1.16              |       h516909a_0         1.4 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libpng-1.6.37              |       h21135ba_2         306 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libuuid-2.32.1             |    h14c3975_1000          26 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libxml2-2.9.10             |       h68273f3_2         1.3 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    openjdk-10.0.2             |    h14c3975_1015       189.2 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    openssl-1.1.1k             |       h27cfd23_0         2.5 MB  defaults
    perl-5.32.0                |       h36c2ea0_0        16.8 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    python_abi-3.8             |           1_cp38           4 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ------------------------------------------------------------
                                           Total:       239.0 MB

The following NEW packages will be INSTALLED:

  fastqc             anaconda/cloud/bioconda/noarch::fastqc-0.11.9-hdfd78af_1
  font-ttf-dejavu-s~ anaconda/cloud/conda-forge/noarch::font-ttf-dejavu-sans-mono-2.37-hab24e00_0
  fontconfig         anaconda/cloud/conda-forge/linux-64::fontconfig-2.13.1-h7e3eb15_1002
  freetype           anaconda/cloud/conda-forge/linux-64::freetype-2.10.4-h7ca028e_0
  icu                anaconda/cloud/conda-forge/linux-64::icu-67.1-he1b5a44_0
  libiconv           anaconda/cloud/conda-forge/linux-64::libiconv-1.16-h516909a_0
  libpng             anaconda/cloud/conda-forge/linux-64::libpng-1.6.37-h21135ba_2
  libuuid            anaconda/cloud/conda-forge/linux-64::libuuid-2.32.1-h14c3975_1000
  libxml2            anaconda/cloud/conda-forge/linux-64::libxml2-2.9.10-h68273f3_2
  openjdk            anaconda/cloud/conda-forge/linux-64::openjdk-10.0.2-h14c3975_1015
  perl               anaconda/cloud/conda-forge/linux-64::perl-5.32.0-h36c2ea0_0
  python_abi         anaconda/cloud/conda-forge/linux-64::python_abi-3.8-1_cp38

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2020.10.14~ --> anaconda/cloud/conda-forge::ca-certificates-2020.12.5-ha878542_0
  certifi            pkgs/main/noarch::certifi-2020.6.20-p~ --> anaconda/cloud/conda-forge/linux-64::certifi-2020.12.5-py38h578d9bd_1
  conda               pkgs/main::conda-4.9.2-py38h06a4308_0 --> anaconda/cloud/conda-forge::conda-4.10.1-py38h578d9bd_0
  openssl                                 1.1.1h-h7b6447c_0 --> 1.1.1k-h27cfd23_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
openjdk-10.0.2       | 189.2 MB  | ######################################### | 100% 
openssl-1.1.1k       | 2.5 MB    | ######################################### | 100% 
libuuid-2.32.1       | 26 KB     | ######################################### | 100% 
fastqc-0.11.9        | 9.7 MB    | ######################################### | 100% 
ca-certificates-2020 | 137 KB    | ######################################### | 100% 
fontconfig-2.13.1    | 324 KB    | ######################################### | 100% 
perl-5.32.0          | 16.8 MB   | ######################################### | 100% 
freetype-2.10.4      | 912 KB    | ######################################### | 100% 
python_abi-3.8       | 4 KB      | ######################################### | 100% 
conda-4.10.1         | 3.1 MB    | ######################################### | 100% 
libxml2-2.9.10       | 1.3 MB    | ######################################### | 100% 
certifi-2020.12.5    | 143 KB    | ######################################### | 100% 
icu-67.1             | 12.9 MB   | ######################################### | 100% 
libiconv-1.16        | 1.4 MB    | ######################################### | 100% 
libpng-1.6.37        | 306 KB    | ######################################### | 100% 
font-ttf-dejavu-sans | 388 KB    | ######################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
  • 卸载软件 conda remove fastqc -y

5. (选修)不同的生信实战项目

需要定制conda的分身。(不理解就跳过吧)

conda 环境

  • 查看当前conda有哪些环境
    conda info --envs
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base                  *  /home/bio04/miniconda3

例子:处理转录组数据

  • 先建立一个名叫rnaseq的conda环境;然后指定python版本是3,安装软件fastqc、trimmomatic
    conda create -n rna-seq python=3 fastqc trimmomatic -y
(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda create -n rna-seq python=3 fastqc trimmomatic -y
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/bio04/miniconda3/envs/rna-seq

  added / updated specs:
    - fastqc
    - python=3
    - trimmomatic


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |      conda_forge           3 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    _openmp_mutex-4.5          |            1_gnu          22 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    certifi-2020.12.5          |   py39hf3d152e_1         143 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    fontconfig-2.13.1          |    hba837de_1005         357 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    freetype-2.10.4            |       h0708190_1         890 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    icu-68.1                   |       h58526e2_0        13.0 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ld_impl_linux-64-2.35.1    |       hea4e1c9_2         618 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libffi-3.3                 |       h58526e2_2          51 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libgcc-ng-9.3.0            |      h2828fa1_19         7.8 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libgomp-9.3.0              |      h2828fa1_19         376 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libstdcxx-ng-9.3.0         |      h6de172a_19         4.0 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libuuid-2.32.1             |    h7f98852_1000          28 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    libxml2-2.9.10             |       h72842e0_4         774 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ncurses-6.2                |       h58526e2_4         985 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    openssl-1.1.1k             |       h7f98852_0         2.1 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    pip-21.0.1                 |     pyhd8ed1ab_0         1.1 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    python-3.9.2               |hffdb5ce_0_cpython        27.3 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    python_abi-3.9             |           1_cp39           4 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    readline-8.1               |       h46c0cb4_0         295 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    setuptools-49.6.0          |   py39hf3d152e_3         943 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    sqlite-3.35.4              |       h74cdb3f_0         1.4 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    tk-8.6.10                  |       h21135ba_1         3.2 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    trimmomatic-0.39           |       hdfd78af_2         144 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
    tzdata-2021a               |       he74cb21_0         121 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    wheel-0.36.2               |     pyhd3deb0d_0          31 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    xz-5.2.5                   |       h516909a_1         343 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    zlib-1.2.11                |    h516909a_1010         106 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
    ------------------------------------------------------------
                                           Total:        66.1 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      anaconda/cloud/conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
  _openmp_mutex      anaconda/cloud/conda-forge/linux-64::_openmp_mutex-4.5-1_gnu
  ca-certificates    anaconda/cloud/conda-forge/linux-64::ca-certificates-2020.12.5-ha878542_0
  certifi            anaconda/cloud/conda-forge/linux-64::certifi-2020.12.5-py39hf3d152e_1
  fastqc             anaconda/cloud/bioconda/noarch::fastqc-0.11.9-hdfd78af_1
  font-ttf-dejavu-s~ anaconda/cloud/conda-forge/noarch::font-ttf-dejavu-sans-mono-2.37-hab24e00_0
  fontconfig         anaconda/cloud/conda-forge/linux-64::fontconfig-2.13.1-hba837de_1005
  freetype           anaconda/cloud/conda-forge/linux-64::freetype-2.10.4-h0708190_1
  icu                anaconda/cloud/conda-forge/linux-64::icu-68.1-h58526e2_0
  ld_impl_linux-64   anaconda/cloud/conda-forge/linux-64::ld_impl_linux-64-2.35.1-hea4e1c9_2
  libffi             anaconda/cloud/conda-forge/linux-64::libffi-3.3-h58526e2_2
  libgcc-ng          anaconda/cloud/conda-forge/linux-64::libgcc-ng-9.3.0-h2828fa1_19
  libgomp            anaconda/cloud/conda-forge/linux-64::libgomp-9.3.0-h2828fa1_19
  libiconv           anaconda/cloud/conda-forge/linux-64::libiconv-1.16-h516909a_0
  libpng             anaconda/cloud/conda-forge/linux-64::libpng-1.6.37-h21135ba_2
  libstdcxx-ng       anaconda/cloud/conda-forge/linux-64::libstdcxx-ng-9.3.0-h6de172a_19
  libuuid            anaconda/cloud/conda-forge/linux-64::libuuid-2.32.1-h7f98852_1000
  libxml2            anaconda/cloud/conda-forge/linux-64::libxml2-2.9.10-h72842e0_4
  ncurses            anaconda/cloud/conda-forge/linux-64::ncurses-6.2-h58526e2_4
  openjdk            anaconda/cloud/conda-forge/linux-64::openjdk-10.0.2-h14c3975_1015
  openssl            anaconda/cloud/conda-forge/linux-64::openssl-1.1.1k-h7f98852_0
  perl               anaconda/cloud/conda-forge/linux-64::perl-5.32.0-h36c2ea0_0
  pip                anaconda/cloud/conda-forge/noarch::pip-21.0.1-pyhd8ed1ab_0
  python             anaconda/cloud/conda-forge/linux-64::python-3.9.2-hffdb5ce_0_cpython
  python_abi         anaconda/cloud/conda-forge/linux-64::python_abi-3.9-1_cp39
  readline           anaconda/cloud/conda-forge/linux-64::readline-8.1-h46c0cb4_0
  setuptools         anaconda/cloud/conda-forge/linux-64::setuptools-49.6.0-py39hf3d152e_3
  sqlite             anaconda/cloud/conda-forge/linux-64::sqlite-3.35.4-h74cdb3f_0
  tk                 anaconda/cloud/conda-forge/linux-64::tk-8.6.10-h21135ba_1
  trimmomatic        anaconda/cloud/bioconda/noarch::trimmomatic-0.39-hdfd78af_2
  tzdata             anaconda/cloud/conda-forge/noarch::tzdata-2021a-he74cb21_0
  wheel              anaconda/cloud/conda-forge/noarch::wheel-0.36.2-pyhd3deb0d_0
  xz                 anaconda/cloud/conda-forge/linux-64::xz-5.2.5-h516909a_1
  zlib               anaconda/cloud/conda-forge/linux-64::zlib-1.2.11-h516909a_1010



Downloading and Extracting Packages
setuptools-49.6.0    | 943 KB    | ######################################### | 100% 
libstdcxx-ng-9.3.0   | 4.0 MB    | ######################################### | 100% 
readline-8.1         | 295 KB    | ######################################### | 100% 
libgomp-9.3.0        | 376 KB    | ######################################### | 100% 
xz-5.2.5             | 343 KB    | ######################################### | 100% 
icu-68.1             | 13.0 MB   | ######################################### | 100% 
openssl-1.1.1k       | 2.1 MB    | ######################################### | 100% 
python-3.9.2         | 27.3 MB   | ######################################### | 100% 
wheel-0.36.2         | 31 KB     | ######################################### | 100% 
fontconfig-2.13.1    | 357 KB    | ######################################### | 100% 
_openmp_mutex-4.5    | 22 KB     | ######################################### | 100% 
ncurses-6.2          | 985 KB    | ######################################### | 100% 
libuuid-2.32.1       | 28 KB     | ######################################### | 100% 
ld_impl_linux-64-2.3 | 618 KB    | ######################################### | 100% 
freetype-2.10.4      | 890 KB    | ######################################### | 100% 
python_abi-3.9       | 4 KB      | ######################################### | 100% 
certifi-2020.12.5    | 143 KB    | ######################################### | 100% 
tk-8.6.10            | 3.2 MB    | ######################################### | 100% 
sqlite-3.35.4        | 1.4 MB    | ######################################### | 100% 
libffi-3.3           | 51 KB     | ######################################### | 100% 
zlib-1.2.11          | 106 KB    | ######################################### | 100% 
trimmomatic-0.39     | 144 KB    | ######################################### | 100% 
_libgcc_mutex-0.1    | 3 KB      | ######################################### | 100% 
libxml2-2.9.10       | 774 KB    | ######################################### | 100% 
tzdata-2021a         | 121 KB    | ######################################### | 100% 
pip-21.0.1           | 1.1 MB    | ######################################### | 100% 
libgcc-ng-9.3.0      | 7.8 MB    | ######################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate rna-seq
#
# To deactivate an active environment, use
#
#     $ conda deactivate

-再次查看一下我们的conda环境,conda info --envs ,看是不是多了一个rna-seq。但是发现,默认还是base

(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda info --envs
# conda environments:
#
base                  *  /home/bio04/miniconda3
rna-seq                  /home/bio04/miniconda3/envs/rna-seq

-激活新的conda环境 conda activate rna-seq

(base) bio04@VM-0-6-ubuntu:~/biosoft$ conda activate rna-seq
(rna-seq) bio04@VM-0-6-ubuntu:~/biosoft$
  • 显示帮助文档
    随便输入一个软件名称
(rna-seq) bio04@VM-0-6-ubuntu:~/biosoft$ fastqc
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/bio04/miniconda3/envs/rna-seq/lib/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
    at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
    at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2424)
    at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2481)
    at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2678)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2611)
    at java.base/java.lang.Runtime.load0(Runtime.java:814)
    at java.base/java.lang.System.load(System.java:1838)
    at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
    at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2424)
    at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2481)
    at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2678)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2632)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:876)
    at java.base/java.lang.System.loadLibrary(System.java:1875)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1395)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1393)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1392)
    at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1425)
    at java.desktop/java.awt.Component.<clinit>(Component.java:590)

-退出当前环境 conda deactivate

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

推荐阅读更多精彩内容