Open wangjiawen2013 opened 1 year ago
Hi again,
Yes we can do that, I'll make the changes by Monday and update the git and pip versions
On Sat, 12 Nov 2022, 13:31 jiawen wang, @.***> wrote:
Hi, Are there any ways to plot gene expression along only one or more lineages using via.get_gene_expression? It's similar to palantir function compute_gene_trends(pr_res, gene_exprs, lineages=None, n_jobs=-1), where lineages: Subset of lineages for which to compute the trends
— Reply to this email directly, view it on GitHub https://github.com/ShobiStassen/VIA/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISI4SEOKRFH6K5W2C64JADWH4TT5ANCNFSM6AAAAAAR6E2SZE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
hi, just made the changes and are available on git/pip if you want to update. let me know if it works
Great, it works! And can we set a list of user defined terminal states ? Now the terminal states are generated automatically.
This is what palantir does: terminal_states = pd.Series(['DC', 'Mono', 'Ery'],index=['Run5_131097901611291', 'Run5_134936662236454', 'Run4_200562869397916']) start_cell = 'Run5_164698952452459' pr_res = palantir.core.run_palantir(ms_data, start_cell, num_waypoints=500, terminal_states=terminal_states.index)
hi, that would be useful if you want to 'overwrite' the autodetection. we can do a fairly quick fix on that but would need until next week when we have a little more time. thanks for the useful suggestions
hi @wangjiawen2013 this should be fixed now - let me know if it works for you you can specify user_defined_terminal_group=['pDC','MONO1','MEGA1'] - these must correspond to labels in true_label paramter, or you can give user_defined_terminal_cell=[] (with single cell indices as a list of integers) when you initialize v0=VIA()
you can also selectively plot lineage branch probabilities in draw_sc_lineage_probability() or get_gene_expression() by setting marker_lineages = [] with the suitable terminal lineage clusters.
draw_sc_lineage_probability(v0, embedding=tsnem, marker_lineages=[2,4,6,9]) get_gene_expression(via0=v0, gene_exp=df_magic, cmap='rainbow', marker_genes=marker_genes,marker_lineages=[2,4,6,9])
Randomseed is also now fixed to keep pt stable
TypeError Traceback (most recent call last)
Perhaps all the function that use plt.subplots() will lead to this issue when there are only one plot.
hi, i fixed this bug in draw_sc_lineage_probability()
so that you can also plot just one single lineage
Hi, Are there any ways to plot gene expression along only one or more lineages using via.get_gene_expression? It's similar to palantir function compute_gene_trends(pr_res, gene_exprs, lineages=None, n_jobs=-1), where lineages: Subset of lineages for which to compute the trends