CPU time of Anova in R
2
0
Entering edit mode
@marcin-piechota-1331
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20050711/ a3beff06/attachment.pl
• 815 views
ADD COMMENT
0
Entering edit mode
@adaikalavan-ramasamy-675
Last seen 10.2 years ago
This might be slightly faster apply( Exprs, 1, function(x){ anova( lm( x ~ scheme ) )[1,5] } ) and should get you the correct names from Exprs. BTW, have you considered using LIMMA which is designed for such purposes. Regards, Adai On Mon, 2005-07-11 at 12:19 +0200, Marcin Piechota wrote: > Hi > > I have problem with very long lasting time of anova in R. > > My script: > Exprs <- exprs(eset) > Anno <- geneNames(eset) > scheme <- gl(4,3,12, labels=c("a", "b","c", "d")) > x<-matrix(1:90202,nrow=45101, ncol=2) > for (i in 1:45101) { > Data = Exprs[i,] > results <- lm(Data~schemat) > nextstep <- anova(results) > x[i,] <- c(Anno[i],nextstep[1,5]) > } > > where "eset' is rma normalized affy data from m430v2 > > this script lasts for about 20 minutes > on P4 3GHz, 4GB RAM > > How to make it shorter? > > Marcin Piechota > Institute of Pharmacology PAS Krakow > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT
0
Entering edit mode
Adaikalavan Ramasamy wrote: > This might be slightly faster > > apply( Exprs, 1, function(x){ anova( lm( x ~ scheme ) )[1,5] } ) > > and should get you the correct names from Exprs. BTW, have you > considered using LIMMA which is designed for such purposes. Yes. Regarding Adaikalavan's suggestion, also check the function esApply in Biobase, which is a little convenience wrapper for apply for use with exprSets (but same speed). Best regards Wolfgang ------------------------------------- Wolfgang Huber European Bioinformatics Institute European Molecular Biology Laboratory Cambridge CB10 1SD England Phone: +44 1223 494642 Fax: +44 1223 494486 Http: www.ebi.ac.uk/huber
ADD REPLY
0
Entering edit mode
@arnemullersanofi-aventiscom-1086
Last seen 10.2 years ago
Marcin, the only dramatic speedup I can think about is to use limma instead of R's lm. Otherwise 20 min for 45k anovas in R is not too bad, isn't it? kind regards, Arne -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch]On Behalf Of Marcin Piechota Sent: Monday, July 11, 2005 12:19 To: bioconductor at stat.math.ethz.ch Subject: [BioC] CPU time of Anova in R Hi I have problem with very long lasting time of anova in R. My script: Exprs <- exprs(eset) Anno <- geneNames(eset) scheme <- gl(4,3,12, labels=c("a", "b","c", "d")) x<-matrix(1:90202,nrow=45101, ncol=2) for (i in 1:45101) { Data = Exprs[i,] results <- lm(Data~schemat) nextstep <- anova(results) x[i,] <- c(Anno[i],nextstep[1,5]) } where "eset' is rma normalized affy data from m430v2 this script lasts for about 20 minutes on P4 3GHz, 4GB RAM How to make it shorter? Marcin Piechota Institute of Pharmacology PAS Krakow [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor

Login before adding your answer.

Traffic: 494 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6