mims-harvard / TDC

Therapeutics Commons: Artificial Intelligence Foundation for Therapeutic Science
https://tdcommons.ai
MIT License
957 stars 169 forks source link

add gene perturb outcome tasks #252

Closed kexinhuang12345 closed 2 months ago

kexinhuang12345 commented 2 months ago

here is an initial PR for adding scperturb datasets - here are the demo code:

from tdc.multi_pred import PerturbOutcome
test_loader = PerturbOutcome(name="scperturb_gene_NormanWeissman2019")
testdf = test_loader.get_data()

here are the dataset supported "scperturb_gene_NormanWeissman2019"/ "scperturb_gene_ReplogleWeissman2022_rpe1"/ "scperturb_gene_ReplogleWeissman2022_k562_essential"

this also supports the existing drug perturbation datasets

amva13 commented 2 months ago

Hi @kexinhuang12345 looks great! Can you reformat the code to pass the linter. Instructions for doing this easily are

  1. see all failing files by running yapf --style=google -r -d tdc
  2. for any given file, on mac, you can run yapf --style=google <file_path> | pbcopy or simply copy the output of the yapf command
  3. replace the contents of the file with what's on your clipboard

You have 3 failing files. If you do the above for all 3 that test should pass.

amva13 commented 2 months ago

@kexinhuang12345 lgtm