[BioC] extract info

Jenny Drnevich drnevich at uiuc.edu
Mon Feb 5 21:04:23 CET 2007


Hi,

I'm also not exact sure what Som wanted, but assuming he created the 
results object like this ...:

 > results <- decideTests(fit)  # using the defaults of method="separate" 
and adjust.method="BH"

... if he only wants affyIDs and the topTable output for these 39+37 = 76 
genes , couldn't he just do:

 > results.coef4 <- topTable(fit, coef=4, number=76, sort.by="p") # also 
uses default of adjust.method="BH"

If 76 genes were called "significant" by decideTests, they had to have the 
lowest p-values, so asking for that same number of genes in topTable should 
give you those genes, unless method="heirarchical" or "nestedF" was used in 
decideTests(). Take a look at ?topTable for more options, including 
resort.by= if you want to sort into "up" and "down". Then to output as a 
tab-delim text file, all he'd have to do is:

 > write.table(results.coef4,file="Myresults4.txt",sep="/t")

As Jim says, this won't give you any annotation for the genes, just affyID 
numbers.

Cheers,
Jenny


At 01:10 PM 2/5/2007, James W. MacDonald wrote:
>Hi Somnath,
>
>Bandyopadhyay, Somnath (Som) wrote:
> > Hello,
> > I am trying to use limma to analyze data from a microarray experiment.
> > This is what I got from the contrasts I am interested in.
> >
> >
> >>summary(results)
> >
> >    P.SvsA.S P.TvsA.T  P.SvsP.T        A.SvsA.T
> > -1      817        0          651                     39
> > 0     43637    45101          43724           45025
> > 1       647        0          726             37
> >
> > How do I get the lists of (39+37) genes, (651+726) etc. along with their
> > affy ids in a format so that I can export it in .txt format? I also want
> > the topTable statistics for only these genes. How do I do that?
>
>Giving this little information makes things very difficult for anybody
>to help you. If you were to show e.g., the code you ran to get the
>results object you are summarizing above then people won't have to guess
>at what you have done in order to give you some help.
>
>A posting guide that gives you hints on how to post useful questions can
>be found here:
>
>http://www.bioconductor.org/docs/postingGuide.html
>
>Please do read it.
>
>Now, to attmept to answer your question.
>
>You can use limma2annaffy() from the affycoretools package to output the
>topTable(s) in either .txt or .html format. This won't separate the
>probesets into 'up' and 'down' like you have here, so you could always
>use the results object to subset your featureNames and then use
>probes2table() from the same package.
>
>Or you could just output things directly, but that would take too long
>to show in an email. That sort of thing can be figured out by spending
>some time with 'An Introductio to R', which you can access from
>help.start().
>
>Assuming that your exprSet containing the data is called 'eset', and the
>MArrayLM object you got from calling eBayes() is called 'fit', we can
>output e.g., the 39 probesets from A.SvsA.T like this:
>
>gns <- featureNames(eset)[results[,4] == -1]
>otherdata <- list("t-statistic" = fit$t[results[,4] == -1,4],
>                   "p-value" = 
> p.adjust(fit$p.value[,4],
>"BH")[results[,4] == -1]
>                   "Fold change" = fit$coef[results[,4] == -1,4])
>probes2table(eset, gns, annotation(eset), otherdata, 
>text=TRUE,
>         html=FALSE, filename="some interesting genes")
>
>If you are using a custom chip (you don't say), then the above won't
>work because you need an annotation package for your chip. In that case,
>you will have to either figure out how to subset the results from
>topTable() using the results vector and use write.table(), or you could
>try probes2tableBM(), which uses biomaRt to annotate.
>
>HTH,
>
>Jim
>
>
> >
> > Regards,
> > Som.
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives: 
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
>--
>James W. MacDonald, M.S.
>Biostatistician
>Affymetrix and cDNA Microarray Core
>University of Michigan Cancer Center
>1500 E. Medical Center Drive
>7410 CCGC
>Ann Arbor MI 48109
>734-647-5623
>
>
>**********************************************************
>Electronic Mail is not secure, may not be read every day, and should not 
>be used for urgent or sensitive issues.
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/bioconductor
>Search the archives: 
>http://news.gmane.org/gmane.science.biology.informatics.conductor

Jenny Drnevich, Ph.D.

Functional Genomics Bioinformatics Specialist
W.M. Keck Center for Comparative and Functional Genomics
Roy J. Carver Biotechnology Center
University of Illinois, Urbana-Champaign

330 ERML
1201 W. Gregory Dr.
Urbana, IL 61801
USA

ph: 217-244-7355
fax: 217-265-5066
e-mail: drnevich at uiuc.edu



More information about the Bioconductor mailing list