Open auesro opened 2 years ago
Hi, thanks for reporting this! Yes, your correction should be fine. Or we can just add ".cpu()" and having:
model_dict['state_dict_2']['decoder.predictor.0.weight'].detach().cpu().numpy()
I just updated the corresponding line in the tutorial.
No problem, Dora!
I have a couple of questions, I will add them here but if you prefer me to post them somewhere else, let me know: -In the tutorial, you use human genesets (c2,c5, and c8) to cluster a mouse dataset. Would it work better to use the mouse genesets? Or it doesnt matter much? -Can we use the updated genesets (v2022.1) or Unifan is designed to work only with the ones provided (v7.4)? -Can we add other genesets such as c3.mir or c3.tft to aid in the clustering?
Thanks!
A
Hi, UNIFAN should be compatible with any gene sets. We use getGeneSetMatrix function in the utils.py to process the gene sets input. You may take a look at the function and our example gene sets (including the tf-DNA interaction file) to see if this function can also be applied to process the gene sets that you are interested in. Let me know if modifications are needed and we will consider update the function accordingly.
Regarding your question on mouse or human gene sets, we haven't explored if applying mouse (human) gene sets to mouse (human) tissues works better. It is an interesting question and I would love to hear more from you if you decide to explore this.
Dear @doraadong
I have found an error when running the cluster annotations notebook
At the line
weights = model_dict['state_dict_2']['decoder.predictor.0.weight'].detach().numpy()
, python throws:I believe I solved it by doing:
The notebook then runs without problems but wanted to make sure thats the correct solution.
Cheers,
A
P.S.: Just in case, I add here my environment setup: