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
63e89bd7
Commit
63e89bd7
authored
18 years ago
by
Glenn Proctor
Browse files
Options
Downloads
Patches
Plain Diff
Added accessor for web_data.
parent
2b2f4b18
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
+28
-3
28 additions, 3 deletions
modules/Bio/EnsEMBL/Analysis.pm
modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm
+11
-9
11 additions, 9 deletions
modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm
with
39 additions
and
12 deletions
modules/Bio/EnsEMBL/Analysis.pm
+
28
−
3
View file @
63e89bd7
...
...
@@ -34,7 +34,8 @@ Bio::EnsEMBL::Analysis.pm - Stores details of an analysis run
-created => $created,
-description => 'some warm words about this analysis',
-display_label => 'UNIprot alignment',
-displayable => '1'
-displayable => '1',
-web_data => 'web metadata info'
);
=head1 DESCRIPTION
...
...
@@ -95,8 +96,8 @@ 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
,
$description
,
$display_label
,
$displayable
)
=
$parameters
,
$created
,
$logic_name
,
$description
,
$display_label
,
$displayable
,
$web_data
)
=
rearrange
([
qw(ID
ADAPTOR
...
...
@@ -116,6 +117,7 @@ sub new {
DESCRIPTION
DISPLAY_LABEL
DISPLAYABLE
WEB_DATA
)
],
@args
);
$self
->
dbID
(
$id
);
...
...
@@ -136,6 +138,7 @@ sub new {
$self
->
description
(
$description
);
$self
->
display_label
(
$display_label
);
$self
->
displayable
(
$displayable
);
$self
->
web_data
(
$web_data
);
return
$self
;
# success - we hope!
}
...
...
@@ -529,6 +532,28 @@ sub displayable {
}
=head2 web_data
Arg [1] : string $web_data
Example : none
Description: get/set for attribute web_data
Returntype : string
Exceptions : none
Caller : general
Status : Stable
=cut
sub
web_data
{
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
(
$arg
))
{
$self
->
{
_web_data
}
=
$arg
;
}
return
$self
->
{
_web_data
};
}
=head2 compare
Arg 1 : Bio::EnsEMBL::Analysis $ana
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/AnalysisAdaptor.pm
+
11
−
9
View file @
63e89bd7
...
...
@@ -104,7 +104,7 @@ sub fetch_all {
db
,
db_version
,
db_file
,
module
,
module_version
,
gff_source
,
gff_feature
,
created
,
parameters
,
description
,
display_label
,
displayable
created
,
parameters
,
description
,
display_label
,
displayable
,
web_data
FROM
analysis
LEFT
JOIN
analysis_description
ON
analysis
.
analysis_id
=
analysis_description
.
analysis_id
}
);
...
...
@@ -224,7 +224,7 @@ sub fetch_by_dbID {
db, db_version, db_file,
module, module_version,
gff_source, gff_feature,
created, parameters, description, display_label, displayable
created, parameters, description, display_label, displayable
, web_data
FROM analysis
LEFT JOIN analysis_description
ON analysis.analysis_id = analysis_description.analysis_id
...
...
@@ -275,7 +275,7 @@ sub fetch_by_logic_name {
db, db_version, db_file,
module, module_version,
gff_source, gff_feature,
created, parameters, description, display_label, displayable
created, parameters, description, display_label, displayable
, web_data
FROM analysis
LEFT JOIN analysis_description
ON analysis.analysis_id = analysis_description.analysis_id
...
...
@@ -436,12 +436,13 @@ sub store {
defined
(
$analysis
->
display_label
()
))
{
$sth
=
$self
->
prepare
(
"
INSERT IGNORE INTO analysis_description (analysis_id, display_label, description, displayable) VALUES (?,?,?,?)
");
$sth
=
$self
->
prepare
(
"
INSERT IGNORE INTO analysis_description (analysis_id, display_label, description, displayable
, web_data
) VALUES (?,?,?,
?,
?)
");
$sth
->
bind_param
(
1
,
$dbID
,
SQL_INTEGER
);
$sth
->
bind_param
(
2
,
$analysis
->
display_label
(),
SQL_VARCHAR
);
$sth
->
bind_param
(
3
,
$analysis
->
description
,
SQL_LONGVARCHAR
);
$sth
->
bind_param
(
4
,
$analysis
->
displayable
,
SQL_TINYINT
);
$sth
->
bind_param
(
4
,
$analysis
->
web_data
(),
SQL_LONGVARCHAR
);
$sth
->
execute
();
$sth
->
finish
();
...
...
@@ -521,15 +522,15 @@ sub update {
if
(
$sth
->
fetchrow_hashref
)
{
# update if exists
$sth
=
$self
->
prepare
("
UPDATE analysis_description SET description = ?, display_label = ?, displayable = ? WHERE analysis_id = ?
");
("
UPDATE analysis_description SET description = ?, display_label = ?, displayable =
?, web_data =
? WHERE analysis_id = ?
");
$sth
->
execute
(
$a
->
description
(),
$a
->
display_label
(),
$a
->
displayable
(),
$a
->
dbID
);
$sth
->
execute
(
$a
->
description
(),
$a
->
display_label
(),
$a
->
displayable
(),
$a
->
web_data
(),
$a
->
dbID
);
}
else
{
# create new entry
if
(
$a
->
description
()
||
$a
->
display_label
())
{
$sth
=
$self
->
prepare
(
"
INSERT IGNORE INTO analysis_description (analysis_id, display_label, description, displayable) VALUES (?,?,?,?)
");
$sth
->
execute
(
$a
->
dbID
(),
$a
->
display_label
(),
$a
->
description
(),
$a
->
displayable
()
);
$sth
=
$self
->
prepare
(
"
INSERT IGNORE INTO analysis_description (analysis_id, display_label, description, displayable
, web_data
) VALUES (?,?,?,?
,?
)
");
$sth
->
execute
(
$a
->
dbID
(),
$a
->
display_label
(),
$a
->
description
(),
$a
->
displayable
()
,
$a
->
web_data
()
);
$sth
->
finish
();
}
...
...
@@ -672,7 +673,8 @@ sub _objFromHashref {
-
logic_name
=>
$rowHash
->
{
logic_name
},
-
description
=>
$rowHash
->
{
description
},
-
display_label
=>
$rowHash
->
{
display_label
},
-
displayable
=>
$rowHash
->
{
displayable
}
-
displayable
=>
$rowHash
->
{
displayable
},
-
web_data
=>
$rowHash
->
{
web_data
}
);
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