Package: iterpert
Sequential Optimal Experimental Design of Perturbation ScreensThis repository hosts the code base for the paperSequential Optimal Experimental Design of Perturbation Screens Guided by Multimodal PriorsKexin Huang, Romain Lopez, Jan-Christian Hütter, Takamasa Kudo, Antonio Rios, Aviv RegevOverviewUnderstanding a cell's transcriptional response to genetic perturbations answers vital biological questions such as cell reprogramming and target discovery. Despite significant advances in the Perturb-seq technology, the demand for vast experimental configurations surpasses the capacity for existing assays. Recent machine learning models, trained on existing Perturb-seq data sets, predict perturbation outcomes but face hurdles due to sub-optimal training set selection, resulting in weak predictions for unexplored perturbation space. In this study, we propose a sequential approach to the design of Perturb-seq experiments that uses the model to strategically select the most informative perturbations at each step, for follow-up experiments. This enables a significantly more efficient exploration of the perturbation space, while predicting the effect of the rest of the perturbations with high-fidelity. We conduct a preliminary data analysis on a large-scale Perturb-seq experiment, which reveals that our setting is severely restricted by the number of examples and rounds, falling into a non-conventional active learning regime called ''active learning under budget''. Motivated by this insight, we develop IterPert that exploits rich and multi-modal prior knowledge in order to efficiently guide the selection of perturbations. Making use of prior knowledge for this task is novel, and crucial for our setting of active learning under budget. We validate our method using in-silico benchmarking of active learning, constructed from a large-scale CRISPRi Perturb-seq data set. Our benchmarking reveals that IterPert outperforms contemporary active learning strategies, and delivering comparable accuracy with only a third of the amount of perturbations profiled. All in all, these results demonstrate the potential of sequentially designing perturbation screens.InstallationUse the API:condacreate--nameiterpert_envpython=3.8
condaactivateiterpert_env
condainstallpyg-cpyg
pipinstalliterpertUse the raw source code:condacreate--nameiterpert_envpython=3.8
condaactivateiterpert_env
condainstallpyg-cpyg
gitclonehttps://github.com/Genentech/iterative-perturb-seq.gitcditerative-perturb-seq
pipinstall-rrequirements.txtAPI interfaceFirst, initialize theIterPertmodule:fromiterpert.iterpertimportIterPertinterface=IterPert(weight_bias_track=True,exp_name=strategy,device='cuda:0',seed=1)The arguments are:weight_bias_track: True/False, if use weights and bias trackingdevice: cuda deviceproj_name: weights and bias project nameexp_name: weights and bias experiment nameseed: random seed in data splitrun: random seed in training runThen, initialize the data:path='YOUR PATH'interface.initialize_data(path=path,dataset_name='replogle_k562_essential_1000hvg',batch_size=256)The arguments are:path: path to save the datadataset_name: name of the datasetbatch_size: number of cells in a batchtest_fraction: fraction of the hold out test setThen, initialize the GEARS model:interface.initialize_model(epochs=20,hidden_size=64)The arguments are:epochs: the number of training epochshidden_size: the number of hidden size of the modelretrain: True/False, whether to retrain the model in each roundThen, initialize the active learning strategy:You can also choose from baselinesRandom,BALD,BatchBALD,BAIT,ACS-FW,Core-Set,BADGE,LCMDor specify our methodIterPertinterface.initialize_active_learning_strategy(strategy='IterPert')Lastly, kick off the training:interface.start(n_init_labeled=100,n_round=5,n_query=100)The arguments are:n_init_labeled: the number of initialized number of samplesn_round: the number of roundsn_query: the number of queries per roundDemoWe provide  tutorials to get started with iterative perturb-seq:NameDescriptionData TutorialIntroduce the data loader and how to use your own dataTraining TutorialA demo on training iterpertKnowledge Kernel TutorialA tutorial on creating knowledge kernel for your own dataReproduce experimentsPlease refer toreproduce_repodirectory to reproduce each experiment. Notably, theREADME.mdcontains sh files to generate all experiments.figX.ipynbis the notebook that produces the figures.