Closed erzakiev closed 3 months ago
I think it's not worth digging it further, the problem was with singlets aka degenerate clusters (containing 1 cell). But if anyone has this same problem they can fix it by merging singlets into a 'trashy' cluster or whatever
igraph's graph_from_adjacency_matrix()
is now stricter in checking that the adjacency matrix you pass in is consistent with the type of graph you are trying to construct. The adjacency matrix of an undirected graph should always be symmetric. If it's not, perhaps you made a mistake or there's a bug in your code? The new behaviour is meant to alert you to this. However, the previous behaviour is still available with mode="max"
for cases when you are aware that the matrix is not symmetric and still want to go ahead.
Thanks for these reports! I dug into it a little and the only time Slingshot would actually call graph_from_adjacency_matrix()
is in the degenerate case where there is only one cluster. All other cases are handled by TrajectoryUtils::createClusterMST()
, but even then, all the distance metrics are (or at least should be) symmetric, so I'm not sure how you would ever end up with a non-symmetric adjacency matrix.
hmm I had two or three clusters (out of 16) consisting of 1 cell each. Once I merged them with other clusters, the problem went away...
## At vendor/cigraph/src/constructors/adjacency.c:538 : Adjacency matrix should be symmetric to produce an undirected graph. Invalid value
Based on the line number, I can see that this error occurs when converting weighted adjacency matrices.
Could it be that the symmetry is broken due to numerical precision issues?
Hello Kelly, I've got this error, which is most certainly related to
igraph
:Perhaps you could point me to the file where it gets invoked? When I look up the
View(slingshot::slingshot)
it's giving me only the generic thingyThe object i'm passing is an SCE object, if that's pertinent to the problem.