id

Usage    - print $relationship_type->id()
Returns  - the relationship type ID
Args     - the relationship type ID
Function - gets/sets an ID

is_anonymous

Usage    - print $relationship_type->is_anonymous() or $relationship_type->is_anonymous("1")
Returns  - either 1 (true) or 0 (false)
Args     - either 1 (true) or 0 (false)
Function - tells whether this relationship type is anonymous or not.

name

Usage    - print $relationship_type->name()
Returns  - the name of the relationship type
Args     - the name of the relationship type
Function - gets/sets the name of the relationship type

alt_id

Usage    - $relationship_type->alt_id() or $relationship_type->alt_id($id1, $id2, $id3, ...)
Returns  - a set (OBO::Util::Set) with the alternate id(s) of this relationship type
Args     - the alternate id(s) (string) of this relationship type
Function - gets/sets the alternate id(s) of this relationship type

def

Usage    - $relationship_type->def() or $relationship_type->def($def)
Returns  - the definition (OBO::Core::Def) of the relationship type
Args     - the definition (OBO::Core::Def) of the relationship type
Function - gets/sets the definition of the relationship type

def_as_string

Usage    - $relationship_type->def_as_string() or $relationship_type->def_as_string("This is a sample", "[APO:ea, PMID:9334324]")
Returns  - the definition (string) of the relationship type
Args     - the definition (string) of the relationship type plus the dbxref list describing the source of this definition
Function - gets/sets the definition of the relationship type
Remark   - make sure that colons (,) are scaped (\,) when necessary

namespace

Usage    - $relationship_type->namespace() or $relationship_type->namespace($ns1, $ns2, $ns3, ...)
Returns  - an array with the namespace to which this relationship type belongs
Args     - the namespacet(s) to which this relationship type belongs
Function - gets/sets the namespace(s) to which this relationship type belongs

comment

Usage    - print $relationship_type->comment()
Returns  - the comment of this relationship type
Args     - the comment of this relationship type
Function - gets/sets the comment of this relationship type

subset

Usage    - $relationship_type->subset() or $relationship_type->subset($ss1, $ss2, $ss3, ...)
Returns  - an array with the subset to which this relationship type belongs
Args     - the subset(s) to which this relationship type belongs
Function - gets/sets the subset(s) to which this relationship type belongs

synonym_set

