Entering edit mode
5.3 years ago
iti.gupta
▴
10
Hello all, I know there have been a lot of post about pair-wise comparison using limma but still I am struggling for the same. Please help!!! I am facing issue in defining the design matrix and the downstream steps.
My experimental design looks like the following:
Patient Tissue (same organ)
VD16 L
VD16 NL
VD24 L
VD24 NL
The codes so far:
tissue <-factor(targets$Tissue)
patient<-factor(targets$Sample_Name)
test_design<-factor(paste(patient, tissue, sep="."))
design <- model.matrix(~0+test_design)
I think your design should be:
My colnames for the design matrix looks like:
The downstream code will be like this:
Is it correct? Also, how can I get the list of differentially expressed genes (consensus across all samples)?
Use topTable or decideTests to get the differnetially expressed genes. Have you modified the encoding of your tissue names? According to your original code there should be a tissueNormal and a tissueTumor column in the design matrix
Sorry for the confusion I have corrected the tissue encoding in the above posts. Also, I have used the topTable But the resulting matrix is somewhat unusual.
I want a single column for logFC, P-value etc. for all samples combined(Somewhat like this: "logFC" "AveExpr" "t" "P.Value" "adj.P.Val" "B" )
Please follow the user's guide first instead of asking here if each step you take is correct. No offense. When you encounter problems, come back here and explain exactly what error you encounter and give use your exact code. Good luck.
Hey ben, I have checked the user guide. I was able to compare the simple case versus control. However, I was facing the issue with paired comparisons hence i posted here. The complete code is posted below
So what is the error that you get? Please explain clearly what the issue is here.
I am not getting any error But unfortunately, I am not getting the desired output. I want a single logFC and pvalue for all the 15 paired samples Also, I know some genes which for sure behave upregulated/downregulated as per the trend. Which is not the case here
Okay, I understand your issue now. Please try if this helps.
You've used
fit
in your call toeBayes
, rather that thefit1
object you made while runningcontrasts.fit
...fit
contains a coefficient for every coefficient in your design matrix, so running topTable overfit
will do an F-Test over all the coefficients used in your model design. You don't want that.