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
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