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

View distal/promoter peaks after RNA/ATAC integration #58

Closed
matthew-levy opened this issue May 18, 2022 · 2 comments
Closed

View distal/promoter peaks after RNA/ATAC integration #58

matthew-levy opened this issue May 18, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@matthew-levy
Copy link

Is there a way to get the UMAP with distal vs promoter peaks on the integrated dataset? Similar to the function ac.pl.umap(atac, color=["KLF4"], average="peak_type") but using mu.pl.umap(mdata, color=["KLF4", "chr9:107480158-107492721"]).

@matthew-levy matthew-levy added the enhancement New feature or request label May 18, 2022
@matthew-levy
Copy link
Author

I guess a work around would to trick the ATAC AnnData object by copying the .obsm['X_umap'] from MuData after running MOFA. That way we could run the ac.pl.umap function but with the integrated UMAP coordinates. If I go this way, is there a way to store multiple sets of UMAP coordinates in an object and tell the plotting function which to use, or would I just need to overwrite it?

@gtca
Copy link
Collaborator

gtca commented May 18, 2022

Thanks, @matthew-levy! Peak aggregation is probably going to stay a modality-specific feature: there's no way to know if this is the gene "KLF4" from RNA or peaks that are linked to this gene from ATAC that the user wants to visualise.

That being said, we can think of ways to make it a more general feature by exposing the interfaces accordingly, e.g. to plot aggregate values using a list of features.

The solution you mention would be the most transparent way to go. One can store and plot many embeddings:

atac.obsm["X_mofa_umap"] = mdata.obsm["X_umap"].copy()
ac.pl.embeddings(atac, basis="X_mofa_umap", color=["KLF4"], average="peak_type")

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

No branches or pull requests

2 participants