HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
66 stars 30 forks source link

FlowSOM Clustering #378

Closed KStrange94 closed 5 months ago

KStrange94 commented 8 months ago

Having an error come up on my FlowSOM clustering:

sce1 <- cluster(sce, features = type_markers(sce),

  • xdim = 10, ydim = 10, maxK = ncl, seed = 1234) o running FlowSOM clustering... o running ConsensusClusterPlus metaclustering... Error in hclust(this_dist, method = innerLinkage) : NA/NaN/Inf in foreign function call (arg 10)

Running on R version 4.3.2 (2023-10-31) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

Any ideas how to fix? Thanks!

SamGG commented 8 months ago

The problem is the metaclustering. There are NA, NaN or Inf value in the distance matrix that could originate from empty clusters (ie, no cell, which occurs very rarely). Can you avoid metaclustering and then examine the clusters?

KStrange94 commented 8 months ago

I think its all part of the cluster command, is there a way of checking if i have any NA, NaN or Inf values in the single cell exp and removing them before running the clustering?

SamGG commented 8 months ago

Right, no parameters to bypass metaclustering. Try to set maxK = 2 to run metaclustering for only one metaclustering value. After that we have to hack the cluster function for identifying the problem with your dataset.

SamGG commented 6 months ago

@KStrange94 What's the current situation?

HelenaLC commented 5 months ago

closing due to inactivity; please comment back if the issue persists/is still of interest.