Extracting coordinates of PAGA after draw_graph_fa

Hello,

I am trying to extract the embedding/coordinates of the graph obtained when running sc.pl.paga_compare after having run:

sc.tl.paga
sc.tl.draw_graph(adata, init_pos='paga')

Do these values get stored somewhere?

I can only access the original PAGA embeddings in adata.uns['paga']['pos'], and the coordinates of the FA layout. But not the ones of the PAGA version of the FA layout.

Many thanks for your help

Actually I think I understand what happens… everytime I use the plotting function, the adata.uns['paga']['pos'] field gets updated with new coordinates, is this correct?

Hi Mevelo – were you able to figure this out? In general, curious how to extract the UMI based on the coordinates of a given sc.pl representation, whether that be sc.pl.umap or sc.pl.draw_graph.

I took a look at adata.uns[‘paga’][‘pos’] based on your post – can I just match the order of these coordinates to adata.obs.index ?

Best,
-Marc

Hi @Mevelo,
As far as I’m aware, you are correct. I didn’t write the function though, but have noticed the updates as well and used them previously :).

@mssher07: The coordinates of the embeddings are stored in adata.obsm and are called 'X_pca', 'X_umap', etc.