Comments (5)
Ciao edward and apologizes for the delay in responding (holidays and such).
project_cell_annotation
simply transfers any annotation from the scRNAseq data to space. Most times, we use it to transfer to the cell type probabilities stored in tangram_ct_pred
. These values are useful on a relative scale, not absolute. As you notice, when we plot them, the plotting function standardizes to 0-1 scale irrespective of the scale of each annotation (cell types). We wanted Tangram to do that.
The meaning of plotting tangram_ct_pred
in space is to tell you where your cell type is likely to be within the ROI,
from tangram.
Hello, how do I get the most likely cell type for each voxel from tangram_ct_pred. Thanks!
from tangram.
The simplest way is to fetch the most probable cell for each voxel (which assumes one cell per voxel).
To get a more accurate histogram, you can sample one cell from the probability distribution of each voxels: in this way, you do not get only the most probable cell, as you sample proportionally to the cell probability.
from tangram.
The simplest way is to fetch the most probable cell for each voxel (which assumes one cell per voxel).
Thanks for your clarification. If each voxel only has one cell, do you mean that we can use np.argmax(adata_MxIF.obsm["tangram_ct_pred"].values, axis=-1) to assign a label for each voxel with the class with the largest probability? Thanks!
from tangram.
Short answer: yes.
Long answer: yes but be careful.
Let's say that you have 4 voxels (containing 1 cell each), each of them is 75% prob. of being a cancer cell and 25% of being an immune cell.
How many immune cell do you expect? I would say 1 - but using argmax will give you all cancer cells.
Despite the above argument, we still use argmax to do assignment. But if you asked us to build an histogram of cell types, we would instead draw a random binary label with 75%/25% probability to get a more accurate estimate. We don't do this for deconvolution b/c we have no way to know "which" of the four is an immune cell. For more advanced cases, we compute cell type statistics by argmax vs by random sampling from probability, and compare that to estimate Tangram uncertainty in deconvolution.
The "right" way of doing is to have a more robust method for deconvolution, which perhaps even works w/o using segmentation. Well - that's Tangram2 which we are currently building :)
from tangram.
Related Issues (20)
- Possible to use multiple single cell datasets in Tangram? HOT 3
- Cannot find correspondence of the input data HOT 1
- question about training genes HOT 1
- Some questions about best practices HOT 1
- Attribute error : module 'tangram' has no attribute 'map_cells_to_space' HOT 2
- scRNAseq cells < spatial cells, curious about how mapping works HOT 3
- Unexpected behaviour HOT 1
- Question about acceptable AUC, improving AUC HOT 1
- potential overfitting HOT 5
- Interpretation of tangram_ct_pred HOT 2
- Option "enforce gene lowercase" HOT 1
- error when sq.im.segment
- Tangram Deconvolution HOT 1
- Using Integrated single cell data for alignment
- AttributeError: module 'tangram' has no attribute 'pp_adatas'
- Sparsity_sc and sparsity_sp = 0
- Please explain `project_cell_annotations`
- Running time for Tangram
- plot_auc does not work HOT 1
- Possible mistakes in the "Tangram under the hood" page in documentation website
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tangram.