NAME
Bio::Ontology::Term - implementation of the interface for ontology terms
SYNOPSIS
#get Bio::Ontology::TermI somehow.
print $term->identifier(), "\n";print $term->name(), "\n";print $term->definition(), "\n";print $term->is_obsolete(), "\n";print $term->comment(), "\n";foreach my $synonym ( $term->each_synonym() ) {print $synonym, "\n";}
DESCRIPTION
This is a simple implementation for ontology terms providing basic methods (it provides no functionality related to graphs). It implements the Bio::Ontology::TermI interface.
This class also implements Bio::IdentifiableI and Bio::DescribableI.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR
Christian M. Zmasek
Email: czmasek-at-burnham.org or [email protected]
WWW: http://monochrome-effect.net/
Address:
Genomics Institute of the Novartis Research Foundation10675 John Jay Hopkins DriveSan Diego, CA 92121
APPENDIX
The rest of the documentation details each of the object methods.
new
Title : newUsage : $term = Bio::Ontology::Term->new(-identifier => "16847",-name => "1-aminocyclopropane-1-carboxylate synthase",-definition => "Catalysis of ...",-is_obsolete => 0,-comment => "" );Function: Creates a new Bio::Ontology::Term.Returns : A new Bio::Ontology::Term object.Args : -identifier => the identifier of this term [scalar]-name => the name of this term [scalar]-definition => the definition of this term [scalar]-ontology => the ontology this term lives in(a Bio::Ontology::OntologyI object)-version => version information [scalar]-is_obsolete => the obsoleteness of this term [0 or 1]-comment => a comment [scalar]-dblinks => Bio::Annotation::DBLink objects[reference to array]-references => Bio::Annotation::Reference objects[reference to array]
See Bio::Ontology::OntologyI, Bio::Annotation::Reference, Bio::Annotation::DBLink.
identifier
Title : identifierUsage : $term->identifier( "GO:0003947" );orprint $term->identifier();Function: Set/get for the identifier of this Term.Returns : The identifier [scalar].Args : The identifier [scalar] (optional).
name
Title : nameUsage : $term->name( "N-acetylgalactosaminyltransferase" );orprint $term->name();Function: Set/get for the name of this Term.Returns : The name [scalar].Args : The name [scalar] (optional).
definition
Title : definitionUsage : $term->definition( "Catalysis of ..." );orprint $term->definition();Function: Set/get for the definition of this Term.Returns : The definition [scalar].Args : The definition [scalar] (optional).
ontology
Title : ontologyUsage : $ont = $term->ontology();or$term->ontology( $ont );Function: Get the ontology this term is in.Note that with the ontology in hand you can query for allrelated terms etc.Returns : The ontology of this Term as a Bio::Ontology::OntologyIimplementing object.Args : On set, the ontology of this Term as a Bio::Ontology::OntologyIimplementing object or a string representing its name.
See Bio::Ontology::OntologyI.
version
Title : versionUsage : $term->version( "1.00" );orprint $term->version();Function: Set/get for version information.Returns : The version [scalar].Args : The version [scalar] (optional).
is_obsolete
Title : is_obsoleteUsage : $term->is_obsolete( 1 );orif ( $term->is_obsolete() )Function: Set/get for the obsoleteness of this Term.Returns : the obsoleteness [0 or 1].Args : the obsoleteness [0 or 1] (optional).
comment
Title : commentUsage : $term->comment( "Consider the term ..." );orprint $term->comment();Function: Set/get for an arbitrary comment about this Term.Returns : A comment.Args : A comment (optional).
get_synonyms
Title : get_synonymsUsage : @aliases = $term->get_synonyms;Function: Returns a list of aliases of this Term.Returns : A list of aliases [array of [scalar]].Args :
add_synonym
Title : add_synonymUsage : $term->add_synonym( @asynonyms );or$term->add_synonym( $synonym );Function: Pushes one or more synonyms into the list of synonyms.Returns :Args : One synonym [scalar] or a list of synonyms [array of [scalar]].
remove_synonyms
Title : remove_synonyms()Usage : $term->remove_synonyms();Function: Deletes (and returns) the synonyms of this Term.Returns : A list of synonyms [array of [scalar]].Args :
get_dblinks
Title : get_dblinks()Usage : @ds = $term->get_dblinks();Function: Returns a list of each dblinks of this GO term.Returns : A list of dblinks [array of [scalars]].Args : A scalar indicating the context (optional).If omitted, all dblinks will be returned.Note : deprecated method due to past use of mixed data types; useget_dbxrefs() instead, which handles both strings and DBLinkinstances
get_dbxrefs
Title : get_dbxrefs()Usage : @ds = $term->get_dbxrefs();Function: Returns a list of each link for this term.If an implementor of this interface permits modification ofthis array property, the class should define at leastmethods add_dbxref() and remove_dbxrefs(), with obviousfunctionality.Returns : A list of L<Bio::Annotation::DBLink> instancesArgs : [optional] string which specifies context (default : returns all dbxrefs)
get_dblink_context
Title : get_dblink_contextUsage : @context = $term->get_dblink_context;Function: Return all context existing in TermReturns : a list of scalarArgs : [none]Note : deprecated method due to past use of mixed data types; useget_dbxref_context() instead
get_dbxref_context
Title : get_dbxref_contextUsage : @context = $term->get_dbxref_context;Function: Return all context strings existing in TermReturns : a list of scalarsArgs : [none]
add_dblink
Title : add_dblinkUsage : $term->add_dblink( @dbls );or$term->add_dblink( $dbl );Function: Pushes one or more dblinks onto the list of dblinks.Returns :Args : One or more L<Bio::Annotation::DBLink> instancesNote : deprecated method due to past use of mixed data types; useadd_dbxref() instead, which handles both strings andDBLink instances
add_dbxref
Title : add_dbxrefUsage : $term->add_dbxref( @dbls );or$term->add_dbxref( $dbl );Function: Pushes one or more dblinks onto the list of dblinks.Returns :Args : -dbxrefs : array ref of Bio::Annotation::DBLink instances-context : string designating the context for the DBLink(default : '_default' - contextless)
has_dblink
Title : has_dblinkUsage : $term->has_dblink($dblink);Function: Checks if a DBXref is already existing in the OBOterm objectReturn : TRUE/FALSEArgs : [arg1] A DBxref identifierNote : deprecated method due to past use of mixed data types; usehas_dbxref() instead, which handles both strings andDBLink instances
has_dbxref
Title : has_dbxrefUsage : $term->has_dbxref($dbxref);Function: Checks if a dbxref string is already existing in the OBOterm objectReturn : TRUE/FALSEArgs : [arg1] A DBxref identifier (string).Bio::Annotation::DBLink::display_text() is used for comparisonagainst the string.
add_dblink_context
Title : add_dblink_contextUsage : $term->add_dblink_context($db, $context);Function: add a dblink with its contextReturn : [none]Args : [arg1] a Bio::Annotation::DBLink instance[arg2] a string for context; if omitted, thedefault/context-less one will be used.Note : deprecated method due to past use of mixed data types; useadd_dbxref() instead
remove_dblinks
Title : remove_dblinks()Usage : $term->remove_dblinks();Function: Deletes (and returns) the definition references of this GO term.Returns : A list of definition references [array of [scalars]].Args : Context. If omitted or equal to 'all', all dblinkswill be removed.Note : deprecated method due to past use of mixed data types; useremove_dblinks() instead, which handles both strings andDBLink instances
remove_dbxrefs
Title : remove_dbxrefs()Usage : $term->remove_dbxrefs();Function: Deletes (and returns) the definition references of this GO term.Returns : A list of definition references [array of [scalars]].Args : Context. If omitted or equal to 'all', all dblinkswill be removed.
get_references
Title : get_referencesUsage : @references = $self->get_referencesFuctnion: Returns a list of referencesReturn : A list of objectsArgs : [none]
add_reference
Title : add_referenceUsage : $self->add_reference($reference);$self->add_reference($reference1, $reference2);Fuctnion: Add one or more referencesReturns : [none]
remove_references
Title : remove_referencesUsage : $self->remove_references;Function: Deletes (and returns) all referencesReturns : A list of referencesArgs : [none]
get_secondary_ids
Title : get_secondary_idsUsage : @ids = $term->get_secondary_ids();Function: Returns a list of secondary identifiers of this Term.Secondary identifiers mostly originate from merging terms,or possibly also from splitting terms.Returns : A list of secondary identifiers [array of [scalar]]Args :
add_secondary_id
Title : add_secondary_idUsage : $term->add_secondary_id( @ids );or$term->add_secondary_id( $id );Function: Adds one or more secondary identifiers to this term.Returns :Args : One or more secondary identifiers [scalars]
remove_secondary_ids
Title : remove_secondary_idsUsage : $term->remove_secondary_ids();Function: Deletes (and returns) the secondary identifiers of this Term.Returns : The previous list of secondary identifiers [array of [scalars]]Args :
Methods implementing Bio::IdentifiableI and Bio::DescribableI
object_id
Title : object_idUsage : $string = $obj->object_id()Function: a string which represents the stable primary identifierin this namespace of this object.This is a synonym for identifier().Returns : A scalar
authority
Title : authorityUsage : $authority = $obj->authority()Function: a string which represents the organisation whichgranted the namespace, written as the DNS name fororganisation (eg, wormbase.org)This forwards to ontology()->authority(). Note that youcannot set the authority before having set the ontology orthe namespace (which will set the ontology).Returns : A scalarArgs : on set, the new value (a scalar)
namespace
Title : namespaceUsage : $string = $obj->namespace()Function: A string representing the name space this identifieris valid in, often the database name or the namedescribing the collection.This forwards to ontology() (set mode) andontology()->name() (get mode). I.e., setting the namespacewill set the ontology to one matching that name in theontology store, or to one newly created.Returns : A scalarArgs : on set, the new value (a scalar)
display_name
Title : display_nameUsage : $string = $obj->display_name()Function: A string which is what should be displayed to the user.The definition in Bio::DescribableI states that thestring should not contain spaces. As this is not verysensible for ontology terms, we relax this here. Theimplementation just forwards to name().Returns : A scalarArgs : on set, the new value (a scalar)
description
Title : descriptionUsage : $string = $obj->description()Function: A text string suitable for displaying to the user adescription. This string is likely to have spaces, butshould not have any newlines or formatting - just plaintext.This forwards to definition(). The caveat is that the textwill often be longer for ontology term definitions than the255 characters stated in the definition inBio::DescribableI.Returns : A scalarArgs : on set, the new value (a scalar)
Deprecated methods
Used for looking up the methods that supersedes them.