[BioC] Retrieving a subset from normalized microarray data for differential test in R package, Limma

Vincent Carey stvjc at channing.harvard.edu
Mon Apr 4 23:23:00 CEST 2011


Please read the posting guide

http://www.bioconductor.org/help/mailing-list/posting-guide/

and see further below

On Mon, Apr 4, 2011 at 9:48 AM, Arthur SHEN <arthur.shen at uct.ac.za> wrote:
> 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 <- order(filt.ID)
> filt.ID<-filt.ID[i]
> quantnorm.filt<-quantnorm.filt[i,]
> ave.quantnorm<-matrix(0,ncol=30,nrow=length(unlist(lapply(split(quantnorm.filt$M[,1],filt.ID),mean))))
> for (j in 1:30)
> {
> ave.quantnorm[,j]<-unlist(lapply(split(quantnorm.filt$M[,j],filt.ID),mean))
> }
> 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.
>

What do you mean by "failed" here?  It appears that ave.quantnorm is a
matrix where
rows correspond to genes.  You would subset a matrix X using X[G, ]
where G is some index
into the rows of X.  It seems you failed to put a comma in your request.

> Thank you very much
>
> Arthur
>
>
>
>
>
> ###
> UNIVERSITY OF CAPE TOWN
>
> This e-mail is subject to the UCT ICT policies and e-mai...{{dropped:16}}
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list