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
5c42e464
Commit
5c42e464
authored
20 years ago
by
Arne Stabenau
Browse files
Options
Downloads
Patches
Plain Diff
aded attributes description and display_label
parent
5ef007e4
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/Analysis.pm
+51
-3
51 additions, 3 deletions
modules/Bio/EnsEMBL/Analysis.pm
modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm
+37
-15
37 additions, 15 deletions
modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm
with
88 additions
and
18 deletions
modules/Bio/EnsEMBL/Analysis.pm
+
51
−
3
View file @
5c42e464
...
...
@@ -31,7 +31,9 @@ Bio::EnsEMBL::Analysis.pm - Stores details of an analysis run
-module => $module,
-module_version => $module_version,
-parameters => $parameters,
-created => $created
-created => $created,
-desccription => 'some warm words about this analysis'
-display_label => 'UNIprot alignment'
);
=head1 DESCRIPTION
...
...
@@ -91,7 +93,7 @@ sub new {
my
(
$id
,
$adaptor
,
$db
,
$db_version
,
$db_file
,
$program
,
$program_version
,
$program_file
,
$gff_source
,
$gff_feature
,
$module
,
$module_version
,
$parameters
,
$created
,
$logic_name
)
=
$parameters
,
$created
,
$logic_name
,
$description
,
$display_label
)
=
rearrange
([
qw(ID
ADAPTOR
...
...
@@ -108,6 +110,8 @@ sub new {
PARAMETERS
CREATED
LOGIC_NAME
DESCRIPTION
DISPLAY_LABEL
)
],
@args
);
$self
->
dbID
(
$id
);
...
...
@@ -125,7 +129,8 @@ sub new {
$self
->
parameters
(
$parameters
);
$self
->
created
(
$created
);
$self
->
logic_name
(
$logic_name
);
$self
->
description
(
$description
);
$self
->
display_label
(
$display_label
);
return
$self
;
# success - we hope!
}
...
...
@@ -437,6 +442,49 @@ sub has_database{
}
=head2 description
Arg [1] : string $description
Example : none
Description: get/set for attribute description
Returntype : string
Exceptions : none
Caller : general
=cut
sub
description
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
(
$arg
))
{
$self
->
{
_description
}
=
$arg
;
}
return
$self
->
{
_description
};
}
=head2 display_label
Arg [1] : string $display_label
Example : none
Description: get/set for attribute display_label
Returntype : string
Exceptions : none
Caller : general
=cut
sub
display_label
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
(
$arg
))
{
$self
->
{
_display_label
}
=
$arg
;
}
return
$self
->
{
_display_label
};
}
=head2 compare
Arg 1 : Bio::EnsEMBL::Analysis $ana
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm
+
37
−
15
View file @
5c42e464
...
...
@@ -96,13 +96,15 @@ sub fetch_all {
$self
->
{
_logic_name_cache
}
=
{};
my
$sth
=
$self
->
prepare
(
q {
SELECT
analysis_id
,
logic_name
,
SELECT
analysis
.
analysis_id
,
logic_name
,
program
,
program_version
,
program_file
,
db
,
db_version
,
db_file
,
module
,
module_version
,
gff_source
,
gff_feature
,
created
,
parameters
FROM
analysis
}
);
created
,
parameters
,
description
,
display_label
FROM
analysis
LEFT
JOIN
analysis_description
ON
analysis
.
analysis_id
=
analysis_description
.
analysis_id
}
);
$sth
->
execute
;
while
(
$rowHashRef
=
$sth
->
fetchrow_hashref
)
{
...
...
@@ -209,14 +211,16 @@ sub fetch_by_dbID {
}
my
$query
=
q{
SELECT analysis_id, logic_name,
SELECT
analysis.
analysis_id, logic_name,
program, program_version, program_file,
db, db_version, db_file,
module, module_version,
gff_source, gff_feature,
created, parameters
created, parameters
, description, display_label
FROM analysis
WHERE analysis_id = ? }
;
LEFT JOIN analysis_description
ON analysis.analysis_id = analysis_description.analysis_id
WHERE analysis.analysis_id = ? }
;
my
$sth
=
$self
->
prepare
(
$query
);
$sth
->
execute
(
$id
);
...
...
@@ -256,13 +260,15 @@ sub fetch_by_logic_name {
}
my
$sth
=
$self
->
prepare
(
"
SELECT analysis_id, logic_name,
SELECT
analysis.
analysis_id, logic_name,
program, program_version, program_file,
db, db_version, db_file,
module, module_version,
gff_source, gff_feature,
created, parameters
created, parameters
, description, display_label
FROM analysis
LEFT JOIN analysis_description
ON analysis.analysis_id = analysis_description.analysis_id
WHERE logic_name = ?
"
);
$sth
->
execute
(
$logic_name
);
...
...
@@ -339,7 +345,9 @@ sub store {
module = ?,
module_version = ?,
gff_source = ?,
gff_feature = ? }
);
gff_feature = ?
}
);
$rows_inserted
=
$sth
->
execute
(
$analysis
->
created
,
$analysis
->
logic_name
,
...
...
@@ -371,7 +379,8 @@ sub store {
module = ?,
module_version = ?,
gff_source = ?,
gff_feature = ? }
);
gff_feature = ?
}
);
$rows_inserted
=
$sth
->
execute
(
$analysis
->
logic_name
,
...
...
@@ -385,7 +394,7 @@ sub store {
$analysis
->
module
,
$analysis
->
module_version
,
$analysis
->
gff_source
,
$analysis
->
gff_feature
$analysis
->
gff_feature
,
);
}
...
...
@@ -405,11 +414,22 @@ sub store {
$dbID
=
$new_analysis
->
dbID
();
$analysis
->
created
(
$new_analysis
->
created
());
$sth
->
finish
();
}
else
{
$dbID
=
$sth
->
{'
mysql_insertid
'};
$sth
->
finish
();
# store desccription and display_label so they are there
if
(
defined
(
$analysis
->
description
()
)
||
defined
(
$analysis
->
display_label
()
))
{
$sth
=
$self
->
prepare
(
"
INSERT IGNORE INTO TABLE analysis_description
"
.
"
SET analysis_id = ?, display_label = ?,
"
.
"
description = ?
"
);
$sth
->
execute
(
$dbID
,
$analysis
->
display_label
(),
$analysis
->
description
()
);
$sth
->
finish
();
}
}
$sth
->
finish
();
$self
->
{
_cache
}
->
{
$dbID
}
=
$analysis
;
$self
->
{
_logic_name_cache
}{
lc
(
$analysis
->
logic_name
)}
=
$analysis
;
...
...
@@ -450,14 +470,14 @@ sub update {
"
SET created = ?, logic_name = ?, db = ?, db_version = ?, db_file = ?,
"
.
"
program = ?, program_version = ?, program_file = ?,
"
.
"
parameters = ?, module = ?, module_version = ?,
"
.
"
gff_source = ?, gff_feature = ?
"
.
"
gff_source = ?, gff_feature =
?, description =
?
"
.
"
WHERE analysis_id = ?
");
$sth
->
execute
(
$a
->
created
,
$a
->
logic_name
,
$a
->
db
,
$a
->
db_version
,
$a
->
db_file
,
$a
->
program
,
$a
->
program_version
,
$a
->
program_file
,
$a
->
parameters
,
$a
->
module
,
$a
->
module_version
,
$a
->
gff_source
,
$a
->
gff_feature
,
$a
->
gff_source
,
$a
->
gff_feature
,
$a
->
description
,
$a
->
dbID
);
$sth
->
finish
();
...
...
@@ -586,7 +606,9 @@ sub _objFromHashref {
-
module_version
=>
$rowHash
->
{
module_version
},
-
parameters
=>
$rowHash
->
{
parameters
},
-
created
=>
$rowHash
->
{
created
},
-
logic_name
=>
$rowHash
->
{
logic_name
}
-
logic_name
=>
$rowHash
->
{
logic_name
},
-
description
=>
$rowHash
->
{
description
},
-
display_label
=>
$rowHash
->
{
display_label
}
);
return
$analysis
;
...
...
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