Skip to content

adding and plotting seurat_clusters in cistopic object #84

Open
@gebdu

Description

@gebdu

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions