SofieVG/FlowSOM

Calling FlowSOM:::MapDataToCodes produces a segmentation fault

alex-l-kong opened this issue · 3 comments

I'm attempting to use a weights matrix to assign cluster labels to a new dataset, but when I do so, I get this error:

 *** caught segfault ***
address 0x7fd2240f5ea8, cause 'memory not mapped'

Traceback:
 1: FlowSOM:::MapDataToCodes(somWeights, fovPixelData[, markers])

somWeights contains a 10x10 matrix computed by SOM. fovPixelData also contains a numeric matrix of about 1M rows.

Some more information:

  • fovPixelData is initially read in as a tibble from a .feather file using arrow::read_feather. It needs to be stored this way for Python data frame interoperability. The same segfaults come up whether or not I coerce fovPixelData to a matrix or not
  • somWeights is read in from an intermediate HDF5 file using h5read from rhdf5.
SamGG commented

Hi,
somWeights should be a numerical matrix, with named columns. The names must be found in fovPixelData[, markers].
Check this with head(), is.numeric() and class() on both arrays.
My two cents.

@SofieVG @SamGG thanks for the response, it turns out that occasionally, somWeights got set to NULL in our pipeline. It's been patched and it's working perfectly now!