【报错解决】snakePipes处理scRNAseq流程报错及解决汇总

1. inconsistent use of tabs and spaces in indentation

1.1 报错 在这里插入图片描述

很诡异的问题,因为所有py脚本都是snakePipes自带的,我根本没动过。

1.2 解决

  • 先找到哪一步报错: scRNAseq脚本中cf.runAndCleanup这一步:在这里插入图片描述
  • 找到cf也就是snakePipes.common_functionsmodule: 路径:/path_to/anaconda3/envs/mamba/envs/snakePipes/lib/python3.12/site-packages/snakePipes/common_functions.py
    查看runAndCleanup
    在这里插入图片描述
  • 继续找出问题的脚本:
    • 因为上述报错是在运行下面这个命令后出错的,所以先找到cmd在这里插入图片描述
    • snakePipes会将cmd输出到log中,查找后得知出问题的应该在snakefile,也就是/path_to/anaconda3/envs/mamba/envs/snakePipes/lib/python3.12/site-packages/snakePipes/workflows/scRNAseq/Snakefile
      在这里插入图片描述
    • 检查出问题脚本:
      • 先备份该脚本
      • vscode打开,找之前报错的line 118,发现确实是indentation混用的问题
      • 解决:ctrl+shift+p, 然后选择Convert Identation to Tabs

2. The ‘mamba’ command is not available in the shell

2.1 报错 在这里插入图片描述

2.2 原因及解决 把mamba的bin加入到环境变量中即可

3. Could not resolve host: mirrors.tuna.tsinghua.edu.cn

3.1 报错 在这里插入图片描述

3.2 原因及解决

  • 原因:mamba env create会使用conda设置中默认的、优先级最前的channel,我的设置里是conda-forge:https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/,所以最后会变成以下报错:
RuntimeError: Download error (28) Timeout was reached [https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/repodata.json]

而这个地址是不存在的。

  • 解决:
    • 备份.condarc
    • 修改.condarc
      • 修改channels里优先级
      • custom_channels中添加mpi-ie: https://conda.anaconda.org/.
channels:
  - mpi-ie
  - conda-forge
  - defaults 
show_channel_urls: true 
custom_channels: 	
  	mpi-ie: https://conda.anaconda.org/ ```

4. ERROR: Could not open file for download /data/extended/mambaf8uLNT88UCo: No such file or directory

4.1 报错

Could not create conda environment from
/path_to/anaconda3/envs/mamba/envs/snakePipes/lib/python3.12/site-packages/snakePipes/shared/rules/envs/shared.yaml:
Command: mamba env create --quiet --file
"/path_to/anaconda3/envs/mamba/envs/8a730fff6bfd761c1a1a279a0c048d44_.yaml"
--prefix "/path_to/anaconda3/envs/mamba/envs/8a730fff6bfd761c1a1a279a0c048d44_"
Output: ERROR   Could not open file for download
/data/extended/mambaf8uLNT88UCo: No such file or directory 

4.2 原因及解决

  • 原因:没有在defaults.yaml中设置tempDir,自动设置成了/data/extended/,导致找不到路径
  • 解决:自定义tempDir即可。
  • 9
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值