Entering edit mode
Arthur SHEN
▴
10
@arthur-shen-4578
Last seen 10.2 years ago
Dear Sir/Madam,
I would like to find out the correct way for extracting asubset of
data
from the normalized data, and
use it for the subsequentdifferential test in Limma.
Below is the script that I used for doing the cross-
arraynormalization,
averaging of in-slide technical
repeats, differential test andmultiple testing corrections in package
Limma:
#Cross-array normalization
library(limma)
quantnorm_r<-normalizeBetweenArrays(normdata,method="Rquantile")
#Filtering out all the control genes
quantnorm.filt<-quantnorm_r[quantnorm_r$genes$Status=="gene",]
filt.ID<-(as.character(quantnorm_r$genes$ID)[quantnorm_r$genes$Status=
="gene"])
#Merging in-slide technical repeats
i <- orderfilt.ID)
filt.ID<-filt.ID[i]
quantnorm.filt<-quantnorm.filt[i,]
ave.quantnorm<-matrix(0,ncol=30,nrow=length(unlist(lapply(split(quantn
orm.filt$M[,1],filt.ID),mean))))
for (j in 1:30)
{
ave.quantnorm[,j]<-unlist(lapply(split(quantnorm.filt$M[,j],filt.ID),m
ean))
}
ave.gene.IDs<-names(lapply(split(quantnorm.filt$M[,1],filt.ID),mean))
length(ave.gene.IDs)
#Linear Model Fits (common reference approach)
targets<-readTargets("Targetsnew.txt")
design<-modelMatrix(targets,ref="reference")
fit<-lmFit(ave.quantnorm,design)
contrast.matrix<-makeContrasts(RWC80-RWC100,RWC60-RWC100,RWC40-RWC100,
RWC20-RWC100,RWC5-RWC100,levels=design)
contrast.matrix
fit2<-contrasts.fit(fit,contrast.matrix)
fit2<-eBayes(fit2)
results<-decideTests(fit2)
diffex<-apply(abs(results),1,sum)
diffex<-diffex>0
#Preparing diff exp data for clustering analysis
cluster.data<-ave.quantnorm[diffex,]
cluster.names<-ave.gene.IDs[diffex]
rownames(cluster.data)<-cluster.names
After the merging of the technical repeats, I tried to retrievethe
data
of the interested 781 genes
from the full set normalized data. Ithought of exporting the full set
of
normalized data (ave.quantnorm),
manuallyremoving the unwanted genes, then read it back into R, but I
was
worried thatby doing so,
I might lose the important original information contained in
thisobject.
I then tried creating the list of
781 genes into a vector, or a matrix,then tried extracting the subset
data by using command:
ave.quantnorm.781<-ave.quantnorm[ave.gene.IDs=781list_matrix]or
ave.quantnorm.781<-ave.quantnorm[ave.gene.IDs=781list_vector],
but these failed. I would like to find out the correct wayof doing
this.
Thank you very much
Arthur
###
UNIVERSITY OF CAPE TOWN
This e-mail is subject to the UCT ICT policies and
e-mai...{{dropped:16}}