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
639ed3af
Commit
639ed3af
authored
19 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
new merged adaptor needs species and type
parent
18cf32d0
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/DBSQL/MergedAdaptor.pm
+36
-9
36 additions, 9 deletions
modules/Bio/EnsEMBL/DBSQL/MergedAdaptor.pm
with
36 additions
and
9 deletions
modules/Bio/EnsEMBL/DBSQL/MergedAdaptor.pm
+
36
−
9
View file @
639ed3af
...
...
@@ -13,7 +13,7 @@ Bio::EnsEMBL::DBSQL::MergedAdaptor
=head1 SYNOPSIS
$merged_adaptor = new Bio::EnsEMBL::DBSQL::MergedAdaptor();
$merged_adaptor = new Bio::EnsEMBL::DBSQL::MergedAdaptor(
-species => "human", -type => "Population"
);
=head1 DESCRIPTION
...
...
@@ -37,23 +37,49 @@ package Bio::EnsEMBL::DBSQL::MergedAdaptor;
use
vars
qw(@ISA)
;
use
strict
;
use
Bio::EnsEMBL::Utils::
Exception
qw(throw warning deprecate)
;
use
Bio::EnsEMBL::Utils::
Argument
qw(rearrange)
;
use
Bio::EnsEMBL::
Registry
;
my
$reg
=
"
Bio::EnsEMBL::Registry
";
=head2 new
Example : $MergedAdaptor = new Bio::EnsEMBL::DBSQL::MergedAdaptor();
Example : $MergedAdaptor = new
: Bio::EnsEMBL::DBSQL::MergedAdaptor(-species=> 'human', -type =>'Population');
Arg [SPECIES]: (optional) string
species name to get adaptors for
Arg [TYPE] : (optional) string
type to get adaptors for
Description: Creates a new MergedAdaptor
Returntype : Bio::EnsEMBL::DBSQL::MergedAdaptor
Exceptions : none
Caller : Bio::EnsEMBL::Registry
Exceptions : throws if species or type not specified
Caller : general
Status : At Risk
: Under development
=cut
sub
new
{
my
(
$class
)
=
@_
;
my
(
$class
,
@args
)
=
@_
;
my
$self
=
{};
bless
$self
,
$class
;
my
(
$species
,
$type
)
=
rearrange
([
qw(SPECIES TYPE)
],
@args
);
if
(
!
defined
(
$species
)
||
!
defined
(
$type
)){
die
"
Species and Type must be specified
\n
";
}
my
@adaps
=
@
{
$reg
->
get_all_adaptors
(
-
species
=>
$species
,
-
type
=>
$type
)};
my
@list
=
();
push
(
@list
,
@adaps
);
$self
->
{'
list
'}
=
\
@list
;
return
$self
;
}
...
...
@@ -63,6 +89,8 @@ sub new {
Description: adds a list of adaptors to the Merged adaptor list.
Returntype : none
Exceptions : none
Status : At Risk
: Under development
=cut
...
...
@@ -80,6 +108,8 @@ sub add_list{
Description: adds an adaptor to the Merged adaptor list.
Returntype : none
Exceptions : none
Status : At Risk
: Under development
=cut
...
...
@@ -122,10 +152,7 @@ sub AUTOLOAD {
foreach
my
$adaptor
(
@
{
$self
->
{'
list
'}})
{
my
$ref
;
if
(
$adaptor
->
can
(
$sub
)
# and !($adaptor->isa("Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor") ||
# $adaptor->isa("Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor"))
){
if
(
$adaptor
->
can
(
$sub
)){
$ref
=
$adaptor
->
$sub
(
@args
);
my
$type
=
ref
(
$ref
);
if
(
$type
=~
/HASH/
){
...
...
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