Bio::EnsEMBL::IdMapping
Entry
Toolbar
Summary
Bio::EnsEMBL::IdMapping::Entry - object representing a ScoredMappingMatrix entry
Package variables
No package variables defined.
Included modules
Synopsis
Description
This object represents a ScoredMappingMatrix entry. It is defined by a
pair of a source and target object's internal Id and a score for this
mapping.
Methods
Methods description
Example : my $entry = Bio::EnsEMBL::IdMapping::Entry->new(); Description : Constructor. This is a no-argument constructor, so you need to populate the object manually. Rarely used since in most cases new_fast() is preferred. Return type : a Bio::EnsEMBL::IdMapping::Entry object Exceptions : none Caller : general Status : At Risk : under development |
Arg[1] : Arrayref $array_ref - the arrayref to bless into the Entry object Example : my $entry = Bio::EnsEMBL::IdMapping::Entry->new_fast([ $source_gene->id, $target_gene->id, 0.9]); Description : Fast constructor. Return type : a Bio::EnsEMBL::IdMapping::Entry object Exceptions : none Caller : general Status : At Risk : under development |
Arg[1] : (optional) Float - a score Description : Getter/setter for score for the mapping between source and target object. Return type : Float Exceptions : none Caller : general Status : At Risk : under development |
Arg[1] : (optional) Int - source object's internal Id Description : Getter/setter for source object's internal Id. Return type : Int Exceptions : none Caller : general Status : At Risk : under development |
Arg[1] : (optional) Int - target object's internal Id Description : Getter/setter for target object's internal Id. Return type : Int Exceptions : none Caller : general Status : At Risk : under development |
Example : print LOG $entry->to_string, "\n"; Description : Returns a string representation of the Entry object. Useful for debugging and logging. Return type : String Exceptions : none Caller : general Status : At Risk : under development |
Methods code
sub new
{ my $caller = shift;
my $class = ref($caller) || $caller;
my $self = [];
bless ($self, $class);
return $self; } |
sub new_fast
{ my $class = shift;
my $array_ref = shift;
return bless $array_ref, $class; } |
sub score
{ my $self = shift;
$self->[2] = shift if (@_);
return $self->[2]; } |
sub source
{ my $self = shift;
$self->[0] = shift if (@_);
return $self->[0]; } |
sub target
{ my $self = shift;
$self->[1] = shift if (@_);
return $self->[1]; } |
sub to_string
{ my $self = shift;
return sprintf('%-10s%-10s%-5.6f', $self->source, $self->target, $self->score);
}
1; } |
General documentation
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
/info/about/code_licence.html