Add umap into cisTopic object? #86
Answered
by
SeppeDeWinter
zhangqc723
asked this question in
Q&A
-
How to add a existing UMAP files into cisTopic object rather than runing run_umap? |
Beta Was this translation helpful? Give feedback.
Answered by
SeppeDeWinter
Aug 18, 2023
Replies: 1 comment 2 replies
-
Hi @zhangqc723 I migrated your question to the discussions tab. You can add these as a pandas DataFrame to the For example, import numpy as np
import pandas as pd
your_umap = pd.DataFrame(
np.zeros((len(cistopic_obj.cell_names), 2)),
columns = ["UMAP_1", "UMAP_2"], index = cistopic_obj.cell_names)
cistopic_obj.projections["cell"]["your_umap"] = your_umap #it's important to use the "cell" key here, cistopic object can also store dimensionality reductions for regions. Best, Seppe |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
SeppeDeWinter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @zhangqc723
I migrated your question to the discussions tab.
You can add these as a pandas DataFrame to the
projections
attribute of the cistopic object.For example,
Best,
Seppe