This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert the ordinal categorical trait in the WGCNA?

Hello everyone, I am performing WGCNA to estimate the relationship of modules with clinical traits. The clinical information includes numeric variable (Age), binominal variable (Sex) and ordinal varible with four levels (TNM Stage: I, II, III and IV).

I only konw that trait "Age" can be directed used, trait "Sex" can be used after experssed as 0 and 1. Now, I am still confused on how to encode the trait "TNM Stage" after comprehensive search on google. Can it be treated as a single trait and expressed as 0,1,2 and 3 for Stage I, II, III and IV respectively? Or it is mandatory to split the Stage into four traits(Stage I, II, III and IV) and expressed as 0 and 1 for each trait?

Sorry for my unexperienced trouble. Thanks a lot for any sugesstions!

wgcna rna-seq

1 answer

If it's for WGCNA, then use 0, 1, 2, 3.

Kevin

Thank you for your help. You've been most kind.

Thank you, Mohammad! I read thoroughly the note. Professor Peter Langfelder offered some valuable sugesstions such as creating binary indicators for the various comparisons. The note mainly concerned the categorical variable with more than two levels, such as ethnicity. However, I am more confused about the ordinal varible with more than two levels. I tend to agree with Kevin. Thank you again!

I have a similar question with you but my clinical traits is cell development timepoint (Day0, Day2, Day5 and Day15). I wonder did you get your expected result after you treated TNM Stage as 0, 1, 2 and 3? If so, I will do the same thing: treat Day0, Day2, Day5 and Day15 as 0, 1, 2 and 3. Thanks!

You can encode these 'Days' as numerical values. Otherwise, perhaps try to construct a logistic regression model where you are regressing Day to WGCNA Module.

Log in to answer this question.