-
Notifications
You must be signed in to change notification settings - Fork 21
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
No common gene when running Tangram in Sopa-CLI model #174
Comments
Hi @KunHHE, indeed
|
Thanks very much! @quentinblampey So you mean I update this using the code for the reference.h5ad: gene_name_mapping = adata_sc.var['feature_name']; adata_sc.var_names = gene_name_mapping. Then save it and reuse it in sopa for Tangram? |
Yes @KunHHE, exactly! Let me know if this works |
HI, @quentinblampey, tested and it works. But I have a question, single cell resolution-like technologies like merscope, Xenium, Visium HD are recommended using uniform mode? based on the introduction from Tangram github. non-single cell like technologies are recommended using rna_count_based density_prior. In the CLI of sopa, it's not flexible switching to 'uniform'? And Can I ask you what is the next coding steps once read and open the AnnData, to project the cell types either mapping to leiden or spatial coordinates? This would be different from the 'tutorial_tangram_with_squidpy.ipynb' For example, I should do normalization for the probability value and then project to cell types? probabilities = np.array(comb_adata.obsm['tangram_pred']) predicted_cell_types = [XXXX cell types Thanks!!! (sopa) C:\Users\hekun>sopa annotate tangram C:/Users/hekun/Downloads/S3R1.zarr --sc-reference-path C:/Users/hekun/Downloads/M1_modified.h5ad --cell-type-key cell_type |
I'm not sure to understand your question. We use a uniform density, indeed. |
Thanks very much@quentinblampey. Can I ask you if we have multiple samples for merscope or xenium data, let's say 30 samples, then we will have to run Tangram one-by-one, because I like sopa-Tangram here, as it splits the Tangram run, so the RAM memory won't be filled full. |
Yes @KunHHE by default we run this sample by sample, but you could also decide to concatenate your samples into one AnnData object, and then run Tangram on this concatenated object. Be careful to the batch effect though: if you have a lot of batch effect, this could affect the annotation after concatenation |
Hi @quentinblampey, I used CLI mode to run sopa, and want to use Tangram directly with sopa for my merfish data. But it error: no common gene found between .zarr and .h5ad reference. Looks like in the .h5ad reference, it hides gene names and gene ensemble id jump out for the cell type training, that is why two datasets cannot match.
Because in the jupyter I run :
gene_name_mapping = adata_sc.var['feature_name']
adata_sc.var_names = gene_name_mapping
Then the overlapped genes showed up for training.
Is there any way in the CLI running to figure out?
Thansk!
The text was updated successfully, but these errors were encountered: