line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# BioPerl module for Bio::Annotation::Reference |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Please direct questions and support issues to |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Cared for by Ewan Birney |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright Ewan Birney |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# You may distribute this module under the same terms as perl itself |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Bio::Annotation::Reference - Specialised DBLink object for Literature References |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$reg = Bio::Annotation::Reference->new( -title => 'title line', |
21
|
|
|
|
|
|
|
-location => 'location line', |
22
|
|
|
|
|
|
|
-authors => 'author line', |
23
|
|
|
|
|
|
|
-medline => 998122 ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Object which presents a literature reference. This is considered to be |
28
|
|
|
|
|
|
|
a specialised form of database link. The additional methods provided |
29
|
|
|
|
|
|
|
are all set/get methods to store strings commonly associated with |
30
|
|
|
|
|
|
|
references, in particular title, location (ie, journal page) and |
31
|
|
|
|
|
|
|
authors line. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
There is no attempt to do anything more than store these things as |
34
|
|
|
|
|
|
|
strings for processing elsewhere. This is mainly because parsing these |
35
|
|
|
|
|
|
|
things suck and generally are specific to the specific format one is |
36
|
|
|
|
|
|
|
using. To provide an easy route to go format --E object --E format |
37
|
|
|
|
|
|
|
without losing data, we keep them as strings. Feel free to post the |
38
|
|
|
|
|
|
|
list for a better solution, but in general this gets very messy very |
39
|
|
|
|
|
|
|
fast... |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR - Ewan Birney |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Email birney@ebi.ac.uk |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 APPENDIX |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
The rest of the documentation details each of the object |
48
|
|
|
|
|
|
|
methods. Internal methods are usually preceded with a _ |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# Let the code begin... |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package Bio::Annotation::Reference; |
56
|
39
|
|
|
39
|
|
829
|
use strict; |
|
39
|
|
|
|
|
69
|
|
|
39
|
|
|
|
|
1135
|
|
57
|
|
|
|
|
|
|
|
58
|
39
|
|
|
39
|
|
173
|
use base qw(Bio::Annotation::DBLink); |
|
39
|
|
|
|
|
60
|
|
|
39
|
|
|
|
|
16830
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 new |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Title : new |
63
|
|
|
|
|
|
|
Usage : $ref = Bio::Annotation::Reference->new( -title => 'title line', |
64
|
|
|
|
|
|
|
-authors => 'author line', |
65
|
|
|
|
|
|
|
-location => 'location line', |
66
|
|
|
|
|
|
|
-medline => 9988812); |
67
|
|
|
|
|
|
|
Function: |
68
|
|
|
|
|
|
|
Example : |
69
|
|
|
|
|
|
|
Returns : a new Bio::Annotation::Reference object |
70
|
|
|
|
|
|
|
Args : a hash with optional title, authors, location, medline, pubmed, |
71
|
|
|
|
|
|
|
start, end, consortium, rp and rg attributes |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub new{ |
77
|
1092
|
|
|
1092
|
1
|
4179
|
my ($class,@args) = @_; |
78
|
|
|
|
|
|
|
|
79
|
1092
|
|
|
|
|
3607
|
my $self = $class->SUPER::new(@args); |
80
|
|
|
|
|
|
|
|
81
|
1092
|
|
|
|
|
4137
|
my ($start,$end,$authors,$consortium,$location,$title,$medline, |
82
|
|
|
|
|
|
|
$pubmed,$rp,$rg,$doi) = |
83
|
|
|
|
|
|
|
$self->_rearrange([qw(START |
84
|
|
|
|
|
|
|
END |
85
|
|
|
|
|
|
|
AUTHORS |
86
|
|
|
|
|
|
|
CONSORTIUM |
87
|
|
|
|
|
|
|
LOCATION |
88
|
|
|
|
|
|
|
TITLE |
89
|
|
|
|
|
|
|
MEDLINE |
90
|
|
|
|
|
|
|
PUBMED |
91
|
|
|
|
|
|
|
RP |
92
|
|
|
|
|
|
|
RG |
93
|
|
|
|
|
|
|
DOI |
94
|
|
|
|
|
|
|
)],@args); |
95
|
|
|
|
|
|
|
|
96
|
1092
|
100
|
|
|
|
3486
|
defined $start && $self->start($start); |
97
|
1092
|
100
|
|
|
|
2219
|
defined $end && $self->end($end); |
98
|
1092
|
100
|
|
|
|
2885
|
defined $authors && $self->authors($authors); |
99
|
1092
|
100
|
|
|
|
1963
|
defined $consortium && $self->consortium($consortium); |
100
|
1092
|
100
|
|
|
|
2499
|
defined $location && $self->location($location); |
101
|
1092
|
100
|
|
|
|
2454
|
defined $title && $self->title($title); |
102
|
1092
|
100
|
|
|
|
2534
|
defined $medline && $self->medline($medline); |
103
|
1092
|
100
|
|
|
|
2152
|
defined $pubmed && $self->pubmed($pubmed); |
104
|
1092
|
100
|
|
|
|
2158
|
defined $rp && $self->rp($rp); |
105
|
1092
|
100
|
|
|
|
1851
|
defined $rg && $self->rg($rg); |
106
|
1092
|
100
|
|
|
|
1810
|
defined $doi && $self->doi($doi); |
107
|
1092
|
|
|
|
|
3205
|
return $self; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 AnnotationI implementing functions |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=cut |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 as_text |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Title : as_text |
118
|
|
|
|
|
|
|
Usage : |
119
|
|
|
|
|
|
|
Function: |
120
|
|
|
|
|
|
|
Example : |
121
|
|
|
|
|
|
|
Returns : |
122
|
|
|
|
|
|
|
Args : |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=cut |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
sub as_text{ |
128
|
1
|
|
|
1
|
1
|
3
|
my ($self) = @_; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
# this could get out of hand! |
131
|
1
|
|
|
|
|
2
|
return "Reference: ".$self->title; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 display_text |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Title : display_text |
137
|
|
|
|
|
|
|
Usage : my $str = $ann->display_text(); |
138
|
|
|
|
|
|
|
Function: returns a string. Unlike as_text(), this method returns a string |
139
|
|
|
|
|
|
|
formatted as would be expected for te specific implementation. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
One can pass a callback as an argument which allows custom text |
142
|
|
|
|
|
|
|
generation; the callback is passed the current instance and any text |
143
|
|
|
|
|
|
|
returned |
144
|
|
|
|
|
|
|
Example : |
145
|
|
|
|
|
|
|
Returns : a string |
146
|
|
|
|
|
|
|
Args : [optional] callback |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
{ |
151
|
|
|
|
|
|
|
my $DEFAULT_CB = sub { $_[0]->title || ''}; |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub display_text { |
154
|
38
|
|
|
38
|
1
|
161
|
my ($self, $cb) = @_; |
155
|
38
|
|
33
|
|
|
143
|
$cb ||= $DEFAULT_CB; |
156
|
38
|
50
|
|
|
|
82
|
$self->throw("Callback must be a code reference") if ref $cb ne 'CODE'; |
157
|
38
|
|
|
|
|
70
|
return $cb->($self); |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=head2 hash_tree |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
Title : hash_tree |
165
|
|
|
|
|
|
|
Usage : |
166
|
|
|
|
|
|
|
Function: |
167
|
|
|
|
|
|
|
Example : |
168
|
|
|
|
|
|
|
Returns : |
169
|
|
|
|
|
|
|
Args : |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=cut |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub hash_tree{ |
175
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
176
|
|
|
|
|
|
|
|
177
|
0
|
|
|
|
|
0
|
my $h = {}; |
178
|
0
|
|
|
|
|
0
|
$h->{'title'} = $self->title; |
179
|
0
|
|
|
|
|
0
|
$h->{'authors'} = $self->authors; |
180
|
0
|
|
|
|
|
0
|
$h->{'location'} = $self->location; |
181
|
0
|
0
|
|
|
|
0
|
if (defined $self->start) { |
182
|
0
|
|
|
|
|
0
|
$h->{'start'} = $self->start; |
183
|
|
|
|
|
|
|
} |
184
|
0
|
0
|
|
|
|
0
|
if (defined $self->end) { |
185
|
0
|
|
|
|
|
0
|
$h->{'end'} = $self->end; |
186
|
|
|
|
|
|
|
} |
187
|
0
|
|
|
|
|
0
|
$h->{'medline'} = $self->medline; |
188
|
0
|
0
|
|
|
|
0
|
if (defined $self->pubmed) { |
189
|
0
|
|
|
|
|
0
|
$h->{'pubmed'} = $self->pubmed; |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
0
|
|
|
|
|
0
|
return $h; |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head2 tagname |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
Title : tagname |
198
|
|
|
|
|
|
|
Usage : $obj->tagname($newval) |
199
|
|
|
|
|
|
|
Function: Get/set the tagname for this annotation value. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
Setting this is optional. If set, it obviates the need to provide |
202
|
|
|
|
|
|
|
a tag to Bio::AnnotationCollectionI when adding this object. When |
203
|
|
|
|
|
|
|
obtaining an AnnotationI object from the collection, the collection |
204
|
|
|
|
|
|
|
will set the value to the tag under which it was stored unless the |
205
|
|
|
|
|
|
|
object has a tag stored already. |
206
|
|
|
|
|
|
|
Example : |
207
|
|
|
|
|
|
|
Returns : value of tagname (a scalar) |
208
|
|
|
|
|
|
|
Args : new value (a scalar, optional) |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=cut |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=head1 Specific accessors for References |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=cut |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=head2 start |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
Title : start |
222
|
|
|
|
|
|
|
Usage : $self->start($newval) |
223
|
|
|
|
|
|
|
Function: Gives the reference start base |
224
|
|
|
|
|
|
|
Example : |
225
|
|
|
|
|
|
|
Returns : value of start |
226
|
|
|
|
|
|
|
Args : newvalue (optional) |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=cut |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub start { |
232
|
656
|
|
|
656
|
1
|
1814
|
my ($self,$value) = @_; |
233
|
656
|
100
|
|
|
|
1383
|
if( defined $value) { |
234
|
462
|
|
|
|
|
998
|
$self->{'start'} = $value; |
235
|
|
|
|
|
|
|
} |
236
|
656
|
|
|
|
|
1281
|
return $self->{'start'}; |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
=head2 end |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
Title : end |
243
|
|
|
|
|
|
|
Usage : $self->end($newval) |
244
|
|
|
|
|
|
|
Function: Gives the reference end base |
245
|
|
|
|
|
|
|
Example : |
246
|
|
|
|
|
|
|
Returns : value of end |
247
|
|
|
|
|
|
|
Args : newvalue (optional) |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=cut |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
sub end { |
253
|
607
|
|
|
607
|
1
|
1304
|
my ($self,$value) = @_; |
254
|
607
|
100
|
|
|
|
1287
|
if( defined $value) { |
255
|
461
|
|
|
|
|
890
|
$self->{'end'} = $value; |
256
|
|
|
|
|
|
|
} |
257
|
607
|
|
|
|
|
1598
|
return $self->{'end'}; |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
=head2 rp |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
Title : rp |
263
|
|
|
|
|
|
|
Usage : $self->rp($newval) |
264
|
|
|
|
|
|
|
Function: Gives the RP line. No attempt is made to parse this line. |
265
|
|
|
|
|
|
|
Example : |
266
|
|
|
|
|
|
|
Returns : value of rp |
267
|
|
|
|
|
|
|
Args : newvalue (optional) |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=cut |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
sub rp{ |
273
|
362
|
|
|
362
|
1
|
1812
|
my ($self,$value) = @_; |
274
|
362
|
100
|
|
|
|
642
|
if( defined $value) { |
275
|
354
|
|
|
|
|
728
|
$self->{'rp'} = $value; |
276
|
|
|
|
|
|
|
} |
277
|
362
|
|
|
|
|
562
|
return $self->{'rp'}; |
278
|
|
|
|
|
|
|
} |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
=head2 rg |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
Title : rg |
283
|
|
|
|
|
|
|
Usage : $obj->rg($newval) |
284
|
|
|
|
|
|
|
Function: Gives the RG line. This is Swissprot/Uniprot specific, and |
285
|
|
|
|
|
|
|
if set will usually be identical to the authors attribute, |
286
|
|
|
|
|
|
|
but the swissprot manual does allow both RG and RA (author) |
287
|
|
|
|
|
|
|
to be present for the same reference. |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
Example : |
290
|
|
|
|
|
|
|
Returns : value of rg (a scalar) |
291
|
|
|
|
|
|
|
Args : on set, new value (a scalar or undef, optional) |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
=cut |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
sub rg{ |
297
|
19
|
|
|
19
|
1
|
30
|
my $self = shift; |
298
|
|
|
|
|
|
|
|
299
|
19
|
100
|
|
|
|
61
|
return $self->{'rg'} = shift if @_; |
300
|
3
|
|
|
|
|
11
|
return $self->{'rg'}; |
301
|
|
|
|
|
|
|
} |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
=head2 authors |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
Title : authors |
306
|
|
|
|
|
|
|
Usage : $self->authors($newval) |
307
|
|
|
|
|
|
|
Function: Gives the author line. No attempt is made to parse the author line |
308
|
|
|
|
|
|
|
Example : |
309
|
|
|
|
|
|
|
Returns : value of authors |
310
|
|
|
|
|
|
|
Args : newvalue (optional) |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=cut |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
sub authors{ |
316
|
1972
|
|
|
1972
|
1
|
3270
|
my ($self,$value) = @_; |
317
|
1972
|
100
|
|
|
|
3069
|
if( defined $value) { |
318
|
1467
|
|
|
|
|
2547
|
$self->{'authors'} = $value; |
319
|
|
|
|
|
|
|
} |
320
|
1972
|
|
|
|
|
3240
|
return $self->{'authors'}; |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
} |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
=head2 location |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
Title : location |
327
|
|
|
|
|
|
|
Usage : $self->location($newval) |
328
|
|
|
|
|
|
|
Function: Gives the location line. No attempt is made to parse the location line |
329
|
|
|
|
|
|
|
Example : |
330
|
|
|
|
|
|
|
Returns : value of location |
331
|
|
|
|
|
|
|
Args : newvalue (optional) |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=cut |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
sub location{ |
337
|
1187
|
|
|
1187
|
1
|
2009
|
my ($self,$value) = @_; |
338
|
1187
|
100
|
|
|
|
2060
|
if( defined $value) { |
339
|
1085
|
|
|
|
|
1842
|
$self->{'location'} = $value; |
340
|
|
|
|
|
|
|
} |
341
|
1187
|
|
|
|
|
1822
|
return $self->{'location'}; |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
=head2 title |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
Title : title |
348
|
|
|
|
|
|
|
Usage : $self->title($newval) |
349
|
|
|
|
|
|
|
Function: Gives the title line (if exists) |
350
|
|
|
|
|
|
|
Example : |
351
|
|
|
|
|
|
|
Returns : value of title |
352
|
|
|
|
|
|
|
Args : newvalue (optional) |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
=cut |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
sub title{ |
358
|
2019
|
|
|
2019
|
1
|
14427
|
my ($self,$value) = @_; |
359
|
2019
|
100
|
|
|
|
3210
|
if( defined $value) { |
360
|
1448
|
|
|
|
|
2203
|
$self->{'title'} = $value; |
361
|
|
|
|
|
|
|
} |
362
|
2019
|
|
|
|
|
3301
|
return $self->{'title'}; |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
=head2 medline |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
Title : medline |
369
|
|
|
|
|
|
|
Usage : $self->medline($newval) |
370
|
|
|
|
|
|
|
Function: Gives the medline number |
371
|
|
|
|
|
|
|
Example : |
372
|
|
|
|
|
|
|
Returns : value of medline |
373
|
|
|
|
|
|
|
Args : newvalue (optional) |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
=cut |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
sub medline{ |
379
|
633
|
|
|
633
|
1
|
1088
|
my ($self,$value) = @_; |
380
|
633
|
100
|
|
|
|
1183
|
if( defined $value) { |
381
|
521
|
|
|
|
|
917
|
$self->{'medline'} = $value; |
382
|
|
|
|
|
|
|
} |
383
|
633
|
|
|
|
|
1120
|
return $self->{'medline'}; |
384
|
|
|
|
|
|
|
} |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
=head2 pubmed |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
Title : pubmed |
389
|
|
|
|
|
|
|
Usage : $refobj->pubmed($newval) |
390
|
|
|
|
|
|
|
Function: Get/Set the PubMed number, if it is different from the MedLine |
391
|
|
|
|
|
|
|
number. |
392
|
|
|
|
|
|
|
Example : |
393
|
|
|
|
|
|
|
Returns : value of medline |
394
|
|
|
|
|
|
|
Args : newvalue (optional) |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=cut |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
sub pubmed { |
400
|
738
|
|
|
738
|
1
|
1214
|
my ($self,$value) = @_; |
401
|
738
|
100
|
|
|
|
1287
|
if( defined $value) { |
402
|
564
|
|
|
|
|
1072
|
$self->{'pubmed'} = $value; |
403
|
|
|
|
|
|
|
} |
404
|
738
|
|
|
|
|
1149
|
return $self->{'pubmed'}; |
405
|
|
|
|
|
|
|
} |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head2 database |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
Title : database |
410
|
|
|
|
|
|
|
Usage : |
411
|
|
|
|
|
|
|
Function: Overrides DBLink database to be hard coded to 'MEDLINE' (or 'PUBMED' |
412
|
|
|
|
|
|
|
if only pubmed id has been supplied), unless the database has been |
413
|
|
|
|
|
|
|
set explicitly before. |
414
|
|
|
|
|
|
|
Example : |
415
|
|
|
|
|
|
|
Returns : |
416
|
|
|
|
|
|
|
Args : |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=cut |
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
sub database{ |
422
|
1
|
|
|
1
|
1
|
2
|
my ($self, @args) = @_; |
423
|
1
|
|
|
|
|
3
|
my $default = 'MEDLINE'; |
424
|
1
|
50
|
33
|
|
|
2
|
if (! defined $self->medline && defined $self->pubmed) { |
425
|
0
|
|
|
|
|
0
|
$default = 'PUBMED'; |
426
|
|
|
|
|
|
|
} |
427
|
1
|
|
33
|
|
|
7
|
return $self->SUPER::database(@args) || $default; |
428
|
|
|
|
|
|
|
} |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
=head2 primary_id |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
Title : primary_id |
433
|
|
|
|
|
|
|
Usage : |
434
|
|
|
|
|
|
|
Function: Overrides DBLink primary_id to provide medline number, or pubmed |
435
|
|
|
|
|
|
|
number if only that has been defined |
436
|
|
|
|
|
|
|
Example : |
437
|
|
|
|
|
|
|
Returns : |
438
|
|
|
|
|
|
|
Args : |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
=cut |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
sub primary_id{ |
444
|
0
|
|
|
0
|
1
|
0
|
my ($self, @args) = @_; |
445
|
0
|
0
|
|
|
|
0
|
if (@args) { |
446
|
0
|
|
|
|
|
0
|
$self->medline(@args); |
447
|
|
|
|
|
|
|
} |
448
|
0
|
0
|
0
|
|
|
0
|
if (! defined $self->medline && defined $self->pubmed) { |
449
|
0
|
|
|
|
|
0
|
return $self->pubmed; |
450
|
|
|
|
|
|
|
} |
451
|
0
|
|
|
|
|
0
|
return $self->medline; |
452
|
|
|
|
|
|
|
} |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
=head2 optional_id |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
Title : optional_id |
457
|
|
|
|
|
|
|
Usage : |
458
|
|
|
|
|
|
|
Function: Overrides DBLink optional_id to provide the PubMed number. |
459
|
|
|
|
|
|
|
Example : |
460
|
|
|
|
|
|
|
Returns : |
461
|
|
|
|
|
|
|
Args : |
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
=cut |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
sub optional_id{ |
467
|
0
|
|
|
0
|
1
|
0
|
my ($self, @args) = @_; |
468
|
|
|
|
|
|
|
|
469
|
0
|
|
|
|
|
0
|
return $self->pubmed(@args); |
470
|
|
|
|
|
|
|
} |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
=head2 publisher |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
Title : publisher |
475
|
|
|
|
|
|
|
Usage : $self->publisher($newval) |
476
|
|
|
|
|
|
|
Function: Gives the publisher line. No attempt is made to parse the publisher line |
477
|
|
|
|
|
|
|
Example : |
478
|
|
|
|
|
|
|
Returns : value of publisher |
479
|
|
|
|
|
|
|
Args : newvalue (optional) |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
=cut |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
sub publisher { |
485
|
10
|
|
|
10
|
1
|
11
|
my ($self,$value) = @_; |
486
|
10
|
50
|
|
|
|
13
|
if( defined $value) { |
487
|
0
|
|
|
|
|
0
|
$self->{'publisher'} = $value; |
488
|
|
|
|
|
|
|
} |
489
|
10
|
|
|
|
|
11
|
return $self->{'publisher'}; |
490
|
|
|
|
|
|
|
} |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
=head2 editors |
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
Title : editors |
496
|
|
|
|
|
|
|
Usage : $self->editors($newval) |
497
|
|
|
|
|
|
|
Function: Gives the editors line. No attempt is made to parse the editors line |
498
|
|
|
|
|
|
|
Example : |
499
|
|
|
|
|
|
|
Returns : value of editors |
500
|
|
|
|
|
|
|
Args : newvalue (optional) |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
=cut |
504
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
sub editors { |
506
|
12
|
|
|
12
|
1
|
14
|
my ($self,$value) = @_; |
507
|
12
|
50
|
|
|
|
19
|
if( defined $value) { |
508
|
0
|
|
|
|
|
0
|
$self->{'editors'} = $value; |
509
|
|
|
|
|
|
|
} |
510
|
12
|
|
|
|
|
18
|
return $self->{'editors'}; |
511
|
|
|
|
|
|
|
} |
512
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
=head2 encoded_ref |
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
Title : encoded_ref |
517
|
|
|
|
|
|
|
Usage : $self->encoded_ref($newval) |
518
|
|
|
|
|
|
|
Function: Gives the encoded_ref line. No attempt is made to parse the encoded_ref line |
519
|
|
|
|
|
|
|
(this is added for reading PDB records (REFN record), where this contains |
520
|
|
|
|
|
|
|
ISBN/ISSN/ASTM code) |
521
|
|
|
|
|
|
|
Example : |
522
|
|
|
|
|
|
|
Returns : value of encoded_ref |
523
|
|
|
|
|
|
|
Args : newvalue (optional) |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
=cut |
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
sub encoded_ref { |
529
|
12
|
|
|
12
|
1
|
14
|
my ($self,$value) = @_; |
530
|
12
|
100
|
|
|
|
17
|
if( defined $value) { |
531
|
10
|
|
|
|
|
11
|
$self->{'encoded_ref'} = $value; |
532
|
|
|
|
|
|
|
} |
533
|
12
|
|
|
|
|
63
|
return $self->{'encoded_ref'}; |
534
|
|
|
|
|
|
|
} |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
=head2 doi |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
Title : doi |
539
|
|
|
|
|
|
|
Usage : $self->doi($newval) |
540
|
|
|
|
|
|
|
Function: Gives the DOI (Digital Object Identifier) from the International |
541
|
|
|
|
|
|
|
DOI Foundation (http://www.doi.org/), which can be used to resolve |
542
|
|
|
|
|
|
|
URL links for the full-text documents using: |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
http://dx.doi.org/ |
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
Example : |
547
|
|
|
|
|
|
|
Returns : value of doi |
548
|
|
|
|
|
|
|
Args : newvalue (optional) |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
=cut |
551
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
sub doi { |
553
|
35
|
|
|
35
|
1
|
80
|
my ($self,$value) = @_; |
554
|
35
|
100
|
|
|
|
80
|
if( defined $value) { |
555
|
22
|
|
|
|
|
59
|
$self->{'doi'} = $value; |
556
|
|
|
|
|
|
|
} |
557
|
35
|
|
|
|
|
69
|
return $self->{'doi'}; |
558
|
|
|
|
|
|
|
} |
559
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
=head2 consortium |
561
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
Title : consortium |
563
|
|
|
|
|
|
|
Usage : $self->consortium($newval) |
564
|
|
|
|
|
|
|
Function: Gives the consortium line. No attempt is made to parse the consortium line |
565
|
|
|
|
|
|
|
Example : |
566
|
|
|
|
|
|
|
Returns : value of consortium |
567
|
|
|
|
|
|
|
Args : newvalue (optional) |
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
|
570
|
|
|
|
|
|
|
=cut |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
sub consortium{ |
573
|
117
|
|
|
117
|
1
|
242
|
my ($self,$value) = @_; |
574
|
117
|
100
|
|
|
|
257
|
if( defined $value) { |
575
|
61
|
|
|
|
|
131
|
$self->{'consortium'} = $value; |
576
|
|
|
|
|
|
|
} |
577
|
117
|
|
|
|
|
273
|
return $self->{'consortium'}; |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
=head2 gb_reference |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
Title : gb_reference |
583
|
|
|
|
|
|
|
Usage : $obj->gb_reference($newval) |
584
|
|
|
|
|
|
|
Function: Gives the generic GenBank REFERENCE line. This is GenBank-specific. |
585
|
|
|
|
|
|
|
If set, this includes everything on the reference line except |
586
|
|
|
|
|
|
|
the REFERENCE tag and the reference count. This is mainly a |
587
|
|
|
|
|
|
|
fallback for the few instances when REFERENCE lines have unusual |
588
|
|
|
|
|
|
|
additional information such as split sequence locations, feature |
589
|
|
|
|
|
|
|
references, etc. See Bug 2020 in Bugzilla for more information. |
590
|
|
|
|
|
|
|
Example : |
591
|
|
|
|
|
|
|
Returns : value of gb_reference (a scalar) |
592
|
|
|
|
|
|
|
Args : on set, new value (a scalar or undef, optional) |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
=cut |
596
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
sub gb_reference{ |
598
|
73
|
|
|
73
|
1
|
226
|
my ($self,$value) = @_; |
599
|
73
|
50
|
|
|
|
174
|
if( defined $value) { |
600
|
73
|
|
|
|
|
150
|
$self->{'gb_reference'} = $value; |
601
|
|
|
|
|
|
|
} |
602
|
73
|
|
|
|
|
130
|
return $self->{'gb_reference'}; |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
} |
605
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
1; |