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

adding and plotting seurat_clusters in cistopic object #84

Open
gebdu opened this issue Oct 21, 2024 · 0 comments
Open

adding and plotting seurat_clusters in cistopic object #84

gebdu opened this issue Oct 21, 2024 · 0 comments

Comments

@gebdu
Copy link

gebdu commented Oct 21, 2024

Hi,

I am using pycisTopic. My multiome data was processed in seurat/signac. I added seurat_clusters seurat/signac as metadata column.

cell_data = pd.read_csv(projDir+'metadata.txt', sep='\t')
cell_data.set_index('cell', inplace=True)
cistopic_obj.add_cell_data(cell_data)

Then I also added UMAP coordinates from seurat/signac

umap_coordinates = pd.read_csv("umap_coordinates.tsv", sep="\t")
umap_coordinates.set_index('cell', inplace=True)
cistopic_obj.projections["cell"]["umap"] = umap_coordinates
umap_coordinates.index = cistopic_obj.cell_data.index

Now when plotting the metadata, it is giving umap with seurat_cluster as continuous data, continuous scale color.......... not individual color for each cluster:

plot_metadata(cistopic_obj,
reduction_name='umap',
variables=['seurat_clusters'],
target='cell',
show_legend=1,
show_label=1,
num_columns=2,
text_size=10,
dot_size=5,
figsize=(15,5),
save= outDir + 'visualization/dimensionality_reduction_label.pdf')

However, if I run "find_clusters" then I get leiden cluster image with discrete colors. How can I visualize my seurat clusters in seurat umap? Well, a quick hack is to add a letter like "C" before the cluster number though.

thanks,

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

1 participant