SofieVG / FlowCytometryScripts

A collection of R scripts to use various flow cytometry libraries
GNU General Public License v3.0
6 stars 1 forks source link

'x' must be numeric in 2_SPADE.R #2

Closed ketancmaheshwari closed 7 years ago

ketancmaheshwari commented 7 years ago

When I run 2_SPADE.R, I get the following error in PlotMarker function call that is at the end of the script:

Error in cut.default(fsom$map$meanValues[, marker], breaks = 100) : 'x' must be numeric Calls: PlotMarker -> cut -> cut.default Any help in how to debug the issue and possible root cause is greatly appreciated.

ketancmaheshwari commented 7 years ago

The script works when line 59 is replaced with: spade_res$map$meanValues

SofieVG commented 7 years ago

This is an issue caused by different versions of the FlowSOM package, which is used to plot the SPADE results. Initially, mean values were used, but afterwards I switched to median values because those are more robust against outliers. This script assumed the newer version of the FlowSOM package. Your fix is indeed correct for the older FlowSOM version.