ERROR::No fixed effects included in formula.NEED HELP! SOS!

WARNING::Feature name not found in metadata so not applied to formula as fixed effect: antibiotics , d90_outcome
2024-06-28 17:15:03.29544 ERROR::No fixed effects included in formula.
Error in Maaslin2(input_data = data, input_metadata = DMI_data, min_abundance = 1e-04,

Hello, I am using MaAslin for data analysis. After correctly defining the input data and input metadata, and confirming that my fixed effect definitely exists in the input metadata, R always throws an error. I am not sure what the problem is and I hope to get help. Thank you very much.

Hi @nnnpj0624,

Thank you for raising this issue. Can you please give us some additional information? Are you running in R or on Galaxy (it looks like you may have commented on some Galaxy posts)?

If you are running in R can you provide us with your R version, MaAsLin version, and the code you used to run R?

Thank you!
Best,
Kelsey

Subject: Issue with MaAslin2 Execution in R

Dear Developer,

I hope this message finds you well. I am encountering an issue while running MaAslin2 in R and would appreciate your assistance. Here are the details of my situation:

I am using the following R version and MaAslin2 package version:

**R version 4.3.3** (2024-02-29)
**MaAslin2 version:**
**[1] '1.16.0'**

The code I am executing is:

library(MaAslin2)
fit_data_gender <- MaAslin2(
  input_data = data,
  input_metadata = DM_data,
  min_abundance = 0.0001,
  min_prevalence = 0.1,
  output = "DM_Group_outcome_antibio__CPLM_CSS",
  fixed_effects = c("d90_outcome", "Group", "antibiotics"),
  random_effects = c('studyID'),
  analysis_method = c("CPLM"),
  normalization = c("CSS"),
  standardize = FALSE,
  plot_heatmap = FALSE,
  plot_scatter = FALSE
)

The error message I receive is:

2024-06-30 15:03:05.18642 ERROR::No fixed effects included in formula.
Error in Maaslin2(input_data = data, input_metadata = DM_data, min_abundance = 1e-04,  : 

Additionally, there are warnings indicating that feature names are not found in the metadata and thus not applied to the formula as fixed effects. Here is an excerpt from the warnings:

WARNING::Feature name not found in metadata so not applied to formula as fixed effect: d90_outcome, Group, antibiotics

I have checked the DM_data and the variables antibiotics, d90_outcome, and Group are indeed present, with values as follows:

DM_data$antibiotics
# [1] N N N N Y Y N Y Y Y Y N Y Y N Y Y Y Y Y Y N N N N N N N N N N N N N N N N N N N N N N Y Y
 [46] Y Y N Y Y Y N N Y Y Y N Y Y N Y N N Y N Y Y N N Y Y N Y Y N N N N Y Y Y N Y Y N N N Y Y N
 [91] N Y N Y Y Y Y Y Y N N Y N Y Y N Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N N N N N N N
[136] N N N N N N N N N N N
Levels: N Y

DM_data$d90_outcome
# [1] 2 2 2 2 1 2 2 1 1 2 2 1 2 2 1 2 1 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 1 1 1 1 2 2 2 1 2 2 2 1 1
 [46] 1 1 2 1 1 1 1 2 2 1 1 2 2 1 1 1 1 1 1 1 2 1 1 1 1 2 2 2 1 1 1 1 1 1 2 2 2 2 1 2 2 2 2 1 2
 [91] 1 1 1 2 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 2
[136] 1 1 1 1 2 2 2 2 2 1 1
Levels: 1 2

DM_data$Group
# [1] DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI
 [23] DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMI DMW DMW DMW DMW
 [45] DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW
 [67] DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW
 [89] DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW
[111] DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW
[133] DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW DMW
Levels: DMI DMW HC

I am unsure what the issue might be and would be grateful for any guidance you could provide. Thank you very much for your time and assistance.

Best regards

Previously, I never encountered this issue when using the MaAslin2 tool for analysis in R language. However, a few days ago, during the execution of a MaAslin analysis, it seemed to have frozen and crashed. As a result, I forcibly terminated the running code, and since then, I’ve been facing this bug. I have tried clearing the environment, restarting the R platform, and even rebooting my computer, but none of these actions have resolved this issue.

Hi @nnnpj0624,

What is the initial format of the feature table that you are inputting? Do you have a small sub sampling that you could provide? Additionally could you try running something like this:

fit_data <- Maaslin2(
  data, DM_data, 'test',
  fixed_effects = c('d90_outcome', 'Group','antibiotics'),
  random_effects = c('studyID'),
  standardize = FALSE, cores=1)

And let me know if that runs without error?

Thanks,
Jacob Nearing