broadinstitute / wot

A software package for analyzing snapshots of developmental processes
https://broadinstitute.github.io/wot/
BSD 3-Clause "New" or "Revised" License
139 stars 34 forks source link

import error "from scipy.sparse.sputils import IndexMixin" #60

Open yeroslaviz opened 5 years ago

yeroslaviz commented 5 years ago

After installing version 1.0.2 and running the command

wot optimal_transport --matrix data/ExprMatrix.h5ad --cell_days data/cell_days.txt --out tmaps1.0.2/tmaps1.0.2

I get the following error

 Traceback (most recent call last):
  File "/home/yeroslaviz/miniconda3/envs/wot1.0/bin/wot", line 6, in <module>
    from wot.__main__ import main
  File "/home/yeroslaviz/miniconda3/envs/wot1.0/lib/python3.7/site-packages/wot/__init__.py", line 3, in <module>
    import wot.io
  File "/home/yeroslaviz/miniconda3/envs/wot1.0/lib/python3.7/site-packages/wot/io/__init__.py", line 2, in <module>
    from .io import *
  File "/home/yeroslaviz/miniconda3/envs/wot1.0/lib/python3.7/site-packages/wot/io/io.py", line 5, in <module>
    import anndata
  File "/home/yeroslaviz/.local/lib/python3.7/site-packages/anndata/__init__.py", line 1, in <module>
    from .base import AnnData
  File "/home/yeroslaviz/.local/lib/python3.7/site-packages/anndata/base.py", line 21, in <module>
    from scipy.sparse.sputils import IndexMixin

I have bin able to temporarily fix it by downgrading scipy to version 1.2.1 inside my conda environment.

pip install scipy==1.2.1
yeroslaviz commented 5 years ago

But when running the command with the new data I still get an error

wot optimal_transport --matrix data/ExprMatrix.h5ad --cell_days data/cell_days.txt --out tmaps1.0.2/tmaps1.0.2

the files are as followed

data/ExprMatrix.h5ad

id      Xkr4    Sox17   Mrpl15  Lypla1 ...
D0_Dox_C1_AAACCTGAGTATCTCG-1    0.0     0.0     0.98459476      0.0 ...
D0_Dox_C1_AAACCTGCAAGCGAGT-1    0.0     0.0     0.7069785       0.0 ...
...

data/cell_days.txt

D0_Dox_C1_AAACCTGAGTATCTCG-1    0
D0_Dox_C1_AAACCTGCAAGCGAGT-1    0
D0_Dox_C1_AAACCTGGTCTCTTAT-1    0

But the error calims the day information is not available for that:

Traceback (most recent call last):
  File "/home/yeroslaviz/miniconda3/envs/Waddington/bin/wot", line 11, in <module>
    load_entry_point('wot', 'console_scripts', 'wot')()
  File "/home/yeroslaviz/miniconda3/envs/Waddington/lib/python3.7/site-packages/wot/wot/__main__.py", line 23, in main
    cmd.main(command_args)
  File "/home/yeroslaviz/miniconda3/envs/Waddington/lib/python3.7/site-packages/wot/wot/commands/optimal_transport.py", line 23, in main
    ot_model = wot.commands.initialize_ot_model_from_args(args)
  File "/home/yeroslaviz/miniconda3/envs/Waddington/lib/python3.7/site-packages/wot/wot/commands/util.py", line 47, in initialize_ot_model_from_args
    covariate=args.covariate if hasattr(args, 'covariate') else None
  File "/home/yeroslaviz/miniconda3/envs/Waddington/lib/python3.7/site-packages/wot/wot/ot/initializer.py", line 39, in initialize_ot_model
    return OTModel(ds, **kwargs)
  File "/home/yeroslaviz/miniconda3/envs/Waddington/lib/python3.7/site-packages/wot/wot/ot/ot_model.py", line 111, in __init__
    raise ValueError("Days information not available for matrix")
ValueError: Days information not available for matrix