[BioC] Why is my matrix transposed?

James W. MacDonald jmacdon at med.umich.edu
Fri Mar 7 21:00:13 CET 2008



Balasubramanian Ganesan wrote:
> Dear all
> I am running R-2.6.2 on a PowerPC PowerBook-G4.
> I am using the following method to normalize my data.
> 
>  >library(affy)
>  >eset=justRMA()
> 
> I used two different ways of writing out the eset data.
>  >write.table(eset,file="abc.txt",sep="\t") # produces a table with  
> probe IDs as cols and sample names as rows (order of data is transposed)
> 
> But if I use
>  >write.exprs(eset,file="abc2.txt") # produces a table with probe IDs  
> as rows and sample names as col headers, which is what we want.
> 
> Why do I see this discrepancy? I have always used "Write.table" in  
> the past and has always worked for me upto R-2.5. I started having  
> this issue only with R-2.6 and have it with both versions of 2.6.

You get this discrepancy because write.table() isn't designed to use an 
S4 object. From ?write.table

Arguments:

        x: the object to be written, preferably a matrix or data frame.
           If not, it is attempted to coerce 'x' to a data frame.

So by using write.table() rather than the function specifically written 
to do what you want, you are assuming that the coercion of an 
ExpressionSet to data.frame will end up doing what you expect. Evidently 
it did so in the past, but there was never any guarantee that this would 
work, and evidently it no longer does.

Best,

Jim


> 
> Balasubramanian Ganesan
> Research Assistant Professor
> Center for Integrated BioSystems
> Utah State University
> 4700 Old Main Hill
> Logan UT 84322
> balag at cc.usu.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

-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list