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