How to create "trait data" file for WGCNA
3
2
Entering edit mode
@shalinisonar13-9695
Last seen 7.9 years ago

Hi,

I have mice microarray time course data. The study design as follows, mice were treated with two different kinds of drugs "a" and "b" for three time points day1, 2, 3, day0 is used as control for both the groups. Further we extracted the RNA from liver and performed microarray. Next we  wanted to do WGCNA analysis. Since we are interested to check the correlation of genes with traits I have created categorical trait but not sure whether it is a right way of doing it or no. So kindly help me with this. I have attached the trait file please have a look.

 

Mice days Treatment Condition
X315_1_1 day0 absent 1
X316_1_1 day0 absent 1
X315_1_2
day1_drug_a Treat1 2
X316_1_2
day1_drug_a Treat1 2
X315_2_4
day2_drug_a Treat1 3
X315_1_3
day2_drug_a Treat1 3
X316_1_3
day3_drug_a Treat1 4
X315_1_4
day3_drug_a Treat1 4
X316_1_4
day1_drug_b Treat2 5
X315_2_1
day1_drug_b Treat2 5
X316_2_1
day1_drug_b Treat2 5
X315_2_2
day2_drug_b Treat2 6
X316_2_2
day2_drug_b Treat2 6
X315_2_3
day3_drug_b Treat2 7
X316_2_3
day3_drug_b Treat2 7

I want to correlate the conditions with genes is it possible?  My question is can I use it as a trait file???

 

Regards,

Shalini

wgcna coexpression correlation microarray • 4.5k views
ADD COMMENT
0
Entering edit mode
etycksen • 0
@etycksen-9714
Last seen 8.1 years ago

I assume your interested in finding clusters of genes changing over time in response to two different treatments relative to baseline.  If that is the case, turn your data frame into a model matrix using just the days column, like so:

traits <- model.matrix(~day, data = traits.df)

ADD COMMENT
0
Entering edit mode
@shalinisonar13-9695
Last seen 7.9 years ago

Hi,

I was able to design a trait file. But do you think doing Intramodular analysis is logical?  Because unlike the example analysis my traits are binary. My trait file looks like this.

array day0  day1
xx1 1 0
xx2 1 0
xx3 0 1
xx4 0 1

 

ADD COMMENT
0
Entering edit mode
@peter-langfelder-4469
Last seen 9 months ago
United States

You can certainly use correlation to relate a binary trait to a module eigengene, to genes, and you can relate intra-modular connectivity to gene-trait association statistics (some people may prefer the Student t-test or Mann-Whitney (for binary traits) or perhaps Kruskal-Wallis (for categorical traits with more than 2 levels)).

The problem with your data is that you only have two observations in most groups (I see one group with 3 observations). That's an incredibly low number to do any binary comparisons on. 

Peter

ADD COMMENT
0
Entering edit mode

Hi,

Thank you for the inputs. Actually we started with 3 samples per group, but some samples had issues at RNA level so had to consider only these samples. But do you think using the current sample no are not good enough to do intramodular analysis? o I should draw trait -module relationship and then look for hub gene for the modules which are significantly correlating with traits.

Shalini

ADD REPLY
0
Entering edit mode

Hi,

I have two modules which are significantly positively correlated with treatment "a" day1 and day2 (obtained from module-trait relationship plot). Since you mentioned my samples numbers are very low i tried to merge both day1 and day2 of treatment "a" and then did intramodular analysis. 

please help me here.

Regards,

Shalini

ADD REPLY
0
Entering edit mode

Hello Peter,

I have a similar problem. I have 1 group of control, 4 groups of treatment (treated for 1, 2, 4, and 8 days). Each treatment/control has 3 replicates. 

If coding control as 0, and all treatment as 1, it might miss some information from treatment as they were treated for different days.

I am wondering if I can code control as 0, treated for 1 days as 2, 2 days as 3, 4 days as 4, 8 days as 6.  Is it too arbitrary?   

Thank you

Chen

ADD REPLY
0
Entering edit mode

It depends on what question you want to ask. Do you want to see modules that relate to each treatment group vs. controls? Then create one variable for each treatment group. Call the variables groupVar1, groupVar2, groupVar4, groupVar8. Define the groupVar1 [2,4,8] variable to be 1 if the sample is treated in day 1 [2,4,8], 0 if it is a control, and NA otherwise. Then relate each variable to module eigengenes as a separate trait. 

Your numeric coding makes sense if you want to look for genes that closely follow the (0, 2, 3, 4, 6) pattern. You would miss genes that follow certain patterns of change in the middle days (1,2,4) and then go back to their original expression on day 8.

ADD REPLY

Login before adding your answer.

Traffic: 696 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6