Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
8bf5bb43
Commit
8bf5bb43
authored
18 years ago
by
Patrick Meidl
Browse files
Options
Downloads
Patches
Plain Diff
better pod
parent
d6673b11
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/DBEntry.pm
+148
-149
148 additions, 149 deletions
modules/Bio/EnsEMBL/DBEntry.pm
with
148 additions
and
149 deletions
modules/Bio/EnsEMBL/DBEntry.pm
+
148
−
149
View file @
8bf5bb43
#
# EnsEMBL module for DBEntry
#
# Cared for by Arne Stabenau <stabenau@ebi.ac.uk>
#
# Copyright EMBL/EBI 2001
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
=pod
package
Bio::EnsEMBL::
DBEntry
;
=head1 NAME
=head1 NAME
Bio::EnsEMBL::DBEntry - Module to collect information about an external reference
Bio::EnsEMBL::DBEntry -
Object representing an external reference (xref)
=head1 SYNOPSIS
=head1 DESCRIPTION
This module stores information about external references to EnsEMBL objects
This object holds information about external references (xrefs) to Ensembl
objects.
=head1
CONTACT
=head1
METHODS
Post questions to the EnsEMBL developer mailing list: <ensembl-dev@ebi.ac.uk>
=head1
METHODS
=head1
LICENCE
=cut
This code is distributed under an Apache style licence. Please see
http://www.ensembl.org/info/about/code_licence.html for details.
=head1 AUTHOR
Arne Stabenau <stabenau@ebi.ac.uk>, Ensembl core API team
package
Bio::EnsEMBL::
DBEntry
;
=head1 CONTACT
use
Bio::EnsEMBL::
Storable
;
use
Bio::Annotation::
DBLink
;
Please post comments/questions to the Ensembl development list
<ensembl-dev@ebi.ac.uk>
use
Bio::EnsEMBL::Utils::
Argument
qw(rearrange)
;
use
Bio::EnsEMBL::Utils::
Exception
qw(deprecate)
;
=cut
use
vars
qw(@ISA $AUTOLOAD)
;
use
strict
;
use
warnings
;
no
warnings
qw(uninitialized)
;
@ISA
=
qw( Bio::EnsEMBL::Storable Bio::Annotation::DBLink )
;
use
Bio::EnsEMBL::
Storable
;
use
Bio::Annotation::
DBLink
;
use
Bio::EnsEMBL::Utils::
Argument
qw(rearrange)
;
use
Bio::EnsEMBL::Utils::
Exception
qw(deprecate)
;
our
@ISA
=
qw(Bio::EnsEMBL::Storable Bio::Annotation::DBLink)
;
=head2 new_fast
Arg [1] : hash reference $hashref
Example : none
Arg [1] : Hashref $hashref - hash reference to bless as new DBEntry object
Description: A very quick constructor that requires internal knowledge of
the class. This is used in speed critical sections of the code
where many objects need to be created quickly.
Returntype : Bio::EnsEMBL::DBEntry
Exceptions : none
Caller :
?
Caller :
general
Status : Stable
=cut
...
...
@@ -64,38 +61,40 @@ use warnings;
sub
new_fast
{
my
$class
=
shift
;
my
$hashref
=
shift
;
bless
$hashref
,
$class
;
$hashref
->
{
synonyms
}
=
[]
;
return
$hashref
;
}
=head2 new
Args [...] : list of named parameters
Example : my $dbentry = new Bio::EnsEMBL::DBEntry(-adaptor => $adaptor,
-primary_id => $pid,
-version => $version,
-dbname => $dbname,
-release => $release,
-display_id => $did,
-description => $description,
-primary_id_linkable =>$primary_id_linkable,
-display_id_linkable =>$display_id_linkable,
-priority => $priority,
-db_display_name => $db_display_name,
-info_type => $info_type,
-info_text => $info_text);
Example : my $dbentry = new Bio::EnsEMBL::DBEntry(
-adaptor => $adaptor,
-primary_id => $pid,
-version => $version,
-dbname => $dbname,
-release => $release,
-display_id => $did,
-description => $description,
-primary_id_linkable =>$primary_id_linkable,
-display_id_linkable =>$display_id_linkable,
-priority => $priority,
-db_display_name => $db_display_name,
-info_type => $info_type,
-info_text => $info_text);
Description: Creates a new DBEntry object
Returntype : Bio::EnsEMBL::DBEntry
Exceptions : none
Caller : Bio::EnsEMBL::DBEntryAdaptor
Status : At Risk
: d
ue to 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY'
:
being under development
: If you don't use any of these the sub
can be considered Stable
D
ue to 'PRIMARY_ID_LINKABLE','DISPLAY_ID_LINKABLE','PRIORITY'
being under development
- if you don't use any of these the
method
can be considered Stable
=cut
...
...
@@ -135,14 +134,13 @@ sub new {
}
=head2 primary_id
Arg [1] :
string $primary_id
Arg [1] :
(optional) String $arg - value to set
Example : none
Description:
g
et/set for attribute primary_id
its this
objects primary id in the external database
Returntype :
s
tring
Description:
G
et
ter
/set
ter
for attribute
'
primary_id
'.
This is the
object
'
s primary id in the external database
.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -154,20 +152,18 @@ sub primary_id {
if
(
defined
$arg
)
{
$self
->
{
primary_id
}
=
$arg
;
}
return
$self
->
{
primary_id
};
}
=head2 display_id
Arg [1] :
string $display_id
Arg [1] :
(optional) String $arg - value to set
Example : none
Description:
g
et/set for attribute display_id
Th
is
objects preferred display
string
. Th
at
can be the same
as primary
id or ensembl
specific.
Returntype :
s
tring
Description:
G
et
ter
/set
ter
for attribute
'
display_id
'.
Th
e
object
'
s preferred display
name
. Th
is
can be the same
as primary
_
id or ensembl
-
specific.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -180,79 +176,80 @@ sub display_id{
$self
->
{
display_id
}
=
$arg
;
}
return
$self
->
{
display_id
};
}
=head2 optional_id
=head2 dbname
Arg [1] : string $dbname
Args : none
Example : none
Description: get/set for attribute dbname
Returntype : string
Description: Additional getter for attribute 'display_id'.
The object's preferred display name.
Only include for BioPerl interface compliance, please use
$self->display_id().
Returntype : String
Exceptions : none
Caller : general
Status : Stable
=cut
sub
dbname
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
$arg
)
{
$self
->
{
dbname
}
=
$arg
;
}
return
$self
->
{
dbname
};
sub
optional_id
{
my
$self
=
shift
;
return
$self
->
display_id
;
}
=head2 dbname
=head2 database
Args : none
Arg [1] : (optional) String $arg - value to set
Example : none
Description:
additional get for th
e dbname
to make it compliant to
some interface
Returntype :
s
tring
Description:
Getter/setter for attribut
e
'
dbname
'.
The name of the external database.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : Stable
=cut
sub
database
{
my
$self
=
shift
;
return
$self
->
dbname
();
sub
dbname
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
$arg
)
{
$self
->
{
dbname
}
=
$arg
;
}
return
$self
->
{
dbname
};
}
=head2 optional_id
=head2 database
Args : none
Example : none
Description: additional get for the display_id to make it compliant to
some interface
Returntype : string
Description: Additional getter for attribute 'dbname'.
The name of the external database.
Only include for BioPerl interface compliance, please use
$self->dbname().
Returntype : String
Exceptions : none
Caller : general
Status : Stable
=cut
sub
optional_id
{
sub
database
{
my
$self
=
shift
;
return
$self
->
d
isplay_id
;
return
$self
->
d
bname
()
;
}
=head2 release
Arg [1] :
string $relea
se
Arg [1] :
(optional) String $arg - value to
se
t
Example : none
Description: get/set for attribute release
Returntype : string
Description: Getter/setter for attribute 'release'.
The external database release name.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -270,10 +267,11 @@ sub release {
=head2 version
Arg [1] :
string $version
Arg [1] :
(optional) String $arg - value to set
Example : none
Description: get/set for attribute version
Returntype : string
Description: Getter/setter for attribute 'version'.
The object's version in the external database.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -289,14 +287,13 @@ sub version {
}
=head2 description
Arg [1] :
string $description
Arg [1] :
(optional) String $arg - value to set
Example : none
Description: get/set for attribute description
Returntype : string
Description: Getter/setter for attribute 'description'.
The object's description.
Returntype : String
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -312,12 +309,33 @@ sub description {
}
=head2 comment
Args : none
Example : none
Description: Additional getter for attribute 'description'.
The object's description.
Only include for BioPerl interface compliance, please use
$self->description().
Returntype : String
Exceptions : none
Caller : general
Status : Stable
=cut
sub
comment
{
my
$self
=
shift
;
return
$self
->
description
();
}
=head2 primary_id_linkable
Arg [1] :
boolean $primary_id_linkable
Arg [1] :
(optional) Boolean $arg - value to set
Example : none
Description:
g
et/set for attribute primary_id_linkable
Returntype :
s
tring
Description:
G
et
ter
/set
ter
for attribute
'
primary_id_linkable
'.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : At Risk
...
...
@@ -333,12 +351,13 @@ sub primary_id_linkable {
return
$self
->
{
primary_id_linkable
};
}
=head2 display_id_linkable
Arg [1] :
boolean $display_id_linkable
Arg [1] :
(optional) Boolean $arg - value to set
Example : none
D
isplay_id_linkable
:
g
et/set for attribute display_id_linkable
Returntype :
s
tring
D
escription
:
G
et
ter
/set
ter
for attribute
'
display_id_linkable
'.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : At Risk
...
...
@@ -359,8 +378,8 @@ sub display_id_linkable {
Arg [1] : int $priority
Example : none
Priority :
g
et/set for attribute priority
Returntype :
s
tring
Priority :
G
et
ter
/set
ter
for attribute
'
priority
'.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : At Risk
...
...
@@ -381,8 +400,10 @@ sub priority {
Arg [1] : String $db_display_name
Example : none
Db_display_name: get/set for attribute db_display_name
Returntype : string; has "Projected " prepended if info_type='PROJECTION'
Description: Getter/setter for attribute 'db_display_name'.
The preferred display name for the external database. Has
"Projected " prepended if info_type='PROJECTION'.
Returntype : String
Exceptions : none
Caller : general
...
...
@@ -409,8 +430,8 @@ sub db_display_name {
Arg [1] : String $info_type
Example : none
Info_type
:
g
et/set for attribute info_type
Returntype :
s
tring
Description
:
G
et
ter
/set
ter
for attribute
'
info_type
'.
Returntype :
S
tring
Exceptions : none
Caller : general
...
...
@@ -429,8 +450,8 @@ sub info_type {
Arg [1] : String $info_text
Example : none
Info_text
:
g
et/set for attribute info_text
Returntype :
s
tring
Description
:
G
et
ter
/set
ter
for attribute
'
info_text
'.
Returntype :
S
tring
Exceptions : none
Caller : general
...
...
@@ -447,10 +468,9 @@ sub info_text {
=head2 add_synonym
Arg
1
:
s
tring $synonym
Arg
[1]
:
S
tring $
arg -
synonym
to add
Example : none
Description: adding a synonynm for the external object under which it is
also known
Description: Add a synonym for the external object.
Returntype : none
Exceptions : none
Caller : general
...
...
@@ -470,9 +490,9 @@ sub add_synonym {
=head2 get_all_synonyms
Args : none
Example : @synonyms = @{$db_entry->get_all_synonyms
()
};
Description:
g
et a list of synonym
added to
this object
Returntype : list
ref
erence
of strings
Example :
my
@synonyms = @{
$db_entry->get_all_synonyms
};
Description:
G
et a list of synonym
s known for
this object
.
Returntype : listref of strings
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -489,7 +509,7 @@ sub get_all_synonyms {
Args : none
Example : none
Description:
r
emove all synonyms from this object
Description:
R
emove all synonyms from this object
.
Returntype : none
Exceptions : none
Caller : general
...
...
@@ -505,10 +525,10 @@ sub flush_synonyms {
=head2 status
Arg [1] :
string $status
Arg [1] :
(optional) String $arg - value to set
Example : none
Description:
g
et/set for attribute status
Returntype :
s
tring
Description:
G
et
ter
/set
ter
for attribute
'
status
'.
Returntype :
S
tring
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -517,33 +537,11 @@ sub flush_synonyms {
sub
status
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
$arg
)
{
$self
->
{
status
}
=
$arg
;
}
return
$self
->
{
status
};
}
=head2 comment
Args : none
Example : none
Description: additional get for description to comply with bioperl
Returntype : string
Exceptions : none
Caller : general
Status : Stable
=cut
#Cheat to comply with bioperl
sub
comment
{
my
(
$self
)
=
@_
;
if
(
$self
)
{
return
$self
->
description
();
}
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
$arg
)
{
$self
->
{
status
}
=
$arg
;
}
return
$self
->
{
status
};
}
...
...
@@ -565,3 +563,4 @@ sub get_synonyms {
}
1
;
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment