Hi there!

Is it possible to use categorical traits (such as ethnicity) in WGCNA analysis? If so, shall we encode them with 0s and 1s? what if the trait is not binary and has several levels? Perhaps use 1, 2, 3,4?

Thank you in advance
You can use categorical variables, if it is binary, then you can expressed it as 0 and 1. If it has more levels then you can separate each level as an individual binary variable.

[This link may help][1]


  [1]: https://peterlangfelder.com/2018/11/25/working-with-categorical-variables/