Usage - $map->put("GO:0007049", "cell cycle") Returns - the size of map Args - OBO id (string), term name (string) Function - either puts a new entry in the map or modifies an existing entry by changing the term name Remark - prior to adding new entries to the map, use method get_new_id()
Usage - $map->get_new_id('GO', 'cell cycle') Returns - a new OBO ID (string) Args - idspace (string), term (string), seed_id (string) Function - get a new OBO ID and insert it (put) into this map
Usage - $map->get_term_by_id($obo_id) Returns - the term name (string) associated to the given OBO id Args - an OBO id (string) Function - the term name associated to the given OBO id
Usage - $map->get_id_by_term($term_name) Returns - the OBO id associated to the given term name Args - a term name (string) Function - the term associated to the given term
Usage - $map->keys_set() Returns - the keys (or OBO ids) Args - none Function - the keys (or OBO ids)
Usage - $map->values_set() Returns - the values (or terms names) Args - none Function - the keys (or terms names)
Usage - $map->contains_key($k) Returns - 1 (true) or 0 (false) Args - a key or OBO id Function - 1 (true) or 0 (false)
Usage - $map->contains_value($v) Returns - 1 (true) or 0 (false) Args - a value or term Function - 1 (true) or 0 (false)
Usage - $map->equals($other_map) Returns - 1 (true) or 0 (false) Args - another map Function - compares two maps and tells whether they are identical or not
Usage - $map->size() Returns - the size of this map Args - none Function - the size of this map
Usage - $map->file() Returns - the file of this map Args - none Function - the file of this map
Usage - $map->clear() Returns - clears this map Args - none Function - clears this map
Usage - $map->is_empty() Returns - 1 (true) or 0 (false) Args - none Function - tells if this map is empty
Usage - $map->write_map() Returns - none Args - none Function - prints the contents of the map to the file associated to this object
Usage - $map->remove_by_key('OBO:B0000001') Returns - the value corresponding to the given key that will be eventually removed Args - the key (OBO ID as string) of the entry to be removed (string) Function - removes one entry from the map
OBO::XO::OBO_ID_Term_Map - A map between OBO IDs and term names.
use OBO::XO::OBO_ID_Term_Map;
$obo_id_set = OBO_ID_Term_Map->new();
$obo_id_set->file("gene_ontology.ids");
$file = $obo_id_set->file();
$size = $obo_id_set->size();
$obo_id_set->file("OBO");
if ($obo_id_set->add("OBO:0007049")) { ... }
$new_id = $obo_id_set->get_new_id('GO', 'cel cycle');
The OBO::XO::OBO_ID_Term_Map class implements a map for storing OBO IDs and their corresponding names.
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.