xpclr icon indicating copy to clipboard operation
xpclr copied to clipboard

TypeError: not all arguments converted during string formatting

Open Peijiawei2022 opened this issue 1 year ago • 6 comments

Dear author

when I use xpclr like this : > xpclr --out ./chr1.txt --format vcf --input /home/maize/vcf/merge_1.filter.vcf --samplesA /home/maize/pop/pop_TEM_7.txt --samplesB /home/maize/pop/pop_parviglumis.txt --map ../../map/chr1.MT.map.distance --chr 1 --gdistkey None --phased --size 1000 --step 1000.

The soft report like this > 2023-04-11 02:14:36 : INFO : running xpclr v1.1.2 2023-04-11 02:14:36 : INFO : Loading VCF 2023-04-11 03:58:57 : INFO : VCF loading complete 2023-04-11 03:59:43 : INFO : 10,387,865 SNPs in total are in the provided input files 2023-04-11 03:59:45 : INFO : 458,181 SNPs excluded as multiallelic 2023-04-11 03:59:47 : INFO : 94,201 SNPs excluded as missing in all samples in a population 2023-04-11 03:59:47 : INFO : 6,952,624 SNPs excluded as invariant or singleton in population 2 2023-04-11 03:59:48 : INFO : 2,882,859/10,387,865 SNPs included in the analysis (27.75%) 2023-04-11 03:59:58 : INFO : Done dropping above SNPs from analysis. XP-CLR algorithm starting. 2023-04-11 03:59:58 : INFO : No genetic distance provided; using rrate of 1e-08/bp 2023-04-11 04:00:13 : INFO : Omega estimated as : 1.218393 --- Logging error --- Traceback (most recent call last): File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/logging/init.py", line 1100, in emit msg = self.format(record) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/logging/init.py", line 943, in format return fmt.format(record) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/logging/init.py", line 678, in format record.message = record.getMessage() File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/logging/init.py", line 368, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/bin/xpclr", line 4, in import('pkg_resources').run_script('xpclr==1.1.2', 'xpclr') File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 672, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/pkg_resources/init.py", line 1479, in run_script exec(script_code, namespace, namespace) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/xpclr-1.1.2-py3.10.egg/EGG-INFO/scripts/xpclr", line 196, in File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/xpclr-1.1.2-py3.10.egg/EGG-INFO/scripts/xpclr", line 182, in main File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/xpclr-1.1.2-py3.10.egg/xpclr/methods.py", line 333, in xpclr_scan li_data[i] = compute_xpclr(window_data, sel_coefs) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/xpclr-1.1.2-py3.10.egg/xpclr/methods.py", line 225, in compute_xpclr ll = calculate_cl_romberg(s_coef, dat) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/xpclr-1.1.2-py3.10.egg/xpclr/methods.py", line 204, in calculate_cl_romberg cl = calculate_likelihood(values=(xj, nj, c, p2freq, var)) File "/home/soft/biosoft/Anaconda3/envs/pjw_python3.10/lib/python3.10/site-packages/xpclr-1.1.2-py3.10.egg/xpclr/methods.py", line 137, in chen_likelihood logger.warning(w[-1].message, i_likl, i_base) Message: RuntimeWarning('divide by zero encountered in _binom_pdf') Arguments: ((0.000985545217247697, 1.697675905086831e-07, {'neval': 231, 'last': 6, 'iord': array([ 1, 6, 5, 4, 3, 2, 32, 0, 0, 0, 4, 0, 64, 0, 64, 0, 0, 0, 67, 0, 2, 0, 134, 0, 2, 0, 1, 0, 128, 0, 80, 0, 0, 0, 67, 0, 2, 0, 134, 0, 2, 0, 1, 0, 1702043745, 1852142702, 537552227, 857743392, 208, 0], dtype=int32), 'alist': array([1.00000000e-003, 5.00000000e-001, 2.50500000e-001, 1.25750000e-001, 6.33750000e-002, 3.21875000e-002, 6.92945493e-310, 6.92917945e-310, 6.92917941e-310, 6.92917932e-310, 6.92944876e-310, 6.92944894e-310, 6.92917932e-310, 6.92917932e-310, 6.92918119e-310, 6.92917931e-310, 6.92917932e-310, 6.92934876e-310, 6.92917931e-310, 6.92944895e-310, 6.92917932e-310, 6.92945497e-310, 6.92917931e-310, 6.92945494e-310, 6.92944891e-310, 6.92944892e-310, 6.92917931e-310, 6.92944892e-310, 6.92917932e-310, 6.92944890e-310, 6.92944888e-310, 6.92944844e-310, 6.92917932e-310, 6.92917931e-310, 6.92944895e-310, 6.92917967e-310, 6.92917932e-310, 6.92944881e-310, 6.92945496e-310, 6.92945494e-310, 6.92945496e-310, 6.92945496e-310, 6.92945494e-310, 6.92945496e-310, 6.92945496e-310, 6.92945494e-310, 6.92917932e-310, 6.92945494e-310, 6.92917931e-310, 6.92945496e-310]), 'blist': array([3.21875000e-002, 9.99000000e-001, 5.00000000e-001, 2.50500000e-001,

If I invert popA and popB,it became normal,how i happend?

Peijiawei2022 avatar Apr 11 '23 02:04 Peijiawei2022