Covariates in Maaslin 2?

265 views
Skip to first unread message

rachael horne

unread,
Apr 29, 2019, 3:53:48 PM4/29/19
to MaAsLin-users

Hello everyone,

I was wondering if there is a way to include covariates or Forced predictors in MaAslin 2?  I know this was a part of the original maaslin, but it appears to be removed in maaslin 2.

I have complex adopted non adopted dataset, that has a number of metadata features, that would like to explore while correcting for the original factor of adoption.

Thanks,

Rachael

valentin...@cri-paris.org

unread,
May 7, 2019, 12:24:45 PM5/7/19
to MaAsLin-users
Dear Rachel, dear all,

I was wondering the exact same question! Is it not possible to force predictors in MaAsLins anymore with new Maaslin2?

If you came across an answer Rachel, would you be kind enough to share it?

Thanks a lot for your help and support!

-Valentin

Jeremy Wilkinson

unread,
Jul 16, 2019, 9:33:13 AM7/16/19
to MaAsLin-users
Hi Rachael and Valentin,

If you would like to only select certain metadata variables to go in the model you can use the fixed_effects option. For example: fixed_effects = c("Age", "Sex") will only return those two variables even if you have more than those two in your metadata dataset. 

You can order your metadata variables in the metadata dataframe before running the Maaslin2 function if you would like a specific order. This can be done with code like this in R: 
metadata = metadata[, c(1:3, 5, 13, 6:11, 4)]

I hope this helps.

-Jeremy
Reply all
Reply to author
Forward
0 new messages