Dear all,
I already used MMUPHin with MetaPhlAn data but now while including HUMAnN pathways results and after reading a little more about the program I tried to include 2 covariates like “age”, “sex”. These covariates are not present in one study. I also tried MaAsLin2 to explore this results too.
When I try the tutorial with my own data…
pathway <- read_tsv("~/andres/HUMAnN/mmuphin_pathsX.tsv")
MeTa <- read_tsv("~/andres/HUMAnN/mmuphin_metadataX.csv")
pathway <- pathway %>% map_if(is.numeric, ~./sum(.)) %>% as.data.frame() %>%
column_to_rownames("ID") %>% as.matrix() # transform the data between 0-1
MeTa <- MeTa %>% column_to_rownames("ID") # with rownames
fit_lm_cov <- lm_meta(feature_abd = pathway,
batch = "study",
exposure = "response",
covariates = c("age", "sex"),
data = MeTa,
control = list(verbose = FALSE))
I got this error…
Error: `x` and `y` must share the same src, set `copy` = TRUE (may be slow).
Run `rlang::last_error()` to see where the error occurred.
Además: Warning messages:
1: In check_batch(df_batch[[batch]], min_n_batch = 2) :
Batch variable is not a factor as provided and will be converted to one.
2: In lm_meta(feature_abd = pathway, batch = "study", exposure = "response", :
Covariate age is missing or has only one non-missing value in the following batches; will be excluded from model for these batches:
montes
3: In lm_meta(feature_abd = pathway, batch = "study", exposure = "response", :
Covariate sex is missing or has only one non-missing value in the following batches; will be excluded from model for these batches:
montes
Omitting the covariates…
fit_lm_cov <- lm_meta(feature_abd = pathway,
batch = "study",
exposure = "response",
data = MeTa,
control = list(verbose = FALSE))
This worked fine but with results only considering ‘response’ as a variable.
If I omit ‘montes’ from both files and rerun it and I got the same error
Error: `x` and `y` must share the same src, set `copy` = TRUE (may be slow).
I wonder if I can include these covariates in this step maybe I am missing something with the format. Thank you very much for your help
I am attaching the pathways file here
metadata = mmuphin_metadataX.csv (6.4 KB)
Best,
Andrés