ensembl-hive  2.7.0
Bio::EnsEMBL::IdMapping::MappingList Class Reference
+ Inheritance diagram for Bio::EnsEMBL::IdMapping::MappingList:

Public Member Functions

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

Detailed Description

Synopsis

# create a new MappingList
-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
-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.

Member Function Documentation

◆ add_all()

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

◆ add_Entry()

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

◆ get_all_Entries()

public Arrayref Bio::EnsEMBL::IdMapping::MappingList::get_all_Entries ( )
  Example     :
foreach my $entry (@{ $mappings->get_all_Entries }) {
@section autotoc_md11 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

◆ get_entry_count()

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

◆ log()

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

◆ new()

public Bio::EnsEMBL::IdMapping::MappingList Bio::EnsEMBL::IdMapping::MappingList::new ( )
  Arg[1-N]    : see superclass
  Example     :
-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

◆ to_string()

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

The documentation for this class was generated from the following file:
Bio::EnsEMBL::IdMapping::MappingList::add_all
public void add_all()
Bio::EnsEMBL::IdMapping::MappingList::new
public Bio::EnsEMBL::IdMapping::MappingList new()
Bio::EnsEMBL::IdMapping::Serialisable::read_from_file
public Bio::EnsEMBL::IdMapping::Serialisable read_from_file()
Bio::EnsEMBL::IdMapping::MappingList::get_all_Entries
public Arrayref get_all_Entries()
Bio::EnsEMBL::IdMapping::MappingList
Definition: MappingList.pm:38
Bio::EnsEMBL::IdMapping::MappingList::add_Entry
public void add_Entry()
Bio::EnsEMBL::IdMapping::MappingList::get_entry_count
public Int get_entry_count()
Bio::EnsEMBL::IdMapping::MappingList::to_string
public String to_string()
Bio::EnsEMBL::IdMapping::MappingList::log
public void log()