conda是包及其依賴項和環(huán)境的管理工具。快速安裝晒喷、運行和升級包及其依賴項。做生信研究用miniconda就可以了访敌。
小知識點:
~根目錄
-參數(shù)(單個字母) --多個字母
conda的知識點 https://www.cnblogs.com/chester-cs/p/11824433.html
conda關(guān)系
下面是整個過程凉敲。
1:下載:
1.1去清華conda鏡像網(wǎng)站找到鏈接
1.2(uname -a可以查看服務(wù)器多少位)
1.3 wget+網(wǎng)址下載。
2: 安裝
2.1 bash +軟件名字 安裝
2.2 source ~/.bashrc 激活(修改環(huán)境變量)
2.3 添加鏡像
# 使用清華鏡像 config是設(shè)置配置
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
# 設(shè)置搜索時顯示通道地址
conda config --set show_channel_urls yes
3:使用(-y是自動化,以fastqc為例)
3.1 查看當前所有軟件列表 conda list
3.2 搜索軟件 conda search fastqc
3.3 安裝軟件 conda install fastqc -y
或者 conda install fastqc=0.11.7 -y
3.4 卸載軟件 conda remove fastqc -y
3.5 當前conda環(huán)境 conda info --envs
(前面帶*的就是默認的)
3.6 創(chuàng)建新的conda環(huán)境 (創(chuàng)建一個 rna-seq環(huán)境爷抓,指定python3并安裝 fastqc和trimmomatic)
conda create -n rna-seq python=3 fastqc trimmomatic -y
3.7 激活新的conda環(huán)境
#將rna-seq設(shè)為默認環(huán)境
conda activate rna-seq
查閱了conda的命令:
command
clean Remove unused packages and caches.
config Modify configuration values in .condarc. This is modeled after the git config command. Writes to the user .condarc
file (/home/bio14/.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.
usage: conda [-h] [-V] command ...
clean #移除不用的包和緩存文件
config #修改.condarc文件中的配置值势决,這里的.condarc文件類似于.vimrc或者.bashrc,用于配置conda的設(shè)置蓝撇。模仿了git的配置命令果复,默認將配置寫入到HOME文件夾下的.condarc文件中
create #從一系列特定的包創(chuàng)建一個新的conda環(huán)境
help #conda help文件
info #顯示當前conda的信息,包括路徑渤昌,channels等
init #初始化conda和shell的交互虽抄,實驗性功能
install #在特定的環(huán)境安裝一系列包
list #列出在一個conda環(huán)境中被linked(被關(guān)聯(lián))的包
package #低等級的conda軟件包實用程序?(實驗性功能)不曉得有什么用
remove #從一個特定的conda環(huán)境中移除一系列包
uninstall #remove命令的別名
run #在conda環(huán)境中跑一個可執(zhí)行程序(實驗性功能)
search #找尋包并顯示相關(guān)的信息独柑。輸入是MatchSpec迈窟,一種結(jié)構(gòu)化查詢語言。理解為一種約定的查詢方式忌栅?
update #把conda包更新到最新的兼容版本
upgrade #update命令的別名