saeyslab / CytoNorm

R library to normalize cytometry data
33 stars 6 forks source link

Less then 50 cells in batch17 (42). No quantiles computed. #9

Closed algebio closed 4 years ago

algebio commented 4 years ago

Hi

I get the message below after training the model. I have thousands of cells in every sample. Could you please help me understand why it says that there are less than 50 cells? Also, should I worry about the warnings? I mean, should I trust the normalized results even if I get these warnings?

Regards Juan

model <- CytoNorm.train(files = train_data$Path, labels = train_data$Batch, channels = channels, transformList = transformList, FlowSOM.params = list(nCells = 6000, xdim = 5, ydim = 5, nClus = 10, scale = FALSE), normMethod.train = QuantileNorm.train, normParams = list(nQ = 101, goal = "mean"), seed = 1, verbose = F)

Less then 50 cells in batch17 (42). No quantiles computed. Less then 50 cells in batch11 (23). No quantiles computed. Warning messages: 1: In FlowSOM::NewData(fsom$FlowSOM, ff) : 3804 cells (7.1%) seem far from their cluster centers. 2: In FlowSOM::NewData(fsom$FlowSOM, ff) : 5225 cells (3.52%) seem far from their cluster centers. 3: In FlowSOM::NewData(fsom$FlowSOM, ff) : 8601 cells (5.54%) seem far from their cluster centers. 4: In FlowSOM::NewData(fsom$FlowSOM, ff) : 1494 cells (3.65%) seem far from their cluster centers. 5: In (function (files, labels, channels, transformList, nQ = 101, : Not enough cells for batch17 The identity function will be used. 6: In (function (files, labels, channels, transformList, nQ = 101, : Not enough cells for batch11 The identity function will be used.

SofieVG commented 4 years ago

Hi Juan,

Even though there are enough cells in the overall files, the quantiles are computed per cluster. So for some specific cluster/file combinations, there will not be enough cells assigned. When there are not enough cells, the identity function is used for these specific batches for these clusters, meaning that the values are not shifted in any way. This might mean that the data is not completely normalized optimally, but should also not introduce much extra error. In any case, I would recommend to double check some figures (e.g. the density distributions of the different files before and after alignment) and also the flowsom model itself upfront, to make sure things are making sense.

Kind regards, Sofie

On Sun, 31 May 2020 at 19:22, Juan notifications@github.com wrote:

Hi

I get the message below after training the model. I have thousands of cells in every sample. Could you please help me understand why it says that there are less than 50 cells? Also, should I worry about the warnings? I mean, should I trust the normalized results even if I get these warnings?

Regards Juan

model <- CytoNorm.train(files = train_data$Path, labels = train_data$Batch, channels = channels, transformList = transformList, FlowSOM.params = list(nCells = 6000, xdim = 5, ydim = 5, nClus = 10, scale = FALSE), normMethod.train = QuantileNorm.train, normParams = list(nQ = 101, goal = "mean"), seed = 1, verbose = F)

Less then 50 cells in batch17 (42). No quantiles computed. Less then 50 cells in batch11 (23). No quantiles computed. Warning messages: 1: In FlowSOM::NewData(fsom$FlowSOM, ff) : 3804 cells (7.1%) seem far from their cluster centers. 2: In FlowSOM::NewData(fsom$FlowSOM, ff) : 5225 cells (3.52%) seem far from their cluster centers. 3: In FlowSOM::NewData(fsom$FlowSOM, ff) : 8601 cells (5.54%) seem far from their cluster centers. 4: In FlowSOM::NewData(fsom$FlowSOM, ff) : 1494 cells (3.65%) seem far from their cluster centers. 5: In (function (files, labels, channels, transformList, nQ = 101, : Not enough cells for batch17 The identity function will be used. 6: In (function (files, labels, channels, transformList, nQ = 101, : Not enough cells for batch11 The identity function will be used.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/saeyslab/CytoNorm/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOS722MNITI5DVW5KQHDHLRUKG67ANCNFSM4NPH26SQ .

algebio commented 4 years ago

Thank you Sofie. That was very helpful.

Regards Juan