zktuong / ktplots

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

Error in h(simpleError(msg, call)): While computing the parameter "x" for the function "t", an error occurred: 'data' must be a vector, but it is 'NULL' now In plot4 #118

Closed wuxiangning closed 4 weeks ago

wuxiangning commented 1 month ago

I encountered this issue mentioned by someone before, and it seems that this problem has not been resolved. Whether I use _, -, or spaces to adjust my interaction pairs, I always get this error. Why is this happening? I used debug to find the bug,it shows like below. debug(plot_cpdb4) plot_cpdb4( interaction=c('IL18 receptor-IL18'),#新的参数 cell_type1='Neu_02_CCL4',cell_type2='Neu_03_IFIT1', scdata=sce_obj, celltype_key="celltype",

idents='celltype',

means=means, pvals=pvals, deconvoluted=deconvoluted2, keep_significant_only=TRUE, standard_scale=TRUE, ) {739E60C0-601E-415C-8E95-7A6F722F9B47} Help!Thanks.

zktuong commented 1 month ago

does this interaction come up as significant with plot_cpdb?

wuxiangning commented 1 month ago

Of course, because I want to select and only look at the proportion of specific interaction pairs, or I want to see the proportion of certain cell types in the total number of interactions.

zktuong commented 1 month ago

I think, curently the error message is essentially complaining that this interaction is not being found, returning an empty table and hence NULL.

hmm, ok. can you send your cellphonedb result files and your singlecellexperiment/seurat object to me at z.tuong@uq.edu.au and i can try and see if i can diagnose what's the issue?

wuxiangning commented 1 month ago

I have sent my data, please check. Much appreciated.

zktuong commented 1 month ago

hi, is your code chunk correct for the data you sent me?

plot_cpdb4(
interaction=c('IL18 receptor-IL18'),#新的参数
cell_type1='Neu_02_CCL4',cell_type2='Neu_03_IFIT1',
scdata=sce_obj,
celltype_key="celltype",
#idents='celltype',
means=means,
pvals=pvals,
deconvoluted=deconvoluted2,
keep_significant_only=TRUE,
standard_scale=TRUE,
)

I ask that because there's no Neu_02_CCL4 or Neu_03_IFIT1 in what you sent.

all i see in the available celltypes are:

image

the annotations in your your test_cellphonedb.tsv metadata also doesn't seem to match.

zktuong commented 4 weeks ago

closing for now as more information is needed.