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


  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 { ... }


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



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


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


This attribute gives access to the raw index in memory.


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



Return the number of elements in the index.


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


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


Not used, yet.


Close the index.


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.


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.



jw bargsten, <jwb at cpan dot org>