You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was testing the program but I get an error when parsing data that does not contain PL (either VCF file without PL or bed format).
To check if it was my input file I tried out with the provided bed data 701_502.filter.bed and got the same error.
(base) [user@host SNPmatch]$ snpmatch parser -v -i 701_502.filter.bed -o test
2022-08-31 17:32:58,070 - snpmatch.core.parsers - INFO - running snpmatch parser!
2022-08-31 17:32:58,071 - snpmatch.core.parsers - INFO - reading the position file
2022-08-31 17:32:58,100 - snpmatch.core.parsers - INFO - creating snpmatch parser file: test.npz
2022-08-31 17:32:58,117 - root - ERROR - ufunc 'add' did not contain a loop with signature matching types (dtype('<U2'), dtype('<U2')) -> None
Traceback (most recent call last):
File "/home/user/miniconda3/lib/python3.9/site-packages/snpmatch/__init__.py", line 177, in main
args['func'](args)
File "/home/user/miniconda3/lib/python3.9/site-packages/snpmatch/__init__.py", line 134, in snpmatch_parser
parsers.potatoParser(inFile = args['inFile'], logDebug = args['logDebug'], outFile = args['outFile'])
File "/home/user/miniconda3/lib/python3.9/site-packages/snpmatch/core/parsers.py", line 217, in potatoParser
inputs = ParseInputs(inFile, logDebug, outFile)
File "/home/user/miniconda3/lib/python3.9/site-packages/snpmatch/core/parsers.py", line 86, in __init__
self.case_interpret_inputs(outFile + ".stats.json")
File "/home/user/miniconda3/lib/python3.9/site-packages/snpmatch/core/parsers.py", line 113, in case_interpret_inputs
statdict["depth"] = np.nanmean(self.dp)
File "<__array_function__ internals>", line 180, in nanmean
File "/home/user/miniconda3/lib/python3.9/site-packages/numpy/lib/nanfunctions.py", line 1034, in nanmean
return np.mean(arr, axis=axis, dtype=dtype, out=out, keepdims=keepdims,
File "<__array_function__ internals>", line 180, in mean
File "/home/user/miniconda3/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 3432, in mean
return _methods._mean(a, axis=axis, dtype=dtype,
File "/home/user/miniconda3/lib/python3.9/site-packages/numpy/core/_methods.py", line 180, in _mean
ret = umr_sum(arr, axis, dtype, out, keepdims, where=where)
numpy.core._exceptions._UFuncNoLoopError: ufunc 'add' did not contain a loop with signature matching types (dtype('<U2'), dtype('<U2')) -> None
Just to remark: when I provide a VCF file with PL I do not get the error.
== Update ==
I've just found where the problem comes from:
When parsing from .bed, DPmean is set to "NA" (line but afterwards this comuted statdict["depth"] = np.nanmean(self.dp) is called, which gives the error). The same happens with VCF file, if DP is not present (or not present in INFO), it is set to a list of "NA"s, giving afterwards the same error.
The text was updated successfully, but these errors were encountered:
Hi, I was testing the program but I get an error when parsing data that does not contain PL (either VCF file without PL or bed format).
To check if it was my input file I tried out with the provided bed data
701_502.filter.bed
and got the same error.Just to remark: when I provide a VCF file with PL I do not get the error.
== Update ==
I've just found where the problem comes from:
When parsing from .bed,
DPmean
is set to"NA"
(line but afterwards this comutedstatdict["depth"] = np.nanmean(self.dp)
is called, which gives the error). The same happens with VCF file, if DP is not present (or not present in INFO), it is set to a list of "NA"s, giving afterwards the same error.The text was updated successfully, but these errors were encountered: