Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simulation_single option with pert_data.prepare_split gives ValueError #72

Open
murthy1770 opened this issue Jun 2, 2024 · 1 comment

Comments

@murthy1770
Copy link

pert_data.prepare_split(split = 'simulation_single', seed=1) # get data split with seed
pert_data.get_dataloader(batch_size = 32, test_batch_size = 128) # prepare data loader

This gives Value Error. I am using a custom dataset with single gene perturbations only (CROP-Seq). What is the difference between simulation and simulation_single? If you have a dataset with single gene perturbations, what should one use?


ValueError Traceback (most recent call last)
Cell In[6], line 1
----> 1 pert_data.prepare_split(split = 'simulation_single', seed=1) # get data split with seed
2 pert_data.get_dataloader(batch_size = 32, test_batch_size = 128) # prepare data loader

File ~/.conda/envs/biomodels/lib/python3.12/site-packages/gears/pertdata.py:355, in PertData.prepare_split(self, split, seed, train_gene_set_size, combo_seen2_train_frac, combo_single_split_test_set_fraction, test_perts, only_test_set_perts, test_pert_genes, split_dict_path)
351 if split in ['simulation', 'simulation_single']:
352 # simulation split
353 DS = DataSplitter(self.adata, split_type=split)
--> 355 adata, subgroup = DS.split_data(train_gene_set_size = train_gene_set_size,
356 combo_seen2_train_frac = combo_seen2_train_frac,
357 seed=seed,
358 test_perts = test_perts,
359 only_test_set_perts = only_test_set_perts
360 )
361 subgroup_path = split_path[:-4] + '_subgroup.pkl'
362 pickle.dump(subgroup, open(subgroup_path, "wb"))

ValueError: too many values to unpack (expected 2)

@murthy1770 murthy1770 changed the title simulation_single option with pert_data.prepare_split gives simulation_single option with pert_data.prepare_split gives ValueError Jun 2, 2024
@domcke
Copy link

domcke commented Jul 31, 2024

I have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants