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
88 stars 23 forks source link

Transfer learning code #59

Closed siboehm closed 2 years ago

siboehm commented 2 years ago

Adds code for performing the basic transfer learning steps (same genes).

siboehm commented 2 years ago

This seems to be working, but I'll test it more extensively tomorrow. I haven't adjusted the adversarial parameters like we did in #57, since we don't quite know how it'll behave (the low amount of drugs will make the adversaries job much easier).

siboehm commented 2 years ago

@MxMstrmn Can you have a look mainly at the config file? https://github.com/theislab/chemical_CPA/pull/59/files#diff-18343001c7e5bcc84d52ee88ec6dd664adcd03b43a87364c890f7a985142ef05

I want to start a first sweep for figuring out which hyperparameters we should use for finetuning on SciPlex. Ideally I'd run this after the trapnell_cpa_lincs_genes.h5ad has been updated (#61) to include the full Trapnell dataset.

MxMstrmn commented 2 years ago

I will check the config tomorrow morning. The PR #65 addresses the above mentioned issue.

review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

siboehm commented 2 years ago

@MxMstrmn I updated the notebook that I use to analyze the results, plot_sweep_results.ipynb, you can have a look at it if you want.

MxMstrmn commented 2 years ago

Thanks, I will look at the notebook tomorrow. Will also skim through the other changes!

siboehm commented 2 years ago

I ran a first finetuning and it failed, due to an issue in the evaluation. For some perturbations, we only have 1 DE gene, which is not enough to calculate an R2 score (no variance). I'm skipping these now, just pasting this here for reference:

K562_Dasatinib_0.001
K562_Dasatinib_0.01
K562_Dasatinib_0.1
K562_Dasatinib_1.0
K562_Mocetinostat_0.001
K562_Mocetinostat_0.01
K562_Mocetinostat_0.1
K562_Mocetinostat_1.0
K562_Nilotinib_0.001
K562_Nilotinib_0.01
K562_Nilotinib_0.1
K562_Nilotinib_1.0
MxMstrmn commented 2 years ago

This is a good spot, we might have to compute the de genes based on the available gene set for fintetuning. We should discuss this and potentially adjust the adata files.

siboehm commented 2 years ago

Merging this since it seems to be working.