Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
23250db7
Commit
23250db7
authored
Jul 27, 2011
by
Dan Staines
Browse files
added method fetch_all_by_Operon and extended support to Operon and OperonTranscript
parent
1f134247
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
+20
-1
No files found.
modules/Bio/EnsEMBL/DBSQL/DBEntryAdaptor.pm
View file @
23250db7
...
...
@@ -161,6 +161,12 @@ sub _get_all_dm_loc_sth {
elsif
(
$ensembl_object
->
isa
("
Bio::EnsEMBL::Translation
")){
$object_type
=
"
Translation
";
}
elsif
(
$ensembl_object
->
isa
("
Bio::EnsEMBL::Operon
")){
$object_type
=
"
Operon
";
}
elsif
(
$ensembl_object
->
isa
("
Bio::EnsEMBL::OperonTranscript
")){
$object_type
=
"
OperonTranscript
";
}
else
{
warn
(
ref
(
$ensembl_object
)
.
"
is not a Gene Transcript or Translation object??
\n
");
return
undef
;
...
...
@@ -532,7 +538,10 @@ sub store {
$ensembl_id
=
$ensID
;
}
elsif
(
ref
(
$ensID
)
eq
'
Bio::EnsEMBL::Gene
'
or
ref
(
$ensID
)
eq
'
Bio::EnsEMBL::Transcript
'
or
ref
(
$ensID
)
eq
'
Bio::EnsEMBL::Translation
'
)
or
ref
(
$ensID
)
eq
'
Bio::EnsEMBL::Translation
'
or
ref
(
$ensID
)
eq
'
Bio::EnsEMBL::OperonTranscript
'
or
ref
(
$ensID
)
eq
'
Bio::EnsEMBL::Operon
'
)
{
warning
(
"
You should pass DBEntryAdaptor->store()
"
.
"
a dbID rather than an ensembl object
"
...
...
@@ -885,6 +894,16 @@ sub fetch_all_by_Gene {
return
$self
->
_fetch_by_object_type
(
$gene
->
dbID
(),
'
Gene
',
$ex_db_reg
,
$exdb_type
);
}
sub
fetch_all_by_Operon
{
my
(
$self
,
$gene
,
$ex_db_reg
,
$exdb_type
)
=
@_
;
if
(
!
ref
(
$gene
)
||
!
$gene
->
isa
('
Bio::EnsEMBL::Operon
'))
{
throw
("
Bio::EnsEMBL::Operon argument expected.
");
}
return
$self
->
_fetch_by_object_type
(
$gene
->
dbID
(),
'
Operon
',
$ex_db_reg
,
$exdb_type
);
}
=head2 fetch_all_by_Transcript
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment