edgeR Multifactor Design - Baseline
2
0
Entering edit mode
mh.manoj • 0
@mhmanoj-7441
Last seen 7.7 years ago
United States

Hello,

In my experiment, we have mice treated with drug and saline at 2 week stage. We have transcriptome data for both these treatments across five development time points - 2w, 3w, 4w, 6w and 10w. My objective is to detect the effect of drug at each time point, where the Sal accounts for changes that happen during normal development. I guess my situation is similar to the example case given in the user manual section 3.3.2.

I tried the formula:

targets$Treat <- relevel(factor(targets$Treat), ref="Placeb")

design <- model.matrix(~Treat + Treat:Time, data=targets)

but, depending on how I label my dataset, I get different number of DE genes. I guess it is because the first term gets used as a baseline. For eg., when I label my data as 2w, 3w, 4w, 6w, 10w, the coefficient names are:

> colnames(fit)
 [1] "(Intercept)"        "TreatDrug"          "TreatPlaceb:Time2w" "TreatDrug:Time2w"   "TreatPlaceb:Time3w" "TreatDrug:Time3w"   "TreatPlaceb:Time4w" "TreatDrug:Time4w"   "TreatPlaceb:Time6w"
[10] "TreatDrug:Time6w" 

and,

the drug effect at 2w - lrt_Drug_2w <- glmLRT(fit, coef=c(4))  - and the resulting DE genes are 7912

the drug effect at 3w - lrt_Drug_3w <- glmLRT(fit, coef=c(6))  - and the resulting DE genes are 3925

the drug effect at 4w - lrt_Drug_4w <- glmLRT(fit, coef=c(8))  - and the resulting DE genes are 961

the drug effect at 6w - lrt_Drug_6w <- glmLRT(fit, coef=c(10))  - and the resulting DE genes are 15

 

 

But, if I rename my 10w sample to 9w [changes the alphabetical order], I get the following coefficient names:

> colnames(fit)
 [1] "(Intercept)"        "TreatDrug"          "TreatPlaceb:Time3w" "TreatDrug:Time3w"   "TreatPlaceb:Time4w" "TreatDrug:Time4w"   "TreatPlaceb:Time6w" "TreatDrug:Time6w"   "TreatPlaceb:Time9w"
[10] "TreatDrug:Time9w" 

and

the drug effect at 3w - lrt_Drug_3w <- glmLRT(fit, coef=c(4))  - and the resulting DE genes are 2887

the drug effect at 4w - lrt_Drug_4w <- glmLRT(fit, coef=c(6))  - and the resulting DE genes are 5338

the drug effect at 6w - lrt_Drug_6w <- glmLRT(fit, coef=c(8))  - and the resulting DE genes are 6394

the drug effect at 9w - lrt_Drug_9w <- glmLRT(fit, coef=c(10))  - and the resulting DE genes are 7907

 

As you can see, the numbers are vastly different. I'm not sure if I've done anything wrong. I've pasting all steps (code) below.

In my experiment there is no 0h (as in the example in the case study of section 3.3). So I cannot define any one time point as a base line. As I'd mentioned earlier, my objective is to identify the genes that change due to drug treatment at 2w, across development. There are normal, expected changes that happen during development. We wish to bring out the long-term effect of the drug treatment at an early time point (2w), taking into consideration the changes in development.

 

I'd be glad if you could help me with this problem. Thanks very much.

Manoj.

 

Here's the code I use:

targets <- readTargets("AllCountData_Info.txt")
x <- read.delim("HTSqRvrse_Counts_ReOrdrd" , row.names=1)
y <- DGEList(counts=x[,1:20], group=targets$Treat)
colnames(y) <- targets$Label

y$samples$lib.size <- colSums(y$counts)
y$samples
y <- calcNormFactors(y)

Treat <- factor(targets$Treat, levels=c("Drug","Placeb"))
Group <- factor(paste(targets$Treat,targets$Time,sep="."))
cbind(targets,Group=Group)

targets$Treat <- relevel(factor(targets$Treat), ref="Placeb")
design <- model.matrix(~Treat + Treat:Time, data=targets) # consider all the levels of time for each treatment drug separately. The second term is a nested interaction, the interaction of Time within Treat.

y <- estimateGLMCommonDisp(y,design, verbose=TRUE)
y <- estimateGLMTrendedDisp(y,design)
y <- estimateGLMTagwiseDisp(y,design)

fit <- glmFit(y, design)
colnames(fit)

lrt_Drug_2w <- glmLRT(fit, coef=c(4))
FDR_Drug_2w <- p.adjust(lrt_Drug_2w$table$PValue, method="BH")
sum(FDR_Drug_2w < 0.05)
summary(de_Drug_2w <- decideTestsDGE(lrt_Drug_2w))
detags_Drug_2w <- rownames(y)[as.logical(de_Drug_2w)]

---- end of sample code ---

 

Input file:

AllCountData_Info.txt
Lane    Treat    Time    Label
2S1    Placeb    2w    2S1
2S2    Placeb    2w    2S2
3S1    Placeb    3w    3S1
3S2    Placeb    3w    3S2
4S1    Placeb    4w    4S1
4S2    Placeb    4w    4S2
6S1    Placeb    6w    6S1
6S2    Placeb    6w    6S2
10S1    Placeb    10w    10S1
10S2    Placeb    10w    10S2
2K1    Drug    2w    2K1
2K2    Drug    2w    2K2
3K1    Drug    3w    3K1
3K2    Drug    3w    3K2
4K1    Drug    4w    4K1
4K2    Drug    4w    4K2
6K1    Drug    6w    6K1
6K2    Drug    6w    6K2
10K1    Drug    10w    10K1
10K2    Drug    10w    10K2

---- end of input file ---

 

 

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocInstaller_1.16.1 RColorBrewer_1.1-2   gplots_2.16.0        statmod_1.4.20       locfit_1.5-9.1       edgeR_3.8.5          limma_3.22.6        

loaded via a namespace (and not attached):
[1] bitops_1.0-6       caTools_1.17.1     gdata_2.13.3       grid_3.1.1         gtools_3.4.1       KernSmooth_2.23-14 lattice_0.20-30    tools_3.1.1       
>

---- end of message ---

edgeR multiple factor design • 2.3k views
ADD COMMENT
1
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 10 hours ago
The city by the bay

You might not be specifying the desired contrast for your experiment. It's hard to tell from the column names alone, so I might be wrong, but bear with me. In your first design matrix, you drop coefficient 4 to test the effect of the treatment at 2 weeks. However, coefficient 4 itself represents the log-fold change of the 2-week treated sample over the 10-week treated sample (you can check this by examining the row of design for the 2-week treated sample - you should get values of 1 for the intercept, TreatDrug and TreatDrug:Time2w, with zero for everything else).

If this is true, you should specify contrast=c(0,1,-1,1,0,0,0,0,0,0) in your call to glmLRT. This will compare the 2-week treated sample with the 2-week placebo, which seems to be more sensible. The corresponding contrast for the second design matrix would probably be c(0,1,0,0,0,0,0,0,0,0), as TreatDrug directly represents the log-fold change of the 2-week treated over its placebo. These two should give the same results.

ADD COMMENT
0
Entering edit mode

Thanks for your comment Aaron.

Below is the design matrix that was generated:

> design
     (Intercept) TreatDrug TreatPlaceb:Time2w TreatDrug:Time2w TreatPlaceb:Time3w TreatDrug:Time3w TreatPlaceb:Time4w TreatDrug:Time4w TreatPlaceb:Time6w TreatDrug:Time6w
2S1            1         0                  1                0                  0                0                  0                0                  0                0
2S2            1         0                  1                0                  0                0                  0                0                  0                0
3S1            1         0                  0                0                  1                0                  0                0                  0                0
3S2            1         0                  0                0                  1                0                  0                0                  0                0
4S1            1         0                  0                0                  0                0                  1                0                  0                0
4S2            1         0                  0                0                  0                0                  1                0                  0                0
6S1            1         0                  0                0                  0                0                  0                0                  1                0
6S2            1         0                  0                0                  0                0                  0                0                  1                0
10S1           1         0                  0                0                  0                0                  0                0                  0                0
10S2           1         0                  0                0                  0                0                  0                0                  0                0
2K1            1         1                  0                1                  0                0                  0                0                  0                0
2K2            1         1                  0                1                  0                0                  0                0                  0                0
3K1            1         1                  0                0                  0                1                  0                0                  0                0
3K2            1         1                  0                0                  0                1                  0                0                  0                0
4K1            1         1                  0                0                  0                0                  0                1                  0                0
4K2            1         1                  0                0                  0                0                  0                1                  0                0
6K1            1         1                  0                0                  0                0                  0                0                  0                1
6K2            1         1                  0                0                  0                0                  0                0                  0                1
10K1           1         1                  0                0                  0                0                  0                0                  0                0
10K2           1         1                  0                0                  0                0                  0                0                  0                0
attr(,"assign")
 [1] 0 1 2 2 2 2 2 2 2 2
