File: heatmap3.htm

package info (click to toggle)
ploticus 2.42-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,228 kB
  • sloc: ansic: 46,243; perl: 1,590; sh: 392; makefile: 123
file content (89 lines) | stat: -rw-r--r-- 1,776 bytes parent folder | download | duplicates (10)
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
<html><h1>heatmap3</h1><img src="heatmap3.gif"><p>
<a href="gall.using.html">How to download and try this example</a><br>

<pre><b>Usage: pl -gif [-map] heatmap3.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
pagesize: 10 4

// read in the SNP map data file..
#proc getdata
fieldnameheader: yes
file: strainz.dat

#proc categories
  axis: x
  datafield: 2

#proc categories
  axis: y
  datafield: 1

// set up the plotting area
#proc areadef
rectangle: 1 1 9 3.5
xscaletype: categories
yscaletype: categories
yaxis.stubs: usecategories
yaxis.stubdetails: adjust=0.7,0
yaxis.axisline: none
yaxis.tics: none
xaxis.stubs: usecategories
xaxis.axisline: none
xaxis.tics: none
xaxis.location: max+0.3


// set up legend for color gradients..
#proc legendentry
sampletype: color
details: dullyellow
label: 1 or more SD above normal
tag: 1

#proc legendentry
sampletype: color
details: white
label: within 1 SD of normal
tag: -1

#proc legendentry
sampletype: color
details: skyblue
label: 1 or more SD below normal
tag: -99
  

// use proc scatterplot to count # of instances and pick appropriate color from legend..
#proc scatterplot
xfield: meas
yfield: strain
cluster: no
symrangefield: zscore
rectangle: 1 1 outline

// overlay the values..
#proc scatterplot
xfield: meas
yfield: strain
cluster: no
labelfield: value
textdetails: size=6
  

// display legend..
#proc legend
location: min+0.7 min-0.2
textdetails: size=6