3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
40 pair of a source and target
object's internal Id and a score for this
54 package Bio::EnsEMBL::IdMapping::Entry;
58 no warnings 'uninitialized
';
60 use Bio::EnsEMBL::Utils::Exception qw(throw warning);
65 Example : my $entry = Bio::EnsEMBL::IdMapping::Entry->new();
66 Description : Constructor. This is a no-argument constructor, so you need to
67 populate the object manually. Rarely used since in most cases
68 new_fast() is preferred.
69 Return type : a Bio::EnsEMBL::IdMapping::Entry object
79 my $class = ref($caller) || $caller;
82 bless ($self, $class);
90 Arg[1] : Arrayref $array_ref - the arrayref to bless into the Entry
92 Example : my $entry = Bio::EnsEMBL::IdMapping::Entry->new_fast([
93 $source_gene->id, $target_gene->id, 0.9]);
94 Description : Fast constructor.
95 Return type : a Bio::EnsEMBL::IdMapping::Entry object
105 my $array_ref = shift;
106 return bless $array_ref, $class;
112 Arg[1] : (optional) Int - source object's
internal Id
113 Description : Getter/setter
for source
object's internal Id.
124 $self->[0] = shift if (@_);
131 Arg[1] : (optional) Int - target object's
internal Id
132 Description : Getter/setter
for target
object's internal Id.
143 $self->[1] = shift if (@_);
150 Arg[1] : (optional) Float - a score
151 Description : Getter/setter for score for the mapping between source and
163 $self->[2] = shift if (@_);
170 Example : print LOG $entry->to_string, "\n";
171 Description : Returns a string representation of the Entry object. Useful for
172 debugging and logging.
183 return sprintf('%-10s%-10s%-5.6f
', $self->source, $self->target, $self->score);