使用mamba替換miniconda和anaconda,原因是速度更快,無論是創(chuàng)建新環(huán)境還是激活環(huán)境
conda、mamba、anaconda都是蟒蛇的意思…
下載mambaforge
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh
linux和mac使用命令行下載mambaforge
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
windows版本和linux、mac版本可以從夸克網盤下載
鏈接:https://pan.quark.cn/s/6fd066275bd1
提取碼:iG2E
安裝
windows直接鼠標雙擊打開Mambaforge-Windows-x86_64.exe文件在圖形界面安裝;
linux和mac在命令行中安裝
bash Mambaforge*.sh
- 設置鏡像
linux和mac在${HOME}目錄下新建文件.condarc
Windows中默認路徑為C:\Users\用戶名\.condarc
always_yes設為true, 也不用每次加-y參數或者每次手動輸入y確認安裝包了。
always_yes: true
show_channel_urls: true
channels:
- defaults
default_channels:
- https://mirror.sjtu.edu.cn/anaconda/pkgs/r
- https://mirror.sjtu.edu.cn/anaconda/pkgs/main
custom_channels:
conda-forge: https://mirror.sjtu.edu.cn/anaconda/cloud/
pytorch: https://mirror.sjtu.edu.cn/anaconda/cloud/
bioconda: https://mirror.sjtu.edu.cn/anaconda/cloud/
創(chuàng)建一個簡單環(huán)境
創(chuàng)建一個名叫fastq_env的環(huán)境,包括一個軟件fastqc
mamba create -n fastq_env -c bioconda fastqc
創(chuàng)建一個單細胞分析環(huán)境
示例創(chuàng)建一個Python單細胞分析環(huán)境;
- SC.yml文件如下
name 是環(huán)境名,prefix為環(huán)境目錄路徑,channels為鏡像文件.condarc
中設置的國內鏡像名;dependencies包及其版本號
name: SC
prefix: /home/victor/mambaforge/envs/SC
channels:
- conda-forge
- bioconda
- plotly
dependencies:
- python=3.11
- numpy
- pandas
- bioinfokit
- matplotlib
- seaborn
- matplotlib-venn
- adjustText
- tabulate
- textwrap3
- notebook
- ipykernel
- openpyxl
- pyarrow
- scanpy
- python-igraph
- leidenalg
- pytables
- harmonypy
- plotly
- cython
- scikit-learn
- python-louvain
- pip
- pip:
- scrublet
- celltypist
- pyscenic
- cell2location
- pydeseq2
- gseapy
- 創(chuàng)建環(huán)境
mamba env create -f SC.yml
創(chuàng)建一個R單細胞環(huán)境
R.yml文件如下,包括R4.3.2、tidyverse系列數據處理軟件文章來源:http://www.zghlxwxcb.cn/news/detail-804839.html
name: R
prefix: /home/victor/mambaforge/envs/R
channels:
- conda-forge
- bioconda
dependencies:
- r-base=4.3.2
- r-monocle3
- r-terra
- r-tidyverse
- r-lme4
- r-ggrastr
- r-pheatmap
- r-plotly
- r-gplots
- conda-forge:r-seurat
- conda-forge:r-seuratobject
- conda-forge:r-circlize
- conda-forge:r-speedglm
- conda-forge:r-htmlwidgets
- bioconductor-biocgenerics
- bioconductor-delayedarray
- bioconductor-delayedmatrixstats
- bioconductor-limma
- bioconductor-s4vectors
- bioconductor-summarizedexperiment
- bioconductor-batchelor
- bioconductor-hdf5array
- bioconductor-complexheatmap
- bioconductor-monocle
- libgdal
- libudunits2
- 創(chuàng)建環(huán)境
mamba env create -f R.yml
文章來源地址http://www.zghlxwxcb.cn/news/detail-804839.html
到了這里,關于使用mamba替換conda和anaconda配置環(huán)境安裝軟件的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!