In silico perturbation error with combos
#331
by
tasahi-1
- opened
Hello,
In silico perturbation using a fine-tuned model with combos=0 successfully worked.
However, when I set combos=1 in the same setting, isp.perturb_data() had an error maybe due to dimension mismatch.
Could you teach me what was happened?
I updated geneformer on Feb 8, 2024.
isp = InSilicoPerturber(perturb_type="overexpress",
perturb_rank_shift=None,
genes_to_perturb="all",
combos=1,
anchor_gene=None,
model_type="CellClassifier",
num_classes=5,
emb_mode="cell",
cell_emb_style="mean_pool",
filter_data=None,
cell_states_to_model={
"state_key": "label",
"start_state": 0,
"goal_state": goal_state,
"alt_states": []},
max_ncells=None,
emb_layer=0,
cell_inds_to_perturb="all",
forward_batch_size=40,
nproc=8)
num = 0 # No. of splitted datasets
isp.perturb_data("Norman/finetune/231214_geneformer_CellClassifier_K562_L2048_B12_LR0.0006454238554420985_LSlinear_WU126.5101151044998_E10_Oadamw_F0",
"Norman/data_split_for_perturb_selected_combo/select_{}_to_{}.dataset/".format(num, num+400),
"Norman/perturb_select_results_freeze-4/overexpress_{}/".format(gene),
"perturbed_{}_to_{}".format(num, num+400))
Outputs:
Thanks for raising this issue! We don't currently support the combinations of combos=1
and anchor_gene=None
, given the computational complexity of perturbing all pairs of genes. If you are still interested in perturbing combinations, please specify the anchor_gene
. Hope that helps!
tasahi-1
changed discussion status to
closed