Usage    - $relationship_type->synonym_set() or $relationship_type->synonym_set($synonym1, $synonym2, $synonym3, ...)
Returns  - an array with the synonym(s) of this relationship type
Args     - the synonym(s) of this relationship type
Function - gets/sets the synonym(s) of this relationship type
Remark1  - if the synonym (text) is already in the set of synonyms of this relationship type, its scope (and their dbxref's) will be updated (provided they have the same synonym type name)
Remark2  - a synonym text identical to the relationship type name is not added to the set of synonyms of this relationship type

synonym_as_string

Usage    - print $relationship_type->synonym_as_string() or $relationship_type->synonym_as_string("this is a synonym text", "[APO:ea]", "EXACT")
Returns  - an array with the synonym(s) of this relationship type
Args     - the synonym text (string), the dbxrefs (string), synonym scope (string) of this relationship type, and optionally the synonym type name (string)
Function - gets/sets the synonym(s) of this relationship type
Remark1  - if the synonym (text) is already in the set of synonyms of this relationship type, its scope (and their dbxref's) will be updated (provided they have the same synonym type name)
Remark2  - a synonym text identical to the relationship type name is not added to the set of synonyms of this relationship type

xref_set

Usage    - $relationship_type->xref_set() or $relationship_type->xref_set($dbxref_set)
Returns  - a Dbxref set with the analogous xref(s) of this relationship type in another vocabulary
Args     - analogous xref(s) (OBO::Util::DbxrefSet) of this relationship type in another vocabulary
Function - gets/sets the analogous xref(s) of this relationship type in another vocabulary

xref_set_as_string

Usage    - $relationship_type->xref_set_as_string() or $relationship_type->xref_set_as_string("[Reactome:20610, EC:2.3.2.12]")
Returns  - the dbxref set with the analogous xref(s) of this relationship type; [] if the set is empty
Args     - the dbxref set with the analogous xref(s) of this relationship type
Function - gets/sets the dbxref set with the analogous xref(s) of this relationship type
Remark   - make sure that colons (,) are scaped (\,) when necessary

domain

Usage    - print $relationship_type->domain() or $relationship_type->domain($id1, $id2, $id3, ...)
Returns  - a set (OBO::Util::Set) with the domain(s) to which this relationship type belongs
Args     - the domain(s) (string) to which this relationship type belongs
Function - gets/sets the domain(s) to which this relationship type belongs

range

Usage    - print $relationship_type->range() or $relationship_type->range($id1, $id2, $id3, ...)
Returns  - a set (OBO::Util::Set) with the range(s) of this relationship type
Args     - the range(s) (string) of this relationship type
Function - gets/sets the range(s) of this relationship type

inverse_of

Usage    - $relationship_type->inverse_of() or $relationship_type->inverse_of($inv_rel)
Returns  - inverse relationship type (OBO::Core::RelationshipType) of this relationship type
Args     - inverse relationship type (OBO::Core::RelationshipType) of this relationship type
Function - gets/sets the inverse relationship type of this relationship type

is_cyclic

Usage    - $relationship_type->is_cyclic()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether the relationship type is cyclic or not.

is_reflexive

Usage    - $relationship_type->is_reflexive()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether the relationship type is reflexive or not.

is_symmetric

Usage    - $relationship_type->is_symmetric()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether the relationship type is symmetric or not.

is_anti_symmetric

Usage    - $relationship_type->is_anti_symmetric()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether the relationship type is anti symmetric or not.

is_transitive

Usage    - $relationship_type->is_transitive()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether the relationship type is transitive or not.

is_metadata_tag

Usage    - $relationship_type->is_metadata_tag()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether this relationship type is a metadata tag or not.

is_class_level

Usage    - $relationship_type->is_class_level()
Returns  - 1 (true) or 0 (false)
Args     - 1 (true) or 0 (false)
Function - tells whether this relationship type is a class-level relation or not.

transitive_over

Usage    - $relationship_type->transitive_over() or $relationship_type->transitive_over($id1, $id2, $id3, ...)
Returns  - a set (OBO::Util::Set) with the relationship type(s) for which this relationship type is(are) transitive over
Args     - the relationship type(s) (string) with which this one is transitive over
Function - gets/sets the set of the relationship type(s) for which this relationship type is(are) transitive over

holds_over_chain

Usage    - $relationship_type->holds_over_chain() or $relationship_type->holds_over_chain($rt1, $rt2)
Returns  - an array of pairs (string) with the relationship type identifiers for which this relationship type holds over a chain
Args     - the relationship type identifiers (string) with which this one holds over a chain
Function - gets/sets the set of the relationship types for which this relationship type holds over a chain

is_functional

Usage    - $relationship_type->is_functional() or $relationship_type->is_functional(1) or $relationship_type->is_functional(0)
Returns  - tells if this relationship type is functional; false by default
Args     - 1 (true) or 0 (false)
Function - gets/sets the value indicating whether this relationship type is functional

is_inverse_functional

Usage    - $relationship_type->is_inverse_functional() or $relationship_type->is_inverse_functional(1) or $relationship_type->is_inverse_functional(0)
Returns  - tells if this relationship type is inverse functional; false by default
Args     - 1 (true) or 0 (false)
Function - gets/sets the value indicating whether this relationship type is inverse functional

intersection_of

Usage    - $relationship_type->intersection_of() or $relationship_type->intersection_of($t1, $t2, $r1, ...)
Returns  - an array with the terms/relations which define this relationship type
Args     - a set (strings) of terms/relations which define this relationship type
Function - gets/sets the set of terms/relatonships defining this relationship type
      

union_of

Usage    - $relationship_type->union_of() or $relationship_type->union_of($t1, $t2, $r1, ...)
Returns  - an array with the terms/relations which define this relationship type
Args     - a set (strings) of terms/relations which define this relationship type
Function - gets/sets the set of terms/relatonships defining this relationship type
      

disjoint_from

Usage    - $relationship_type->disjoint_from() or $relationship_type->disjoint_from($disjoint_term_id1, $disjoint_term_id2, $disjoint_term_id3, ...)
Returns  - the disjoint relationship type id(s) (string(s)) from this one
Args     - the relationship type id(s) (string) that is (are) disjoint from this one
Function - gets/sets the disjoint relationship type(s) from this one

created_by

Usage    - print $relationship_type->created_by() or $relationship_type->created_by("erick_antezana")
Returns  - name (string) of the creator of the relationship type, may be a short username, initials or ID
Args     - name (string) of the creator of the relationship type, may be a short username, initials or ID
Function - gets/sets the name of the creator of the relationship type

creation_date

Usage    - print $relationship_type->creation_date() or $relationship_type->creation_date("2010-04-13T01:32:36Z")
Returns  - date (string) of creation of the relationship type specified in ISO 8601 format
Args     - date (string) of creation of the relationship type specified in ISO 8601 format
Function - gets/sets the date of creation of the relationship type

modified_by

Usage    - print $relationship_type->modified_by() or $relationship_type->modified_by("erick_antezana")
Returns  - name (string) of the modificator of the relationship type, may be a short username, initials or ID
Args     - name (string) of the modificator of the relationship type, may be a short username, initials or ID
Function - gets/sets the name of the modificator of the relationship type

modification_date

Usage    - print $relationship_type->modification_date() or $relationship_type->modification_date("2010-04-13T01:32:36Z")
Returns  - date (string) of modification of the relationship type specified in ISO 8601 format
Args     - date (string) of modification of the relationship type specified in ISO 8601 format
Function - gets/sets the date of modification of the relationship type

is_obsolete

Usage    - print $relationship_type->is_obsolete()
Returns  - either 1 (true) or 0 (false)
Args     - either 1 (true) or 0 (false)
Function - tells whether the relationship type is obsolete or not. 'false' by default.

replaced_by

Usage    - $relationship_type->replaced_by() or $relationship_type->replaced_by($id1, $id2, $id3, ...)
Returns  - a set (OBO::Util::Set) with the id(s) of the replacing relationship type(s)
Args     - the the id(s) of the replacing relationship type(s) (string)
Function - gets/sets the the id(s) of the replacing relationship type(s)

consider

Usage    - $relationship_type->consider() or $relationship_type->consider($id1, $id2, $id3, ...)
Returns  - a set (OBO::Util::Set) with the appropiate substitute(s) for an obsolete relationship type
Args     - the appropiate substitute(s) for an obsolete relationship type (string)
Function - gets/sets the appropiate substitute(s) for this obsolete relationship type

builtin

Usage    - $relationship_type->builtin() or $relationship_type->builtin(1) or $relationship_type->builtin(0)
Returns  - tells if this relationship type is builtin to the OBO format; false by default
Args     - 1 (true) or 0 (false)
Function - gets/sets the value indicating whether this relationship type is builtin to the OBO format

equals

Usage    - print $relationship_type->equals($another_relationship_type)
Returns  - either 1 (true) or 0 (false)
Args     - the relationship type (OBO::Core::RelationshipType) to compare with
Function - tells whether this relationship type is equal to the parameter

NAME

OBO::Core::RelationshipType - A type of relationship type in an ontology.

SYNOPSIS

use OBO::Core::RelationshipType;

use strict;

# three new relationships types

my $r1 = OBO::Core::RelationshipType->new();

my $r2 = OBO::Core::RelationshipType->new();

my $r3 = OBO::Core::RelationshipType->new();

$r1->id("APO:R0000001");

$r2->id("APO:R0000002");

$r3->id("APO:R0000003");

$r1->name("is a");

$r2->name("part of");

$r3->name("participates in");

# rel. type creator + date

$r1->created_by("erick_antezana");

$r1->creation_date("2008-04-13T01:32:36Z ");

# inverse

my $r3_inv = OBO::Core::RelationshipType->new();

$r3_inv->id("APO:R0000004");

$r3_inv->name("has participant");

$r3_inv->inverse_of($r3);

# def as string

$r2->def_as_string("This is a dummy definition", '[APO:vm, APO:ls, APO:ea "Erick Antezana"]');

my @refs_r2 = $r2->def()->dbxref_set()->get_set();

my %r_r2;

foreach my $ref_r2 (@refs_r2) {

$r_r2{$ref_r2->name()} = $ref_r2->name();

}

DESCRIPTION

A type of relationship in the ontology.

AUTHOR

Erick Antezana, <erick.antezana -@- gmail.com>

COPYRIGHT AND LICENSE

Copyright (c) 2006-2015 by Erick Antezana. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.