mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
157 stars 52 forks source link

Errors in the splsda examples #293

Open DannyArends opened 1 year ago

DannyArends commented 1 year ago

Please follow all the steps described at https://mixomics-users.discourse.group/t/reproducible-example-to-clarify-issues/470 and next fill in the items below:


šŸž Describe the bug: Running the example code from the splsda function results in an error


šŸ” reprex results from reproducible example including sessioninfo():

suppressMessages(library(mixOmics))
data(vac18)
X <- vac18$genes
Y <- vac18$stimulation
# sample indicates the repeated measurements
design <- data.frame(sample = vac18$sample)
Y = data.frame(stimul = vac18$stimulation)

# multilevel sPLS-DA model
res.1level <- splsda(X, Y = Y, ncomp = 3, multilevel = design)

Error:

Error in rowSums(Y) : 'x' must be an array of at least two dimensions

sessionInfo():

R version 4.3.0 (2023-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/London
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] vegan_2.6-4           permute_0.9-7         vioplot_0.4.0        
 [4] zoo_1.8-12            sm_2.2-5.7.1          preprocessCore_1.62.1
 [7] ltm_1.2-0             polycor_0.8-1         msm_1.7              
[10] lme4_1.1-33           Matrix_1.5-4          mixOmics_6.24.0      
[13] ggplot2_3.4.2         lattice_0.21-8        MASS_7.3-60          
[16] BiocManager_1.30.20 

packageVersion('mixOmics'):

[1] ā€˜6.24.0ā€™

šŸ¤” Expected behavior:

I expected the examples to run without any errors

mcalgaro93 commented 1 year ago

Dear @aljabadi, I have also encountered this bug. I'm not sure but it might be related to the check_entry.R changes from this commit. It happens when multilevel is present.

samuelmontgomery commented 8 months ago

Hi, this bug is still present when using multilevel in mixOmics 6.26 - any plans to fix? I am having trouble downgrading to an older working version on my institutes HPC