will use this enhanced version

Entering edit mode

Hi,

I Use WGCNA for network analysis. So, one of the WGCNA steps is designing plot of Module-Trait Relationship. In this plot, we can see the relationship between different extracted modules and different Trait variables. Also, in this plot we can see P-Value for each Module-Trait Relationship.So, via these P-Values we can find significant relationships between modules and Traits. In my study, the number of modules is high and in the plot, the number of P-values for each relationship is mixed and not readable. I need help for extracting these p-value as a .csv file out of this plot. I appreciate if any body help me for my problem.

Best Regards,

Mohammad

Entering edit mode

I see. The correlation values are stored in `modTraitCor`

; the P values relating to these are stored in `modTraitP`

. You can change the size of the text with `cex.text`

. You can also modify the dimensions of your plot by saving it as a PDF and modifying width and height:

```
pdf("heatmap.pdf", width=11, height=11)
labeledHeatmap(..., cex.text = 1.0, ...)
dev.off()
```

I have a more flexible function for this: CorLevelPlot - Visualise correlation results, e.g., clinical parameter correlations

[*more updated version on GitHub: https://github.com/kevinblighe/CorLevelPlot*]

Entering edit mode

0

what about the -0.39*** is that signifies strong negative correlation? and how the Species correlation is calculated as its turned into a factor .im bit curious ?

Entering edit mode

2

-0.39* signifies that the p-value is between 0.01 and 0.05. The number of asterisks indicate the level of significance. The cut-offs can be set with the parameters:

```
signifSymbols = c("***", "**", "*", ""),
signifCutpoints = c(0, 0.001, 0.01, 0.05, 1),
```

Factors will be converted into numbers based on the ordering of the factors. This may or may not make intuitive sense, depending on the type of factor.

Entering edit mode

0

Dear Dr. blighe

Hello and Thanks for your comments. I designed Module-Trait Relationship in WGCNA based on modTraitCor and calculated moduleTraitPvalue based on corPvalueStudent function. based on that function, A vector of p-values is generated that show the level of significance of module trait relationship. now, I have 64 modules and 21 trait features but I don't know the cut-off for p-value. in other words, I don't know p-value cut-off for significance is 0.01 or 0.05 ! I appreciate if you share your comment with me.

Entering edit mode

1

Dear modarzi, I mean no disrespect here, but you should not expect people on Biostars providing you a day-to-day support to your problems. Eventually, you as the analyst have to stand up for the results, and that is why **you** should decide about cutoffs and things. If you want it more conservative, use 0.01, more relaxed 0.05 (probably does not matter too much anyway), try both and see what looks more reasonable, but in any case, make decisions based on what you have learned rather than asking for spoon-feeding.

Entering edit mode

0

Dear ATpoint

Hello,

Thanks for your comment. You are right but in this case I have 64 modules and in some modules I have about 2000 genes. So, using 0.01 or 0.05 as cutoffs have huge different results. based on this differentiation, I read few papers for finding answer my question but up to now I couldn't find nay response. For this reason, I posted my question in Biostar portal. Finally, I do apologize for inconvenience you.

Best Regards,

Mohammad

Loading Similar Posts

What have you tried? - please edit the post to show code, and describe your problem in detail.

Hi,

Thanks for your comment. I need to attached my module-trait relationship plot for showing problem. could you please guide me how can I upload my .pdf file via this post?

Description My Problem: I have to work on 53 cancer samples from one of the TCGA Cancer dataset. I used WGCNA for constructing network and finding significant modules. my data dimension is 53 samples and 56000 gene type. after running WGCNA, I see 99 modules. Now, I don't know 99 module is ok or my analysis has problem? secondly, I plot Modules-Trait relationship. in tutorial of WGCNA, you can see p-value for each relationship but in my plot because of lots of modules, numbers of p-value mix together and I cant see it(I can zoom on it). so, I am looking for function for getting P-value based on each module-trait relationship.

I appericiate if you share your comment with me

Best Regards,

Mohammad

Please paste the code that you have used to generate the module-trait relationships.

Dear Dr. Blighe

Hi,

Thanks for your comments.my code is in below:

So, as I the number of modules is 99, in this heatmap I can't see p-values for each relationship.