line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::GMOD::Adaptor::WormBase; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
106
|
|
4
|
2
|
|
|
2
|
|
9
|
use vars qw/@ISA $AUTOLOAD/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
139
|
|
5
|
2
|
|
|
2
|
|
664
|
use Bio::GMOD::Adaptor; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Bio::GMOD::Util::Rearrange; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
@ISA = qw/Bio::GMOD::Adaptor/; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Bio::GMOD::Adaptor::* can optionally read defaults and current versions |
11
|
|
|
|
|
|
|
# from CGI scripts If not provided, the corresponding values can be |
12
|
|
|
|
|
|
|
# overridden either as constants or as options passed to the new() |
13
|
|
|
|
|
|
|
# method. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my %DEFAULTS = ( |
16
|
|
|
|
|
|
|
# DEFAULTS_CGI (optional) |
17
|
|
|
|
|
|
|
# A CGI script that provides these same values |
18
|
|
|
|
|
|
|
# Full URL to CGI that delivers key value pairs of these options This |
19
|
|
|
|
|
|
|
# is optional but lets you quickly change paths to system |
20
|
|
|
|
|
|
|
# resources. Moreover, these changes willl be invisible to end user.s |
21
|
|
|
|
|
|
|
# If not provided -- or if user is working offline -- these values |
22
|
|
|
|
|
|
|
# will be populated from this module. |
23
|
|
|
|
|
|
|
DEFAULTS_CGI => 'http://dev.wormbase.org/db/gmod/defaults', |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# NAME (required) |
26
|
|
|
|
|
|
|
# Symbolic name of the MOD / Adaptor |
27
|
|
|
|
|
|
|
NAME => 'WormBase', |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# LIVE_NAME, LIVE_URL, LIVE_DESCRIPTION (required) |
30
|
|
|
|
|
|
|
# Live public server variables |
31
|
|
|
|
|
|
|
LIVE_NAME => 'WormBase live server', |
32
|
|
|
|
|
|
|
LIVE_URL => 'http://www.wormbase.org', |
33
|
|
|
|
|
|
|
LIVE_DESCRIPTION => 'The WormBase live public server', |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# DEVELOPMENT_NAME, DEVELOPMENT_URL, DEVELOPMENT_DESCRIPTION (optional) |
36
|
|
|
|
|
|
|
# Development server variables, if applicable |
37
|
|
|
|
|
|
|
DEVELOPMENT_NAME => 'WormBase development server', |
38
|
|
|
|
|
|
|
DEVELOPMENT_URL => 'http://dev.wormbase.org', |
39
|
|
|
|
|
|
|
DEVELOPMENT_DESCRIPTION => 'The WormBase semi-public development server', |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# VERSION_LIVE, VERSION_DEV (optional, but recommended!) |
42
|
|
|
|
|
|
|
# If you would like to provide your users a convenient |
43
|
|
|
|
|
|
|
# mechanism for fetching versions specify one or both |
44
|
|
|
|
|
|
|
# of these variables. At WormBase, the version cgi |
45
|
|
|
|
|
|
|
# checks the local verison of the database and returns |
46
|
|
|
|
|
|
|
# a string. This script is available in the cgi-bin/ |
47
|
|
|
|
|
|
|
# directory. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# Where does the version XML file live? |
50
|
|
|
|
|
|
|
# This may be a file or generated by a CGI |
51
|
|
|
|
|
|
|
VERSION_DEV => 'http://dev.wormbase.org/db/gmod/version', |
52
|
|
|
|
|
|
|
VERSION_LIVE => 'http://www.wormbase.org/db/gmod/version', |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# Where does the Standard URLs XML file live? |
55
|
|
|
|
|
|
|
# STANDARD_URLS_XML => 'http://www.wormbase.org/standard_urls/standard_urls.xml', |
56
|
|
|
|
|
|
|
STANDARD_URLS_XML => 'http://localhost/standard_urls/standard_urls.xml', |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# Suitable local paths for WormBase |
59
|
|
|
|
|
|
|
ACEDB_PATH => '/usr/local/acedb/elegans', # This will actually be a symlink |
60
|
|
|
|
|
|
|
MYSQL_PATH => '/usr/local/mysql/data', |
61
|
|
|
|
|
|
|
TMP_PATH => '/usr/local/gmod/wormbase/releases', |
62
|
|
|
|
|
|
|
INSTALL_ROOT => '/usr/local/wormbase', |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Remote paths: |
65
|
|
|
|
|
|
|
FTP_SITE => 'dev.wormbase.org', |
66
|
|
|
|
|
|
|
FTP_ROOT => '/usr/local/ftp', # full local path |
67
|
|
|
|
|
|
|
FTP_PATH => '/pub/wormbase/mirror/database_tarballs', # Relative |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# Where to find prepackaged databases |
70
|
|
|
|
|
|
|
DATABASE_REPOSITORY => '/pub/wormbase/mirror/database_tarballs', |
71
|
|
|
|
|
|
|
DATABASE_REPOSITORY_STABLE => '/pub/wormbase/mirror/database_tarballs/stable', |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# Tarball filenames |
74
|
|
|
|
|
|
|
ACEDB_TARBALL => 'elegans_%s.ace.tgz', |
75
|
|
|
|
|
|
|
ELEGANS_GFF_TARBALL => 'elegans_%s.gff.tgz', |
76
|
|
|
|
|
|
|
BRIGGSAE_GFF_TARBALL => 'briggsae_%s.gff.tgz', |
77
|
|
|
|
|
|
|
BLAST_TARBALL => 'blast_%s.tgz', |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
# Disk space requirements (GB) |
80
|
|
|
|
|
|
|
ACEDB_DISK_SPACE => '10', |
81
|
|
|
|
|
|
|
ELEGANS_GFF_DISK_SPACE => '3.5', |
82
|
|
|
|
|
|
|
BRIGGSAE_GFF_DISK_SPACE => '5', |
83
|
|
|
|
|
|
|
BLAST_DISK_SPACE => '0.5', |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
# Software updating |
86
|
|
|
|
|
|
|
RSYNC_URL => 'rsync://dev.wormbase.org', |
87
|
|
|
|
|
|
|
RSYNC_MODULE => 'wormbase-live', |
88
|
|
|
|
|
|
|
CVS_ROOT => ':pserver:anonymous@brebiou.cshl.org:/usr/local/cvs', |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# DATA MINING CONSTANTS |
91
|
|
|
|
|
|
|
DATA_MINING_URL => 'http://aceserver.cshl.org', |
92
|
|
|
|
|
|
|
DATA_MINING_SERVER => 'aceserver.cshl.org', |
93
|
|
|
|
|
|
|
# DATA_MINING_SERVER => 'localhost', |
94
|
|
|
|
|
|
|
DATA_MINING_PORT => '2005', |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# GENERIC QUERIES |
97
|
|
|
|
|
|
|
GENE_FETCH_QUERY => 'select a,a->Public_name,a->Concise_description from a in class Gene where a->Public_name="%s"', |
98
|
|
|
|
|
|
|
GENE_SEARCH_QUERY => '', |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
PROTEIN_FETCH_QUERY => 'find Protein $s', |
101
|
|
|
|
|
|
|
PROTEIN_SEARCH_QUERY => '', |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# PACKAGE PATHS (LOCAL) (NOT YET SYNCED WITH CGI) |
104
|
|
|
|
|
|
|
# Suitable constants for creating packages |
105
|
|
|
|
|
|
|
# PACKAGE_PATH => (getpwnam('ftp'))[7] . '/pub/wormbase/database_tarballs', |
106
|
|
|
|
|
|
|
# LOCAL_PACKAGE_PATH => (getpwnam('ftp'))[7] . '/pub/wormbase/database_tarballs', |
107
|
|
|
|
|
|
|
# CURRENT_PACKAGE_SYMLINK => (getpwnam('ftp'))[7] . '/pub/wormbase/database_tarballs/current_release', |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
# Constants for archiving |
110
|
|
|
|
|
|
|
CURRENT_RELEASE => (getpwnam('ftp'))[7] . '/pub/wormbase/elegans-current_release', |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
); |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub defaults { |
117
|
|
|
|
|
|
|
my $self = shift; |
118
|
|
|
|
|
|
|
return (keys %DEFAULTS); |
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
# Automatically create lc data accessor methods |
123
|
|
|
|
|
|
|
# for each configuration variable |
124
|
|
|
|
|
|
|
sub AUTOLOAD { |
125
|
|
|
|
|
|
|
my $self = shift; |
126
|
|
|
|
|
|
|
my $attr = $AUTOLOAD; |
127
|
|
|
|
|
|
|
$attr =~ s/.*:://; |
128
|
|
|
|
|
|
|
return unless $attr =~ /[^A-Z]/; # skip DESTROY and all-cap methods |
129
|
|
|
|
|
|
|
return if $attr eq 'new'; # Provided by superclass |
130
|
|
|
|
|
|
|
# die "invalid attribute method: ->$attr()" unless $DEFAULTS{uc($attr)}; |
131
|
|
|
|
|
|
|
$self->{uc($attr)} = shift if @_; |
132
|
|
|
|
|
|
|
my $val = $self->{defaults}->{lc($attr)}; # Get what is already there |
133
|
|
|
|
|
|
|
$val ||= $DEFAULTS{uc($attr)}; # Perhaps it hasn't been defined yet. |
134
|
|
|
|
|
|
|
return $val; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
__END__ |