BONFpvalue<-p.adjust(LimmaFitPvalue,method="bonferroni") > All.Sigs<- data.frame(list(p.value=LimmaFitPvalue,Qvalue=Qvalue,FDRpv alue=FDRpvalue,BONFpvalue=BONFpvalue)) > OrderingPvalues<-order(LimmaFitPvalue) > All.Sigs<-All.Sigs[OrderingPvalues,] >"> BONFpvalue<-p.adjust(LimmaFitPvalue,method="bonferroni") > All.Sigs<- data.frame(list(p.value=LimmaFitPvalue,Qvalue=Qvalue,FDRpv alue=FDRpvalue,BONFpvalue=BONFpvalue)) > OrderingPvalues<-order(LimmaFitPvalue) > All.Sigs<-All.Sigs[OrderingPvalues,] >">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

1-26-061 > FDRpvalue<-p.adjust(LimmaFitPvalue,method="fdr") > FDRTPvalue<-p.adjust(TPvalue,method="fdr") > plot(LimmaFit$coefficients[complete.data],-log(FDRTPvalue[complete.data],base=10),type="p",main="Two-Sample.

Similar presentations


Presentation on theme: "1-26-061 > FDRpvalue<-p.adjust(LimmaFitPvalue,method="fdr") > FDRTPvalue<-p.adjust(TPvalue,method="fdr") > plot(LimmaFit$coefficients[complete.data],-log(FDRTPvalue[complete.data],base=10),type="p",main="Two-Sample."— Presentation transcript:

1 1-26-061 > FDRpvalue<-p.adjust(LimmaFitPvalue,method="fdr") > FDRTPvalue<-p.adjust(TPvalue,method="fdr") > plot(LimmaFit$coefficients[complete.data],-log(FDRTPvalue[complete.data],base=10),type="p",main="Two-Sample t- test",xlab="Mean Difference",ylab="-log10(FDRTPvalue)",ylim=c(0,0.6)) > plot(LimmaFit$coefficients[complete.data],-log(FDRpvalue[complete.data],base=10),type="p",main="Paired t- test",xlab="Mean Difference",ylab="-log10(FDRpvalue)",ylim=c(0,0.6)) FDR Comparisons source("http://eh3.uc.edu/teaching/cfg/2006/R/LimmaAnalysis.R")http://eh3.uc.edu/teaching/cfg/2006/R/LimmaAnalysis.R

2 1-26-062 False Discovery Rate Alternatively, adjust p-values as Following decision making procedure will keep FDR below q *

3 1-26-063 FDR p-value adjustments > N<-sum(!is.na(LimmaFitPvalue)) > Qvalue<-(N/rank(LimmaFitPvalue))*LimmaFitPvalue > FDRpvalue<-p.adjust(LimmaFitPvalue,method="fdr") > BONFpvalue<-p.adjust(LimmaFitPvalue,method="bonferroni") > All.Sigs<- data.frame(list(p.value=LimmaFitPvalue,Qvalue=Qvalue,FDRpv alue=FDRpvalue,BONFpvalue=BONFpvalue)) > OrderingPvalues<-order(LimmaFitPvalue) > All.Sigs<-All.Sigs[OrderingPvalues,] >

4 1-26-064 FDR p-value adjustments > All.Sigs[1:10,] p.value Qvalue FDRpvalue BONFpvalue 8537 4.726924e-05 0.5311644 0.2674394 0.5311644 9447 7.232472e-05 0.4063565 0.2674394 0.8127129 788 8.596788e-05 0.3220070 0.2674394 0.9660211 7269 1.043662e-04 0.2931908 0.2674394 1.0000000 13498 1.369006e-04 0.3076704 0.2674394 1.0000000 3360 1.427994e-04 0.2674394 0.2674394 1.0000000 8582 1.758953e-04 0.2823622 0.2823622 1.0000000 9367 2.441919e-04 0.3429981 0.3204765 1.0000000 1488 3.634397e-04 0.4537746 0.3204765 1.0000000 12395 4.355830e-04 0.4894646 0.3204765 1.0000000 >

5 1-26-065 Loess Normalization

6 1-26-066 Loess Normalization > NickelLoess<-loess(NNBLimmaDataNickel$M[,1]~NNBLimmaDataNickel$A[,1]) > attributes(NickelLoess) $names [1] "n" "fitted" "residuals" "enp" "s" "one.delta" [7] "two.delta" "trace.hat" "divisor" "pars" "kd" "call" [13] "terms" "xnames" "x" "y" "weights" $class [1] "loess" > par(mfrow=c(1,1)) > plotMA(NNBLimmaDataNickel,array=1,zero.weights=F,legend=F) > lines(c(-5,100),c(0,0),lw=5,col="blue") > points(NNBLimmaDataNickel$A[,1],NickelLoess$fitted,col="red")

7 1-26-067 Loess Normalization > NLNBLimmaDataNickel<-normalizeWithinArrays(NBLimmaDataNickel,method="loess") > par(mfrow=c(1,1)) > plotMA(NLNBLimmaDataNickel,array=1,zero.weights=F,legend=F) > lines(c(-5,100),c(0,0),lw=5,col="blue")

8 1-26-068 Loess Normalized Analysis > LoessLimmaFit<-lmFit(NLNBLimmaDataNickel,design) > LoessLimmaFitTstat<- abs(LoessLimmaFit$coefficients/(LoessLimmaFit$sigma*LoessLimmaFit$stdev.unscaled)) > LoessLimmaFitPvalue<-2*pt(LoessLimmaFitTstat,LoessLimmaFit$df.residual,lower.tail=FALSE) > LoessFDRpvalue<-p.adjust(LoessLimmaFitPvalue,method="fdr")

9 1-26-069 Empirical Bayes Estimation > EBayesLoessLimmaFit<-eBayes(LoessLimmaFit) > attributes(EBayesLoessLimmaFit) $names [1] "coefficients" "stdev.unscaled" "sigma" "df.residual" [5] "cov.coefficients" "pivot" "method" "design" [9] "genes" "Amean" "df.prior" "s2.prior" [13] "var.prior" "proportion" "s2.post" "t" [17] "p.value" "lods" "F" "F.p.value" $class [1] "MArrayLM" attr(,"package") [1] "limma" > EBayesFDR<-p.adjust(EBayesLoessLimmaFit$p.value,method="fdr") Homework: Compare "coefficients" for EBayesLoessLimmaFit and LoessLimmaFit

10 1-26-0610 Empirical Bayes Estimation

11 1-26-0611 Pretending That Data is Single Channel Again > LinearModelData<-cbind(NLNBLimmaDataNickel,NLNBLimmaDataNickel) > dim(LinearModelData) [1] 14112 6 > LinearModelData$M[1,] Cy5_Ctl-WT00hr_2_VS_Cy3_Nic-WT72hr_2 Cy5_Nic-WT72hr_3_VS_Cy3_Ctl-WT00hr_3 Cy5_Nic-WT72hr_1_VS_Cy3_Ctl-WT00hr_1 Cy5_Ctl-WT00hr_2_VS_Cy3_Nic- WT72hr_2 -0.1216908 1.2155011 -0.4833670 -0.1216908 Cy5_Nic-WT72hr_3_VS_Cy3_Ctl-WT00hr_3 Cy5_Nic-WT72hr_1_VS_Cy3_Ctl-WT00hr_1 1.2155011 -0.4833670 > LinearModelData$M<-cbind((NLNBLimmaDataNickel$A+NLNBLimmaDataNickel$M/2),NLNBLimmaDataNickel$A-(NLNBLimmaDataNickel$M/2)) > LinearModelData$M[1,] Cy5_Ctl-WT00hr_2_VS_Cy3_Nic-WT72hr_2 Cy5_Nic-WT72hr_3_VS_Cy3_Ctl-WT00hr_3 Cy5_Nic-WT72hr_1_VS_Cy3_Ctl-WT00hr_1 Cy5_Ctl-WT00hr_2_VS_Cy3_Nic-WT72hr_2 11.354734 11.842679 9.485143 476425 Cy5_Nic-WT72hr_3_VS_Cy3_Ctl-WT00hr_3 Cy5_Nic-WT72hr_1_VS_Cy3_Ctl-WT00hr_1 10.627177 9.968510 > This will "split" ratios back into the two channel data We could use original R and G data, but want to make use of loess normalization

12 1-26-0612 Simple Linear Model Statistical Model: Trt j ="Effect due to treatmet j" Ctl for j=1 and Nic for j=2 x ij = log-intensity for replicate i and treatment j, where i=1,2,3 and j=1,2 Parameters are estimated based on the General Linear Model Framework and for now it just turns out that We are interested if Trt 2 -Trt 1

13 1-26-0613 Describing a Linear Model to Limma Statistical Model: Design Matrix: > designMatrix<-cbind(Ctl=c(1,0,0,0,1,1),Nic=c(0,1,1,1,0,0)) > designMatrix Ctl Nic [1,] 1 0 [2,] 0 1 [3,] 0 1 [4,] 0 1 [5,] 1 0 [6,] 1 0 > contrast<-c(-1,1)

14 1-26-0614 Describing a Linear Model to Limma Statistical Model: > FitLM<-lmFit(LinearModelData,designMatrix) > FitContrast<-contrasts.fit(FitLM,contrast) > attributes(FitContrast) $names [1] "coefficients" "stdev.unscaled" "sigma" "df.residual" "cov.coefficients" "method" "design" [8] "genes" "Amean" "contrasts" $class [1] "MArrayLM" attr(,"package") [1] "limma" > ContrastTstat<- abs(FitContrast$coefficients)/(FitContrast$sigma*FitContrast$stdev.unscaled) > ContrastPvalue<-2*pt(ContrastTstat,FitContrast$df.residual,lower.tail=FALSE)

15 1-26-0615 Alternative Formulations of the Two-way ANOVA No-intercept Model Parameter Estimates Gets complicated Regardless of how the model is parametrized certain parameters remain unchanged (Trt 2 -Trt 1 ) In this sense all formulations are equivalent Null Hypotheses Null Distributions


Download ppt "1-26-061 > FDRpvalue<-p.adjust(LimmaFitPvalue,method="fdr") > FDRTPvalue<-p.adjust(TPvalue,method="fdr") > plot(LimmaFit$coefficients[complete.data],-log(FDRTPvalue[complete.data],base=10),type="p",main="Two-Sample."

Similar presentations


Ads by Google