attr(,"contrasts")
attr(,"contrasts")$Treat
[1] "contr.treatment"

attr(,"contrasts")$Time
[1] "contr.treatment"

>

I'm trying to get a baseline effect from the Placebo across development and then obtain treatment effects at each time point. I did do the classic ET at specific time points (eg., for drug vs placebo at 2w I get 24 DE genes).

 

ADD REPLY
1
Entering edit mode

I'll interpret "baseline effect from Placebo across development" as the effect of development time on the placebo samples. I'll assume that you want to compare adjacent time points, in which case:

contrast.3w <- c(0, 0, -1, 0, 1, 0, 0, 0, 0, 0) # 3-week vs 2-week
contrast.4w <- c(0, 0, 0, 0, -1, 0, 1, 0, 0, 0) # 4-week vs 3-week
contrast.6w <- c(0, 0, 0, 0, 0, 0, -1, 0, 1, 0) # 6-week vs 4-week
contrast.10w <- c(0, 0, 0, 0, 0, 0, 0, 0, -1, 0) # 10-week vs 6-week

You can then look at the contrasts and see which genes are consistently up/down-regulated across development, or get turned on/off within a specific time-frame, etc. This can be done by running each contrast separately and intersecting the results, or by running all contrasts together in an ANOVA-like comparison and sorting genes by the sign of the log-fold change in each contrast.

If, as in your original post, you were to drop the TreatPlaceb:Time coefficient for each time point, you'd only be comparing each placebo sample to the 10-week placebo. This also explains why you get different behaviour in the two design matrices in your original post; in your second design, dropping the coefficients compares each other placebo sample to the 2-week placebo, not the 10-week placebo.

As for your comparisons between treatment and placebo at each time point, this is also easy to formulate:

contrast.TvP.2w <- c(0, 1, -1, 1, 0, 0, 0, 0, 0, 0) # 2 weeks
contrast.TvP.3w <- c(0, 1, 0, 0, -1, 1, 0, 0, 0, 0) # 3 weeks
contrast.TvP.4w <- c(0, 1, 0, 0, 0, 0, -1, 1, 0, 0) # 4 weeks
contrast.TvP.6w <- c(0, 1, 0, 0, 0, 0, 0, 0, -1, 1) # 6 weeks
contrast.TvP.10w <- c(0, 1, 0, 0, 0, 0, 0, 0, 0, 0) # 10 weeks
ADD REPLY
0
Entering edit mode

Thanks Aaron.

Part 1: I'm not really trying to get the effect of placebo -- I want to use this (placebo) to account for changes during development, and get the effect of treatment.

