zktuong / ktplots

Some tools for plotting single-cell data
https://zktuong.github.io/ktplots/
MIT License
157 stars 30 forks source link

Can't utilize plot_cpdb3,4 functions using my data #74

Closed cacaonib closed 1 year ago

cacaonib commented 1 year ago

Hi Thanks for making a good package

I tried to use plot_cpdb3 and plot_cpdb4 for chord plot I got the Error

p <- plot_cpdb3(cell_type1 = 'T cells', cell_type2 = 'B cells', scdata = sce, idents = 'cell_type', # column name where the cell ids are located in the metadata means = means, pvals = pvals, deconvoluted = decon, # new options from here on specific to plot_cpdb3 keep_significant_only = TRUE, standard_scale = TRUE, remove_self = TRUE ) Error in plot_cpdb3(cell_type1 = "T cells", cell_type2 = "B cells", scdata = sce, : Sorry not supported. Please use a SingleCellExperiment object.

So, I try the same function using "kidneyimmune data" (practice data)

this data can draw chord plot

so this error means, now I can not use my data in plot_cpdb3 and plot_cpdb3?

Thanks

zktuong commented 1 year ago

Hi, @cacaonib. I'm guessing you are using a Seurat object. Please convert to SingleCellExperiment first. you can use Seurat's as.SingleCellExperiment to do that.

cacaonib commented 1 year ago

Hi, @cacaonib. I'm guessing you are using a Seurat object. Please convert to SingleCellExperiment first. you can use Seurat's as.SingleCellExperiment to do that.

OH...Sorry

I missed the simple thing.

Thanks for the quick answer!!

Have a good day!!

zktuong commented 1 year ago

no worries! let me know if there's other issues.

cacaonib commented 1 year ago

no worries! let me know if there's other issues.

No. Now, this functions work pretty well