1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
<html><h1>colorgrid2</h1><img src="colorgrid2.gif"><p>
<a href="gall.using.html">How to download and try this example</a><br>
<pre><b>Usage: pl -gif [-map] colorgrid2.htm
This color grid involves processing raw data by
counting occurances within ranges, then mapping counts to colors by range.
Uses data file <a href="snpmap.dat">snpmap.dat</a> .
For brevity, only chromosomes 1-7 and X are represented in this example.
<hr></b>
#set SYM = "radius=0.08 shape=square style=filled"
#setifnotgiven CGI = "http://ploticus.sourceforge.net/cgi-bin/showcgiargs"
#proc page
backgroundcolor: black
color: white
// read in the SNP map data file..
#proc getdata
file: snpmap.dat
fieldnameheader: yes
// group into bins 10 cM wide..
filter:
##set A = $numgroup( @@2, 10, mid )
@@1 @@A
// set up the plotting area
#proc areadef
rectangle: 1 1 6 3
yscaletype: categories
clickmapurl: @CGI?chrom=@@YVAL&cM=@@XVAL
ycategories:
1
2
3
4
5
6
7
X
yaxis.stubs: usecategories
yaxis.stubdetails: adjust=0.2,0
//yaxis.stubslide: 0.08
yaxis.label: chromosome
yaxis.axisline: no
yaxis.tics: no
yaxis.clickmap: xygrid
xrange: -3 120
xaxis.label: position (cM)
xaxis.axisline: no
xaxis.tics: no
xaxis.clickmap: xygrid
xaxis.stubs: inc 10
xaxis.stubrange: 0
xaxis.stubdetails: adjust=0,0.15
// set up legend for color gradients..
#proc legendentry
sampletype: symbol
details: fillcolor=yellow @SYM
label: >40
tag: 41
#proc legendentry
sampletype: symbol
details: fillcolor=orange @SYM
label: 31-40
tag: 31
#proc legendentry
sampletype: symbol
details: fillcolor=red @SYM
label: 21-30
tag: 21
#proc legendentry
sampletype: symbol
details: fillcolor=lightpurple @SYM
label: 11-20
tag: 11
#proc legendentry
sampletype: symbol
details: fillcolor=blue @SYM
label: 1 - 10
tag: 1
// use proc scatterplot to count # of instances and pick appropriate color from legend..
#proc scatterplot
yfield: chr
xfield: cM
cluster: yes
dupsleg: yes
// display legend..
#proc legend
location: max-0.7 min+0.8
textdetails: size=6
|