-
Notifications
You must be signed in to change notification settings - Fork 0
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
KeyError: 'decontXcounts' #15
Comments
Hi @namratabhattacharya -- you need to use the |
I have run the model successfully. However, I cannot retrieve the Leiden clusters. What steps are needed for that after the model is trained? |
If you're referring to the sample embeddings (Figure 1c in the preprint), these come from the self-attention step in the model. In other words, you should go through the If you're referring to the gene embeddings (Figure 2a), these are stored within the # retrieve gene embeddings
embeddings = model.gene_emb(torch.arange(model.gene_emb.num_embeddings - 2)).detach().cpu().numpy() |
I want to find the sample embeddings mentioned in Fig 1c in the pre-print. Is it possible to fetch the embeddings without making changes in the code? |
Yeah, we currently don't have a simple function or anything that will let you get the sample embeddings for given inputs in a single line. That is a good idea and something we should add though! For now you'll need to partially go through the |
@namratabhattacharya
|
Upon running the preprocess.py, I am getting the following error-
python scripts/preprocess.py --ts_path input.h5ad --out_path input
Loaded data.
Subsetted to CCLE genes.
Traceback (most recent call last):
File "/home/namratab/namratab/TransferLearning/Comparison/exceiver/scripts/preprocess.py", line 150, in
sys.exit(main(args))
File "/home/namratab/namratab/TransferLearning/Comparison/exceiver/scripts/preprocess.py", line 53, in main
tsdata = ad.AnnData(tsdata.layers[args.count_var], obs=tsdata.obs, var=tsdata.var, uns=tsdata.uns)
File "/home/namratab/.local/lib/python3.9/site-packages/anndata/_core/aligned_mapping.py", line 113, in getitem
_subset(self.parent_mapping[key], self.subset_idx),
File "/home/namratab/.local/lib/python3.9/site-packages/anndata/_core/aligned_mapping.py", line 148, in getitem
return self._data[key]
KeyError: 'decontXcounts'
How to resolve this?
The text was updated successfully, but these errors were encountered: