bunnech / cellot

Learning Single-Cell Perturbation Responses using Neural Optimal Transport
BSD 3-Clause "New" or "Revised" License
109 stars 9 forks source link

UMAP not found when plotting #24

Closed Anzoteh96 closed 4 months ago

Anzoteh96 commented 4 months ago

Here is what I did after running all models (including evaluation part) on 4i/cisplatin:

python3 ./scripts/plot.py --evaldir results/4i/drug-cisplatin/

The first task (plotting marginals) went fine, but the next thing (plotting umaps) gave the following error:

Plotting UMAPS.
Traceback (most recent call last):
  File "[repo_name]/./scripts/plot.py", line 359, in <module>
    app.run(main)
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "[repo_name]/./scripts/plot.py", line 336, in main
    plot_umaps(config_plotting, evaldir, outdir, setting, where)
  File "[repo_name]/./scripts/plot.py", line 110, in plot_umaps
    umaps[model] = load_single_umap(evaldir / f"model-{model}", setting, where)
  File "[repo_name]/./scripts/plot.py", line 60, in load_single_umap
    umaps = pd.read_csv(expdir / f"evals_{setting}_{where}" / "umap.csv", index_col=0)
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 948, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 611, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1448, in __init__
    self._engine = self._make_engine(f, self.engine)
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1705, in _make_engine
    self.handles = get_handle(
  File "/state/partition1/llgrid/pkg/anaconda/python-LLM-2023b/lib/python3.10/site-packages/pandas/io/common.py", line 863, in get_handle
    handle = open(
FileNotFoundError: [Errno 2] No such file or directory: 'results/4i/drug-cisplatin/model-cellot/evals_iid_data_space/umap.csv'

Did I miss something (during the evaluation part) that (supposedly) produces the umap? The only thing produced during evaluation is imputed file and the evals file on all the metric. Thanks!

bunnech commented 4 months ago

The plotting script is no longer supported as is as we choose not to use UMAPS anymore as part of the evaluation pipeline. Please adapt the plot script accordingly, in case you want to execute it.

Anzoteh96 commented 4 months ago

Thanks Charlotte! The same thing also happens for mmd and knn_enrichment. Are they being deprecated too?

bunnech commented 4 months ago

As mentioned, the plotting script is no longer supported.