Further optional parameters for the image function generating the MXY plot
Details
The function m2v rearranges the values of a matrix M corresponding to the intensity values
on the array to a vector V. The matrix M may have been generated by e.g.
v2m. The order of values in V follows the convention of marrayRaw objects.
In fact, the transformation of m2v is the reverse of v2m (assuming the arguments
are kept the same.)
Note that these functions assume a specific mapping between the data points and the location of spot (i.e.
the same mapping rule that is used for marrayRaw/marrayNorm objects.) The validity of the mappings should be
carefully checked (see also the documentation of the marray package.)
The option for spatial visualisation
is rather restricted to logged fold-changes as the corresponding colour range is centred around zero and
follows the conventional colouring (green for negative, red for positive fold-changes). The MXY plot produced
by m2v does not include a colour-bar. To have a colour included, mxy.plot can be used.
Value
A vector V of length ((Ngc*Nsc)*(Ngr*Nsr)) is produced. The values of V represents the spatial
distribution of the values of vector V given the print-layout. Optionally, a 2D-plot of M is generated.
# LOADING DATA NOT-NORMALISED
data(sw)
# CONVERSION FROM VECTOR TO MATRIX
M <- v2m(maM(sw)[,1],Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)
# BACK-CONVERSION FROM MATRIX TO VECTOR
V <- m2v(M,Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(OLIN)
Loading required package: locfit
locfit 1.5-9.1 2013-03-22
Loading required package: marray
Loading required package: limma
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/OLIN/m2v.Rd_%03d_medium.png", width=480, height=480)
> ### Name: m2v
> ### Title: Converts matrix to vector based on spot layout
> ### Aliases: m2v
> ### Keywords: manip
>
> ### ** Examples
>
>
> # LOADING DATA NOT-NORMALISED
> data(sw)
> # CONVERSION FROM VECTOR TO MATRIX
> M <- v2m(maM(sw)[,1],Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)
>
> # BACK-CONVERSION FROM MATRIX TO VECTOR
> V <- m2v(M,Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)
>
>
>
>
>
> dev.off()
null device
1
>