EBISPOT / gwas-sumstats-tools

Apache License 2.0
7 stars 1 forks source link

TypeError: dtype '<class 'pandera.dtypes.Float128'>' not understood #15

Closed carbocation closed 10 months ago

carbocation commented 1 year ago

I installed these tools via $ pip install gwas-sumstats-tools on macOS. I tried to run gwas-ssf validate but got the following error:

$ gwas-ssf validate outfile.txt    

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/pandera/engines/pandas_engine.py", line 160, in dtype
    return engine.Engine.dtype(cls, data_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandera/engines/engine.py", line 217, in dtype
    raise TypeError(
TypeError: Data type '<class 'pandera.dtypes.Float128'>' not understood by Engine.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/bin/gwas-ssf", line 5, in <module>
    from gwas_sumstats_tools.cli import app
  File "/opt/homebrew/lib/python3.11/site-packages/gwas_sumstats_tools/cli.py", line 13, in <module>
    from gwas_sumstats_tools.validate import validate
  File "/opt/homebrew/lib/python3.11/site-packages/gwas_sumstats_tools/validate.py", line 7, in <module>
    from gwas_sumstats_tools.schema.data_table import SumStatsSchema
  File "/opt/homebrew/lib/python3.11/site-packages/gwas_sumstats_tools/schema/data_table.py", line 15, in <module>
    class SumStatsSchema:
  File "/opt/homebrew/lib/python3.11/site-packages/gwas_sumstats_tools/schema/data_table.py", line 41, in SumStatsSchema
    'p_value': Column(Float128, [
               ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandera/schema_components.py", line 88, in __init__
    super().__init__(
  File "/opt/homebrew/lib/python3.11/site-packages/pandera/schemas.py", line 1772, in __init__
    self.dtype = dtype  # type: ignore
    ^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandera/schemas.py", line 1880, in dtype
    self._dtype = pandas_engine.Engine.dtype(value) if value else None
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandera/engines/pandas_engine.py", line 178, in dtype
    np_or_pd_dtype = pd.api.types.pandas_dtype(data_type)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/dtypes/common.py", line 1702, in pandas_dtype
    raise TypeError(f"dtype '{dtype}' not understood")
TypeError: dtype '<class 'pandera.dtypes.Float128'>' not understood
jdhayhurst commented 1 year ago

Hi, please could you send a small sample of outfile.txt so that I can replicate the issue?

EmilMiP commented 1 year ago

has there been any development on this issue?

I am experiencing something very similar, except I am not even able to get gwas-ssf to print the help function.

I am commenting on this issue as I suspect it may be the same underlying issue.

If you need me to provide any information please let me know.

edit: I am on a windows system.

privefl commented 1 year ago

Same error here (just running gwas-ssf without any option or file). Using miniconda3 on Windows, with Python 3.11.4.

ljwh2 commented 1 year ago

We will investigate whether we can replicate this locally. In the meantime could you try running in Docker?

privefl commented 1 year ago

I found it a bit difficult to use docker on Windows. Do you know any good tuto for it?

ljwh2 commented 1 year ago

@privefl: https://docs.docker.com/desktop/install/windows-install/ Also some helpful tips here (from a different application): https://oboacademy.github.io/obook/howto/odk-setup/

adrianICG commented 11 months ago

Having the same issue here (also windows if that helps)

ljwh2 commented 11 months ago

Apologies for the delay in fixing this issue while we await recruitment of a new staff member. In the meantime, if you are unable to validate your files please contact gwas-subs@ebi.ac.uk and we will be happy to support you further.

EmilMiP commented 11 months ago

I appreciate the offer and good luck with recruitment.

I have had to use a linux based system (the HPC cluster I work on) to validate the sumstats there, as I was unable to get it to work on my local (windows) machine. On the linux system, it work with any problems. However, I still hope the issue for windows can be solved in the future.