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
c22ce5a2
Commit
c22ce5a2
authored
12 years ago
by
Magali Ruffier
Browse files
Options
Downloads
Patches
Plain Diff
can now deal with pre databases
parent
a67070bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/production_database/scripts/populate_analysis_description.pl
+30
-17
30 additions, 17 deletions
...duction_database/scripts/populate_analysis_description.pl
with
30 additions
and
17 deletions
misc-scripts/production_database/scripts/populate_analysis_description.pl
+
30
−
17
View file @
c22ce5a2
...
...
@@ -172,6 +172,29 @@ my %data;
$data
{
$full_db_name
}{
$logic_name
}
=
{
%
{
\
%hash
}
};
}
if
(
$dbtype
eq
'
pre
')
{
my
$sth
=
$dbh
->
prepare
(
'
SELECT db_name, logic_name,
'
.
'
description, display_label, displayable, data
'
.
'
FROM analysis_description ad, species s, analysis_web_data aw
'
.
'
LEFT JOIN web_data wd
'
.
'
ON wd.web_data_id = aw.web_data_id
'
.
'
WHERE ad.analysis_description_id = aw.analysis_description_id AND
'
.
'
aw.species_id = s.species_id AND
'
.
'
aw.db_type = "
'
.
$dbtype
.
'
" AND
'
.
'
db_name =?
'
);
$sth
->
execute
(
$species
)
;
my
(
$db_name
,
$logic_name
,
%hash
)
;
$sth
->
bind_columns
(
\
(
$db_name
,
$logic_name
,
$hash
{'
description
'},
$hash
{'
display_label
'},
$hash
{'
displayable
'},
$hash
{'
web_data
'}
)
);
while
(
$sth
->
fetch
()
)
{
$data
{
$db_name
}{
$logic_name
}
=
{
%
{
\
%hash
}
};
}
}
$dbh
->
disconnect
();
}
...
...
@@ -198,24 +221,14 @@ my %data;
if
(
defined
(
$dbpattern
)
&&
$dbname
!~
/$dbpattern/
)
{
next
}
my
$dbdata
=
$data
{
$dbname
};
if
(
defined
$species
)
{
$dbdata
=
$data
{
$species
};
}
if
(
!
defined
(
$dbdata
)
)
{
if
(
defined
(
$species
)
&&
defined
(
$dbtype
)
)
{
my
@keys
=
grep
(
/^${species}_${dbtype}_/
,
keys
(
%data
)
);
if
(
@keys
>
1
)
{
printf
(
"
ERROR: Found more than one possible data entry
"
.
"
for species '%s', database type '%s':
\n
",
$species
,
$dbtype
);
printf
(
"
ERROR: %s
\n
",
join
(
'
,
',
@keys
)
);
next
;
}
$dbdata
=
$data
{
$keys
[
0
]
};
}
else
{
printf
(
"
ERROR: Can not find data for database '%s'
"
.
"
(skipping it)!
\n
",
$dbname
);
next
;
}
printf
(
"
ERROR: Can not find data for database '%s'
"
.
"
(skipping it)!
\n
",
$dbname
);
next
;
}
print
(
'
=
'
x
80
,
"
\n
"
);
...
...
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