Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::IdMapping::MappingList Class Reference
Inheritance diagram for Bio::EnsEMBL::IdMapping::MappingList:

List of all members.


Class Summary

Synopsis

  # create a new MappingList
  my $mappings = Bio::EnsEMBL::IdMapping::MappingList-\>new(
    -DUMP_PATH  =\> $dump_path,
    -CACHE_FILE =\> 'gene_mappings.ser',
  );

  # add entries
  my $mappings-\>add_Entry($entry1);
  my $mappings-\>add_all( $entry2, $entry3 );

  # serialise to file
  $mappings-\>write_to_file;

  # later, read these mappings from file
  my $mappings1 = Bio::EnsEMBL::IdMapping::MappingList-\>new(
    -DUMP_PATH  =\> $dump_path,
    -CACHE_FILE =\> 'gene_mappings.ser',
  );
  $mappings1-\>read_from_file;

Description

This object represents a list of Bio::EnsEMBL::IdMapping::Entry
objects. It's essentially an OO wrapper for an array with some type
checking and convenience methods.
 

Definition at line 38 of file MappingList.pm.

Available Methods

public void add_all ()
public void add_Entry ()
public String cache_file ()
public String cache_file_name ()
public String dump_path ()
public Arrayref get_all_Entries ()
public Int get_entry_count ()
public Boolean loaded ()
public void log ()
public
Bio::EnsEMBL::IdMapping::MappingList 
new ()
public
Bio::EnsEMBL::IdMapping::Serialisable 
read_from_file ()
public String to_string ()
public String write_to_file ()

Method Documentation

public void Bio::EnsEMBL::IdMapping::MappingList::add_all ( )
  Arg[1]      : List of Bio::EnsEMBL::IdMapping::Entry objects
  Example     : my @entries = ($entry1, $entry2);
                $mappings->add_all(@entries);
  Description : Adds a list of Entries to the MappingList.
  Return type : none
  Exceptions  : thrown on wrong argument
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public void Bio::EnsEMBL::IdMapping::MappingList::add_Entry ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::Entry - Entry to add
  Example     : $mappings->add_Entry($entry);
  Description : Adds an Entry to the MappingList.
  Return type : none
  Exceptions  : thrown on wrong or missing argument
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public String Bio::EnsEMBL::IdMapping::Serialisable::cache_file ( ) [inherited]
  Example     : my $cache_file = $object->cache_file;
  Description : Returns the path and name of the serialised object file.
  Return type : String
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public String Bio::EnsEMBL::IdMapping::Serialisable::cache_file_name ( ) [inherited]
  Arg[1]      : String - file name for serialisation
  Example     : $object->cache_file_name('object_cache.ser');
  Description : Getter/setter for the file name for serialisation.
  Return type : String
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public String Bio::EnsEMBL::IdMapping::Serialisable::dump_path ( ) [inherited]
  Arg[1]      : String - dump path for serialisation
  Example     : $object->dump_path('/tmp');
  Description : Getter/setter for the dump path for serialisation.
  Return type : String
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public Arrayref Bio::EnsEMBL::IdMapping::MappingList::get_all_Entries ( )
  Example     : foreach my $entry (@{ $mappings->get_all_Entries }) {
                  # do something with the entry
                }
  Description : Gets all Entries in the MappingList.
  Return type : Arrayref of Bio::EnsEMBL::IdMapping::Entry
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public Int Bio::EnsEMBL::IdMapping::MappingList::get_entry_count ( )
  Example     : my $num_entries = $mappings->get_entry_count;
  Description : Returns the number of Entries in the MappingList.
  Return type : Int
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public Boolean Bio::EnsEMBL::IdMapping::Serialisable::loaded ( ) [inherited]
  Arg[1]      : Boolean - "loaded" status
  Example     : if ($object->loaded) {
                  # do something with the object that was loaded from a file
                } else {
                  # the object wasn't loaded but is new, so fill it
                }
  Description : Indicates whether a given object was loaded from its serialised
                state on disk.
  Return type : Boolean - TRUE if loaded from disk, FALSE otherwise
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public void Bio::EnsEMBL::IdMapping::MappingList::log ( )
  Arg[1]      : String $type - object type (e.g. 'gene')
  Arg[2]      : String $dump_path - path for writing output
  Example     : $mappings->log('gene', $conf->param('basedir'));
  Description : Logs all Entries in the MappingList to a file. Used for
                debugging.
  Return type : none
  Exceptions  : thrown on I/0 error
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public Bio::EnsEMBL::IdMapping::MappingList Bio::EnsEMBL::IdMapping::MappingList::new ( )
  Arg[1-N]    : see superclass
  Example     : my $gene_mappings = Bio::EnsEMBL::IdMapping::MappingList->new(
                  -DUMP_PATH   => $dump_path,
                  -CACHE_FILE  => 'gene_mappings.ser',
                );
  Description : Constructor.
  Return type : Bio::EnsEMBL::IdMapping::MappingList
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::IdMapping::Serialisable.

public Bio::EnsEMBL::IdMapping::Serialisable Bio::EnsEMBL::IdMapping::Serialisable::read_from_file ( ) [inherited]
  Example     : $object->read_from_file;
  Description : Reads a serialised object from file (determined by
                $self->cache_file).
  Return type : Bio::EnsEMBL::IdMapping::Serialisable implementing object
  Exceptions  : thrown on I/O errors
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public String Bio::EnsEMBL::IdMapping::MappingList::to_string ( )
  Example     : print LOG $mappings->to_string, "\\n";
  Description : Returns a string representation of the MappingList. This is
                simply a multi-line string, where each line is a stringified
                Entry.
                Useful for debugging and logging.
  Return type : String
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view
public String Bio::EnsEMBL::IdMapping::Serialisable::write_to_file ( ) [inherited]
  Example     : my $filesize = $object->write_to_file;
  Description : Serialises an object to a file (determined by
                $self->cache_file).
  Return type : String - size of serialisation file
  Exceptions  : thrown on I/O errors
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

The documentation for this class was generated from the following file: