I want to perform WGCNA analysis, i am having RNA seq data (gene expression) in normal and tumor cases.
I want to compare between control and tumor case with respect to modules, module-trait relationship etc.
How to input control and tumor data to WGCNA?. Can I upload them by keeping in same excel sheet.?
But then how it would recognize them.
Please suggest.
Thanks in advance.m
You indicate that your data is currently stored in an Excel sheet, which is not typical. From where did you obtain it? Processed RNA-seq data is usually stored in a CSV or TSV file, and may be tarred and zipped and have the extension *.tar.gz. Note that storing and re-using data from an Excel sheet is not good practice. Excel adds a lot of formatting on top of your data and can even modify / manipulate it in ways that you may not anticipate.
I suggest that you go through the entire WGCNA Tutorial and then apply the methodology to your own data.
With tumour-normal data, you may consider one of the following:
run WGCNA separately for each of tumour and normal and then compare
results
run WGCNA with tumour + normal together and then see which modules (and, from this, which genes contained within those modules)
correlate with tumour-normal status.
If you honestly complete the online tutorial even once, you will have a better understanding. That's why the tutorial exists.
Ya, I meant to say that only. My data is arranged in .tsv format containing gene name in column and sample id in rows.
My concern was that if we want to study the difference between two groups (control and tumor) then should we input data containing both groups or we input them separately. But as per your second suggestion (run WGCNA with tumour + normal together and then see which modules (and, from this, which genes contained within those modules) correlate with tumour-normal status), if we run them together, how to compare results between two groups.
Thanks in advance.
Ok thanks, I am looking into some papers.
But can you elaborate more point no.1.
"for each module's eigenvalues, correlate (cor and cor.test) or regress (lm or glm) these to TumourNormal status (encoded as 1 and 0)"
While correlating to 1 and 0 is not ideal, it can still be performed. There is a function in WGCNA to generate that plot but I canot find it right now. I have a similar function here, if you need it:
Ya, this module-trait relationship plot, I have got.
But to perform regression analysis of module to tumorstatus, I am giving command like, but getting error
Ya, I meant to say that only. My data is arranged in .tsv format containing gene name in column and sample id in rows. My concern was that if we want to study the difference between two groups (control and tumor) then should we input data containing both groups or we input them separately. But as per your second suggestion (run WGCNA with tumour + normal together and then see which modules (and, from this, which genes contained within those modules) correlate with tumour-normal status), if we run them together, how to compare results between two groups. Thanks in advance.
When you run WGCNA with tumour + normal together, the procedure after this is:
cor
andcor.test
) or regress (lm
orglm
) these to TumourNormal status (encoded as1
and0
)Ok thanks, I am looking into some papers. But can you elaborate more point no.1. "for each module's eigenvalues, correlate (cor and cor.test) or regress (lm or glm) these to TumourNormal status (encoded as 1 and 0)"
Hey, I meant to generate a plot like this, where the modules are correlated to your traits / phenotypes:
While correlating to 1 and 0 is not ideal, it can still be performed. There is a function in WGCNA to generate that plot but I canot find it right now. I have a similar function here, if you need it:
------------------------------------
A regression analysis of the modules to TumourStatus is also possible. For example:
Ya, this module-trait relationship plot, I have got. But to perform regression analysis of module to tumorstatus, I am giving command like, but getting error
Error in eval(predvars, data, env) : object 'TumourNormalStatus' not found
I dont know how to define tumornormalstatus. Can you help me to define this?. Lots of thanks. I have used codes as:
you can just add 0 or 1 as tumour status
old question but its more related to R ,I get module plus the tumour status as one data frame , " data=data" this is the total dataframe .isnt it?