ImmuneDynamics / Spectre

A computational toolkit in R for the integration, exploration, and analysis of high-dimensional single-cell cytometry and imaging data.
https://immunedynamics.github.io/spectre/
MIT License
56 stars 21 forks source link

Issue when running FlowSOM in Simple Discovery Workflow #138

Closed SamN01 closed 1 year ago

SamN01 commented 1 year ago

Hi,

I'd like to firstly say thank you for providing such well thought out package to analysis flow data in R. I cannot wait to take full advantage of it.

I have just started using Spectre with a simple flow exp. following the Simple Discovery Workflow to get me started and I got up to the Clustering and Dimensionality reduction ssection without an issue.

When I try and run the flowsom command I receive this error:

> cell.dat <- run.flowsom(cell.dat, cluster.cols, meta.k = 8)
Preparing data
Starting FlowSOM
Building SOM

Error in SOM(fsom$data[, colsToUse], silent = silent, ...) : 
  NA/NaN/Inf in foreign function call (arg 1)

I proceed to continue thinking it may not matter but I cannot generate a plot further down so I think I need to resolve this issue first.

Any help would be greatly appreciated.

Thanks.

SamN01 commented 1 year ago

I solved this. When merging my data tables, I had no values in a column resulting in the NA error. I removed my rows that had no data in them and this solved my issue.

tomashhurst commented 1 year ago

@SamN01 nice one! The other option is just to exclude the columns that have NA in them from the clustering.cols.