CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

dgCMatrix error smoothData

Open dpschreiner opened this issue 9 months ago • 2 comments

in this smoothData call

cellchat <- CellChat::smoothData(cellchat, PPI.mouse)

i'm getting this error:

Error: ==(<dgCMatrix>, <character>) is not yet implemented; ask maintainer("Matrix") to implement the missing method

my Matrix version is 1.7.3, with R 4.4.1.

i guess this error comes from this line in utilities.R:

stopifnot(is(adj, 'matrix') | is(adj, 'sparseMatrix'))

the class of adj is checked and fails, even though PPI.mouse is an object from CellChat itself.

dpschreiner avatar May 04 '25 19:05 dpschreiner

CellChat version 2.2.0

dpschreiner avatar May 05 '25 06:05 dpschreiner

I had a similar problem and I solved it with this: (See issue #185 for further information) Try cellchat <- CellChat::smoothData(cellchat, adj = PPI.mouse) The "adj = " is needed. It is must be specified.

jcd-gh avatar Jul 02 '25 17:07 jcd-gh