The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IDServerAPI

DESCRIPTION

The KBase ID provides access to the mappings between KBase identifiers and external identifiers, the original identifiers for data that was migrated from other databases into the KBase.

METHODS

kbase_ids_to_external_ids

  $return = $obj->kbase_ids_to_external_ids($ids)
Parameter and return types
$ids is a reference to a list where each element is a kbase_id
$return is a reference to a hash where the key is a kbase_id and the value is a reference to a list containing 2 items:
	0: an external_db
	1: an external_id
kbase_id is a string
external_db is a string
external_id is a string

Description

Given a set of KBase identifiers, look up the associated external identifiers. If no external ID is associated with the KBase id, no entry will be present in the return.

external_ids_to_kbase_ids

  $return = $obj->external_ids_to_kbase_ids($external_db, $ext_ids)
Parameter and return types
$external_db is an external_db
$ext_ids is a reference to a list where each element is an external_id
$return is a reference to a hash where the key is an external_id and the value is a kbase_id
external_db is a string
external_id is a string
kbase_id is a string

Description

Given a set of external identifiers, look up the associated KBase identifiers. If no KBase ID is associated with the external id, no entry will be present in the return.

register_ids

  $return = $obj->register_ids($prefix, $db_name, $ids)
Parameter and return types
$prefix is a kbase_id_prefix
$db_name is an external_db
$ids is a reference to a list where each element is an external_id
$return is a reference to a hash where the key is an external_id and the value is a kbase_id
kbase_id_prefix is a string
external_db is a string
external_id is a string
kbase_id is a string

Description

Register a set of identifiers. All will be assigned identifiers with the given prefix.

If an external ID has already been registered, the existing registration will be returned instead of a new ID being allocated.

allocate_id_range

  $starting_value = $obj->allocate_id_range($kbase_id_prefix, $count)
Parameter and return types
$kbase_id_prefix is a kbase_id_prefix
$count is an int
$starting_value is an int
kbase_id_prefix is a string

Description

Allocate a set of identifiers. This allows efficient registration of a large number of identifiers (e.g. several thousand features in a genome).

The return is the first identifier allocated.

register_allocated_ids

  $obj->register_allocated_ids($prefix, $db_name, $assignments)
Parameter and return types
$prefix is a kbase_id_prefix
$db_name is an external_db
$assignments is a reference to a hash where the key is an external_id and the value is an int
kbase_id_prefix is a string
external_db is a string
external_id is a string

Description

Register the mappings for a set of external identifiers. The KBase identifiers used here were previously allocated using allocate_id_range.

Does not return a value.

TYPES

kbase_id

Description

A KBase ID is string starting with the characters "kb|".

KBase IDs are typed. The types are designated using a short string. For instance, "g" denotes a genome, "fp" denotes a feature representing a protein-encoding gene, etc.

KBase IDs may be hierarchical. If a KBase genome identifier is "kb|g.1234", a protein within that genome may be represented as "kb|g.1234.fp.771".

Definition
a string

external_db

Description

Each external database is represented using a short string. Microbes Online is "MOL", the SEED is "SEED", etc.

Definition
a string

external_id

Description

External database identifiers are strings. They are the precise identifier used by that database. It is important to note that if a database uses the same identifier space for more than one data type (for instance, if integers are used for identifying both genomes and genes, and if the same number is valid for both a genome and a gene) then the distinction must be made by using separate exgternal database strings for the different types; e.g. DBNAME-GENE and DBNAME-GENOME for a database DBNAME that has overlapping namespace for genes and genomes).

Definition
a string

kbase_id_prefix

Description

A KBase identifier prefix. This is a string that starts with "kb|" and includes either a single type designator (e.g. "kb|g") or is a prefix for a hierarchical identifier (e.g. "kb|g.1234.fp").

Definition
a string