使用xpclr分析出现TypeError: ufunc 'true_divide' not supported for the input types'

各位老师好,


我按照组学大讲堂的网易云群体重测序课程在我们超算上搭建了分析环境(我是自行安装的各种软件,因为我们研究所规定不能使用虚拟机)。在使用课程提供的黄瓜重测序数据进行xpclr分析的时候出现了这样的报错:


2022-06-24 16:17:24 : INFO : running xpclr v1.1.2

2022-06-24 16:17:24 : INFO : Loading VCF

/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/allel/io/vcf_read.py:1048: UserWarning: error occurred attempting tabix (Could not load .tbi/.csi index of my_pop_cucu/00.filter/clean.vcf.gz); falling back to scanning to region

  'scanning to region' % e)

/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/allel/io/vcf_read.py:1240: UserWarning: 'None' INFO header not found

  warnings.warn('%r INFO header not found' % name)

/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/allel/io/vcf_read.py:1454: UserWarning: no type for field 'variants/None', assuming object

  warnings.warn('no type for field %r, assuming %s' % (f, normed_types[f]))

/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/allel/io/vcf_read.py:1048: UserWarning: error occurred attempting tabix (Could not load .tbi/.csi index of my_pop_cucu/00.filter/clean.vcf.gz); falling back to scanning to region

  'scanning to region' % e)

/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/allel/io/vcf_read.py:1240: UserWarning: 'None' INFO header not found

  warnings.warn('%r INFO header not found' % name)

/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/allel/io/vcf_read.py:1454: UserWarning: no type for field 'variants/None', assuming object

  warnings.warn('no type for field %r, assuming %s' % (f, normed_types[f]))

2022-06-24 16:17:52 : INFO : VCF loading complete

2022-06-24 16:17:52 : INFO : 73,412 SNPs in total are in the provided input files

2022-06-24 16:17:52 : INFO : 0 SNPs excluded as multiallelic

2022-06-24 16:17:52 : INFO : 0 SNPs excluded as missing in all samples in a population

2022-06-24 16:17:52 : INFO : 22,496 SNPs excluded as invariant or singleton in population 2

2022-06-24 16:17:52 : INFO : 50,916/73,412 SNPs included in the analysis (69.36%)

2022-06-24 16:17:52 : INFO : Done dropping above SNPs from analysis. XP-CLR algorithm starting.

2022-06-24 16:17:53 : INFO : Omega estimated as : 1.861240

Traceback (most recent call last):

  File "/public/home/weijiehong/miniconda3/bin/xpclr", line 4, in <module>

    __import__('pkg_resources').run_script('xpclr==1.1.2', 'xpclr')

  File "/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 667, in run_script

    self.require(requires)[0].run_script(script_name, ns)

  File "/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1471, in run_script

    exec(script_code, namespace, namespace)

  File "/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/EGG-INFO/scripts/xpclr", line 196, in <module>

  File "/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/EGG-INFO/scripts/xpclr", line 186, in main

  File "/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/xpclr/methods.py", line 324, in xpclr_scan

  File "/public/home/weijiehong/miniconda3/lib/python3.7/site-packages/numpy/core/_methods.py", line 191, in _mean

    ret = ret / rcount

TypeError: ufunc 'true_divide' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''


请问这要怎么解决呢


请先 登录 后评论

1 个回答

任蓬伟

请问问题解决了么,我也遇到了该问题

/home/user01/miniconda3/envs/pfam_scan/lib/python3.7/site-packages/allel/io/vcf_read.py:1622: UserWarning: some samples not found, will be ignored: ''

  ', '.join(map(repr, sorted(samples))))

/home/user01/miniconda3/envs/pfam_scan/lib/python3.7/site-packages/allel/io/vcf_read.py:1240: UserWarning: 'None' INFO header not found

  warnings.warn('%r INFO header not found' % name)

/home/user01/miniconda3/envs/pfam_scan/lib/python3.7/site-packages/allel/io/vcf_read.py:1454: UserWarning: no type for field 'variants/None', assuming object

  warnings.warn('no type for field %r, assuming %s' % (f, normed_types[f]))

请先 登录 后评论