使用mamba替换miniconda和anaconda,原因是速度更快,无论是创建新环境还是激活环境
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/
创建一个简单环境
创建一个名叫fastq_env的环境,包括一个软件fastqc
mamba create -n fastq_env -c bioconda fastqc
创建一个单细胞分析环境
示例创建一个Python单细胞分析环境;
- SC.yml文件如下
name 是环境名,prefix为环境目录路径,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
- 创建环境
mamba env create -f SC.yml
创建一个R单细胞环境
R.yml文件如下,包括R4.3.2、tidyverse系列数据处理软件文章来源:https://www.toymoban.com/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
- 创建环境
mamba env create -f R.yml
文章来源地址https://www.toymoban.com/news/detail-804839.html
到了这里,关于使用mamba替换conda和anaconda配置环境安装软件的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!