theislab / chemCPA

Code for "Predicting Cellular Responses to Novel Drug Perturbations at a Single-Cell Resolution", NeurIPS 2022.
https://arxiv.org/abs/2204.13545
MIT License
97 stars 24 forks source link

Errors running default manual_seml_sweep.py #165

Open ArturDev42 opened 3 months ago

ArturDev42 commented 3 months ago

Hi, thanks for this cool method! I need to run your method on my data and wanted to test it first. I ran manual_seml_sweep.py with providing lincs_full_smiles_sciplex_genes.h5ad as this was what the script expected by default. I downloaded the data from your repo.

There were key errors originating from drug_names_to_once_canon_smiles() in data.py. For the following drug names, no smiles name could be found:

Error with drug_name (
Error with drug_name )-3-(1-propyl-piperidin-3-yl)-phenol
Error with drug_name atenolol-(
Error with drug_name flurbiprofen-(
Error with drug_name |-)
Error with drug_name |-)-7-hydroxy-2-(N,N-di-n-propylamino)tetralin

When excluding those drug names, I get the following error:

Traceback (most recent call last):
  File "manual_seml_sweep.py", line 23, in <module>
    exp.init_dataset(**args["dataset"])
  File "/home/usr/miniconda3/envs/chemical_CPA/lib/python3.8/site-packages/sacred/config/captured_function.py", line 42, in captured_function
    result = wrapped(*args, **kwargs)
  File "/home/usr/chemCPA/chemCPA/experiments_run.py", line 90, in init_dataset
    self.datasets, self.dataset = load_dataset_splits(
  File "/home/usr/chemCPA/chemCPA/data.py", line 410, in load_dataset_splits
    dataset = Dataset(
  File "/home/usr/chemCPA/chemCPA/data.py", line 193, in __init__
    assert (
AssertionError: Index-based drug encoding only works with single perturbations

Could you perhaps provide instructions on how to run your method with default settings?

I was also trying to reproduce 1_lincs.ipyb but got an error when running the cell to calculate differential genes manually:

TypeError: Could not convert ['DMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSODMSO...

Thanks in advance!

tsa87 commented 6 days ago

Having the same issue with the drug names