[BioC] How to read a data.frame into limma or marray

Saroj Mohapatra smohapat at vbi.vt.edu
Wed Dec 5 18:22:01 CET 2007


Hi Wolfgang:

If your matrix is called M (and there is another matrix called A), then 
the following would create an MAList object.
 > MA <- new("MAList",list(M=M,A=A))

For example:
---------------------------------------------------------------------
 > library(limma)
 > my.df=as.data.frame(matrix(rnorm(8000), ncol=4, nrow=2000))
 > colnames(my.df)=paste("M.", 1:4, sep="")
 > rownames(my.df)=paste("probe.", 1:2000, sep="")
 > M=my.df
 > A=my.df
 > MA <- new("MAList",list(M=M,A=A))
 > MA[1,]
An object of class "MAList"
$M
               M.1       M.2        M.3       M.4
probe.1 0.02481883 0.3764408 -0.1547271 -0.362104

$A
               M.1       M.2        M.3       M.4
probe.1 0.02481883 0.3764408 -0.1547271 -0.362104
---------------------------------------------------------------------

Best,

Saroj



Wolfgang Raffelsberger wrote:

>Dear list,
>
>the question might seem trivial, I just couldn't find a function to 
>transform a simple data.frame with microarray log2-ratios into a 
>limma-type ot marray-type objects.
>I have a data.frame containing (R/G-) log2-ratios for the each slide in 
>a separate column and I 'd like to use some of the functions available 
>in limma or marray, in particular to run a lowess normalization.   I 
>realized that I need either limma or marray specific (S4-) objects but I 
>couldn't find a function for easily creating one of these.  I guess I'll 
>need either a  class 'marrayNorm'  object  or an 'MAList', but I 
>couldn't find a specific function to do so. 
>Or is it necessary to create an exprSet first, to be able to transform 
>the data the to an MAList ?
>Any suggestions ?
>
>Just for clarification : I run R-2.6.0 with BioC 2.1
>
>Thank's in advance,
>Wolfgang
> 
>
>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
>
>Wolfgang Raffelsberger, PhD
>Laboratoire de BioInformatique et Génomique Intégratives
>CNRS UMR7104, IGBMC
>1 rue Laurent Fries,  67404 Illkirch  Strasbourg,  France
>Tel (+33) 388 65 3300         Fax (+33) 388 65 3276
>wolfgang.raffelsberger at igbmc.u-strasbg.fr
>
>_______________________________________________
>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
>  
>



More information about the Bioconductor mailing list