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
8048b47b
Commit
8048b47b
authored
Apr 05, 2013
by
Magali Ruffier
Browse files
ENSCORESW-308
: added support for is_obsolete
parent
8d9096bc
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
153 additions
and
103 deletions
+153
-103
modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
+132
-101
modules/Bio/EnsEMBL/OntologyTerm.pm
modules/Bio/EnsEMBL/OntologyTerm.pm
+21
-2
No files found.
modules/Bio/EnsEMBL/DBSQL/OntologyTermAdaptor.pm
View file @
8048b47b
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/OntologyTerm.pm
View file @
8048b47b
...
...
@@ -99,9 +99,9 @@ sub new {
my
$this
=
$proto
->
SUPER::
new
(
@
_
);
my
(
$accession
,
$ontology
,
$namespace
,
$name
,
$definition
,
$is_root
,
$subsets
)
my
(
$accession
,
$ontology
,
$namespace
,
$name
,
$definition
,
$is_root
,
$is_obsolete
,
$subsets
)
=
rearrange
(
[
'
ACCESSION
',
'
ONTOLOGY
',
'
NAMESPACE
',
'
NAME
',
'
DEFINITION
',
'
IS_ROOT
',
'
SUBSETS
'
],
'
DEFINITION
',
'
IS_ROOT
',
'
IS_OBSOLETE
',
'
SUBSETS
'
],
@
_
);
$this
->
{'
accession
'}
=
$accession
;
...
...
@@ -110,6 +110,7 @@ sub new {
$this
->
{'
name
'}
=
$name
;
$this
->
{'
definition
'}
=
$definition
;
$this
->
{'
is_root
'}
=
$is_root
;
$this
->
{'
is_obsolete
'}
=
$is_obsolete
;
$this
->
{'
subsets
'}
=
[
@
{
$subsets
}
];
$this
->
{'
child_terms_fetched
'}
=
0
;
...
...
@@ -220,6 +221,24 @@ sub is_root {
return
$this
->
{'
is_root
'};
}
=head2 is_obsolete
Arg : None
Description : Returns true if the term is obsolete
Example : my $is_obsolete = $term->is_obsolete();
Return type : Boolean (TRUE if it is obsolete, else FALSE)
=cut
sub
is_obsolete
{
my
(
$this
)
=
@_
;
return
$this
->
{'
is_obsolete
'};
}
=head2 synonyms
...
...
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