Usage - print $id->idspace() or $id->idspace($idspace) Returns - the idspace (string) Args - the idspace (string) Function - gets/sets the idspace # TODO this is actually the LocalIDSpace
Usage - print $id->localID() or $id->localID($name) Returns - the localID (string) Args - the localID (string) Function - gets/sets the localID
Usage - print $id->id_as_string() or $id->id_as_string("XO:X0000001") Returns - the id as string (scalar) Args - the id as string Function - gets/sets the id as string
Usage - print $id->equals($id) Returns - 1 (true) or 0 (false) Args - the other ID (OBO::XO::OBO_ID) Function - tells if two IDs are equal
Usage - $id->next_id() Returns - the next ID (OBO::XO::OBO_ID) Args - none Function - returns the next ID, which is new
Usage - $id->previous_id() Returns - the previous ID (OBO::XO::OBO_ID) Args - none Function - returns the previous ID, which is new
OBO::XO::OBO_ID - A module for describing identifiers of any OBO ontology (e.g. XO). Its IDSpace and LocalID are stored.
use OBO::XO::OBO_ID;
$id = OBO_ID->new();
$id->idspace("XO");
$id->localID("0000001");
$idspace = $id->idspace();
$localID = $id->localID();
print $id->id_as_string();
$id->id_as_string("XO:1234567");
The OBO::XO::OBO_ID class implements an identifier for any OBO ontology.
A XO ID holds: IDSPACE, and a LOCALID in the following form:
IDSPACE:LOCALID
For instance: XO:1234567
Identifiers (IDs) in OBO should be strings consisting of an IDSpace concatenated to a LocalID via a : (colon) character. The ID should not contain any whitespace. The IDSpace should not itself contain any colon characters, and should ideally be registered on the GO xrefs page or with OBO.
More info at:
http://www.obofoundry.org/id-policy.shtml
Erick Antezana, <erick.antezana -@- gmail.com>
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.
To install OBO::Util::Set, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OBO::Util::Set
CPAN shell
perl -MCPAN -e shell install OBO::Util::Set
For more information on module installation, please visit the detailed CPAN module installation guide.