dengkuistat / WaveICA_2.0

Removing batch effects for untargeted metabolomics data without using batch information
MIT License
8 stars 3 forks source link

WaveICA_2.0 Injection_Order #2

Open ekopylova opened 1 year ago

ekopylova commented 1 year ago

Hello,

Thank you for developing this package! I'm excited to try it on our data.

I have several questions regarding the function WaveICA_2.0:

  1. What type of variable is "Injection_Order" expected to be?
waveica_res <- WaveICA_2.0(data = data, wf = "haar", Injection_Order = as.numeric(metadata$"Injection_order"), alpha = 0, Cutoff = 0.1, K = 10)

When I set the type to numeric, the algorithm runs without errors but I still clearly see the two batches that were present before (which I can see to be run order effects based on the randomization of sample injections and their injection order). When I leave the default type of character:

waveica_res <- WaveICA_2.0(data = data, wf = "haar", Injection_Order = metadata$"Injection_order", alpha = 0, Cutoff = 0.1, K = 10)

the algorithm runs with some warnings:

Warning messages:
1: In mclapply(B, function(x) { :
  all scheduled cores encountered errors in user code

but appears to remove the batches better than setting the variable to numeric.

  1. Do you recommend to run quantile normalization, or any sort of normalization on the data before passing it to WaveICA_2.0? In MetaboAnalystR, the batch effect removal tutorial first runs normalization to sample median before WaveICA (and other methods of batch correction):
mSet<-Normalization(mSet, "MedianNorm", "LogNorm", "NULL", ratio=FALSE, ratioNum=20)
  1. Do you have any recommendations on setting the other parameters, alpha, Cutoff and K?

Thanks!

DavidGO464 commented 1 year ago

according to https://github.com/dengkuistat/WaveICA_2.0/blob/master/man/WaveICA_2.0.Rd here they give an example

it seems that, injection order is a list image

just like group_zong_amide as well.

both are parte of a data frame.