Comments (6)
I'm not sure if i follow you correctly for probs
in GPCCA - you want so sum up the lineages
for the main states except for rest, or do you want to do this only for some restricted cells?
If you want them sum up, I don't think it will work, see below (Alpha, Beta, Epsilon):
And for Alpha and Epsilon only:
from cellrank.
Note that I haven't normalized so that it sums to 1, but with sum
over the lineages, the picture is almost the same.
Maybe more robust way instead of max
could be var
- if a cell is in a metastable state, the variance of probs should be big (not uniform). Here's how it would look (now normalized to sum to 1):
If I did misunderstand, please correct me.
from cellrank.
Thanks Mike, you are right, simply summing them up is not a good idea, as you show above.
What do you mean by max
? Can you post your code?
from cellrank.
@VolkerBergen @michalk8 should we go for root_states_probs
and final_states_probs
, or simple root_probs
and final_probs
? Simpler and shorter, no?
from cellrank.
Just for reference, I've plotted how P(A u B u C) = P(A) + P(B) + P(C) - P(A & B) - ...
would look like (in code using the max as discussed). Code for reference:
from itertools import combinations
x = adata.obsm['to_final_states']
x = x['Alpha', 'Beta', 'Epsilon']
current = x.sum(1)
for c in combinations(range(x.shape[1]), 2):
val = np.prod(x[:, c], axis=1)
current -= val
current += np.prod(x, axis=1)
adata.obs['P(A u B u C)'] = current.X.squeeze()
adata.obs['diff'] = adata.obs['P(A u B u C)'] - adata.obs['final_states_probs']
scv.pl.scatter(adata, color=['final_states_probs', 'P(A u B u C)', 'diff'])
I'd keep it root_state_probs
- it's a bit more descriptive and not much longer (+ we have to_final_states
and final_states
).
from cellrank.
Just for clarification: you compare P(XOR(A, B, C))
with using the max? Or how it final_states_probs
computed above?
from cellrank.
Related Issues (20)
- Real Schur Decomposition High Values HOT 2
- Saving figures generated by ScVelo and CellRank HOT 9
- Remove L2 penalty from pygam models HOT 1
- Heatmap expression cascade enriched for genes peaking in most terminal state of the lineage HOT 7
- Fix `pandas>=2.1.1` HOT 1
- Using Seurat SNN graph in place of connectivities matrix HOT 2
- A question about cr.pl.gene_trends() of cellrank HOT 17
- A question about g.predict_terminal_states(method="top_n", n_states=6) and g.plot_macrostates(which="terminal") HOT 1
- Saving vk.plot_projection() HOT 3
- petsc4py error when running "compute_fate_probabilities" HOT 4
- RuntimeError: No coarse-grained stationary distribution found HOT 4
- AttributeError: module 'cellrank' has no attribute 'kernels' HOT 8
- Compatibility with newest Mac hardware/software or Python version? HOT 1
- Plotting issue with `cellrank` HOT 1
- pk.plot_random_walks → AttributeError: can't set attribute" HOT 2
- Function not found HOT 1
- How to get differential kinetics HOT 1
- RealTimeKernel.from_moscot(tp) Out of Memory HOT 19
- How to Combine Seurat AnnData and VeloCyto AnnData HOT 2
- Segfault / python free() invalid size error during compute_transition_matrix HOT 3
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 cellrank.