zellerlab / siamcat

R package for Statistical Inference of Associations between Microbial Communities And host phenoType
https://siamcat.embl.de/
51 stars 16 forks source link

Error in self$assert(xs) when running train.model() #39

Closed DrYoungOG closed 1 year ago

DrYoungOG commented 1 year ago

Hello! Thanks for the excellent package!

An error occured when running train.model() with a feature abundance table of microbiome function(7000+features and 42 samples in two groups):

log.std.lasso <- normalize.features(sc.obj_filtered, norm.method="log.std", norm.param=list(log.n0 = 1e-16, sd.min.q=0.05), verbose=3) log.std.lasso <- create.data.split(log.std.lasso, num.folds = 2, num.resample = 100, stratify = TRUE, verbose = 3) log.std.lasso <- train.model(log.std.lasso, method = "lasso", min.nonzero = 3, perform.fs=TRUE, param.fs=list(no_features=600, method="Wilcoxon", direction="absolute"), feature.type="normalized", verbose=3)

  • starting train.model
  • training lasso models on 200 training sets
  • Performing feature selection with following parameters: no_features = 600 method = Wilcoxon direction = absolute +++ training on cv fold: 1 ++++ repetition: 1 ++ retaining 600 features after selection based on Wilcoxon; target number of features 600 ...... ++++ repetition: 65 ++ retaining 600 features after selection based on Wilcoxon; target number of features 600 Error in self$assert(xs) : Assertion on 'xs' failed: s: May not be NA. In addition: There were 50 or more warnings (use warnings() to see the first 50)

I did not find similar situation through google, could you please give me some help?

Sincere thanks

jakob-wirbel commented 1 year ago

Hi @DrYoungOG Thanks for submitting the issue. Sorry, I was travelling at a conference and only now managed to look at it...

hmmm, I haven't encountered this error before. My guess is that it comes from the underlying mlr package. Could you attach the output of the sessionInfo() command? Are there any NAs in your data?

Cheers, Jakob