View on
MetaCPAN
Joachim Bargsten > Bio-Grid-Run-SGE-0.032 > Bio::Grid::Run::SGE::Role::Indexable

Download:
Bio-Grid-Run-SGE-0.032.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.0101   Source   Latest Release: Bio-Grid-Run-SGE-0.060

NAME ^

Bio::Grid::Run::SGE::Role::Indexable - Basic role for all indices

SYNOPSIS ^

  use Mouse;

  with 'Bio::Grid::Run::SGE::Role::Indexable';

  # you have to implement these methods
  sub num_elem { ... }
  sub create { ... }
  sub get_elem { ... }
  sub type { ... }
  sub close { ... }

DESCRIPTION ^

This role provides (and requires) the basic functionality every index must have.

PROVIDED ATTRIBUTES ^

$idx->writeable

You can open the index in writable or in read only mode.

$idx->idx_file

Every index needs a file to store the index raw data.

$idx->idx

This attribute gives access to the raw index in memory.

$idx->chunk_size

It returns or sets the chunk size. The chunk size determins the number of atomic elements glued together in one index element.

REQUIRED METHODS ^

$idx->num_elem()

Return the number of elements in the index.

$idx->create(...)

Create the index, in ... you might have to supply additional arguments, such as file names. This function is dependent on the class implementing it.

$idx->get_elem()

Retrieve a certain element from the index. Zero-based.

$idx->type()

Not used, yet.

$idx->close()

Close the index.

$idx->type()

Indicates if Bio::Grid::Run::SGE should store the data returned by the index in a tempoary file and delete it afterwards, or not.

Returns one of three different options:

undef or tmp

The index extracts chunks of data and returns them. An example would be a sequence from a fasta file. Usually the data is stored in a tempoary file and the file is deleted after the task.

Bio::Grid::Run::SGE stores retrieved elements in a tempoary file.

Bio::Grid::Run::SGE DELETES the tempoary file after the task finished.

direct

The index is returning not data, but information. This might be something like a number, if the index is supposed to iterate through a range of numbers. It could also be a file name to already existing files on the cluster.

Bio::Grid::Run::SGE supplies retrieved elements directly to a cluster script.

Bio::Grid::Run::SGE DOES NOT TRY TO DELETE a tempoary file after the task finished.

SEE ALSO ^

AUTHOR ^

jw bargsten, <jwb at cpan dot org>

syntax highlighting: