I’m working on adding the glm capability for the ALDEx2 plugin. For the glm function, a model matrix is required as input that looks something like such (default output from R, may have more columns and/or rows):
(Intercept)
A
B
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
I’m wondering if there is currently a semantic type available to support this type of data, or if I would need to create a new one.
We were just talking about this the other day! Well almost, we were discussing whether or not to make formulas (Wilkinson-Rogers/“R” style) a primitive type in QIIME 2 (via something like patsy). We were also thinking that once that formula is “bound” to a scope (e.g. one or more metadata files/artifacts), it should be possible to view it as a model matrix directly.
I believe a few actions take this formula approach. Would a formula work for ALDEx2, or are there typical model matrices that don’t have an equivalent representation in formula notation?
I think a formula would work as long as the model matrix could be viewed directly and stored as a temp file itself. Currently for ALDEx2, i would need to save the matrix as as a file to be read into R in the background.
Do you happen to know any examples of the formula being used for this purpose?