Entering edit mode
Benoit
▴
70
@benoit-3594
Last seen 10.2 years ago
Hi to all,
I have a microarray experiment with 10 different contrasts and I would
like to generate a dataframe containing all the informations exported
with the function toptable for all the the genes (no restrictions on
p-value and logFC but with BH adjustment).
For 1 specific contrast I proceed like that :
res=toptable(coef=1,number=15120,fit=fit2,genelist=Ebgnorm$genes[isGen
e,],adjust.method="BH",A=fit2$Amean,eb=fit2)
res.summary=data.frame(res$ProbeUID,res$ProbeName,res$GeneName,res$Des
cription,res$P.Value,res$adj.P.Val,res$logFC,exp(res$logFC*log(2)))
and after I add to this dataframe the normalized log intensities and
weights:
lg=data.frame(Ebgnorm$genes$ProbeUID[isGene],Ebgnorm$genes$ProbeName[i
sGene],Ebgnorm$E[isGene,],Ebgnorm$weights[isGene,])
res2=res.summary[order(res.summary$ProbeUID),]
lg2=lg[order(lg$ProbeUID),]
res2=cbind(res2,lg2[,3:18])
write.table(res2,file="result_Weights_and_Intensities.txt",sep="\t",qu
ote=FALSE,col.names=TRUE,row.names=FALSE)
It works very well for one contrast but now, I would like to do that
for
all the contrasts at the same time.
I tried the functions write.fit and topTableF but, with the first one
I
cannot have the adjusted p-values and for the second one, there is
only
one column of adjusted p-value (with method="separate" and "global")
and
not one for each contrast.
So, is there any other function to solve my problem or will I have to
perform the exportation of all contrasts one by one and then
concatenate
them ?
Thank in advance for your help.
Benoit
--
Benoit Loup, PhD
UMR Biologie du D?veloppement et Reproduction
Diff?renciation des Gonades et Perturbations
INRA ? Domaine de Vilvert
B?timent Jacques Poly
78350 Jouy en Josas
France
Tel: 33 1 34 65 25 38
Fax: 33 1 34 65 22 41
E-mail: benoit.loup at jouy.inra.fr