run_enrichment does not work when selecting a single factor
I've found a single factor that I want to perform pathway enrichment on. When I try to run_enrichment but select only one factor, I get an error message.
pathways <- run_enrichment(model,
view = "transcriptomic",
factors = 1,
feature.sets = MSigDB_v6.0_C5_human,
sign = "all",
statistical.test = "parametric")
The paraphrased readout message is:
Warning: XXX features were removed because they had no variance in the data. Intersecting features names in the model and the gene set annotation results in a total of XXXXX features. Error in W[features, , drop = FALSE] : incorrect number of dimensions
Currently the workaround is to just select any other additional factor as well as the one of interest.
Thank you very much for sharing ! I had the same error, namely Error in W[features, , drop = FALSE] : incorrect number of dimensions with the run_enrichment() function, and I can now work around it.