OBO::CCO::CCO_ID_Term_Map - A map between CCO IDs and term names.
use OBO::CCO::CCO_ID_Term_Map;
$cco_id_set = CCO_ID_Term_Map -> new;
$cco_id_set->file("ontology.ids");
$file = $cco_id_set -> file;
$size = $cco_id_set -> size;
$cco_id_set->file("CCO");
if ($cco_id_set->add("CCO:C1234567")) { ... }
$new_id = $cco_id_set->get_new_id("CCO", "C");
The OBO::CCO::CCO_ID_Term_Map class implements a map for storing CCO IDs and their corresponding names.
Erick Antezana, <erant@psb.ugent.be>
Copyright (C) 2006, 2007, 2008 by Erick Antezana
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.
Usage - $map->put("CCO:P0000056", "cell cycle") Returns - none Args - CCO 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_cco_id()
Usage - $map->get_new_cco_id("CCO", "P", "cell cycle") Returns - a new CCO ID (string) Args - idspace (string), subnamespace (string), term (string) Function - get a new CCO ID and insert it (put) into this map
Usage - $map->get_cco_id_by_term($term_name) Returns - the CCO id associated to the given term name Args - a term name (string) Function - the term associated to the given term
Usage - $map->get_term_by_cco_id($cco_id) Returns - the term name (string) associated to the given CCO id Args - a CCO id (string) Function - the term name associated to the given CCO id
Usage - $map->keys_set() Returns - the keys (or CCO ids) Args - none Function - the keys (or CCO 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 CCO 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->size() Returns - the size of this map Args - none Function - the size of this map
Usage - $map->file() Returns - the size of this map Args - none Function - the size 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('CCO:B0000001') Returns - the value corresponding to the given key that will be eventually removed Args - the key (CCO ID as string) of the entry to be removed (string) Function - removes one entry from the map
To install OBO::Core::Def, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OBO::Core::Def
CPAN shell
perl -MCPAN -e shell install OBO::Core::Def
For more information on module installation, please visit the detailed CPAN module installation guide.