Question: How to create design matrix in edgeR
0
gravatar for Björn
21 months ago by
Björn40
Björn40 wrote:
# edgeR
# following are my paired samples (column Patient) with other three columns 
Sample  Groups  Patient Groups1 
a   baseline    a   B   
b   baseline    b   B   
c   baseline    c   B   
d   treated     a   BF  
e   treated     b   BF  
f   treated     c   BF  
g   baseline    d   B   
h   baseline    e   B   
i   baseline    f   B   
j   treated     d   BF  
k   treated     e   BF  
l   treated     f   BF  
m   baseline    g   C   
n   baseline    h   C   
o   baseline    i   C   
p   treated     g   CF  
q   treated     h   CF  
r   treated     i   CF  
s   control     NA  control 
t   control     NA  control 
u   control     NA  control

Given above is the experimental design of my dataset after running the command of edgeR up to :

lcpm <- cpm(y2, log=TRUE)
boxplot(lcpm, las=2, col=group$Sample, main="")
title(main="B. Example: Normalised data",ylab="Log-cpm")

I created following design matrix to find out a) disease marker and b) treatment response marker miRNAs

design<-model.matrix(~0+group$Groups1)  #based B, BF, C, CF, control
colnames(design)<-levels(group$Groups1)
design
#DISEASE MARKER; DM=control-B-C  # substraction of B and C are diseae stage from control
#TREATMENT RESPONSE TR=NC-BF-CF  # substraction of BF and CF are diseae stage after treatment from control
#DM is disease marker which is comparision between patient B, C, and control (without treatment)
#TR is treatment response marker wihch is comparision between patients B after treatment, patients c after treatment and #control (without treatment)
contr.matrix<-makeContrasts(DM=control-B-C, TR=control-BF-CF, levels=colnames(design))

QUESTION: Is the data matrix created above is correct or not ?

The main idea behind is to find DE miRNAs in diseased and DE miRNAs after treatment. This will give those miRNAs that are DE due to treatment so that I can conclude the list of miRNAs that responded to treatment. Is this approach correct ? any suggestions will be highly appreciated ? how to create DE venn diagram using edgeR command

ADD COMMENTlink modified 21 months ago by Devon Ryan92k • written 21 months ago by Björn40

I've tidied up this question as best I can, but I'm not a miracle worker. This is a forum for scientists, please at least attempt to write with correct punctuation (e.g., start your sentences with capital letters) and ensure that the resulting post look intelligible. You'll get more rapid and better replies that way.

ADD REPLYlink written 21 months ago by Devon Ryan92k
0
gravatar for Devon Ryan
21 months ago by
Devon Ryan92k
Freiburg, Germany
Devon Ryan92k wrote:

Those are unlikely to be the contrasts you want. For example, control - B - C is saying, "Test for a difference between the combined effect of B and C vs. the control...but reverse the signs such that B and C increasing something vs. control will have a negative change." At the very least you probably want B+C-control so that at least the sign of the fold-change makes sense. I suspect you actually want 0.5(B+C)-control, but without you going into more detail of how you'd like to define "disease marker" I don't think anyone can provide more help there. The same goes for your TR contrast.

ADD COMMENTlink written 21 months ago by Devon Ryan92k

Thank you for the reply. I am new to bioinformatics and biostars platform. In my data set, there are two groups. Diseased subjects at different stages B and C, and control. The patients were then treated (BF and CF). My approach is first to find DE miRNAs between diseased (B and C) and control. Second, find DE miRNAs after treatment (BF and CF) and control. From first approach, I will find out miRNAs which are arguably disease markers (DM). From second approach, I intend to find those miRNAs which responded to treatment (TR). I am not familiar with edgeR so learning by doing at the moment. The main aim is to find treatment response miRNAs which differentiates patients from healthy controls. The whole concept is given in the picture. I am curious to know if the concept is sensible ! Please note that the patients are paired (baseline and treated).

In short, I want to find miRNAs that are DE in patients compared to control and ten see how those (only those) miRNAs responded to treatment ! I hope I explained clearly which I tried to show in venn diagram below. ![Venn diagram of DE miRNAs][1] https://ibb.co/hGLkNR

Could you please let me know what is the role of 0.5 in 0.5(B+C)-control ? Is it 0.5 fold change ? Thanks

ADD REPLYlink modified 21 months ago • written 21 months ago by Björn40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 970 users visited in the last hour