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

new release and beautify #22

Open
wangjiawen2013 opened this issue Oct 20, 2022 · 16 comments
Open

new release and beautify #22

wangjiawen2013 opened this issue Oct 20, 2022 · 16 comments

Comments

@wangjiawen2013
Copy link

Hi,

I am very interested in your excellent work!

I notice that there are only one release of VIA. Is VIA still under maintenance ? And, the plots in the jupytor tutorials are not beautiful, hope you to improve the visualization capacity of VIA. I am a scanpy user and usually process single cell data using python code. I think VIA maybe an suitable tools for trajectory inference.

@ShobiStassen
Copy link
Owner

Hi, You could consider using the streamplot functions and the streamplot animations (on the readthedocs page), it's also possible to plot the via clustergraphs in a few different ways (colored according to gene/feature intensity or pseudotime etc) and change the size/cmaps of the clusters and edgewidths.
Increasing the cluster resolution (by changing too_big_factor and/or, jac_std_global, and/or resolution_parameter and/or knn) will also enable you to see more granular edges and clusters and you can tune the number of edges with cluster_graph_pruning_std and/or edgebundle_pruning parameter. You might then be able to better observe how the edgebundling allows you to see quite busy graphs

@ShobiStassen
Copy link
Owner

@wangjiawen2013 I should mention that we are also working on a Via2.0 but still testing

@wangjiawen2013
Copy link
Author

Good, looking forward to it. I used monocle, palantir, paga, RNA velocity, cellrank and never satisfied with them.

@wangjiawen2013
Copy link
Author

wangjiawen2013 commented Oct 27, 2022

@ShobiStassen I tried VIA following the tutorials (multifurcating.ipynb), and the it showed:
image
I think TS7,8,9,and 10 are terminal states. what do the arrows between TS8 and TS9 ? Because both TS8 and TS9 are terminal nodes, so it's more reasonable that there is no relationship between TS8 and TS9. And, it's also the case between TS10 and TS7.
There are similar results in the nature communications paper of VIA (Fig. 4f, arrow between beta-1 and beta-2. And Fig. 2a). Can you help me to explain the results ?

@wangjiawen2013
Copy link
Author

image

image
The above are arrows between red circles in the paper.

@wangjiawen2013
Copy link
Author

wangjiawen2013 commented Oct 27, 2022

Hi,
another question:
image
what does pop41, pop85......mean on the above plot ?

@ShobiStassen
Copy link
Owner

hi, in real data adjacent "terminal states" may represent sub populations of a differentiated (i.e. late stage) cell type and because these cell types are related (phenotypically, in some way), some edges may be present between them

@ShobiStassen
Copy link
Owner

pop41 means that cluster has 41 cells in it :)

@wangjiawen2013
Copy link
Author

Thanks for your quickly reply!
I am in Beijing so we are in the same time zone. Now I am still running the tutorials. Does scATAC-seq_HumanHematopoiesis.ipynb out of date ?
In [320]: tsi_list = via.get_loc_terminal_states(v0,X_in)

AttributeError Traceback (most recent call last)
in
----> 1 tsi_list = via.get_loc_terminal_states(v0,X_in)

AttributeError: module 'pyVIA.core' has no attribute 'get_loc_terminal_states'

In [321]: tsi_list = via.get_loc_terminal_states(v0, X_in)

AttributeError Traceback (most recent call last)
in
----> 1 tsi_list = via.get_loc_terminal_states(v0, X_in)

AttributeError: module 'pyVIA.core' has no attribute 'get_loc_terminal_states'

@wangjiawen2013
Copy link
Author

And how to save the results of run_VIA ? Then we can load it again and plot the figures or do other things.

@ShobiStassen
Copy link
Owner

Hi, let me look tomorrow but it's prob out of date. Can you have a look at the other tutorials on the readthedocs page to show how to plot the different outputs, i think they will be more up to date and easier to call

@wangjiawen2013
Copy link
Author

wangjiawen2013 commented Oct 28, 2022

Hi,
I find another problems. The pseudotime colorbar on the right ranges from 0 to 10. It should 0 to 1, is it ?
image

@ShobiStassen
Copy link
Owner

hi hi! in this case i have just scaled the pt for plotting purposes by a factor of 10
in terms of retrieving the results, you would have to save some of the attributes - see here like the branching probabilities/ pseudotime values in a list/dataframe column.

@wangjiawen2013
Copy link
Author

wangjiawen2013 commented Oct 29, 2022

Hi,
I think you mean this chunk of code of draw_piechart_graph() in plotting_via.py:
if type_data == 'pt':
pt = via0.scaled_hitting_times # these are the final MCMC refined pt then slightly scaled at cluster level
title_ax1 = "Pseudotime"

However you use single_cell_pt_markov in the function draw_trajectory_gams() in plotting_via.py:
sc_pt_markov = list(np.asarray(via_fine.single_cell_pt_markov[idx]))
Are there any difference ? Can I just divide scaled_hitting_times by 10 in the draw_piechart_graph or replace it with single_cell_pt_markov ?

@wangjiawen2013
Copy link
Author

wangjiawen2013 commented Oct 29, 2022

My email is wangjiawen2013@163.com, could you send your email to me ?
I want to send you a ppt, where I revised the plotting code, both the code and the figures are in the ppt. The newly generated figures by VIA are beautiful and achieve publication quality now !

@Starlitnightly
Copy link

Starlitnightly commented Apr 8, 2023

Hi @wangjiawen2013

I recently encountered the same issue with pyVIA's visual beautification. You can use the raw color to plot celltype with VIA in Pyomic. The tutorial of pyVIA can be found at here.

Example:
image

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

3 participants