This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to prepare trait data file of categorical trait with more than two levels for WGCNA?

Hi everyone,

I want to do WGCNA and estimate the correlation of modules with clinical traits. The clinical information includes nominal variable with more than two levels (not binary). How I can design and create clinicaltrait.txt file? I have attached a screenshot of the trait file, please have a look on it.

Thanks

https://ibb.co/61S6TZ7

enter image description here

rna-seq r wgcna

1 answer

Well, you clearly already have the file if you are showing a screenshot of it. So, what is the problem in reading that file into R and using it in WGCNA?

There is an example, here: http://systemsbio.ucsd.edu/WGCNAdemo/

I posted a previous related answer, too: A: WGCNA modules and categorical traits relationship (and there are many other threads / questions out there)

Also, take a look at this: A: WGCNA: Relating Eigenmodules to Clinical Traits Returns Matrix of NAs

Kevin

Log in to answer this question.