[prev in list] [next in list] [prev in thread] [next in thread]
List: bioconductor
Subject: [BioC] Limma script - Opinions requested
From: Gordon K Smyth <smyth () wehi ! EDU ! AU>
Date: 2010-08-29 23:25:01
Message-ID: Pine.WNT.4.64.1008300917410.5192 () PC602 ! alpha ! wehi ! edu ! au
[Download RAW message or body]
Dear Lisa,
limma now has a representation for single colour arrays (ELists), so you
can simplify your pre-processing code somewhat:
E <- read.maimages(targets,columns=list(G="Median",Gb="MedBackground"),green.only=TRUE)
E$genes <- read.delim("Annotation file.txt",stringsAsFactors=FALSE)
E <- backgroundCorrect(E, method="subtract")
E <- backgroundCorrect(E, method="normexp", offset=50)
NormE <- normalizeBetweenArrays(E, method="quantile")
I don't understand you question about getting gene names in the toptable,
as this should happen automatically.
Best wishes
Gordon
> Date: Fri, 27 Aug 2010 10:59:10 -0700
> From: "Orfe, Lisa" <lorfe@vetmed.wsu.edu>
> To: "'bioconductor@stat.math.ethz.ch'"
> <bioconductor@stat.math.ethz.ch>
> Subject: [BioC] Limma script - Opinions requested
> Message-ID:
> <44F1D6D7EB8CC84F92859EE5C4E6ECB4011374445539@CVMMBX.vetmed.wsu.edu>
> Content-Type: text/plain; charset="us-ascii"
>
> I am VERY new to R/Bioconductor and over the past two weeks have
> managed, I hope, to put together a limma script to process my single
> color generic arrays. I was hoping that some of the experts that read
> these posts could comment on it - specifically, is it valid? Is there
> something I could be doing that is easier/more appropriate? I know it
> works as I have been getting the genelists back out at the end, so, my
> question is very general...is this how you would process a home-made
> single color array? If not, I would LOVE some pointers.
>
>
> > library(limma)
> > targets <- readTargets("targets.txt")
> > RG <- read.maimages(targets,source="generic" \
> > +columns=list(R="Median",G="Median",Rb="MedBackground",Gb="MedBackground")) \
> > RG$genes <- read.delim("Annotation file.txt") BsubRG <- backgroundCorrect(RG, \
> > method="normexp", offset=50) NormRG <- normalizeBetweenArrays(BSubRG$G, \
> > method="quantile") MA <- log2(NormRG)
>
> ---Now - if I have a single factor I would set up my design as such:
> > design <- model.matrix(~0+factor(c(1,2,3,4,1,2,3,4,1,2,3,4)))
> > colnames(design) <- c("A", "B", "C", "D")
> > corfit <- duplicateCorrelation(MA, design, ndups=4)
> > fit <- lmFit(MA, design, ndups=4, correlation=corfit$consensus)
> > fit <- eBayes(fit)
> > cont.matrix <- makeContrasts(AvsB=A-B, levels=design)
> > fit2 <- contrasts.fit(fit, cont.matrix)
> > fit2 <- eBayes(fit2)
> > GeneList <- topTable(fit2, "AvsB", n=20, adjust="BH", lfc=1)
> > write.table(GeneList, file = "file name.txt", quote = FALSE, sep = "\t")
>
>
> ---however, if I have multiple factors, then I set up the design as...
> > TS <- paste(targets$columnname, targets$columnname, sep=".")
> > TS <- factor(TS, levels=c("xx.xx", "xx.xx", "xx.xx"))
> > design <- model.matrix(~0+TS)
> > colnames(design) <- levels(TS)
>
> Everything after is the same as above...in pasting this in I do have a couple of \
> questions.
> 1. Is it recommended/necessary to apply a Bayesian smoothing to both fits?
> 2. How do I get back out my gene names *in* the topTable?
>
> Thanks for your time and I apologize if the answers seem remarkably obvious.
>
> Lisa
> Lisa Orfe
> Bustad 405
> 509-335-6320
> "Science is a wonderful thing when one does not have to earn one's living at it." \
> Albert Einstein
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
_______________________________________________
Bioconductor mailing list
Bioconductor@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: \
http://news.gmane.org/gmane.science.biology.informatics.conductor
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic