missing value
2
0
Entering edit mode
Yisong Zhen ▴ 200
@yisong-zhen-2952
Last seen 7.4 years ago
Dear Bioconductors, I tried to get the quality control report generated by affyQCReport. But I failed. This is my code: library(affy); Tucson_Array <-ReadAffy(); library(affyQCReport); QCReport(Tucson_Array, file="TucsonQC.pdf"); This is the error message: error density.default(newX[, i], ...) : 'x' contains missing values Warning message: duplicate row.names 12,15,20,21,22,25,26,27,31,32,33,34,38,39,40,43,44,45,48,49,50,54,55,5 9,60,64,65,69,70,73,74,75,78,79,83,84,88,89,90,94,95,96,97,100,101,102 ,106,107,108,110,111,112,114,116,117,118,119,120,121,122,125,127,131,1 32,135,136,139,142,143,144,146,147,148,149,151,152,154,156,158,159,160 ,161,162,165,167,168,171,172,173,179,180,181,182,183,184,187,190,191,1 96,197,198,199,205,206,207,208,211,213,217,218,219,221,222,224,227,228 ,230,232,234,237,238,241,242,246,249,252,253,254,255,257,259,260,263,2 64,266,267,269,270,271,273,275,276,279,281,283,285,288,292,294,296,298 ,301,304,307,309,310,312,315,316,317,321,324,326,329,332,333,334,336,3 39,341,343,345,346,348,351,352,353,354,357,358,360,367,369,370,372,373 ,375,376,378,381,383,384,385,386,388,389,391,392,394,395,397,400,403,4 04,405,407,410,412,415,419,421,424,426,427,429,430,432,434,436,437,439 ,441,443,446,449,452,454,456,457,458,461,465,468,470,471,472,474,475,4 77,480,483,486,490,491,493,495,498,501,504,506,507,509,510,512,513,5 [... truncated] in: data.row.names(row.names, rowsi, i) How can I do for next step to deal with the missing value and duplicated row.names? And what other packages (or steps) should I select to assess the within-group variation so I can discard the poor quality array (outlying chips)? Thanks in advance. Yisong PS. And here is, sessionInfo() R version 2.5.0 (2007-04-23) i686-redhat-linux-gnu locale: LC_CTYPE=zh_CN.GB18030;LC_NUMERIC=C;LC_TIME=zh_CN.GB18030;LC_COLLATE=z h_CN.GB18030;LC_MONETARY=zh_CN.GB18030;LC_MESSAGES=zh_CN.GB18030;LC_PA PER=zh_CN.GB18030;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT =zh_CN.GB18030;LC_IDENTIFICATION=C attached base packages: [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" [7] "methods" "base" other attached packages: cint06a520380fcdf affy affyio Biobase "1.14.0" "1.14.2" "1.4.1" "1.14.1 [[alternative HTML version deleted]]
cdf affy affyQCReport cdf affy affyQCReport • 2.1k views
ADD COMMENT
0
Entering edit mode
rgentleman ★ 5.5k
@rgentleman-7725
Last seen 9.6 years ago
United States
Hi Yisong, Yisong Zhen wrote: > Dear Bioconductors, > > I tried to get the quality control report generated by affyQCReport. But I > failed. > > This is my code: > > library(affy); > > Tucson_Array <-ReadAffy(); There is no need to have ; at the end of lines in R. Could you please post the output of sessionInfo(), as asked in the posting guide. Then try just Tucson_Array and let us know what happens. And finally, let me suggest that you try the arrayQualityMetrics package instead of using affyQCReport. The report it generates is a bit more comprehensive, but currently only in HTML (I think that will change soon). best wishes Robert > > library(affyQCReport); > QCReport(Tucson_Array, file="TucsonQC.pdf"); > > This is the error message: > > error density.default(newX[, i], ...) : > 'x' contains missing values > Warning message: > duplicate row.names > > 12,15,20,21,22,25,26,27,31,32,33,34,38,39,40,43,44,45,48,49,50,54,55 ,59,60,64,65,69,70,73,74,75,78,79,83,84,88,89,90,94,95,96,97,100,101,1 02,106,107,108,110,111,112,114,116,117,118,119,120,121,122,125,127,131 ,132,135,136,139,142,143,144,146,147,148,149,151,152,154,156,158,159,1 60,161,162,165,167,168,171,172,173,179,180,181,182,183,184,187,190,191 ,196,197,198,199,205,206,207,208,211,213,217,218,219,221,222,224,227,2 28,230,232,234,237,238,241,242,246,249,252,253,254,255,257,259,260,263 ,264,266,267,269,270,271,273,275,276,279,281,283,285,288,292,294,296,2 98,301,304,307,309,310,312,315,316,317,321,324,326,329,332,333,334,336 ,339,341,343,345,346,348,351,352,353,354,357,358,360,367,369,370,372,3 73,375,376,378,381,383,384,385,386,388,389,391,392,394,395,397,400,403 ,404,405,407,410,412,415,419,421,424,426,427,429,430,432,434,436,437,4 39,441,443,446,449,452,454,456,457,458,461,465,468,470,471,472,474,475 ,477,480,483,486,490,491,493,495,498,501,504,506,507,509,510,512,513,5 > [... truncated] in: data.row.names(row.names, rowsi, i) > > How can I do for next step to deal with the missing value and duplicated > row.names? And what other packages (or steps) should I select to assess the > within-group variation so I can discard the poor quality array (outlying > chips)? > > Thanks in advance. > > Yisong > > > > PS. > > And here is, > > sessionInfo() > R version 2.5.0 (2007-04-23) > i686-redhat-linux-gnu > > locale: > LC_CTYPE=zh_CN.GB18030;LC_NUMERIC=C;LC_TIME=zh_CN.GB18030;LC_COLLATE =zh_CN.GB18030;LC_MONETARY=zh_CN.GB18030;LC_MESSAGES=zh_CN.GB18030;LC_ PAPER=zh_CN.GB18030;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREME NT=zh_CN.GB18030;LC_IDENTIFICATION=C > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" > [7] "methods" "base" > > other attached packages: > cint06a520380fcdf affy affyio Biobase > "1.14.0" "1.14.2" "1.4.1" "1.14.1 > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org
ADD COMMENT
0
Entering edit mode
Dear all, I am using limma to analyze my microarray data. I have a simple question to ask. I want to save the summary table of ALL genes into local drive. I had tried to use write, write.table or save command but I always got error message. write.table(topTable, "la.txt") Error in as.data.frame.default(x[[i]], optional = TRUE) : Cannot coerce class "function" into a data.frame write.table(fit,number=100,adjust="BH",file="la.txt") Error in write.table(fit, number = 100, adjust = "BH", file = "la.txt") : unused argument(s) (number = 100, adjust = "BH") When I use write.table (fit, file="la.txt"), I got something like this: "coefficients" "stdev.unscaled" "sigma" "df.residual" "genes.Block" "genes.Row" "genes.Column" "genes.ID" "genes.Name" "Amean" "s2.post" "t" "p.value" "lods" "F" "F.p.value" "1" 0.191491534183039 0.5 0.58043881130755 3 1 1 1 5103 NA 6.32074826791933 0.303968848417341 0.694648392759644 0.509374409393106 -4.86326047572600 0.482536389563556 0.509374409393106 "2" -0.293787384283484 0.5 1.20366297838960 3 1 1 2 5124 NA 8.24502874291735 0.774060196679415 -0.667845140479293 0.525351390376272 -4.87400797979679 0.446017131661806 0.525351390376272 "3" -0.513890138933438 0.5 0.298947585330255 3 1 1 3 5145 NA 6.24632903576038 0.199313133368442 -2.30214313044810 0.0543270719852833 -3.89174526089124 5.29986299306939 0.0543270719852833 "4" -0.192900665446982 0.5 0.202699077289498 3 1 1 4 5166 NA 5.4719589146908 0.178899971606802 -0.912133876540687 0.391633127283331 -4.76408991981505 0.831988208733142 0.391633127283331 "5" -0.519787414790754 0.5 0.971899999883875 3 1 1 5 5187 NA 4.79242047112468 0.560886278852435 -1.38809230856769 0.207129224092528 -4.49088947369315 1.92680025710479 0.207129224092528???????. What I want is same as below (contain logFC, P Value and adj.P.Val) of ALL genes, options(digits=3) topTable(fit,number=100,adjust="BH") Block Row Column ID Name logFC AveExpr t P.Value adj.P.Val B 20830 46 2 18 5921 NA 3.22 8.42 15.76 8.78e-07 0.0195 -1.78 5073 11 21 13 15499 NA 3.09 11.56 12.58 4.15e-06 0.0460 -1.86 6457 14 21 11 9451 NA 2.93 10.48 10.88 1.11e-05 0.0617 -1.93 4193 10 2 13 9974 NA 2.69 10.25 10.87 1.11e-05 0.0617 -1.93 292 1 14 6 5195 NA 2.22 9.67 10.35 1.55e-05 0.0689 -1.95 12237 27 11 5 13493 NA 3.80 8.45 9.17 3.46e-05 0.1145 -2.03 15180 33 18 22 1831 NA 4.62 9.16 9.11 3.61e-05 0.1145 -2.03 ??????? Many thanks, Jixin
ADD REPLY
0
Entering edit mode
Hi Jixin, You're mixing up the functions topTable() and write.table() and their arguments. Try this: > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") > write.table( allgenes, file= "la.txt") HTH, Jenny At 01:58 PM 8/12/2008, Wang, Jixin wrote: >Dear all, I am using limma to analyze my >microarray data. I have a simple question to >ask. I want to save the summary table of ALL >genes into local drive. I had tried to use >write, write.table or save command but I always >got error message. write.table(topTable, >"la.txt") Error in as.data.frame.default(x[[i]], >optional = TRUE) : Cannot coerce class >"function" into a data.frame >write.table(fit,number=100,adjust="BH",file="la.txt") >Error in write.table(fit, number = 100, adjust = >"BH", file = "la.txt") : unused argument(s) >(number = 100, adjust = "BH") When I use >write.table (fit, file="la.txt"), I got >something like this: "coefficients" >"stdev.unscaled" "sigma" "df.residual" >"genes.Block" "genes.Row" "genes.Column" >"genes.ID" "genes.Name" "Amean" "s2.post" "t" >"p.value" "lods" "F" "F.p.value" "1" >0.191491534183039 0.5 0.58043881130755 3 1 1 1 >5103 NA 6.32074826791933 0.303968848417341 >0.694648392759644 0.509374409393106 >-4.86326047572600 0.482536389563556 >0.509374409393106 "2" -0.293787384283484 0.5 >1.20366297838960 3 1 1 2 5124 NA >8.24502874291735 0.774060196679415 >-0.667845140479293 0.525351390376272 >-4.87400797979679 0.446017131661806 >0.525351390376272 "3" -0.513890138933438 0.5 >0.298947585330255 3 1 1 3 5145 NA >6.24632903576038 0.199313133368442 >-2.30214313044810 0.0543270719852833 >-3.89174526089124 5.29986299306939 >0.0543270719852833 "4" -0.192900665446982 0.5 >0.202699077289498 3 1 1 4 5166 NA >5.4719589146908 0.178899971606802 >-0.912133876540687 0.391633127283331 >-4.76408991981505 0.831988208733142 >0.391633127283331 "5" -0.519787414790754 0.5 >0.971899999883875 3 1 1 5 5187 NA >4.79242047112468 0.560886278852435 >-1.38809230856769 0.207129224092528 >-4.49088947369315 1.92680025710479 >0.207129224092528 .????????????. What I >want is same as below (contain logFC, P Value >and adj.P.Val) of ALL genes, options(digits=3) >topTable(fit,number=100,adjust="BH") Block >Row Column ID Name logFC >AveExpr t P.Value adj.P.Val B >20830 46 2 18 5921 NA 3.22 8.42 >15.76 8.78e-07 0.0195 -1.78 >5073 11 21 13 15499 NA 3.09 11.56 >12.58 4.15e-06 0.0460 -1.86 >6457 14 21 11 9451 NA 2.93 10.48 >10.88 1.11e-05 0.0617 -1.93 >4193 10 2 13 9974 NA 2.69 10.25 >10.87 1.11e-05 0.0617 -1.93 >292 1 14 6 5195 NA 2.22 9.67 >10.35 1.55e-05 0.0689 -1.95 >12237 27 11 5 >13493 NA 3.80 8.45 9.17 >3.46e-05 0.1145 -2.03 >15180 33 18 22 1831 NA 4.62 9.16 >9.11 3.61e-05 0.1145 -2.03 ?????????? >Many thanks, Jixin >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor >Search the archives: >http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Hi Jenny, Thank you so much for your quick reply and kind help! I really appreciate it. Best regards, Jixin ----- Original Message ----- From: "Jenny Drnevich" <drnevich@illinois.edu> To: "Jixin Wang" <jixinwang at="" neo.tamu.edu="">, bioconductor at stat.math.ethz.ch Sent: Tuesday, August 12, 2008 2:24:22 PM GMT -06:00 US/Canada Central Subject: Re: [BioC] How to save result from limma Hi Jixin, You're mixing up the functions topTable() and write.table() and their arguments. Try this: > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") > write.table( allgenes, file= "la.txt") HTH, Jenny At 01:58 PM 8/12/2008, Wang, Jixin wrote: >Dear all, I am using limma to analyze my >microarray data. I have a simple question to >ask. I want to save the summary table of ALL >genes into local drive. I had tried to use >write, write.table or save command but I always >got error message. write.table(topTable, >"la.txt") Error in as.data.frame.default(x[[i]], >optional = TRUE) : Cannot coerce class >"function" into a data.frame >write.table(fit,number=100,adjust="BH",file="la.txt") >Error in write.table(fit, number = 100, adjust = >"BH", file = "la.txt") : unused argument(s) >(number = 100, adjust = "BH") When I use >write.table (fit, file="la.txt"), I got >something like this: "coefficients" >"stdev.unscaled" "sigma" "df.residual" >"genes.Block" "genes.Row" "genes.Column" >"genes.ID" "genes.Name" "Amean" "s2.post" "t" >"p.value" "lods" "F" "F.p.value" "1" >0.191491534183039 0.5 0.58043881130755 3 1 1 1 >5103 NA 6.32074826791933 0.303968848417341 >0.694648392759644 0.509374409393106 >-4.86326047572600 0.482536389563556 >0.509374409393106 "2" -0.293787384283484 0.5 >1.20366297838960 3 1 1 2 5124 NA >8.24502874291735 0.774060196679415 >-0.667845140479293 0.525351390376272 >-4.87400797979679 0.446017131661806 >0.525351390376272 "3" -0.513890138933438 0.5 >0.298947585330255 3 1 1 3 5145 NA >6.24632903576038 0.199313133368442 >-2.30214313044810 0.0543270719852833 >-3.89174526089124 5.29986299306939 >0.0543270719852833 "4" -0.192900665446982 0.5 >0.202699077289498 3 1 1 4 5166 NA >5.4719589146908 0.178899971606802 >-0.912133876540687 0.391633127283331 >-4.76408991981505 0.831988208733142 >0.391633127283331 "5" -0.519787414790754 0.5 >0.971899999883875 3 1 1 5 5187 NA >4.79242047112468 0.560886278852435 >-1.38809230856769 0.207129224092528 >-4.49088947369315 1.92680025710479 >0.207129224092528???????.????????????. What I >want is same as below (contain logFC, P Value >and adj.P.Val) of ALL genes, options(digits=3) >topTable(fit,number=100,adjust="BH") Block >Row Column ID Name logFC >AveExpr t P.Value adj.P.Val B >20830 46 2 18 5921 NA 3.22 8.42 >15.76 8.78e-07 0.0195 -1.78 >5073 11 21 13 15499 NA 3.09 11.56 >12.58 4.15e-06 0.0460 -1.86 >6457 14 21 11 9451 NA 2.93 10.48 >10.88 1.11e-05 0.0617 -1.93 >4193 10 2 13 9974 NA 2.69 10.25 >10.87 1.11e-05 0.0617 -1.93 >292 1 14 6 5195 NA 2.22 9.67 >10.35 1.55e-05 0.0689 -1.95 >12237 27 11 5 >13493 NA 3.80 8.45 9.17 >3.46e-05 0.1145 -2.03 >15180 33 18 22 1831 NA 4.62 9.16 >9.11 3.61e-05 0.1145 -2.03 ??????? ?????????? >Many thanks, Jixin >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor >Search the archives: >http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Actually, write.fit() is what you are looking for. From ?topTable: Note: This is not the right function to use to create summary statistics for all the probes on an array. Please consider using 'write.fit' or 'write' for this purpose, rather than using 'topTable' with 'number=nrow(fit)'. ;-P Jenny Drnevich wrote: > Hi Jixin, > > You're mixing up the functions topTable() and write.table() and their > arguments. Try this: > > > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") > > write.table( allgenes, file= "la.txt") > > HTH, > Jenny > > At 01:58 PM 8/12/2008, Wang, Jixin wrote: >> Dear all, I am using limma to analyze my microarray data. I have a >> simple question to ask. I want to save the summary table of ALL genes >> into local drive. I had tried to use write, write.table or save >> command but I always got error message. write.table(topTable, >> "la.txt") Error in as.data.frame.default(x[[i]], optional = TRUE) : >> Cannot coerce class "function" into a data.frame >> write.table(fit,number=100,adjust="BH",file="la.txt") Error in >> write.table(fit, number = 100, adjust = "BH", file = "la.txt") : >> unused argument(s) (number = 100, adjust = "BH") When I use >> write.table (fit, file="la.txt"), I got something like this: >> "coefficients" "stdev.unscaled" "sigma" "df.residual" "genes.Block" >> "genes.Row" "genes.Column" "genes.ID" "genes.Name" "Amean" "s2.post" >> "t" "p.value" "lods" "F" "F.p.value" "1" 0.191491534183039 0.5 >> 0.58043881130755 3 1 1 1 5103 NA 6.32074826791933 0.303968848417341 >> 0.694648392759644 0.509374409393106 -4.86326047572600 >> 0.482536389563556 0.509374409393106 "2" -0.293787384283484 0.5 >> 1.20366297838960 3 1 1 2 5124 NA 8.24502874291735 0.774060196679415 >> -0.667845140479293 0.525351390376272 -4.87400797979679 >> 0.446017131661806 0.525351390376272 "3" -0.513890138933438 0.5 >> 0.298947585330255 3 1 1 3 5145 NA 6.24632903576038 0.199313133368442 >> -2.30214313044810 0.0543270719852833 -3.89174526089124 >> 5.29986299306939 0.0543270719852833 "4" -0.192900665446982 0.5 >> 0.202699077289498 3 1 1 4 5166 NA 5.4719589146908 0.178899971606802 >> -0.912133876540687 0.391633127283331 -4.76408991981505 >> 0.831988208733142 0.391633127283331 "5" -0.519787414790754 0.5 >> 0.971899999883875 3 1 1 5 5187 NA 4.79242047112468 0.560886278852435 >> -1.38809230856769 0.207129224092528 -4.49088947369315 1.92680025710479 >> 0.207129224092528???????.????????????. What I want is same as below >> (contain logFC, P Value and adj.P.Val) of ALL genes, >> options(digits=3) topTable(fit,number=100,adjust="BH") Block Row >> Column ID Name logFC AveExpr t P.Value adj.P.Val B >> 20830 46 2 18 5921 NA 3.22 8.42 15.76 8.78e-07 >> 0.0195 -1.78 5073 11 21 13 15499 NA 3.09 11.56 12.58 >> 4.15e-06 0.0460 -1.86 6457 14 21 11 9451 NA 2.93 >> 10.48 10.88 1.11e-05 0.0617 -1.93 4193 10 2 13 9974 >> NA 2.69 10.25 10.87 1.11e-05 0.0617 -1.93 292 1 14 >> 6 5195 NA 2.22 9.67 10.35 1.55e-05 0.0689 -1.95 12237 27 >> 11 5 13493 NA 3.80 8.45 9.17 3.46e-05 0.1145 -2.03 >> 15180 33 18 22 1831 NA 4.62 9.16 9.11 3.61e-05 >> 0.1145 -2.03 ??????? ?????????? Many thanks, Jixin >> _______________________________________________ Bioconductor mailing >> list Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor Search the >> archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Hildebrandt Lab 8220D MSRB III 1150 W. Medical Center Drive Ann Arbor MI 48109-0646 734-936-8662
ADD REPLY
0
Entering edit mode
Yeah, now I remember that being in the help page for topTable(). However, I'm not sure why it's not the "right" function. Assuming all the arguments are equivalent, the values are the same as those output from write.fit(). I like topTable() better because it gives you both the raw p-values and the adjusted P-values. Maybe it's wrong function because it will give you the genes in different orders for each coefficient? I prefer it to write.fit so I can work with the values in R without having to read the output file back in! However, I do have to re-sort it if I want to use with other objects I've created. I've always wanted a resort.by option of "gene" that would do my resorting automatically: > allgenes <- topTable(fit,number=nrow(fit)) > allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] Any chance of you adding that in the future, Gordon? If not, maybe you can expand upon why topTable is not the "right" function. Thanks! Jenny At 02:47 PM 8/12/2008, James W. MacDonald wrote: >Actually, write.fit() is what you are looking for. From ?topTable: > >Note: > > This is not the right function to use to create summary statistics > for all the probes on an array. Please consider using 'write.fit' > or 'write' for this purpose, rather than using 'topTable' with > 'number=nrow(fit)'. > >;-P > >Jenny Drnevich wrote: >>Hi Jixin, >>You're mixing up the functions topTable() and >>write.table() and their arguments. Try this: >> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >> > write.table( allgenes, file= "la.txt") >>HTH, >>Jenny >>At 01:58 PM 8/12/2008, Wang, Jixin wrote: >>>Dear all, I am using limma to analyze my >>>microarray data. I have a simple question to >>>ask. I want to save the summary table of ALL >>>genes into local drive. I had tried to use >>>write, write.table or save command but I >>>always got error message. >>>write.table(topTable, "la.txt") Error in >>>as.data.frame.default(x[[i]], optional = TRUE) : >>>Cannot coerce class "function" into a >>>data.frame >>>write.table(fit,number=100,adjust="BH",file="la.txt") >>>Error in write.table(fit, number = 100, adjust = "BH", file = "la.txt") : >>>unused argument(s) (number = 100, adjust = >>>"BH") When I use write.table (fit, >>>file="la.txt"), I got something like this: >>>"coefficients" "stdev.unscaled" "sigma" >>>"df.residual" "genes.Block" "genes.Row" >>>"genes.Column" "genes.ID" "genes.Name" "Amean" >>>"s2.post" "t" "p.value" "lods" "F" "F.p.value" >>>"1" 0.191491534183039 0.5 0.58043881130755 3 1 >>>1 1 5103 NA 6.32074826791933 0.303968848417341 >>>0.694648392759644 0.509374409393106 >>>-4.86326047572600 0.482536389563556 >>>0.509374409393106 "2" -0.293787384283484 0.5 >>>1.20366297838960 3 1 1 2 5124 NA >>>8.24502874291735 0.774060196679415 >>>-0.667845140479293 0.525351390376272 >>>-4.87400797979679 0.446017131661806 >>>0.525351390376272 "3" -0.513890138933438 0.5 >>>0.298947585330255 3 1 1 3 5145 NA >>>6.24632903576038 0.199313133368442 >>>-2.30214313044810 0.0543270719852833 >>>-3.89174526089124 5.29986299306939 >>>0.0543270719852833 "4" -0.192900665446982 0.5 >>>0.202699077289498 3 1 1 4 5166 NA >>>5.4719589146908 0.178899971606802 >>>-0.912133876540687 0.391633127283331 >>>-4.76408991981505 0.831988208733142 >>>0.391633127283331 "5" -0.519787414790754 0.5 >>>0.971899999883875 3 1 1 5 5187 NA >>>4.79242047112468 0.560886278852435 >>>-1.38809230856769 0.207129224092528 >>>-4.49088947369315 1.92680025710479 >>>0.207129224092528 .????????????. What I >>>want is same as below (contain logFC, P Value and adj.P.Val) of ALL genes, >>>options(digits=3) >>>topTable(fit,number=100,adjust="BH") Block >>>Row Column ID Name logFC >>>AveExpr t P.Value adj.P.Val B >>>20830 46 2 18 5921 NA 3.22 8.42 15.76 8.78e-07 >>>0.0195 -1.78 5073 11 21 13 >>>15499 NA 3.09 11.56 12.58 >>>4.15e-06 0.0460 -1.86 6457 14 21 11 9451 NA 2.93 >>>10.48 10.88 1.11e-05 0.0617 -1.93 4193 10 2 13 9974 >>>NA 2.69 10.25 10.87 1.11e-05 0.0617 -1.93 292 1 14 >>>6 5195 NA 2.22 9.67 10.35 1.55e-05 0.0689 -1.95 12237 27 >>>11 5 13493 NA 3.80 8.45 9.17 >>>3.46e-05 0.1145 -2.03 >>>15180 33 18 22 1831 NA 4.62 9.16 9.11 3.61e-05 >>>0.1145 -2.03 ?????????? Many thanks, >>>Jixin >>>_______________________________________________ >>> Bioconductor mailing list >>>Bioconductor at stat.math.ethz.ch >>>https://stat.ethz.ch/mailman/listinfo/bioconductor >>>Search the archives: >>>http://news.gmane.org/gmane.science.biology.informatics.conductor >>_______________________________________________ >>Bioconductor mailing list >>Bioconductor at stat.math.ethz.ch >>https://stat.ethz.ch/mailman/listinfo/bioconductor >>Search the archives: >>http://news.gmane.org/gmane.science.biology.informatics.conductor > >-- >James W. MacDonald, M.S. >Biostatistician >Hildebrandt Lab >8220D MSRB III >1150 W. Medical Center Drive >Ann Arbor MI 48109-0646 >734-936-8662 Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at illinois.edu
ADD REPLY
0
Entering edit mode
Hi Jenny and Jim, Thanks for the help. I have another question. In the output result of topTable, column labeled logFC is the log base 2 of fold change value instead of e. I want to make sure that. Many thanks, Jixin ----- Original Message ----- From: "Jenny Drnevich" <drnevich@illinois.edu> To: "James W. MacDonald" <jmacdon at="" med.umich.edu="">, "Gordon K Smyth" <smyth at="" wehi.edu.au=""> Cc: "Jixin Wang" <jixinwang at="" neo.tamu.edu="">, bioconductor at stat.math.ethz.ch Sent: Tuesday, August 12, 2008 3:16:14 PM GMT -06:00 US/Canada Central Subject: Re: [BioC] How to save result from limma Yeah, now I remember that being in the help page for topTable(). However, I'm not sure why it's not the "right" function. Assuming all the arguments are equivalent, the values are the same as those output from write.fit(). I like topTable() better because it gives you both the raw p-values and the adjusted P-values. Maybe it's wrong function because it will give you the genes in different orders for each coefficient? I prefer it to write.fit so I can work with the values in R without having to read the output file back in! However, I do have to re-sort it if I want to use with other objects I've created. I've always wanted a resort.by option of "gene" that would do my resorting automatically: > allgenes <- topTable(fit,number=nrow(fit)) > allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] Any chance of you adding that in the future, Gordon? If not, maybe you can expand upon why topTable is not the "right" function. Thanks! Jenny At 02:47 PM 8/12/2008, James W. MacDonald wrote: >Actually, write.fit() is what you are looking for. From ?topTable: > >Note: > > This is not the right function to use to create summary statistics > for all the probes on an array. Please consider using 'write.fit' > or 'write' for this purpose, rather than using 'topTable' with > 'number=nrow(fit)'. > >;-P > >Jenny Drnevich wrote: >>Hi Jixin, >>You're mixing up the functions topTable() and >>write.table() and their arguments. Try this: >> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >> > write.table( allgenes, file= "la.txt") >>HTH, >>Jenny >>At 01:58 PM 8/12/2008, Wang, Jixin wrote: >>>Dear all, I am using limma to analyze my >>>microarray data. I have a simple question to >>>ask. I want to save the summary table of ALL >>>genes into local drive. I had tried to use >>>write, write.table or save command but I >>>always got error message. >>>write.table(topTable, "la.txt") Error in >>>as.data.frame.default(x[[i]], optional = TRUE) : >>>Cannot coerce class "function" into a >>>data.frame >>>write.table(fit,number=100,adjust="BH",file="la.txt") >>>Error in write.table(fit, number = 100, adjust = "BH", file = "la.txt") : >>>unused argument(s) (number = 100, adjust = >>>"BH") When I use write.table (fit, >>>file="la.txt"), I got something like this: >>>"coefficients" "stdev.unscaled" "sigma" >>>"df.residual" "genes.Block" "genes.Row" >>>"genes.Column" "genes.ID" "genes.Name" "Amean" >>>"s2.post" "t" "p.value" "lods" "F" "F.p.value" >>>"1" 0.191491534183039 0.5 0.58043881130755 3 1 >>>1 1 5103 NA 6.32074826791933 0.303968848417341 >>>0.694648392759644 0.509374409393106 >>>-4.86326047572600 0.482536389563556 >>>0.509374409393106 "2" -0.293787384283484 0.5 >>>1.20366297838960 3 1 1 2 5124 NA >>>8.24502874291735 0.774060196679415 >>>-0.667845140479293 0.525351390376272 >>>-4.87400797979679 0.446017131661806 >>>0.525351390376272 "3" -0.513890138933438 0.5 >>>0.298947585330255 3 1 1 3 5145 NA >>>6.24632903576038 0.199313133368442 >>>-2.30214313044810 0.0543270719852833 >>>-3.89174526089124 5.29986299306939 >>>0.0543270719852833 "4" -0.192900665446982 0.5 >>>0.202699077289498 3 1 1 4 5166 NA >>>5.4719589146908 0.178899971606802 >>>-0.912133876540687 0.391633127283331 >>>-4.76408991981505 0.831988208733142 >>>0.391633127283331 "5" -0.519787414790754 0.5 >>>0.971899999883875 3 1 1 5 5187 NA >>>4.79242047112468 0.560886278852435 >>>-1.38809230856769 0.207129224092528 >>>-4.49088947369315 1.92680025710479 >>>0.207129224092528???????.????????????. What I >>>want is same as below (contain logFC, P Value and adj.P.Val) of ALL genes, >>>options(digits=3) >>>topTable(fit,number=100,adjust="BH") Block >>>Row Column ID Name logFC >>>AveExpr t P.Value adj.P.Val B >>>20830 46 2 18 5921 NA 3.22 8.42 15.76 8.78e-07 >>>0.0195 -1.78 5073 11 21 13 >>>15499 NA 3.09 11.56 12.58 >>>4.15e-06 0.0460 -1.86 6457 14 21 11 9451 NA 2.93 >>>10.48 10.88 1.11e-05 0.0617 -1.93 4193 10 2 13 9974 >>>NA 2.69 10.25 10.87 1.11e-05 0.0617 -1.93 292 1 14 >>>6 5195 NA 2.22 9.67 10.35 1.55e-05 0.0689 -1.95 12237 27 >>>11 5 13493 NA 3.80 8.45 9.17 >>>3.46e-05 0.1145 -2.03 >>>15180 33 18 22 1831 NA 4.62 9.16 9.11 3.61e-05 >>>0.1145 -2.03 ??????? ?????????? Many thanks, >>>Jixin >>>_______________________________________________ >>> Bioconductor mailing list >>>Bioconductor at stat.math.ethz.ch >>>https://stat.ethz.ch/mailman/listinfo/bioconductor >>>Search the archives: >>>http://news.gmane.org/gmane.science.biology.informatics.conductor >>_______________________________________________ >>Bioconductor mailing list >>Bioconductor at stat.math.ethz.ch >>https://stat.ethz.ch/mailman/listinfo/bioconductor >>Search the archives: >>http://news.gmane.org/gmane.science.biology.informatics.conductor > >-- >James W. MacDonald, M.S. >Biostatistician >Hildebrandt Lab >8220D MSRB III >1150 W. Medical Center Drive >Ann Arbor MI 48109-0646 >734-936-8662 Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at illinois.edu
ADD REPLY
0
Entering edit mode
Hi Gordon, Got it! Thanks a lot for the email. Best regards, Jixin ----- Original Message ----- From: "Jixin Wang" <jixinwang@neo.tamu.edu> To: "Jenny Drnevich" <drnevich at="" illinois.edu=""> Cc: "James W. MacDonald" <jmacdon at="" med.umich.edu="">, bioconductor at stat.math.ethz.ch Sent: Tuesday, August 12, 2008 4:42:42 PM GMT -06:00 US/Canada Central Subject: Re: [BioC] How to save result from limma Hi Jenny and Jim, Thanks for the help. I have another question. In the output result of topTable, column labeled logFC is the log base 2 of fold change value instead of e. I want to make sure that. Many thanks, Jixin ----- Original Message ----- From: "Jenny Drnevich" <drnevich@illinois.edu> To: "James W. MacDonald" <jmacdon at="" med.umich.edu="">, "Gordon K Smyth" <smyth at="" wehi.edu.au=""> Cc: "Jixin Wang" <jixinwang at="" neo.tamu.edu="">, bioconductor at stat.math.ethz.ch Sent: Tuesday, August 12, 2008 3:16:14 PM GMT -06:00 US/Canada Central Subject: Re: [BioC] How to save result from limma Yeah, now I remember that being in the help page for topTable(). However, I'm not sure why it's not the "right" function. Assuming all the arguments are equivalent, the values are the same as those output from write.fit(). I like topTable() better because it gives you both the raw p-values and the adjusted P-values. Maybe it's wrong function because it will give you the genes in different orders for each coefficient? I prefer it to write.fit so I can work with the values in R without having to read the output file back in! However, I do have to re-sort it if I want to use with other objects I've created. I've always wanted a resort.by option of "gene" that would do my resorting automatically: > allgenes <- topTable(fit,number=nrow(fit)) > allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] Any chance of you adding that in the future, Gordon? If not, maybe you can expand upon why topTable is not the "right" function. Thanks! Jenny At 02:47 PM 8/12/2008, James W. MacDonald wrote: >Actually, write.fit() is what you are looking for. From ?topTable: > >Note: > > This is not the right function to use to create summary statistics > for all the probes on an array. Please consider using 'write.fit' > or 'write' for this purpose, rather than using 'topTable' with > 'number=nrow(fit)'. > >;-P > >Jenny Drnevich wrote: >>Hi Jixin, >>You're mixing up the functions topTable() and >>write.table() and their arguments. Try this: >> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >> > write.table( allgenes, file= "la.txt") >>HTH, >>Jenny >>At 01:58 PM 8/12/2008, Wang, Jixin wrote: >>>Dear all, I am using limma to analyze my >>>microarray data. I have a simple question to >>>ask. I want to save the summary table of ALL >>>genes into local drive. I had tried to use >>>write, write.table or save command but I >>>always got error message. >>>write.table(topTable, "la.txt") Error in >>>as.data.frame.default(x[[i]], optional = TRUE) : >>>Cannot coerce class "function" into a >>>data.frame >>>write.table(fit,number=100,adjust="BH",file="la.txt") >>>Error in write.table(fit, number = 100, adjust = "BH", file = "la.txt") : >>>unused argument(s) (number = 100, adjust = >>>"BH") When I use write.table (fit, >>>file="la.txt"), I got something like this: >>>"coefficients" "stdev.unscaled" "sigma" >>>"df.residual" "genes.Block" "genes.Row" >>>"genes.Column" "genes.ID" "genes.Name" "Amean" >>>"s2.post" "t" "p.value" "lods" "F" "F.p.value" >>>"1" 0.191491534183039 0.5 0.58043881130755 3 1 >>>1 1 5103 NA 6.32074826791933 0.303968848417341 >>>0.694648392759644 0.509374409393106 >>>-4.86326047572600 0.482536389563556 >>>0.509374409393106 "2" -0.293787384283484 0.5 >>>1.20366297838960 3 1 1 2 5124 NA >>>8.24502874291735 0.774060196679415 >>>-0.667845140479293 0.525351390376272 >>>-4.87400797979679 0.446017131661806 >>>0.525351390376272 "3" -0.513890138933438 0.5 >>>0.298947585330255 3 1 1 3 5145 NA >>>6.24632903576038 0.199313133368442 >>>-2.30214313044810 0.0543270719852833 >>>-3.89174526089124 5.29986299306939 >>>0.0543270719852833 "4" -0.192900665446982 0.5 >>>0.202699077289498 3 1 1 4 5166 NA >>>5.4719589146908 0.178899971606802 >>>-0.912133876540687 0.391633127283331 >>>-4.76408991981505 0.831988208733142 >>>0.391633127283331 "5" -0.519787414790754 0.5 >>>0.971899999883875 3 1 1 5 5187 NA >>>4.79242047112468 0.560886278852435 >>>-1.38809230856769 0.207129224092528 >>>-4.49088947369315 1.92680025710479 >>>0.207129224092528???????.????????????. What I >>>want is same as below (contain logFC, P Value and adj.P.Val) of ALL genes, >>>options(digits=3) >>>topTable(fit,number=100,adjust="BH") Block >>>Row Column ID Name logFC >>>AveExpr t P.Value adj.P.Val B >>>20830 46 2 18 5921 NA 3.22 8.42 15.76 8.78e-07 >>>0.0195 -1.78 5073 11 21 13 >>>15499 NA 3.09 11.56 12.58 >>>4.15e-06 0.0460 -1.86 6457 14 21 11 9451 NA 2.93 >>>10.48 10.88 1.11e-05 0.0617 -1.93 4193 10 2 13 9974 >>>NA 2.69 10.25 10.87 1.11e-05 0.0617 -1.93 292 1 14 >>>6 5195 NA 2.22 9.67 10.35 1.55e-05 0.0689 -1.95 12237 27 >>>11 5 13493 NA 3.80 8.45 9.17 >>>3.46e-05 0.1145 -2.03 >>>15180 33 18 22 1831 NA 4.62 9.16 9.11 3.61e-05 >>>0.1145 -2.03 ??????? ?????????? Many thanks, >>>Jixin >>>_______________________________________________ >>> Bioconductor mailing list >>>Bioconductor at stat.math.ethz.ch >>>https://stat.ethz.ch/mailman/listinfo/bioconductor >>>Search the archives: >>>http://news.gmane.org/gmane.science.biology.informatics.conductor >>_______________________________________________ >>Bioconductor mailing list >>Bioconductor at stat.math.ethz.ch >>https://stat.ethz.ch/mailman/listinfo/bioconductor >>Search the archives: >>http://news.gmane.org/gmane.science.biology.informatics.conductor > >-- >James W. MacDonald, M.S. >Biostatistician >Hildebrandt Lab >8220D MSRB III >1150 W. Medical Center Drive >Ann Arbor MI 48109-0646 >734-936-8662 Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at illinois.edu _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Hi Jenny, It would seem a waste to resort toptable by names ... that would essentially amount to sorting the table, and then unsorting it again. Something like sort="none" would be better. Also given that limma handles data from all sorts of microarray platforms, it always can't be relied on that the rownames are gene names. My comment about toptable not being the right function, was on the assumption that anyone creating a toptable of all probes was likely to write it out to a file. If you find topTable a useful way to get summary statistics for the whole arrays, that's fine. What sort fo manipulations do you do with the toptable in R? I guess my thought was that most calculations in R would be done with the fitted model object directly. Best wishes Gordon On Tue, 12 Aug 2008, Jenny Drnevich wrote: > Yeah, now I remember that being in the help page for topTable(). However, I'm > not sure why it's not the "right" function. Assuming all the arguments are > equivalent, the values are the same as those output from write.fit(). I like > topTable() better because it gives you both the raw p-values and the adjusted > P-values. Maybe it's wrong function because it will give you the genes in > different orders for each coefficient? I prefer it to write.fit so I can work > with the values in R without having to read the output file back in! However, > I do have to re-sort it if I want to use with other objects I've created. > I've always wanted a resort.by option of "gene" that would do my resorting > automatically: > >> allgenes <- topTable(fit,number=nrow(fit)) > >> allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] > > Any chance of you adding that in the future, Gordon? If not, maybe you can > expand upon why topTable is not the "right" function. > > Thanks! > Jenny > > At 02:47 PM 8/12/2008, James W. MacDonald wrote: >> Actually, write.fit() is what you are looking for. From ?topTable: >> >> Note: >> >> This is not the right function to use to create summary statistics >> for all the probes on an array. Please consider using 'write.fit' >> or 'write' for this purpose, rather than using 'topTable' with >> 'number=nrow(fit)'. >> >> ;-P >> >> Jenny Drnevich wrote: >>> Hi Jixin, >>> You're mixing up the functions topTable() and write.table() and their >>> arguments. Try this: >>> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >>> > write.table( allgenes, file= "la.txt") >>> HTH, >>> Jenny
ADD REPLY
0
Entering edit mode
Hi Gordon, I guess a sort="none" would be better - I was just thinking about what I have to do, and not what would make the most sense in the function! One advantage of the output from topTable over the fitted model object is that it contains adjusted p-values while the other only contains the raw p-values. I do different manipulations with the topTable results depending on what my clients want, but almost invariably I back calculate to regular fold-changes and remove the t and B columns at the very least. Some want separate "up" and "down" lists, some want me to put "up" and "down" in the output, some want expression levels added, etc. Cheers, Jenny At 06:07 PM 8/12/2008, Gordon K Smyth wrote: >Hi Jenny, > >It would seem a waste to resort toptable by names ... that would >essentially amount to sorting the table, and then unsorting it >again. Something like sort="none" would be better. Also given that >limma handles data from all sorts of microarray platforms, it always >can't be relied on that the rownames are gene names. > >My comment about toptable not being the right function, was on the >assumption that anyone creating a toptable of all probes was likely >to write it out to a file. > >If you find topTable a useful way to get summary statistics for the >whole arrays, that's fine. What sort fo manipulations do you do >with the toptable in R? I guess my thought was that most >calculations in R would be done with the fitted model object directly. > >Best wishes >Gordon > >On Tue, 12 Aug 2008, Jenny Drnevich wrote: > >>Yeah, now I remember that being in the help page for topTable(). >>However, I'm not sure why it's not the "right" function. Assuming >>all the arguments are equivalent, the values are the same as those >>output from write.fit(). I like topTable() better because it gives >>you both the raw p-values and the adjusted P-values. Maybe it's >>wrong function because it will give you the genes in different >>orders for each coefficient? I prefer it to write.fit so I can work >>with the values in R without having to read the output file back >>in! However, I do have to re-sort it if I want to use with other >>objects I've created. I've always wanted a resort.by option of >>"gene" that would do my resorting automatically: >> >>>allgenes <- topTable(fit,number=nrow(fit)) >> >>>allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] >> >>Any chance of you adding that in the future, Gordon? If not, maybe >>you can expand upon why topTable is not the "right" function. >> >>Thanks! >>Jenny >> >>At 02:47 PM 8/12/2008, James W. MacDonald wrote: >>>Actually, write.fit() is what you are looking for. From ?topTable: >>>Note: >>> >>> This is not the right function to use to create summary statistics >>> for all the probes on an array. Please consider using 'write.fit' >>> or 'write' for this purpose, rather than using 'topTable' with >>> 'number=nrow(fit)'. >>>;-P >>>Jenny Drnevich wrote: >>>>Hi Jixin, >>>>You're mixing up the functions topTable() and write.table() and >>>>their arguments. Try this: >>>> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >>>> > write.table( allgenes, file= "la.txt") >>>>HTH, >>>>Jenny >>> >>>Jenny Drnevich, Ph.D. >>> >>>Functional Genomics Bioinformatics Specialist >>>W.M. Keck Center for Comparative and Functional Genomics >>>Roy J. Carver Biotechnology Center >>>University of Illinois, Urbana-Champaign >>> >>>330 ERML >>>1201 W. Gregory Dr. >>>Urbana, IL 61801 >>>USA >>> >>>ph: 217-244-7355 >>>fax: 217-265-5066 >>>e-mail: drnevich at illinois.edu
ADD REPLY
0
Entering edit mode
OK, I've added sort="none" to the possibilities. Best wishes Gordon On Wed, 13 Aug 2008, Jenny Drnevich wrote: > Hi Gordon, > > I guess a sort="none" would be better - I was just thinking about what I have > to do, and not what would make the most sense in the function! One advantage > of the output from topTable over the fitted model object is that it contains > adjusted p-values while the other only contains the raw p-values. I do > different manipulations with the topTable results depending on what my > clients want, but almost invariably I back calculate to regular fold-changes > and remove the t and B columns at the very least. Some want separate "up" and > "down" lists, some want me to put "up" and "down" in the output, some want > expression levels added, etc. > > Cheers, > Jenny > > At 06:07 PM 8/12/2008, Gordon K Smyth wrote: >> Hi Jenny, >> >> It would seem a waste to resort toptable by names ... that would >> essentially amount to sorting the table, and then unsorting it again. >> Something like sort="none" would be better. Also given that limma handles >> data from all sorts of microarray platforms, it always can't be relied on >> that the rownames are gene names. >> >> My comment about toptable not being the right function, was on the >> assumption that anyone creating a toptable of all probes was likely to >> write it out to a file. >> >> If you find topTable a useful way to get summary statistics for the whole >> arrays, that's fine. What sort fo manipulations do you do with the >> toptable in R? I guess my thought was that most calculations in R would be >> done with the fitted model object directly. >> >> Best wishes >> Gordon >> >> On Tue, 12 Aug 2008, Jenny Drnevich wrote: >> >>> Yeah, now I remember that being in the help page for topTable(). However, >>> I'm not sure why it's not the "right" function. Assuming all the arguments >>> are equivalent, the values are the same as those output from write.fit(). >>> I like topTable() better because it gives you both the raw p-values and >>> the adjusted P-values. Maybe it's wrong function because it will give you >>> the genes in different orders for each coefficient? I prefer it to >>> write.fit so I can work with the values in R without having to read the >>> output file back in! However, I do have to re-sort it if I want to use >>> with other objects I've created. I've always wanted a resort.by option of >>> "gene" that would do my resorting automatically: >>> >>>> allgenes <- topTable(fit,number=nrow(fit)) >>> >>>> allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] >>> >>> Any chance of you adding that in the future, Gordon? If not, maybe you can >>> expand upon why topTable is not the "right" function. >>> >>> Thanks! >>> Jenny >>> >>> At 02:47 PM 8/12/2008, James W. MacDonald wrote: >>>> Actually, write.fit() is what you are looking for. From ?topTable: >>>> Note: >>>> >>>> This is not the right function to use to create summary statistics >>>> for all the probes on an array. Please consider using 'write.fit' >>>> or 'write' for this purpose, rather than using 'topTable' with >>>> 'number=nrow(fit)'. >>>> ;-P >>>> Jenny Drnevich wrote: >>>>> Hi Jixin, >>>>> You're mixing up the functions topTable() and write.table() and their >>>>> arguments. Try this: >>>>> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >>>>> > write.table( allgenes, file= "la.txt") >>>>> HTH, >>>>> Jenny >>>> >>>> Jenny Drnevich, Ph.D. >>>> >>>> Functional Genomics Bioinformatics Specialist >>>> W.M. Keck Center for Comparative and Functional Genomics >>>> Roy J. Carver Biotechnology Center >>>> University of Illinois, Urbana-Champaign >>>> >>>> 330 ERML >>>> 1201 W. Gregory Dr. >>>> Urbana, IL 61801 >>>> USA >>>> >>>> ph: 217-244-7355 >>>> fax: 217-265-5066 >>>> e-mail: drnevich at illinois.edu > >
ADD REPLY
0
Entering edit mode
At 06:14 PM 8/13/2008, Gordon K Smyth wrote: >OK, I've added sort="none" to the possibilities. > >Best wishes >Gordon Hi Gordon, Should this change to topTable be up on BioC by now? I just updated my packages on R 2.7.1 and the latest limma_2.14.5 does not have it. Neither does the developmental version limma_2.15.10 on R 2.8.0 dev. Usually your changes appear very quickly... Thanks again for adding it! Jenny >On Wed, 13 Aug 2008, Jenny Drnevich wrote: > >>Hi Gordon, >> >>I guess a sort="none" would be better - I was just thinking about >>what I have to do, and not what would make the most sense in the >>function! One advantage of the output from topTable over the fitted >>model object is that it contains adjusted p-values while the other >>only contains the raw p-values. I do different manipulations with >>the topTable results depending on what my clients want, but almost >>invariably I back calculate to regular fold-changes and remove the >>t and B columns at the very least. Some want separate "up" and >>"down" lists, some want me to put "up" and "down" in the output, >>some want expression levels added, etc. >> >>Cheers, >>Jenny >> >>At 06:07 PM 8/12/2008, Gordon K Smyth wrote: >>>Hi Jenny, >>>It would seem a waste to resort toptable by names ... that would >>>essentially amount to sorting the table, and then unsorting it >>>again. Something like sort="none" would be better. Also given >>>that limma handles data from all sorts of microarray platforms, it >>>always can't be relied on that the rownames are gene names. >>>My comment about toptable not being the right function, was on the >>>assumption that anyone creating a toptable of all probes was >>>likely to write it out to a file. >>>If you find topTable a useful way to get summary statistics for >>>the whole arrays, that's fine. What sort fo manipulations do you >>>do with the toptable in R? I guess my thought was that most >>>calculations in R would be done with the fitted model object directly. >>>Best wishes >>>Gordon >>>On Tue, 12 Aug 2008, Jenny Drnevich wrote: >>> >>>>Yeah, now I remember that being in the help page for topTable(). >>>>However, I'm not sure why it's not the "right" function. Assuming >>>>all the arguments are equivalent, the values are the same as >>>>those output from write.fit(). I like topTable() better because >>>>it gives you both the raw p-values and the adjusted P-values. >>>>Maybe it's wrong function because it will give you the genes in >>>>different orders for each coefficient? I prefer it to write.fit >>>>so I can work with the values in R without having to read the >>>>output file back in! However, I do have to re-sort it if I want >>>>to use with other objects I've created. I've always wanted a >>>>resort.by option of "gene" that would do my resorting automatically: >>>> >>>>>allgenes <- topTable(fit,number=nrow(fit)) >>>> >>>>>allgenes <- allgenes[order(as.numeric(rownames(allgenes))),] >>>>Any chance of you adding that in the future, Gordon? If not, >>>>maybe you can expand upon why topTable is not the "right" function. >>>>Thanks! >>>>Jenny >>>>At 02:47 PM 8/12/2008, James W. MacDonald wrote: >>>>>Actually, write.fit() is what you are looking for. From ?topTable: >>>>>Note: >>>>> >>>>> This is not the right function to use to create summary statistics >>>>> for all the probes on an array. Please consider using 'write.fit' >>>>> or 'write' for this purpose, rather than using 'topTable' with >>>>> 'number=nrow(fit)'. >>>>>;-P >>>>>Jenny Drnevich wrote: >>>>>>Hi Jixin, >>>>>>You're mixing up the functions topTable() and write.table() and >>>>>>their arguments. Try this: >>>>>> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >>>>>> > write.table( allgenes, file= "la.txt") >>>>>>HTH, >>>>>>Jenny >>>>>Jenny Drnevich, Ph.D. >>>>>Functional Genomics Bioinformatics Specialist >>>>>W.M. Keck Center for Comparative and Functional Genomics >>>>>Roy J. Carver Biotechnology Center >>>>>University of Illinois, Urbana-Champaign >>>>>330 ERML >>>>>1201 W. Gregory Dr. >>>>>Urbana, IL 61801 >>>>>USA >>>>>ph: 217-244-7355 >>>>>fax: 217-265-5066 >>>>>e-mail: drnevich at illinois.edu >> > >Jenny Drnevich, Ph.D. > >Functional Genomics Bioinformatics Specialist >W.M. Keck Center for Comparative and Functional Genomics >Roy J. Carver Biotechnology Center >University of Illinois, Urbana-Champaign > >330 ERML >1201 W. Gregory Dr. >Urbana, IL 61801 >USA > >ph: 217-244-7355 >fax: 217-265-5066 >e-mail: drnevich at illinois.edu
ADD REPLY
0
Entering edit mode
On Tue, 19 Aug 2008, Jenny Drnevich wrote: > At 06:14 PM 8/13/2008, Gordon K Smyth wrote: >> OK, I've added sort="none" to the possibilities. >> >> Best wishes >> Gordon > > Hi Gordon, > > Should this change to topTable be up on BioC by now? I just updated my > packages on R 2.7.1 and the latest limma_2.14.5 does not have it. Neither > does the developmental version limma_2.15.10 on R 2.8.0 dev. Usually your > changes appear very quickly... > > Thanks again for adding it! > Jenny Not committed to BioC yet. I'm getting older and slower. Also, there will be a number of code additions in my next commit to BioC, which I'm still finalising. Best wishes Gordon
ADD REPLY
0
Entering edit mode
In many cases, I tend to prefer the topTable output if only for the reason that the "ID" column comes first (I know, a very poor reason). Is there any strong reason why we should never use topTable for full output? I thought that, at least for single contrasts, the information is the same than what can be obtained by write.fit. Also, having a data.frame object helps manipulation prior to saving as a file. Cei James W. MacDonald wrote: > Actually, write.fit() is what you are looking for. From ?topTable: > > Note: > > This is not the right function to use to create summary statistics > for all the probes on an array. Please consider using 'write.fit' > or 'write' for this purpose, rather than using 'topTable' with > 'number=nrow(fit)'. > > ;-P > > Jenny Drnevich wrote: >> Hi Jixin, >> >> You're mixing up the functions topTable() and write.table() and their >> arguments. Try this: >> >> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >> > write.table( allgenes, file= "la.txt") >> >> HTH, >> Jenny >> >> At 01:58 PM 8/12/2008, Wang, Jixin wrote: >>> Dear all, I am using limma to analyze my microarray data. I have a >>> simple question to ask. I want to save the summary table of ALL >>> genes into local drive. I had tried to use write, write.table or >>> save command but I always got error message. write.table(topTable, >>> "la.txt") Error in as.data.frame.default(x[[i]], optional = TRUE) >>> : Cannot coerce class "function" into a data.frame >>> write.table(fit,number=100,adjust="BH",file="la.txt") Error in >>> write.table(fit, number = 100, adjust = "BH", file = "la.txt") : >>> unused argument(s) (number = 100, adjust = "BH") When I use >>> write.table (fit, file="la.txt"), I got something like this: >>> "coefficients" "stdev.unscaled" "sigma" "df.residual" "genes.Block" >>> "genes.Row" "genes.Column" "genes.ID" "genes.Name" "Amean" "s2.post" >>> "t" "p.value" "lods" "F" "F.p.value" "1" 0.191491534183039 0.5 >>> 0.58043881130755 3 1 1 1 5103 NA 6.32074826791933 0.303968848417341 >>> 0.694648392759644 0.509374409393106 -4.86326047572600 >>> 0.482536389563556 0.509374409393106 "2" -0.293787384283484 0.5 >>> 1.20366297838960 3 1 1 2 5124 NA 8.24502874291735 0.774060196679415 >>> -0.667845140479293 0.525351390376272 -4.87400797979679 >>> 0.446017131661806 0.525351390376272 "3" -0.513890138933438 0.5 >>> 0.298947585330255 3 1 1 3 5145 NA 6.24632903576038 0.199313133368442 >>> -2.30214313044810 0.0543270719852833 -3.89174526089124 >>> 5.29986299306939 0.0543270719852833 "4" -0.192900665446982 0.5 >>> 0.202699077289498 3 1 1 4 5166 NA 5.4719589146908 0.178899971606802 >>> -0.912133876540687 0.391633127283331 -4.76408991981505 >>> 0.831988208733142 0.391633127283331 "5" -0.519787414790754 0.5 >>> 0.971899999883875 3 1 1 5 5187 NA 4.79242047112468 0.560886278852435 >>> -1.38809230856769 0.207129224092528 -4.49088947369315 >>> 1.92680025710479 0.207129224092528???????.????????????. What I want >>> is same as below (contain logFC, P Value and adj.P.Val) of ALL >>> genes, options(digits=3) topTable(fit,number=100,adjust="BH") >>> Block Row Column ID Name logFC AveExpr t P.Value >>> adj.P.Val B 20830 46 2 18 5921 NA 3.22 8.42 >>> 15.76 8.78e-07 0.0195 -1.78 5073 11 21 13 15499 NA >>> 3.09 11.56 12.58 4.15e-06 0.0460 -1.86 6457 14 21 11 >>> 9451 NA 2.93 10.48 10.88 1.11e-05 0.0617 -1.93 4193 10 >>> 2 13 9974 NA 2.69 10.25 10.87 1.11e-05 0.0617 -1.93 >>> 292 1 14 6 5195 NA 2.22 9.67 10.35 1.55e-05 >>> 0.0689 -1.95 12237 27 11 5 13493 NA 3.80 8.45 9.17 >>> 3.46e-05 0.1145 -2.03 15180 33 18 22 1831 NA 4.62 >>> 9.16 9.11 3.61e-05 0.1145 -2.03 ??????? ?????????? Many thanks, >>> Jixin _______________________________________________ Bioconductor >>> mailing list Bioconductor at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor Search the >>> archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Cei Abreu-Goodger, PhD Wellcome Trust Sanger Institute Computational and Functional Genomics Wellcome Trust Genome Campus Hinxton, Cambridge, CB10 1SA, UK -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
ADD REPLY
0
Entering edit mode
Indeed, I prefer to use the output of topTable too, I select what I want from it, and create my results files from it. I'm not sure it's a question of "right" or "wrong", but more of a preference... Jose Quoting Cei Abreu-Goodger <cei at="" sanger.ac.uk="">: > In many cases, I tend to prefer the topTable output if only for the > reason that the "ID" column comes first (I know, a very poor reason). > Is there any strong reason why we should never use topTable for full > output? I thought that, at least for single contrasts, the information > is the same than what can be obtained by write.fit. Also, having a > data.frame object helps manipulation prior to saving as a file. > > Cei > > James W. MacDonald wrote: >> Actually, write.fit() is what you are looking for. From ?topTable: >> >> Note: >> >> This is not the right function to use to create summary statistics >> for all the probes on an array. Please consider using 'write.fit' >> or 'write' for this purpose, rather than using 'topTable' with >> 'number=nrow(fit)'. >> >> ;-P >> >> Jenny Drnevich wrote: >>> Hi Jixin, >>> >>> You're mixing up the functions topTable() and write.table() and >>> their arguments. Try this: >>> >>> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH") >>> > write.table( allgenes, file= "la.txt") >>> >>> HTH, >>> Jenny >>> >>> At 01:58 PM 8/12/2008, Wang, Jixin wrote: >>>> Dear all, I am using limma to analyze my microarray data. I have >>>> a simple question to ask. I want to save the summary table of ALL >>>> genes into local drive. I had tried to use write, write.table or >>>> save command but I always got error message. >>>> write.table(topTable, "la.txt") Error in >>>> as.data.frame.default(x[[i]], optional = TRUE) : Cannot coerce >>>> class "function" into a data.frame >>>> write.table(fit,number=100,adjust="BH",file="la.txt") Error in >>>> write.table(fit, number = 100, adjust = "BH", file = "la.txt") : >>>> unused argument(s) (number = 100, adjust = "BH") When I use >>>> write.table (fit, file="la.txt"), I got something like this: >>>> "coefficients" "stdev.unscaled" "sigma" "df.residual" >>>> "genes.Block" "genes.Row" "genes.Column" "genes.ID" "genes.Name" >>>> "Amean" "s2.post" "t" "p.value" "lods" "F" "F.p.value" "1" >>>> 0.191491534183039 0.5 0.58043881130755 3 1 1 1 5103 NA >>>> 6.32074826791933 0.303968848417341 0.694648392759644 >>>> 0.509374409393106 -4.86326047572600 0.482536389563556 >>>> 0.509374409393106 "2" -0.293787384283484 0.5 1.20366297838960 3 1 >>>> 1 2 5124 NA 8.24502874291735 0.774060196679415 >>>> -0.667845140479293 0.525351390376272 -4.87400797979679 >>>> 0.446017131661806 0.525351390376272 "3" -0.513890138933438 0.5 >>>> 0.298947585330255 3 1 1 3 5145 NA 6.24632903576038 >>>> 0.199313133368442 -2.30214313044810 0.0543270719852833 >>>> -3.89174526089124 5.29986299306939 0.0543270719852833 "4" >>>> -0.192900665446982 0.5 0.202699077289498 3 1 1 4 5166 NA >>>> 5.4719589146908 0.178899971606802 -0.912133876540687 >>>> 0.391633127283331 -4.76408991981505 0.831988208733142 >>>> 0.391633127283331 "5" -0.519787414790754 0.5 0.971899999883875 3 >>>> 1 1 5 5187 NA 4.79242047112468 0.560886278852435 >>>> -1.38809230856769 0.207129224092528 -4.49088947369315 >>>> 1.92680025710479 0.207129224092528???????.????????????. What I >>>> want is same as below (contain logFC, P Value and adj.P.Val) of >>>> ALL genes, options(digits=3) >>>> topTable(fit,number=100,adjust="BH") Block Row Column ID >>>> Name logFC AveExpr t P.Value adj.P.Val B 20830 46 >>>> 2 18 592 >>>> 1 NA 3.22 8.42 15.76 8.78e-07 0.0195 -1.78 5073 11 >>>> 21 13 15499 NA 3.09 11.56 12.58 4.15e-06 0.0460 -1.86 >>>> 6457 14 21 11 9451 NA 2.93 10.48 10.88 1.11e-05 >>>> 0.0617 -1.93 4193 10 2 13 9974 NA 2.69 10.25 >>>> 10.87 1.11e-05 0.0617 -1.93 292 1 14 6 5195 NA >>>> 2.22 9.67 10.35 1.55e-05 0.0689 -1.95 12237 27 11 >>>> 5 13493 NA 3.80 8.45 9.17 3.46e-05 0.1145 -2.03 15180 >>>> 33 18 22 1831 NA 4.62 9.16 9.11 3.61e-05 0.1145 >>>> -2.03 ??????? ?????????? Many thanks, Jixin >>>> _______________________________________________ Bioconductor >>>> mailing list Bioconductor at stat.math.ethz.ch >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor Search the >>>> archives: >>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > > -- > Cei Abreu-Goodger, PhD > > Wellcome Trust Sanger Institute > Computational and Functional Genomics > Wellcome Trust Genome Campus > Hinxton, Cambridge, CB10 1SA, UK > > > > -- > The Wellcome Trust Sanger Institute is operated by Genome Research > Limited, a charity registered in England with number 1021457 and a > company registered in England with number 2742969, whose registered > office is 215 Euston Road, London, NW1 2BE. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
ADD REPLY
0
Entering edit mode
@herve-pages-1542
Last seen 2 days ago
Seattle, WA, United States
Hi Yisong, According to your sessionInfo() below you are using R-2.5 / BioC 2.0. This version of Bioconductor is more than 1 year old and we don't support it anymore. FYI, the Bioconductor project releases a new version of the software every 6 months and only the latest release is supported. Please update your installation to use the current release version (R-2.7 / BioC 2.2) and let us know if the problem remains. Thanks! H. Yisong Zhen wrote: > Dear Bioconductors, > > I tried to get the quality control report generated by affyQCReport. But I > failed. > > This is my code: > > library(affy); > > Tucson_Array <-ReadAffy(); > > library(affyQCReport); > QCReport(Tucson_Array, file="TucsonQC.pdf"); > > This is the error message: > > error density.default(newX[, i], ...) : > 'x' contains missing values > Warning message: > duplicate row.names > > 12,15,20,21,22,25,26,27,31,32,33,34,38,39,40,43,44,45,48,49,50,54,55 ,59,60,64,65,69,70,73,74,75,78,79,83,84,88,89,90,94,95,96,97,100,101,1 02,106,107,108,110,111,112,114,116,117,118,119,120,121,122,125,127,131 ,132,135,136,139,142,143,144,146,147,148,149,151,152,154,156,158,159,1 60,161,162,165,167,168,171,172,173,179,180,181,182,183,184,187,190,191 ,196,197,198,199,205,206,207,208,211,213,217,218,219,221,222,224,227,2 28,230,232,234,237,238,241,242,246,249,252,253,254,255,257,259,260,263 ,264,266,267,269,270,271,273,275,276,279,281,283,285,288,292,294,296,2 98,301,304,307,309,310,312,315,316,317,321,324,326,329,332,333,334,336 ,339,341,343,345,346,348,351,352,353,354,357,358,360,367,369,370,372,3 73,375,376,378,381,383,384,385,386,388,389,391,392,394,395,397,400,403 ,404,405,407,410,412,415,419,421,424,426,427,429,430,432,434,436,437,4 39,441,443,446,449,452,454,456,457,458,461,465,468,470,471,472,474,475 ,477,480,483,486,490,491,493,495,498,501,504,506,507,509,510,512,513,5 > [... truncated] in: data.row.names(row.names, rowsi, i) > > How can I do for next step to deal with the missing value and duplicated > row.names? And what other packages (or steps) should I select to assess the > within-group variation so I can discard the poor quality array (outlying > chips)? > > Thanks in advance. > > Yisong > > > > PS. > > And here is, > > sessionInfo() > R version 2.5.0 (2007-04-23) > i686-redhat-linux-gnu > > locale: > LC_CTYPE=zh_CN.GB18030;LC_NUMERIC=C;LC_TIME=zh_CN.GB18030;LC_COLLATE =zh_CN.GB18030;LC_MONETARY=zh_CN.GB18030;LC_MESSAGES=zh_CN.GB18030;LC_ PAPER=zh_CN.GB18030;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREME NT=zh_CN.GB18030;LC_IDENTIFICATION=C > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" > [7] "methods" "base" > > other attached packages: > cint06a520380fcdf affy affyio Biobase > "1.14.0" "1.14.2" "1.4.1" "1.14.1 > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

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