-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgbrowse-config.php
177 lines (145 loc) · 4.86 KB
/
gbrowse-config.php
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
// generate a gbrowse database config for tht data
require_once('config.php');
require_once($config['root_dir'] . 'includes/bootstrap.inc');
connect();
$dbpath = $argv[1];
echo <<<EOD
[GENERAL]
description = THT
db_adaptor = Bio::DB::SeqFeature::Store
#db_args = -adaptor memory
# -dir '{$dbpath}'
db_args = -adaptor DBI::mysql
-dsn gtht
-user tht
-password <password>
#units = cM
#unit_divider = 1000
plugins =
# Web site configuration info
gbrowse root = gbrowse
stylesheet = gbrowse.css
buttons = images/buttons
js = js
tmpimages = tmp
initial landmark = chr1H
# advanced features
balloon tips = 1
drag and drop = 1
# one hour
cache time = 1
# where to link to when user clicks in detailed view
#link = AUTO
# what image widths to offer
image widths = 450 640 800 1024
# color of the selection rectangle
hilite fill = beige
hilite outline = red
# default width of detailed view (pixels)
default width = 800
default features = remark
# max and default segment sizes for detailed view
max segment = 500000
default segment = 50000
# zoom levels
zoom levels = 50 100 200 1000 2000 5000 10000 20000 40000 100000 200000 500000 1000000
# whether to show the sources popup menu (0=false, 1=true; defaults to true)
show sources = 1
# colors of the overview, detailed map and key
overview bgcolor = lightgrey
detailed bgcolor = lightgoldenrodyellow
key bgcolor = beige
# examples to show in the introduction
examples = chr1H
chr2H
# "automatic" classes to try when an unqualified identifier is given
automatic classes = Symbol Gene Clone
### HTML TO INSERT AT VARIOUS STRATEGIC LOCATIONS ###
# inside the <head></head> section
head =
# at the top...
header =
# a footer
footer = <hr>
<table width="100%">
<TR>
<TD align="LEFT" class="databody">
For the source code for this browser, see the <a href="http://www.gmod.org">
Generic Model Organism Database Project.</a> For other questions, send
mail to <a href="mailto:[email protected]">[email protected]</a>.
</TD>
</TR>
</table>
<hr>
# Various places where you can insert your own HTML -- see configuration docs
html1 = <iframe name='invisibleiframe' style='display:none'></iframe>
html2 =
html3 =
html4 =
html5 =
html6 =
# Advanced feature: custom balloons
custom balloons = [balloon]
delayTime = 500
[balloon500]
maxWidth = 500
delayTime = 50
# Default glyph settings
[TRACK DEFAULTS]
glyph = generic
height = 8
bgcolor = cyan
fgcolor = cyan
label density = 25
bump density = 100
### TRACK CONFIGURATION ####
# the remainder of the sections configure individual tracks
[Lines:DETAILS]
URL = \$value
[Linkout:DETAILS]
URL = \$value
EOD;
$sql = "select mapset_name from mapset order by mapset_name";
$sqlr = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_assoc($sqlr)) {
extract($row);
echo <<<EOD1
[Marker $mapset_name:overview]
feature = remark:$mapset_name
fgcolor = sub { my \$feat = shift; my \$mt = join('', \$feat->each_tag_value('MarkerType')); return 'gray' if \$mt eq 'Historical'; return 'green' if \$mt eq 'OPA SNP Name'; return 'red' if \$mt eq 'DArT Marker'; return 'blue' if \$mt eq 'QTL'; return 'black'; }
glyph = generic
key = $mapset_name marker
[Marker $mapset_name]
feature = remark:$mapset_name
fgcolor = gray
bgcolor = sub { my \$feat = shift; my \$mt = join('', \$feat->each_tag_value('MarkerType')); return 'gray' if \$mt eq 'Historical'; return 'green' if \$mt eq 'OPA SNP Name'; return 'red' if \$mt eq 'DArT Marker'; return 'blue' if \$mt eq 'QTL'; return 'black'; }
glyph = dot
description = 1
key = Marker in $mapset_name
# default pop-up balloon
balloon hover = sub {
my \$feat = shift;
my \$mt = join('', \$feat->each_tag_value('MarkerType'));
my \$linkout = join('', \$feat->each_tag_value('Linkout'));
my \$rv = "<b>".(\$feat->name)."</b> is a marker spanning "
.(\$feat->ref)." from ".(\$feat->start)." to ".(\$feat->end)
." of type <b>\$mt</b>. Click for more details.";
return \$rv;
}
balloon click = sub {
my \$feat = shift;
my \$marker_uid = join('', \$feat->each_tag_value('marker_uid'));
my \$map = join('', \$feat->each_tag_value('Map'));
my \$rv = "Marker ".(\$feat->name)."<br /><form method='POST' "
."action='/genotyping/marker_selection.php'>"
."<input type='hidden' name='mapname' value='".(\$map)."'></input>"
."<input type='hidden' name='selbyname' value='".(\$feat->name)."'></input>"
."<input type='submit' value='Select in THT'></form>"
."<br /><a href='/cgi-bin/gbrowse_details/tht?name=".(\$feat->name).";class=".(\$feat->class)
.";ref=".(\$feat->ref).";start=".(\$feat->start).";end=".(\$feat->end).">More..</a>";
return \$rv;
}
EOD1;
}
?>