Hello Jim,

Thanks very much. I tried this design matrix and it works great. The
contrast(I am using) first finds the DEG based on strain difference and
then between control and KO. The resulting DEG number is very low. Here's
my contrast

my.ctst <- makeContrasts(deg=(trt_srtControl_3-trt_srtControl_4) -
(trt_srtKO_1 - trt_srtKO_2),levels=design)


diff <- glmLRT(fit,design,contrast = my.ctst) OR diff <-
glmLRT(fit,design,contrast = c(1,-1,-1,1))


Is there any way to create contrast matrix to find out the DEG b/w Control
and KO by adjusting the Starin difference instead of first finding DEG from
different Strains?


I have also tried different ways of creating design matrix and I am ended
up totally confused. Here the another design matrix, I tried:-


Straing <- target$Strain

Condition <- targets$Condition

Design <- model.matriix(~Condition+Straing)


design1

          (Intercept) ConditionKO Straing

KO1-A           1           1       1

KO1-B           1           1       1

KO2-A           1           1       2

KO2-B           1           1       2

Cont1-A           1           0       3

Cont1-B           1           0       3

Cont2-A           1           0       4

Cont2-B           1           0       4

attr(,"assign")

[1] 0 1 2

attr(,"contrasts")

attr(,"contrasts")$Condition

[1] "contr.treatment"


diff <- glmLRT(fit,coef=2)


Now this gives me more DEG. As I am using coef2, so is it finding the DEG
b/w control vs ko after adjusting strain effect? Or is it simply finding
the DEG the Control vs KO?


Thank you

Regards



On Wed, Dec 25, 2013 at 5:59 PM, James W. MacDonald <jmacdon@uw.edu> wrote:

> Hi Reema,
>
> Instead of using that parameterization, you might consider creating a
> treatment-strain coefficient, which will tend to be more easily
> interpreted. So if you read in the sample table and then do:
>
> trt_srt <- paste(targets$Condition, targets$strain, sep = "_")
> design <- model.matrix(~ 0 + trt_srt)
>
> Then you can do any contrast between any treatment/strain combination you
> like, including the interaction, which tests for any differences between
> treatment that depend on the strain.
>
> Best,
>
> Jim
> On Dec 23, 2013 5:56 PM, "Reema Singh" <reema28sep@gmail.com> wrote:
>
>> Dear All,
>>
>> I have some queries regarding design matrix for two group(Control vs. KO)
>> Differential expression.I am using edgeR for this. Here is the ording of
>> my
>> question:- 1) Sample table for design matrix, 2) Design matrix, 3)
>> Questions.
>>
>> *1) Sample table for design matrix*
>>
>>
>>      Sample                 Strain                    Condition
>>
>>      KO1-A                   1                              KO
>>
>>      KO1-B                   1                              KO
>>
>>      KO2-A                   2                              KO
>>
>>      KO2-B                   2                              KO
>>
>>      Cont1-A               1                              Control
>>
>>      Cont1-B                1                              Control
>>
>>      Cont2-A               2                              Control
>>
>>      Cont2-B                2                              Control
>>
>>
>> *2) Design Matrix*
>>
>>
>>
>> targets <- read.table(file= "Samples",sep="\t",header=TRUE)
>>
>> design <- model.matrix(~Strain+Condition,targets)
>>
>> > design
>>
>>           (Intercept) Strain ConditionKO
>>
>> KO1-A           1      1           1
>>
>> KO1-B           1      1           1
>>
>> KO2-A           1      2           1
>>
>> KO2-B           1      2           1
>>
>> Cont1-A           1      3           0
>>
>> Cont1-B           1      3           0
>>
>> Cont2-A           1      4           0
>>
>> Cont2-B           1      4           0
>>
>> attr(,"assign")
>>
>> [1] 0 1 2
>>
>> attr(,"contrasts")
>>
>> attr(,"contrasts")$Condition
>>
>> [1] "contr.treatment"
>>
>>
>> *3) Questions*
>>
>> 1)      *A)* During differential expression I also want to consider
>>
>> different strain variation along with the control vs KO variation.  As far
>> as I understand this design matrix only consider one Control vs KO for DE.
>> I would like to known How I can make it consider strain variation as well?
>>
>> 2)      *B)* After DE using the same design matrix with glmFit, I inspect
>>
>> the read count for the top down regulated gene and find out that the read
>> count for this gene is very low in knockout as compare to Control . So is
>> it means the comparison is Control vs KO and topTags gives the DEG list in
>> KO as compare to Control?
>> I would appreciate your suggestion.
>>
>> Kind Regards
>>
>>
>> --
>> Reema Singh
>> Postdoctoral Research Assistant
>> College of Life Sciences
>> University of Dundee,
>> Dundee DD1 4HN, Scotland
>> United Kingdom
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>


-- 
Reema Singh
Postdoctoral Research Assistant
College of Life Sciences
University of Dundee,
Dundee DD1 4HN, Scotland
United Kingdom

	[[alternative HTML version deleted]]

