Skip to content
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

Arrow, directionality, line, smoothness #34

Open
wangjiawen2013 opened this issue Dec 20, 2022 · 6 comments
Open

Arrow, directionality, line, smoothness #34

wangjiawen2013 opened this issue Dec 20, 2022 · 6 comments

Comments

@wangjiawen2013
Copy link

Hi,
Could you explain the meaning of the arrow direction and the line ? Besides, some lines are smoothly, but some are very sharp, how do you draw the line ?

Are they (lines) similar to paga and monocle3 ? Lines overlap well with the main path of the graph, while sometimes the lines of VIA deviate from the centroid of the scatter points, is there a way to make it beautiful ?
image

@ShobiStassen
Copy link
Owner

ShobiStassen commented Dec 20, 2022 via email

@wangjiawen2013
Copy link
Author

I cannot find the function plot_milestone_edgebundle, do you change it ? There is a similar one named plot_edge_bundle. But I haven't found any tutorial on plot_edge_bundle(). When I tried to used it with via.plot_edge_bundle(v0,text_labels=True), it displayed:
In [85]: via.plot_edge_bundle(v0,text_labels=True)

TypeError Traceback (most recent call last)
in
----> 1 via.plot_edge_bundle(v0,text_labels=True)

~/programs/miniconda3/envs/py37/lib/python3.7/site-packages/pyVIA/plotting_via.py in plot_edge_bundle(hammerbundle_dict, via_object, alpha_bundle_factor, linewidth_bundle, facecolor, cmap, extra_title_text, size_scatter, alpha_scatter, headwidth_bundle, headwidth_alpha, arrow_frequency, show_arrow, sc_labels_sequential, sc_labels_expression, initial_bandwidth, decay, n_milestones, scale_scatter_size_pop, show_milestones, sc_labels, text_labels)
735 milestone_numeric_values = df['sc_expression'].values # used to color edges
736 else:
--> 737 hammer_bundle = hammerbundle_dict['hammerbundle']
738 layout = hammerbundle_dict['milestone_embedding'][['x', 'y']].values
739 milestone_edges = hammerbundle_dict['edges']

TypeError: 'VIA' object is not subscriptable

@ShobiStassen
Copy link
Owner

ShobiStassen commented Dec 20, 2022 via email

@ShobiStassen
Copy link
Owner

By the way, if you check out the tutorial on timeseries data in the RTD then you can see an example of how we modify the umap embedding to make it more consistent with the temporal chronology of the data :)

@wangjiawen2013
Copy link
Author

Are the lines MCMC path ?

@ShobiStassen
Copy link
Owner

the lines in the plot_edge_bundle() are a fine-grained view of the intercellular connectivity highlighting all major pathways/connections. The weight of an edge means there are many cell-cell connections along this path. I will soon add in the functionality to highlight lineage probabilities from plot edge_bundle(). Currently you can color this graph by pseudotime, known temporal labels (for timeseries data) sc_labels_sequential (list, length nsamples), or gene expression sc_labels_expression (list length nsamples)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants