limma package topTable error
1
0
Entering edit mode
Monica Wong ▴ 10
@monica-wong-5144
Last seen 10.4 years ago
Dear all, I am receiving an error when running the topTable function within the limma package, and I am having trouble deciphering its meaning. I would appreciate any feedback that could be provided! My data set is stored in a matrix called "exprSet_entrez", with these details and sample values (no missing data): > dim(exprSet_entrez) [1] 25528 24 > exprSet_entrez[1:10,] entrez X577.ga.cel X578.ga.cel X579.ga.cel X580.ga.cel X583.ga.cel 1 100038431 3.482030 3.517921 3.429582 3.471463 3.368129 2 100038431 5.994481 6.136057 6.065544 6.144734 5.965864 3 18777 9.286540 9.378587 9.347815 9.285812 9.236086 4 21399 9.281334 9.164668 9.277620 9.210111 9.246223 5 108664 8.444451 8.516510 8.449924 8.434129 8.372296 6 18387 3.653424 3.547419 3.493820 3.726097 3.463435 7 12421 7.730113 7.670693 7.571302 7.688184 7.605875 8 620393 3.391134 3.400358 3.424306 3.304937 3.367195 9 240690 4.063018 3.979794 4.163925 4.082816 3.985831 10 319263 9.110032 9.169712 9.105135 9.080157 9.148936 X584.ga.cel X585.ga.cel X588.ga.cel X590.ga.cel X591.ga.cel X593.ga.cel 1 3.511509 3.534144 3.425228 3.648801 3.512385 3.373739 2 5.766239 6.015806 5.999773 6.190905 6.229489 6.188441 3 8.972189 9.356392 9.300335 9.329950 9.378346 9.326097 4 9.321111 9.352220 9.406007 9.508528 9.305394 9.313589 5 8.377022 8.371282 8.386898 8.465536 8.466654 8.546152 6 3.950703 3.433874 3.734620 3.746484 3.442888 3.531611 7 7.065636 7.722109 7.579347 7.690983 7.681199 7.726777 8 3.718955 3.449373 3.564055 3.587321 3.389434 3.383427 9 4.388968 4.193013 4.502328 4.296238 4.020287 4.033473 10 8.894222 9.107174 8.982389 8.986460 9.234685 9.167963 X594.ga.cel X596.ga.cel X597.ga.cel X598.ga.cel X599.ga.cel X601.ga.cel 1 3.654531 3.516786 3.488017 3.465478 3.471159 3.481133 2 6.342066 6.286220 6.228640 6.313395 6.025776 5.848678 3 9.349673 9.367497 9.326966 9.339992 9.335472 9.285127 4 9.461578 9.309374 9.317105 9.211384 9.366058 9.245989 5 8.514357 8.462649 8.471525 8.436176 8.322131 8.456860 6 3.735984 3.602093 3.457239 3.643317 3.592110 3.490955 7 7.787006 7.869115 7.820069 7.752202 7.599940 7.646468 8 3.465870 3.527124 3.494260 3.465870 3.536719 3.540971 9 4.051419 4.087084 4.103557 4.028897 4.125522 3.911318 10 9.185123 9.228618 9.231650 9.228426 9.046149 9.179135 X605.ga.cel X606.ga.cel X607.ga.cel X608.ga.cel X610.ga.cel X611.ga.cel 1 3.593981 3.457572 3.659534 3.483897 3.488017 3.481450 2 6.207318 6.322827 6.113176 5.912394 5.947696 5.850750 3 9.376264 9.370653 9.281247 9.288041 9.444991 9.311493 4 9.326719 9.282408 9.346006 9.367484 9.310837 9.345151 5 8.512225 8.482284 8.395395 8.208786 8.301569 8.341434 6 3.483677 3.668495 3.410698 3.823439 3.514624 3.654546 7 7.863490 7.711175 7.655057 7.319929 7.768672 7.760662 8 3.395674 3.440786 3.395949 3.492032 3.511352 3.489662 9 3.905314 4.057490 4.275029 4.299711 4.062283 4.087084 10 9.406058 9.183311 9.227215 9.029998 9.206172 9.151521 I followed the limma guide to conduct an analysis and was successful with the following analysis (79 significant genes): > design<-cbind(con=c(rep(1,4),rep(0,19)),pa=c(rep(0,4),rep(1,4),rep(0 ,15)),pma=c(rep(0,8),rep(1,4),rep(0,11)),sa=c(rep(0,12),rep(1,4),rep(0 ,7)),oa=c(rep(0,16),rep(1,3),rep(0,4)),na=c(rep(0,19),rep(1,4))) > colnames(design)<-c("con","pa","pma","sa","oa","na") > fit_entrez<-lmFit(exprSet_entrez[,2:24],design) > contrast_sa<-makeContrasts(sa1=sa-con,levels=design) > fit2_sa<-contrasts.fit(fit_entrez,contrast_sa) > fit2_sa<-eBayes(fit2_sa) > top_sa<-topTable(fit2_sa, p.value=0.05, number=500) But I get an error running a similar analysis on another set of columns as described below: > contrast_pma<-makeContrasts(pma1=pma-con,levels=design) > fit2_pma<-contrasts.fit(fit_entrez,contrast_pma) > fit2_pma<-eBayes(fit2_pma) > top_pma<toptable(fit2_pma, p.value="0.05," number="500)" error="" in="" ops.data.frame(top_pma,="" toptable(fit2_pma,="" p.value="0.05," number="500))" :="" <="" only="" defined="" for="" equally-sized="" data="" frames="" i="" am="" not="" sure="" what="" is="" causing="" the="" error="" since="" the="" data="" is="" just="" coming="" from="" different="" columns="" of="" the="" same="" matrix.="" below="" is="" my="" r="" info:=""> sessionInfo() R version 2.14.1 (2011-12-22) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C [5] LC_TIME=English_Canada.1252 attached base packages: [1] tcltk tools stats graphics grDevices utils datasets [8] methods base other attached packages: [1] limma_3.10.2 SciViews_0.9-4 ellipse_0.3-5 MASS_7.3-16 svGUI_0.9-50 [6] svMisc_0.9-63 Hopefully I have provided enough information for troubleshooting purposes. Thanks in advance! Regards, Monica Wong Monica Wong, M.Sc. Bioinformatics Ph.D. Statistics Student University of Guelph http://www.uoguelph.ca/~mwong09/ [[alternative HTML version deleted]]
limma limma • 788 views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 4 days ago
United States
This looks like a simple syntax error. See below On Mon, Mar 5, 2012 at 9:07 PM, Monica Wong <mwong09@uoguelph.ca> wrote: > > Dear all, > > I am receiving an error when running the topTable function within the > limma package, and I am having trouble deciphering its meaning. I would > appreciate any feedback that could be provided! > > My data set is stored in a matrix called "exprSet_entrez", with these > details and sample values (no missing data): > > > dim(exprSet_entrez) > [1] 25528 24 > > exprSet_entrez[1:10,] > entrez X577.ga.cel X578.ga.cel X579.ga.cel X580.ga.cel X583.ga.cel > 1 100038431 3.482030 3.517921 3.429582 3.471463 3.368129 > 2 100038431 5.994481 6.136057 6.065544 6.144734 5.965864 > 3 18777 9.286540 9.378587 9.347815 9.285812 9.236086 > 4 21399 9.281334 9.164668 9.277620 9.210111 9.246223 > 5 108664 8.444451 8.516510 8.449924 8.434129 8.372296 > 6 18387 3.653424 3.547419 3.493820 3.726097 3.463435 > 7 12421 7.730113 7.670693 7.571302 7.688184 7.605875 > 8 620393 3.391134 3.400358 3.424306 3.304937 3.367195 > 9 240690 4.063018 3.979794 4.163925 4.082816 3.985831 > 10 319263 9.110032 9.169712 9.105135 9.080157 9.148936 > X584.ga.cel X585.ga.cel X588.ga.cel X590.ga.cel X591.ga.cel X593.ga.cel > 1 3.511509 3.534144 3.425228 3.648801 3.512385 3.373739 > 2 5.766239 6.015806 5.999773 6.190905 6.229489 6.188441 > 3 8.972189 9.356392 9.300335 9.329950 9.378346 9.326097 > 4 9.321111 9.352220 9.406007 9.508528 9.305394 9.313589 > 5 8.377022 8.371282 8.386898 8.465536 8.466654 8.546152 > 6 3.950703 3.433874 3.734620 3.746484 3.442888 3.531611 > 7 7.065636 7.722109 7.579347 7.690983 7.681199 7.726777 > 8 3.718955 3.449373 3.564055 3.587321 3.389434 3.383427 > 9 4.388968 4.193013 4.502328 4.296238 4.020287 4.033473 > 10 8.894222 9.107174 8.982389 8.986460 9.234685 9.167963 > X594.ga.cel X596.ga.cel X597.ga.cel X598.ga.cel X599.ga.cel X601.ga.cel > 1 3.654531 3.516786 3.488017 3.465478 3.471159 3.481133 > 2 6.342066 6.286220 6.228640 6.313395 6.025776 5.848678 > 3 9.349673 9.367497 9.326966 9.339992 9.335472 9.285127 > 4 9.461578 9.309374 9.317105 9.211384 9.366058 9.245989 > 5 8.514357 8.462649 8.471525 8.436176 8.322131 8.456860 > 6 3.735984 3.602093 3.457239 3.643317 3.592110 3.490955 > 7 7.787006 7.869115 7.820069 7.752202 7.599940 7.646468 > 8 3.465870 3.527124 3.494260 3.465870 3.536719 3.540971 > 9 4.051419 4.087084 4.103557 4.028897 4.125522 3.911318 > 10 9.185123 9.228618 9.231650 9.228426 9.046149 9.179135 > X605.ga.cel X606.ga.cel X607.ga.cel X608.ga.cel X610.ga.cel X611.ga.cel > 1 3.593981 3.457572 3.659534 3.483897 3.488017 3.481450 > 2 6.207318 6.322827 6.113176 5.912394 5.947696 5.850750 > 3 9.376264 9.370653 9.281247 9.288041 9.444991 9.311493 > 4 9.326719 9.282408 9.346006 9.367484 9.310837 9.345151 > 5 8.512225 8.482284 8.395395 8.208786 8.301569 8.341434 > 6 3.483677 3.668495 3.410698 3.823439 3.514624 3.654546 > 7 7.863490 7.711175 7.655057 7.319929 7.768672 7.760662 > 8 3.395674 3.440786 3.395949 3.492032 3.511352 3.489662 > 9 3.905314 4.057490 4.275029 4.299711 4.062283 4.087084 > 10 9.406058 9.183311 9.227215 9.029998 9.206172 9.151521 > > I followed the limma guide to conduct an analysis and was successful with > the following analysis (79 significant genes): > > > > design<-cbind(con=c(rep(1,4),rep(0,19)),pa=c(rep(0,4),rep(1,4),rep(0 ,15)),pma=c(rep(0,8),rep(1,4),rep(0,11)),sa=c(rep(0,12),rep(1,4),rep(0 ,7)),oa=c(rep(0,16),rep(1,3),rep(0,4)),na=c(rep(0,19),rep(1,4))) > > colnames(design)<-c("con","pa","pma","sa","oa","na") > > fit_entrez<-lmFit(exprSet_entrez[,2:24],design) > > contrast_sa<-makeContrasts(sa1=sa-con,levels=design) > > fit2_sa<-contrasts.fit(fit_entrez,contrast_sa) > > fit2_sa<-eBayes(fit2_sa) > > top_sa<-topTable(fit2_sa, p.value=0.05, number=500) > > But I get an error running a similar analysis on another set of columns as > described below: > > > contrast_pma<-makeContrasts(pma1=pma-con,levels=design) > > fit2_pma<-contrasts.fit(fit_entrez,contrast_pma) > > fit2_pma<-eBayes(fit2_pma) > > top_pma<toptable(fit2_pma, p.value="0.05," number="500)"> You are using the comparison operator "<" instead of assignment "<-" > Error in Ops.data.frame(top_pma, topTable(fit2_pma, p.value = 0.05, number > = 500)) : > < only defined for equally-sized data frames > > I am not sure what is causing the error since the data is just coming from > different columns of the same matrix. Below is my R info: > > > sessionInfo() > R version 2.14.1 (2011-12-22) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > locale: > [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 > [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C > [5] LC_TIME=English_Canada.1252 > > attached base packages: > [1] tcltk tools stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] limma_3.10.2 SciViews_0.9-4 ellipse_0.3-5 MASS_7.3-16 svGUI_0.9-50 > [6] svMisc_0.9-63 > > Hopefully I have provided enough information for troubleshooting purposes. > Thanks in advance! > > Regards, > Monica Wong > > > Monica Wong, M.Sc. Bioinformatics > Ph.D. Statistics Student > University of Guelph > http://www.uoguelph.ca/~mwong09/ > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 856 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