Solved (How to create "trait data" file for WGCNA )
1
4
Entering edit mode
8.2 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. The trait file I have created looks like this

Trait:

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?

Regards,
Shalini

wgcna co-expression microarray correlation network • 7.8k views
ADD COMMENT
0
Entering edit mode

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.

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
1
Entering edit mode
8.2 years ago

WGCNA doesn't take a covariate file for module creation, it's an unsupervised correlation network analysis technique. However once you have generated your modules, you can create a correlation heatmap described in this tutorial. This heatmap will tell you which modules are highly correlated with your treatment and time points data.

ADD COMMENT
0
Entering edit mode

Hi Lando Ringel,

Thank you very much for quick response. The example tutorial uses quantitative trait data but in my case I have qualitative data. Actually my question is can I use the above table as a trait file?

ADD REPLY
0
Entering edit mode

Have you tried using the plotDendroAndColors function:

#expression data is in datExpr, corresponding clinical traits are datTraits
sampleTree2=flashClust(dist(datExpr), method=``"average"``)
traitColors= numbers2colors(datTraits, signed= FALSE)

plotDendroAndColors(sampleTree2, traitColors, groupLabels= names(datTraits), main="Sample Dendrogram and Trait heatmap")

If you want to cluster the modules with the qualitative conditions ("traits"), why don't you convert your table into a true/false dichotomy. (i.e. 0 = no treatment1, 1 = treated with treatment 1) (or 0 = not day one, 1 = is day one) for each possible condition, then calculate the correlation between the 1s and 0s with your eigen-gene values for each module.

You can also color your eigengene bar-plots based upon your experiment conditions (i.e assign day0 red, day3 blue, etc). this can visually show you which module eigen gene values correspond with you experimental conditions

ADD REPLY
1
Entering edit mode

And by dichotomy do u mean creating a matrix sort of files like this?

          X315_1_1  X316_1_1  X315_1_2  X316_1_2  X315_2_4  X315_1_3  X316_1_3  X315_1_4  X316_1_4  X315_2_1  X316_2_1  X315_2_2  X316_2_2  X315_2_3
X315_1_1  1         0         0         0         0         0         0         0         0         0         0         0         0         0
X316_1_1  0         1         0         0         0         0         0         0         0         0         0         0         0         0
X315_1_2  0         0         1         0         0         0         0         0         0         0         0         0         0         0
X316_1_2  0         0         0         1         0         0         0         0         0         0         0         0         0         0
X315_2_4  0         0         0         0         1         0         0         0         0         0         0         0         0         0
X315_1_3  0         0         0         0         0         1         0         0         0         0         0         0         0         0
X316_1_3  0         0         0         0         0         0         1         0         0         0         0         0         0         0
X315_1_4  0         0         0         0         0         0         0         1         0         0         0         0         0         0
X316_1_4  0         0         0         0         0         0         0         0         1         0         0         0         0         0
X315_2_1  0         0         0         0         0         0         0         0         0         1         0         0         0         0
X316_2_1  0         0         0         0         0         0         0         0         0         0         1         0         0         0
X315_2_2  0         0         0         0         0         0         0         0         0         0         0         1         0         0
X316_2_2  0         0         0         0         0         0         0         0         0         0         0         0         1         0
X315_2_3  0         0         0         0         0         0         0         0         0         0         0         0         0         1
ADD REPLY
0
Entering edit mode
Day0
1
1
0
0
0
0
0
0
0

etc. for each value.

ADD REPLY
0
Entering edit mode

Thank you it worked.. However I was just going through few papers wherein they have filtered the genes based on differential expression analysis and selected only differential genes for WGCNA . But tutorial says we should use all the genes. Can we consider only differential genes?

ADD REPLY
0
Entering edit mode

Like I said earlier, WGCNA is supposed to be unsupervised. You are allowed to use deferentially expressed genes, but you might miss out on subtle features differential expression was not able to pick up. My advice is: to do it both ways and see if any of the modules overlap. Be sure to use >1000 genes when using the differentially expressed ones.

I'm glad it worked! feel free to mark this problem as solved : )

ADD REPLY
0
Entering edit mode

I wanted to plot module trait relationship plot similar like a plot mentioned in tutorial. Could please you suggest me a method? I am trying to identify treatment and days specific modules and their corresponding pathways.

ADD REPLY
0
Entering edit mode

Convert your traits into true false numbers (1 and 0). Correlate the 1s and 0s for each trait with the module eigen-genes. This is not a perfect solution because the module eigen-genes are continuous variables. which is why I suggested you make multiple bar-plots for each module's eigen-genes and color the bars of the barplots based upon the the trait you are interested in (red day0 blue day 3 etc). Another way is to cluster the eigen-gene matrix and see which of the samples with the same traits are clustered together based upon module eigen-gene values.

ADD REPLY

Login before adding your answer.

Traffic: 2057 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