Part 2: I understand that the problem is because only one of the Placebo time points is getting considered (10w or 2w, depending on which label comes first (alphabetically). How could I get an average of all placebo (across development) as a baseline, instead of just one specific time point?

Part 3: For the TvP comparison at each time point as you have mentioned, I could also just use the classic ET test, right? I prefer to get the whole developmental change also accounted for.

ADD REPLY
1
Entering edit mode

With regards to Part 2, I'm not sure what you want to compare to the placebo baseline. It doesn't make a lot of sense to compare treatment samples to this baseline, if you already have matched placebo samples at the same timepoint.

For part 3, I don't know what you mean by the "classic ET test". The closest I can think of is classic edgeR, but this isn't relevant for the GLM framework. I'm also unclear on what you mean when you talk about accounting for the "whole developmental change".

ADD REPLY
0
Entering edit mode

Thanks Aaron for your inputs. I agree, when you take out the phrase "whole developmental change", it doesn't make sense.

As explained in my original post:

"my objective is to identify the genes that change due to drug treatment at 2w, across development. There are normal, expected changes that happen during development. We wish to bring out the long-term effect of the drug treatment at an early time point (2w), taking into consideration the changes in development."

 

Regarding Part 2: I'm trying the nested interaction formula. As I understand, this can be used to get the effect of "Time within Treat" (as per edgeR manual).

3.3.3 Treatment eects over all times

The nested interaction model makes it easy to nd genes that respond to the treatment at any time, in a single test. Continuing the above example,

> lrt <- glmLRT(fit, coef=c(4,6))

finds genes that respond to the treatment at either 1 hour or 2 hours versus the 0 hour baseline.

 

My problem is that I do not have a 0h to make as a baseline.

 

 

ADD REPLY
0
Entering edit mode

Okay, one problem at a time.

You say that "my objective is to identify the genes that change due to drug treatment at 2w, across development". Which one is it? At 2 weeks, or across development?

Let's simplify the discussion. Say we have treated and normal samples for both 2 and 10 week timepoints. What kind of gene would you hope to detect?

ADD REPLY
1
Entering edit mode
@gordon-smyth
Last seen 4 minutes ago
WEHI, Melbourne, Australia

Dear Manoj,

Actually, the example in Section 3.3.2 of the edgeR User's Guide is more complicated than your situation. Section 3.3.2 was estimating interaction effects whereas you just want simple drug effects at each time.

You can do what you want simply by reversing the factors in your model formula:

> design <- model.matrix(~Time + Time:Treat, data=targets)
> colnames(design)
 [1] "(Intercept)"       "Time2w"            "Time3w"           
 [4] "Time4w"            "Time6w"            "Time10w:TreatDrug"
 [7] "Time2w:TreatDrug"  "Time3w:TreatDrug"  "Time4w:TreatDrug" 
[10] "Time6w:TreatDrug" 

Then you can use

> lrt_Drug_2w <- glmLRT(fit, coef="Time2w:TreatDrug")
> lrt_Drug_3w <- glmLRT(fit, coef="Time3w:TreatDrug")
> lrt_Drug_4w <- glmLRT(fit, coef="Time4w:TreatDrug")
> lrt_Drug_6w <- glmLRT(fit, coef="Time6w:TreatDrug")
> lrt_Drug_10w <- glmLRT(fit, coef="Time10w:TreatDrug")

Alternatively of course you could have followed Section 3.3.1, in which case you would simply take the contrasts: "Drug.2w-Placeb.2w" , "Drug.3w-Placeb.3w" and so on.

ADD COMMENT
0
Entering edit mode

Hi Gordon,

Thanks very much for your input. I tried the two options you gave. It makes sense to reverse the factors in order to model the effect of drug effects at each time, accounting for the changes during normal development, derived from the Placebo samples.

I'm a bit confused about the use of the label / header information. When I try the second option making contrasts Drug.2w-Placeb.2w" , "Drug.3w-Placeb.3w" etc., I get different results based on whether I label the 10w sample as "10w" or "9w".

Using the label as "9w" for the 10w samples:

more AllCountData_Info_10wLast.txt
Lane    Treat   Time    Label
2K1     Drug    2w      2K1
2K2     Drug    2w      2K2
3K1     Drug    3w      3K1
3K2     Drug    3w      3K2
4K1     Drug    4w      4K1
4K2     Drug    4w      4K2
6K1     Drug    6w      6K1
6K2     Drug    6w      6K2
9K1     Drug    9w      9K1
9K2     Drug    9w      9K2
2S1     Placeb  2w      2S1
2S2     Placeb  2w      2S2
3S1     Placeb  3w      3S1
3S2     Placeb  3w      3S2
4S1     Placeb  4w      4S1
4S2     Placeb  4w      4S2
6S1     Placeb  6w      6S1
6S2     Placeb  6w      6S2
9S1     Placeb  9w      9S1
9S2     Placeb  9w      9S2

Expression Data:

GeneID    W2S1    W2S2    W3S1    W3S2    W4S1    W4S2    W6S1    W6S2    W9S1    W9S2    W2K1    W2K2    W3K1    W3K2    W4K1    W4K2    W6K1    W6K2    W9K1    W9K2
ENSMUSG00000000001.4    4590    2719    1422    2159    1537    2967    2216    1624    2703    1753    5798    4597    1725    2041    1981    3089    1543    2297    3240    3657

etc..

I run the following code:

targets <- readTargets("AllCountData_Info_10wLast.txt")
x <- read.delim("HTSqRvrse_Counts_ReOrdrd_10wLast" , row.names=1)
y <- DGEList(counts=x[,1:20], group=targets$Treat)
colnames(y) <- targets$Label

y$samples$lib.size <- colSums(y$counts)
y <- calcNormFactors(y)

Treat <- factor(targets$Treat, levels=c("Drug","Placeb"))
Group <- factor(paste(targets$Treat,targets$Time,sep="."))
cbind(targets,Group=Group)

targets$Treat <- relevel(factor(targets$Treat), ref="Placeb")
design <- model.matrix(~Time + Time:Treat, data=targets) 

y <- estimateGLMCommonDisp(y,design, verbose=TRUE)
y <- estimateGLMTrendedDisp(y,design)
y <- estimateGLMTagwiseDisp(y,design)

fit <- glmFit(y, design)
colnames(fit)

> colnames(fit)
 [1] "(Intercept)"      "Time3w"           "Time4w"           "Time6w"           "Time9w"           "Time2w:TreatDrug" "Time3w:TreatDrug" "Time4w:TreatDrug" "Time6w:TreatDrug"
[10] "Time9w:TreatDrug"

colnames(design) <- levels(Group)

> colnames(design)
 [1] "Drug.2w"   "Drug.3w"   "Drug.4w"   "Drug.6w"   "Drug.9w"   "Placeb.2w" "Placeb.3w" "Placeb.4w" "Placeb.6w" "Placeb.9w"
my.contrasts <- makeContrasts(DrugvsPlaceb.2w = Drug.2w-Placeb.2w,
                              DrugvsPlaceb.3w = Drug.3w-Placeb.3w,
                              DrugvsPlaceb.4w = Drug.4w-Placeb.4w,
                              DrugvsPlaceb.6w = Drug.6w-Placeb.6w,
                              DrugvsPlaceb.9w = Drug.9w-Placeb.9w,
                              levels=design)

lrt_DrugvsPlaceb_2w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.2w"])
FDR_KvS_2 <- p.adjust(lrt_DrugvsPlaceb_2w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_2 < 0.05)
[1] 23975

lrt_DrugvsPlaceb_3w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.3w"])
FDR_KvS_3 <- p.adjust(lrt_DrugvsPlaceb_3w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_3 < 0.05)
[1] 561

lrt_DrugvsPlaceb_4w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.4w"])
FDR_KvS_4 <- p.adjust(lrt_DrugvsPlaceb_4w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_4 < 0.05)
[1] 1889

lrt_DrugvsPlaceb_6w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.6w"])
FDR_KvS_6 <- p.adjust(lrt_DrugvsPlaceb_6w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_6 < 0.05)
[1] 2371

lrt_DrugvsPlaceb_9w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.9w"])
FDR_KvS_10 <- p.adjust(lrt_DrugvsPlaceb_9w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_10 < 0.05)
[1] 3620

 


And if I change the labels of the 10w samples from "9w" to "10w" and run the same code:

> colnames(fit)
[1] "(Intercept)"       "Time2w"            "Time3w"            "Time4w"            "Time6w"            "Time10w:TreatDrug" "Time2w:TreatDrug"  "Time3w:TreatDrug"
[9] "Time4w:TreatDrug"  "Time6w:TreatDrug"

colnames(design) <- levels(Group)

> colnames(design)
[1] "Drug.10w"   "Drug.2w"    "Drug.3w"    "Drug.4w"    "Drug.6w"    "Placeb.10w" "Placeb.2w"  "Placeb.3w"  "Placeb.4w"  "Placeb.6w"

 

fit <- glmFit(y, design)

my.contrasts <- makeContrasts(DrugvsPlaceb.2w = Drug.2w-Placeb.2w,
                              DrugvsPlaceb.3w = Drug.3w-Placeb.3w,
                              DrugvsPlaceb.4w = Drug.4w-Placeb.4w,
                              DrugvsPlaceb.6w = Drug.6w-Placeb.6w,
                              DrugvsPlaceb.10w = Drug.10w-Placeb.10w,
                              levels=design)

lrt_DrugvsPlaceb_2w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.2w"])
FDR_KvS_2 <- p.adjust(lrt_DrugvsPlaceb_2w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_2 < 0.05)
[1] 3772

lrt_DrugvsPlaceb_3w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.3w"])
FDR_KvS_3 <- p.adjust(lrt_DrugvsPlaceb_3w$table$PValue, method="BH")

I get:

sum(FDR_KvS_3 < 0.05)
[1] 724

lrt_DrugvsPlaceb_4w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.4w"])
FDR_KvS_4 <- p.adjust(lrt_DrugvsPlaceb_4w$table$PValue, method="BH")


I get:

> sum(FDR_KvS_4 < 0.05)
[1] 52

lrt_DrugvsPlaceb_6w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.6w"])
FDR_KvS_6 <- p.adjust(lrt_DrugvsPlaceb_6w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_6 < 0.05)
[1] 1

lrt_DrugvsPlaceb_10w <- glmLRT(fit, contrast=my.contrasts[,"DrugvsPlaceb.10w"])
FDR_KvS_10 <- p.adjust(lrt_DrugvsPlaceb_10w$table$PValue, method="BH")

I get:

> sum(FDR_KvS_10 < 0.05)
[1] 23558

 

I guess the first term (either 2w or 10w) gets considered as a baseline? In my case, I cannot do that since I do not have a "0h" time point, as in example 3.3.1.

Even if I considered 2w as a starting time-point, I don't know why I get 23,975 genes DE out of total 38,924 genes.

 

 

Using option 1:

When I tried option 1, I get zero DE genes for all comparisons:

targets$Treat <- relevel(factor(targets$Treat), ref="Placeb")
design <- model.matrix(~Time + Time:Treat, data=targets)

fit <- glmFit(y, design)
colnames(fit)
[1] "(Intercept)"      "Time3w"           "Time4w"           "Time6w"           "Time9w"           "Time2w:TreatDrug" "Time3w:TreatDrug" "Time4w:TreatDrug" "Time6w:TreatDrug"
[10] "Time9w:TreatDrug"

 

I get zero DE genes for all comparisons :

> lrt_Drug_2w <- glmLRT(fit, coef="Time2w:TreatDrug")
> FDR_Drug_2w <- p.adjust(lrt_Drug_2w$table$PValue, method="BH")
> sum(FDR_Drug_2w < 0.05)
[1] 0
> sum(FDR_Drug_2w < 0.1)
[1] 0

> lrt_Drug_3w <- glmLRT(fit, coef="Time3w:TreatDrug")
> FDR_Drug_3w <- p.adjust(lrt_Drug_3w$table$PValue, method="BH")
> sum(FDR_Drug_3w < 0.05)
[1] 0
> sum(FDR_Drug_3w < 0.1)
[1] 0

 

> lrt_Drug_4w <- glmLRT(fit, coef="Time4w:TreatDrug")
> FDR_Drug_4w <- p.adjust(lrt_Drug_4w$table$PValue, method="BH")
> sum(FDR_Drug_4w < 0.05)
[1] 0
> sum(FDR_Drug_4w < 0.1)
[1] 0

> lrt_Drug_6w <- glmLRT(fit, coef="Time6w:TreatDrug")
> FDR_Drug_6w <- p.adjust(lrt_Drug_6w$table$PValue, method="BH")
> sum(FDR_Drug_6w < 0.05)
[1] 0
> sum(FDR_Drug_6w < 0.1)
[1] 0

> lrt_Drug_9w <- glmLRT(fit, coef="Time9w:TreatDrug")
> FDR_Drug_9w <- p.adjust(lrt_Drug_9w$table$PValue, method="BH")
> sum(FDR_Drug_9w < 0.05)
[1] 0
> sum(FDR_Drug_9w < 0.1)
[1] 0

 


I'm pretty sure that this is not the true result. Can you please check and see if I've missed anything?

Thanks,

Manoj.

 

 

ADD REPLY
1
Entering edit mode

Dear Manoj,

You are not applying Option 2 correctly.  If you want to use this method, you must the follow the code in Section 3.3.1 of the User's Guide and use

design <- model.matrix(~0 + Group, data=targets)
colnames(design) <- levels(Group)

The code you actually use:

design <- model.matrix(~Time + Time:Treat, data=targets) 
colnames(design) <- levels(Group)

will give nonsense results because you applying colnames that are unrelated to the design matrix that as been created.

As far as I can see, you have applied Option 1 correctly and found no DE. This may simply be the correct result.

Note that, when you are applying the methods correctly, you will get the same results regardless of how the time points are labelled.

ADD REPLY
0
Entering edit mode

I agree. The design formula should have an intercept term.

When I do a classic exact test, just pairwise comparison I do get DE genes (Drug vs Placebo) at each time point. Probably, when taken as a whole (across development), there is no significantly DE genes.

Thanks very much Gordon and Aaron for helping me out.

 

ADD REPLY

Login before adding your answer.

Traffic: 919 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6