[BioC] extract info
James W. MacDonald
jmacdon at med.umich.edu
Mon Feb 5 20:10:49 CET 2007
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.
More information about the Bioconductor
mailing list