zktuong/ktplots

plot_cpdb2 failed plot a chord diagram of cellphonedb results

wzh7768 opened this issue · 3 comments

Dear zktuong,
I'm analyzing scRNA-seq data and using cellPhoneDB. Your ktplots is very useful to visualize CPDB results. Fantastic!
However, "plot_cpdb2" part is hardly worked, could you please help me to find out where I did wrong?
The following shows my code:
interaction_grouping <- read.delim("Interactions_annotation.txt", check.names = FALSE)
sce <- Seurat::as.SingleCellExperiment(CRC_MS)
rowData(sce)$gene_symbols <- row.names(sce)
p <- plot_cpdb2(cell_type1 = 'iCAF',
cell_type2 = 'SPP1+TAM|TREM2+TAM|TREM2+CD168+pTAM',
scdata = sce,
idents = 'labers',
means=means,
pvals=pvalues,
deconvoluted = deconvoluted,
gene_symbol_mapping = 'gene_symbols',
desiredInteractions = list(c('TREM2+TAM','CXCL12+iCAF'),c('TREM2+CD168+pTAM','CXCL12+iCAF'),c('SPP1+TAM','CXCL12+iCAF'),
c('TREM2+TAM','CXCL14+iCAF'),c('TREM2+CD168+pTAM','CXCL14+iCAF'),c('SPP1+TAM','CXCL14+iCAF')),
interaction_grouping = interaction_grouping,
edge_group_colors = c('chemokines'='#e15759','costimulatory'='#59a14f','Th17'='#4e79a7'),
node_group_colors = c('CXCL12+iCAF'='red','CXCL14+iCAF'='hotpink3',
'SPP1+TAM'='deepskyblue','TREM2+CD168+pTAM'='cyan4','TREM2+TAM'='dodgerblue'),
keep_significant_only = T,
standard_scale = T,
remove_self = T
)

The results of p was odd
image

hi @wzh7768, off the top of my head, i'm wondering if the + in your label names are interferring with the functions internally. Can you check if removing + helps?

Do the other plot_cpdb functions work? like plot_cpdb3 or plot_cpdb4?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.