Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in TensorQTL - pandas & numpy conflict #528

Open
m-mews opened this issue Feb 15, 2023 · 1 comment
Open

Bug in TensorQTL - pandas & numpy conflict #528

m-mews opened this issue Feb 15, 2023 · 1 comment

Comments

@m-mews
Copy link
Contributor

m-mews commented Feb 15, 2023

I tried to run a cis-eQTL analysis using TensorQTL, but received the below error. Upon investigating the dockerfile from which I built my singularity sif image, it appears that this pandas and numpy version conflict originate FROM gaow/base-notebook. Thank you in advance for your help!

Warning: 'rfunc' cannot be imported. R and the 'rpy2' Python package are needed.
Mapping files: 100% | 3/3 [00:07<00:00, 2.45s/it]
cis-QTL mapping: nominal associations for all variant-phenotype pairs

  • 221 samples
  • 1130 phenotypes
  • 44 covariates
  • 4817011 variants
  • checking phenotypes: 1130/1130
  • Computing associations
    Mapping chromosome 3
    processing phenotype 1130/1130
    time elapsed: 3.57 min
    • writing output
      Traceback (most recent call last):
      File "/home/mxm1368/.sos/19d2b6ee7290e278/singularity_run_25148.py", line 41, in
      cis.map_nominal(genotype_df, variant_df,
      File "/opt/conda/lib/python3.8/site-packages/tensorqtl/cis.py", line 475, in map_nominal
      chr_res_df.to_parquet(os.path.join(output_dir, f'{prefix}.cis_qtl_pairs.{chrom}.parquet'))
      File "/opt/conda/lib/python3.8/site-packages/pandas/util/_decorators.py", line 211, in wrapper
      return func(*args, **kwargs)
      File "/opt/conda/lib/python3.8/site-packages/pandas/core/frame.py", line 2976, in to_parquet
      return to_parquet(
      File "/opt/conda/lib/python3.8/site-packages/pandas/io/parquet.py", line 430, in to_parquet
      impl.write(
      File "/opt/conda/lib/python3.8/site-packages/pandas/io/parquet.py", line 174, in write
      table = self.api.Table.from_pandas(df, **from_pandas_kwargs)
      File "pyarrow/table.pxi", line 1393, in pyarrow.lib.Table.from_pandas
      File "/opt/conda/lib/python3.8/site-packages/pyarrow/pandas_compat.py", line 1027, in
      'floating': np.float,
      File "/opt/conda/lib/python3.8/site-packages/numpy/init.py", line 305, in getattr
      raise AttributeError(former_attrs[attr])
      AttributeError: module 'numpy' has no attribute 'float'.
      np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
      The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
      https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
@gaow
Copy link
Contributor

gaow commented Feb 15, 2023

@m-mews i like the way you report issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants