Hi Diya, at this stage of your analysis you're leaving the world of aroma.affymetrix. Please use the Bioconductor mailing list for questions about limma etc. You have a much better chance to get a quick and clear answer there.
/Henrik On Thu, Sep 3, 2009 at 12:22 PM, Diya Vaka<biotechd...@gmail.com> wrote: > > Hi, > > I have a question.I have 2contral samples(v7,v8) and 2 treatment > samples(g1,g4).I have the data generated from aroma.affymetrix and I > have applied log2 on it and load the data for doing ststistical > analysis by limma.But I dont understand whether to give coef=2or 1 in > the toptable command.When I give one it gives very little fold change > and when I give 1 its gives 14 fold change. > > dat.m<-read.csv("datam.csv",skip=0) > genes<-rownames(dat.m) > groups<-c(2,2,1,1) > groups<-as.factor(groups) > design<-model.matrix(~groups) > design > fit<-lmFit(dat.m, design) > fit<-eBayes(fit) > toptable(fit, coef=2) > > Thanks in advance, > Diya > > On Aug 31, 8:26 am, Mathieu Parent <parent.math...@gmail.com> wrote: >> Salut ! >> >> Here is the little function I wrote to run limma and save time. I'm a bad >> scripter, but this saves me a lot of time. Limma is very well documented. >> Here is a book chapter from Gordon Smith that covers it >> all:www.statsci.org/smyth/pubs/*limma*-biocbook-reprint.pdf >> >> Cheers ! >> >> (load the function) >> The call for you would be... >> >> data <- matrix_from_limma_not_logged >> design <- cbind(c(1,1,0,0), c(0,0,1,1)) >> colnames(design) <- c("Gr1", "Gr2") >> rownames(design) <- c("array1", "array2", "array3", "array4") >> contrast <- makeContrasts(Gr1VsGr2 = (Gr2-Gr1), levels=design) >> Pval <- 0.05 >> FDR <- "fdr" >> LFC <- log2(2)* >> >> *output_from_limma <- fun.LIMMA(data, design, contrast, Pval, LFC, FDR) >> rm(design, contrast, Pval, LFC, FDR) >> >> *##### Execute LIMMA to output matrix of significant genes >> ### ARGUMENTS >> ## fun.LIMMA(data, design, contrast, Pval, LFC, FDR) >> # Data matrix - Output from Aroma, NOT LOGGED. rows=genes, cols=arrays >> # Design matrix for n array in 2 group (ie design <- cbind(c(1,1,0,0), >> c(0,0,1,1) ) >> # Contrast matrix (ie contrast <- makeContrasts(Gr1VsGr2 = (Gr2-Gr1), >> levels=design) ) >> # Pval (numeric, between 0 and 1) (ie Pval <- 0.05) >> # LFC (numeric, logged base 2 value of fold change) (ie LFC<- log2(2)) >> # FDR correction (Caracter, '"none"', '"BH"', '"fdr"', '"BY"' or '"holm" ) >> (ie FDR <- "fdr") >> * >> fun.LIMMA <- function(data, design, contrast, Pval, LFC, FDR) { >> library(limma) >> # Fit >> fit.lm <- lmFit(log(data, 2), design) >> fit.co <- contrasts.fit(fit.lm, contrast) >> fit.eb <- eBayes(fit.co) >> # Results >> results <- decideTests(fit.eb, adjust.method=FDR, p.val=Pval, >> lfc=LFC) >> summary_table<-summary(results) >> # Filtering >> signif_probes <- which(results != 0) >> limma_output <- fit.eb[signif_probes,] >> limma_output$signif_probes <- signif_probes >> # Output >> cat("\n", "\n"); cat("*** Input:", "\n") ; cat("\n", "Pval = ", >> Pval) >> cat("\n", "LFC = ", LFC) >> cat("\n", "FDR correction method = ", FDR, "\n", "\n") >> cat("*** Number of significant probes :", length(signif_probes), >> "\n", "\n") >> cat("*** Summary of the results", "\n", "\n"); >> print(summary(results)); cat("\n") >> cat("*** Object returned: limma_output", "\n", "\n") >> limma_output #returns the table as an object >> >> On Fri, Aug 28, 2009 at 8:13 AM, Diya v <diya_2...@yahoo.co.in> wrote: >> > Hi >> >> > I have 2 control and 2 treatment groups of MoGene-1_0-st.I have the data >> > normalized and and a data matrix after fit(plm) is performed. >> >> > I want to do statistical analysis for differentially expressed ganes. >> >> > Can I take the datamatrix generated from aroma.affymetrix and do the >> > analysis with limma >> >> > Is there any online tutorial for this? >> >> > Thanks, >> > Diya >> >> > --- On *Fri, 28/8/09, Mathieu Parent <parent.math...@gmail.com>* wrote: >> >> > From: Mathieu Parent <parent.math...@gmail.com> >> > Subject: [aroma.affymetrix] Re: Discussion on gene-1-0-st-array-analysis >> > To: aroma-affymetrix@googlegroups.com >> > Date: Friday, 28 August, 2009, 5:58 PM >> >> > Hi, >> > They way it has been proposed to me, is to extract the matrix from the >> > normalised and summarised data, log it and pass into the LIMMA package for >> > differential expression analysis. >> >> > What is your experimental design ? >> >> > Math >> > McGill University >> >> > On Thu, Aug 27, 2009 at 3:46 PM, Diya Vaka >> > <biotechd...@gmail.com<http://mc/compose?to=biotechd...@gmail.com> >> > > wrote: >> >> >> Hello All, >> >> >> I want to know about the up and down regulated genes.So how am i >> >> supposed to proceed after this step >> >> >> Diya >> >> > ------------------------------ >> > Love Cricket? Check out live scores, photos, video highlights and more. >> > Click >> > here <http://in.rd.yahoo.com/tagline_cricket_2/*http://cricket.yahoo.com>. > > > --~--~---------~--~----~------------~-------~--~----~ When reporting problems on aroma.affymetrix, make sure 1) to run the latest version of the package, 2) to report the output of sessionInfo() and traceback(), and 3) to post a complete code example. You received this message because you are subscribed to the Google Groups "aroma.affymetrix" group. To post to this group, send email to aroma-affymetrix@googlegroups.com To unsubscribe from this group, send email to aroma-affymetrix-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/aroma-affymetrix?hl=en -~----------~----~----~----~------~----~------~--~---