CompEpigen / MeDeCom

Decomposition of heterogeneous DNA methylomes
22 stars 16 forks source link

Error during ICA #37

Open hanketim opened 10 months ago

hanketim commented 10 months ago

I want to use the script for MeDeCom with my own 76 samples. Up to the removal of the confounder by means of ICA everything worked without problems. I worked with DecompPipeline 1.0.3 and MeDeCom 1.0.1 This is the code I used:

data.prep <- prepare.data(rnb.set=data.prep$rnb.set.filtered, normalization = "none", analysis.name = "Glioblastoma", filter.beads = FALSE, filter.intensity = FALSE, remove.ICA = TRUE, filter.na = FALSE, filter.context = FALSE, filter.snp = FALSE, filter.sex.chromosomes = FALSE, filter.cross.reactive = FALSE, conf.fact.ICA = c("Geschlecht","AlterbeiED"), ica.setting = c("alpha.fact"=1e-5,"save.report"=TRUE, "ntry"=10,"nmin"=20,"nmax"=50,"ncores"=15))

however now the following error occurs:

Analyse stability Starting parallel calculation on 10 core(s)... System: unix 50 components, 10 runs, 518989 features, 76 samples. Start time: 2023-10-26 18:35:31.038152 Done! End time: 2023-10-26 19:06:30.023182 Time difference of 30.98308 mins Calculate ||X-SxM|| and r2 between component weights Correlate rows of S between tries Build consensus ICA Analyse stability

Error in if (!fact %in% names(Var)) { : the condition has length > 1

For me it looks like 50 components are loaded (nmax = 50), but after that a problem occurs, which i don't understand. I would be very grateful for any help. If further information / details are needed, I will of course gladly provide them.

schmic05 commented 10 months ago

Hi @hanketim,

Thanks for reporting this issue: it arose from R not allowing more than one condition in an if statement. I fixed the issue in DecompPipeline with the most recent commit. Please try to update DecompPipeline and let us know if it works afterwards!

Best,

Michael

hanketim commented 10 months ago

Dear @schmic05 ,

thank you very much for your quick and helpful reply. That solved the problem and the confounders were removed! Now I can start with the methylome deconvolution, I am very excited!

Best regards, Tim