Difference between revisions of "Matrix2png"

From Christoph's Personal Wiki
Jump to: navigation, search
(Example)
Line 1: Line 1:
 
{{lowercase|title=matrix2png}}
 
{{lowercase|title=matrix2png}}
'''matrix2png''' is a simple but powerful program for making visualizations of microarray data and many other data types. It generates [http://www.libpng.org/pub/png/ PNG] formatted images from text files of data. It is fast, easy to use, and reasonably flexible. It can be used to generate publication-quality images, or to act as a image generator for web applications. It is useful for imaging all kinds of matrix-based data, not just microarray data. Matrix2png is open source.
+
'''matrix2png''' is a simple but powerful programme for making visualizations of microarray data and many other data types. It generates [http://www.libpng.org/pub/png/ PNG] formatted images from text files of data. It is fast, easy to use, and reasonably flexible. It can be used to generate publication-quality images, or to act as a image generator for web applications. It is useful for imaging all kinds of matrix-based data, not just microarray data. Matrix2png is open source.
  
 
==Usage==
 
==Usage==
-data <file> (required)
+
;<code>-data <file></code> : (required)
-desctext <file>
+
;<code>-desctext <file></code> : (optional)
-range : values assigned to mincolor and maxcolor as min:max (default is data range)
+
;<code>-range</code> : values assigned to mincolor and maxcolor as min:max (default is data range)
-con : contrast (default = 1.0; applies only when not using -range option)
+
;<code>-con</code> : contrast (default = 1.0; applies only when not using -range option)
-size : pixel dimensions per value as x:y (default = 2:2)
+
;<code>-size</code> : pixel dimensions per value as x:y (default = 2:2)
-numcolors : number of colors (default = 64)
+
;<code>-numcolors</code> : number of colours (default = 64)
-minsize : minimum image size as x:y pixels
+
;<code>-minsize</code> : minimum image size as x:y pixels
-mincolor : color used at lowest value (name or r:g:b triplet) (default = blue)
+
;<code>-mincolor</code> : colour used at lowest value (name or r:g:b triplet) (default = blue)
-maxcolor : color used at highest value (name or r:g:b triplet) (default = red)
+
;<code>-maxcolor</code> : colour used at highest value (name or r:g:b triplet) (default = red)
-bkgcolor : color used as background (name or r:g:b triplet) (default = white)
+
;<code>-bkgcolor</code> : colour used as background (name or r:g:b triplet) (default = white)
-missingcolor : color used for missing values (name or r:g:b triplet) (default = grey)
+
;<code>-missingcolor</code> : colour used for missing values (name or r:g:b triplet) (default = grey)
-map : color choices from preset maps: overrides min/max colors and -b (default = 0 (none) )
+
;<code>-map</code> : colour choices from preset maps: overrides min/max colours and -b (default = 0 (none))
-discrete: Use discretized mapping of values to colors; use -dmap to assign a mapping file
+
;<code>-discrete</code> : Use discretized mapping of values to colors; use -dmap to assign a mapping file
-dmap <mapping file> : Discrete color mapping file to use for discrete mapping (default = preset)
+
;<code>-dmap <mapping file></code> : Discrete colour mapping file to use for discrete mapping (default = preset)
-numr : Number of rows to process starting from the top of the matrix by default
+
;<code>-numr</code> : Number of rows to process starting from the top of the matrix by default
-numc : Number of columns to process starting from the left edge of the matrix by default
+
;<code>-numc</code> : Number of columns to process starting from the left edge of the matrix by default
-startrow : Index of the first row to be processed; can combine with numr (default=1)
+
;<code>-startrow</code> : Index of the first row to be processed; can combine with numr (default=1)
-startcol : Index of the first column to be processed; can combine with numc (default=1)
+
;<code>-startcol</code> : Index of the first column to be processed; can combine with numc (default=1)
-trim : Trim this percent of data extremes when determining data range (only without the -range option)
+
;<code>-trim</code> : Trim this percent of data extremes when determining data range (only without the -range option)
-verbose : Verbosity of the output 1|2|3|4|5 (default=2)
+
;<code>-verbose</code> : Verbosity of the output <code>1|2|3|4|5</code> (default=2)
-title <title>: Add a title
+
;<code>-title <title></code> : Add a title
-z : Row-normalize the data to mean 0 and variance 1
+
;<code>-z</code> : Row-normalize the data to mean 0 and variance 1
-b : Middle of color range is black
+
;<code>-b</code> : Middle of colour range is black
-d : Add cell dividers
+
;<code>-d</code> : Add cell dividers
-s : Add scale bar
+
;<code>-s</code> : Add scale bar
-r : Add row names
+
;<code>-r</code> : Add row names
-c : Add column names
+
;<code>-c</code> : Add column names
-f : Data file has a format line
+
;<code>-f</code> : Data file has a format line
-e : Draw ellipses instead of rectangles
+
;<code>-e</code> : Draw ellipses instead of rectangles
-l : Log transform the data (base 2)
+
;<code>-l</code> : Log transform the data (base 2)
  
 
===Example===
 
===Example===
Line 45: Line 45:
 
  {{prg_name|matrix2png}} -data foo.mat -size 18:18 -mincolor darkred -maxcolor white -c -r -s -con 1.0 >foo.png
 
  {{prg_name|matrix2png}} -data foo.mat -size 18:18 -mincolor darkred -maxcolor white -c -r -s -con 1.0 >foo.png
  
== Reference ==
+
==Reference==
* Pavlidis P, Noble WS (2003). Matrix2png: A Utility for Visualizing Matrix Data. ''Bioinformatics, 19:295-296''.
+
*Pavlidis P, Noble WS (2003). Matrix2png: A Utility for Visualizing Matrix Data. ''Bioinformatics, 19:295-296''.
  
== External links ==
+
==External links==
* [http://microarray.cpmc.columbia.edu/matrix2png/ Official site]
+
*[http://microarray.cpmc.columbia.edu/matrix2png/ Official site]
* [http://microarray.cpmc.columbia.edu/pavlidis/lab/cgi-bin/matrix2png.cgi Web interface to matrix2png]
+
*[http://microarray.cpmc.columbia.edu/pavlidis/lab/cgi-bin/matrix2png.cgi Web interface to matrix2png]
* [http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer.html ColorBrewer] &mdash; colour schemes used in matrix2png
+
*[http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer.html ColorBrewer] &mdash; colour schemes used in matrix2png
  
 
[[Category:Bioinformatics]]
 
[[Category:Bioinformatics]]
 
[[Category:Graphics software]]
 
[[Category:Graphics software]]

Revision as of 07:08, 12 February 2007

The correct title of this article is matrix2png. The initial letter is capitalized due to technical restrictions.

matrix2png is a simple but powerful programme for making visualizations of microarray data and many other data types. It generates PNG formatted images from text files of data. It is fast, easy to use, and reasonably flexible. It can be used to generate publication-quality images, or to act as a image generator for web applications. It is useful for imaging all kinds of matrix-based data, not just microarray data. Matrix2png is open source.

Usage

-data <file> 
(required)
-desctext <file> 
(optional)
-range 
values assigned to mincolor and maxcolor as min:max (default is data range)
-con 
contrast (default = 1.0; applies only when not using -range option)
-size 
pixel dimensions per value as x:y (default = 2:2)
-numcolors 
number of colours (default = 64)
-minsize 
minimum image size as x:y pixels
-mincolor 
colour used at lowest value (name or r:g:b triplet) (default = blue)
-maxcolor 
colour used at highest value (name or r:g:b triplet) (default = red)
-bkgcolor 
colour used as background (name or r:g:b triplet) (default = white)
-missingcolor 
colour used for missing values (name or r:g:b triplet) (default = grey)
-map 
colour choices from preset maps: overrides min/max colours and -b (default = 0 (none))
-discrete 
Use discretized mapping of values to colors; use -dmap to assign a mapping file
-dmap <mapping file> 
Discrete colour mapping file to use for discrete mapping (default = preset)
-numr 
Number of rows to process starting from the top of the matrix by default
-numc 
Number of columns to process starting from the left edge of the matrix by default
-startrow 
Index of the first row to be processed; can combine with numr (default=1)
-startcol 
Index of the first column to be processed; can combine with numc (default=1)
-trim 
Trim this percent of data extremes when determining data range (only without the -range option)
-verbose 
Verbosity of the output 1|2|3|4|5 (default=2)
-title <title> 
Add a title
-z 
Row-normalize the data to mean 0 and variance 1
-b 
Middle of colour range is black
-d 
Add cell dividers
-s 
Add scale bar
-r 
Add row names
-c 
Add column names
-f 
Data file has a format line
-e 
Draw ellipses instead of rectangles
-l 
Log transform the data (base 2)

Example

If, for an example, you have a matrix file ('foo.mat') that has something like the following matrix:

foo A1 A2 A3
B1   4  3  9
B2   3  2  1
B3   7  5  8

Note: All entries must be tab delimited.

You can convert this to a PNG like so:

matrix2png -data foo.mat -size 18:18 -mincolor darkred -maxcolor white -c -r -s -con 1.0 >foo.png

Reference

  • Pavlidis P, Noble WS (2003). Matrix2png: A Utility for Visualizing Matrix Data. Bioinformatics, 19:295-296.

External links