saeyslab / CytoNorm

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

How to amend script to Normalize without clustering #47

Open CNicholasMDA opened 1 month ago

CNicholasMDA commented 1 month ago

Hello, How do I amend the script in order to perform the normalization without using clustering? I ran the script as follows but received an error.

Script I ran:

model <- CytoNorm.train(files = train_files,
                        labels = train_data$Batch,
                        channels = channels,
                        transformList = NULL,
                        FlowSOM.params = NULL,
                        normMethod.train = QuantileNorm.train,
                        normParams = list(nQ = 101,
                                          goal = "mean"),
                        truncate_max_range = FALSE,
                        seed = 1,
                        verbose = TRUE)

CytoNorm.normalize(model = model,
                   files = validation_files,
                   labels = validation_data$Batch,
                   transformList = NULL,
                   transformList.reverse = NULL,
                   normMethod.normalize = QuantileNorm.normalize,
                   outputDir = "Batch Corrected 11-01-24",
                   prefix = "After Correction w clust ",
                   truncate_max_range = FALSE,
                   clean = TRUE,
                   verbose = TRUE)

Error I received: Error in CytoNorm.train(files = train_files, labels = train_data$Batch, : FlowSOM.params should contain the parameter nCells.

thank you in advance!

SamGG commented 1 month ago

Hi. Did you try to specify a SOM grid of a single cell, I.e. x_grid=y_grid=1?

CNicholasMDA commented 1 month ago

I did not. I can try that. Thanks.