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
754a708d
Commit
754a708d
authored
19 years ago
by
Glenn Proctor
Browse files
Options
Downloads
Patches
Plain Diff
Added db_display_name
parent
f7e7bd6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/DBEntry.pm
+26
-3
26 additions, 3 deletions
modules/Bio/EnsEMBL/DBEntry.pm
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
+8
-6
8 additions, 6 deletions
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
with
34 additions
and
9 deletions
modules/Bio/EnsEMBL/DBEntry.pm
+
26
−
3
View file @
754a708d
...
...
@@ -82,7 +82,8 @@ sub new_fast {
-description => $description,
-primary_id_linkable =>$primary_id_linkable,
-display_id_linkable =>$display_id_linkable,
-priority => $priority);
-priority => $priority,
-db_display_name => $db_display_name );
Description: Creates a new DBEntry object
Returntype : Bio::EnsEMBL::DBEntry
Exceptions : none
...
...
@@ -97,10 +98,11 @@ sub new {
my
(
$adaptor
,
$dbID
,
$primary_id
,
$version
,
$dbname
,
$release
,
$display_id
,
$description
,
$primary_id_linkable
,
$display_id_linkable
,
$priority
)
=
$primary_id_linkable
,
$display_id_linkable
,
$priority
,
$db_display_name
)
=
rearrange
(
['
ADAPTOR
','
DBID
','
PRIMARY_ID
','
VERSION
',
'
DBNAME
','
RELEASE
','
DISPLAY_ID
','
DESCRIPTION
',
'
PRIMARY_ID_LINKABLE
','
DISPLAY_ID_LINKABLE
','
PRIORITY
'],
@args
);
'
PRIMARY_ID_LINKABLE
','
DISPLAY_ID_LINKABLE
','
PRIORITY
',
'
DB_DISPLAY_NAME
'],
@args
);
$self
->
{'
adaptor
'}
=
$adaptor
;
$self
->
{'
dbID
'}
=
$dbID
;
...
...
@@ -115,6 +117,7 @@ sub new {
if
(
defined
$primary_id_linkable
)
{
$self
->
primary_id_linkable
(
$primary_id_linkable
)
}
if
(
defined
$display_id_linkable
)
{
$self
->
display_id_linkable
(
$display_id_linkable
)
}
if
(
defined
$priority
)
{
$self
->
priority
(
$priority
)
}
if
(
defined
$db_display_name
)
{
$self
->
db_display_name
(
$db_display_name
)
}
$self
->
{
synonyms
}
=
[]
;;
return
$self
;
...
...
@@ -347,6 +350,26 @@ sub priority {
return
$self
->
{
priority
};
}
=head2 db_display_name
Arg [1] : String $db_display_name
Example : none
Db_display_name: get/set for attribute db_display_name
Returntype : string
Exceptions : none
Caller : general
=cut
sub
db_display_name
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
$arg
)
{
$self
->
{
db_display_name
}
=
$arg
;
}
return
$self
->
{
db_display_name
};
}
=head2 add_synonym
Arg 1 : string $synonym
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
+
8
−
6
View file @
754a708d
...
...
@@ -65,7 +65,7 @@ sub fetch_by_dbID {
"
SELECT xref.xref_id, xref.dbprimary_acc, xref.display_label,
xref.version, xref.description,
exDB.dbprimary_acc_linkable, exDB.display_label_linkable, exDB.priority,
exDB.db_name, exDB.release, es.synonym
exDB.db_name,
exDB.db_display_name,
exDB.release, es.synonym
FROM xref, external_db exDB
LEFT JOIN external_synonym es on es.xref_id = xref.xref_id
WHERE xref.xref_id = ?
...
...
@@ -78,7 +78,7 @@ sub fetch_by_dbID {
while
(
my
$arrayref
=
$sth
->
fetchrow_arrayref
()){
my
(
$refID
,
$dbprimaryId
,
$displayid
,
$version
,
$desc
,
$primary_id_linkable
,
$display_id_linkable
,
$priority
,
$dbname
,
$release
,
$synonym
)
=
@$arrayref
;
$dbname
,
$db_display_name
,
$release
,
$synonym
)
=
@$arrayref
;
if
(
!
$exDB
)
{
$exDB
=
Bio::EnsEMBL::
DBEntry
->
new
...
...
@@ -91,7 +91,8 @@ sub fetch_by_dbID {
-
dbname
=>
$dbname
,
-
primary_id_linkable
=>
$primary_id_linkable
,
-
display_id_linkable
=>
$display_id_linkable
,
-
priority
=>
$priority
);
-
priority
=>
$priority
,
-
db_display_name
=>
$db_display_name
);
$exDB
->
description
(
$desc
)
if
(
$desc
);
}
...
...
@@ -132,7 +133,7 @@ sub fetch_by_db_accession {
"
SELECT xref.xref_id, xref.dbprimary_acc, xref.display_label,
xref.version, xref.description,
exDB.dbprimary_acc_linkable, exDB.display_label_linkable, exDB.priority,
exDB.db_name, exDB.release, es.synonym
exDB.db_name,
exDB.db_display_name,
exDB.release, es.synonym
FROM xref, external_db exDB
LEFT JOIN external_synonym es on es.xref_id = xref.xref_id
WHERE xref.dbprimary_acc = ?
...
...
@@ -158,7 +159,7 @@ sub fetch_by_db_accession {
my
$exDB
;
while
(
my
$arrayref
=
$sth
->
fetchrow_arrayref
()){
my
(
$dbID
,
$dbprimaryId
,
$displayid
,
$version
,
$desc
,
$dbname
,
my
(
$dbID
,
$dbprimaryId
,
$displayid
,
$version
,
$desc
,
$dbname
,
$db_display_name
,
$primary_id_linkable
,
$display_id_linkable
,
$priority
,
$release
,
$synonym
)
=
@$arrayref
;
...
...
@@ -173,7 +174,8 @@ sub fetch_by_db_accession {
-
dbname
=>
$dbname
,
-
primary_id_linkable
=>
$primary_id_linkable
,
-
display_id_linkable
=>
$display_id_linkable
,
-
priority
=>
$priority
);
-
priority
=>
$priority
,
-
db_display_name
=>
$db_display_name
);
$exDB
->
description
(
$desc
)
if
(
$desc
);
}
...
...
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