Archive Ensembl HomeArchive Ensembl Home
ConservationScore.pm
Go to the documentation of this file.
00001 =head1 LICENSE
00002 
00003   Copyright (c) 1999-2012 The European Bioinformatics Institute and
00004   Genome Research Limited.  All rights reserved.
00005 
00006   This software is distributed under a modified Apache license.
00007   For license details, please see
00008 
00009     http://www.ensembl.org/info/about/code_licence.html
00010 
00011 =head1 CONTACT
00012 
00013   Please email comments or questions to the public Ensembl
00014   developers list at <dev@ensembl.org>.
00015 
00016   Questions may also be sent to the Ensembl help desk at
00017   <helpdesk@ensembl.org>.
00018 
00019 =head1 NAME
00020 
00021 Bio::EnsEMBL::Compara::ConservationScore - Stores conservation scores
00022 
00023 =head1 SYNOPSIS
00024 
00025 use Bio::EnsEMBL::Compara::ConservationScore;
00026 my $conservation_score = new Bio::EnsEMBL::Compara::ConservationScore(
00027     -genomic_align_block => $gab, 
00028     -window_size => $win_size, 
00029     -position => $pos, 
00030     -observed_score => $obs_scores, 
00031     -expected_score => $exp_scores, 
00032     -diff_score => $diff_scores);
00033 
00034 SET VALUES
00035     $conservation_score->genomic_align_block($gab);
00036     $conservation_score->window_size(10);
00037     $conservation_score->position(1);
00038     $conservation_score->observed_score($observed_scores);
00039     $conservation_score->expected_score($expected_scores);
00040     $conservation_score->diff_score($diff_scores);
00041     $conservation_score->y_axis_min(0);
00042     $conservation_score->y_axis_max(100);
00043 
00044 
00045 GET VALUES
00046     $gab = $conservation_score->genomic_align_block;
00047     $win_size = $conservation_score->window_size;
00048     $pos = $conservation_score->position;
00049     $obs_scores = $conservation_score->observed_score;
00050     $exp_scores = $conservation_score->expected_score;
00051     $diff_scores = $conservation_score->diff_score;
00052     $y_axis_min = $conservation_score->y_axis_min;
00053     $y_axis_max = $conservation_score->y_axis_max;
00054 
00055 =head1 DESCRIPTION
00056 
00057 Object for storing conservation scores. The scores are averaged over different
00058 window sizes to speed up drawing over large regions. The scores are packed as 
00059 floats and stored in a string. The scores can be stored and retrieved in 
00060 either a packed or unpacked format. The unpacked format is as a space delimited
00061 string eg ("0.123 0.456 0.789"). The packed format is a single precision float 
00062 (4 bytes). It is recommended to use the unpacked format.
00063 
00064 =head1 APPENDIX
00065 
00066 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
00067 
00068 =cut
00069 
00070 
00071 # Let the code begin...
00072 
00073 
00074 package Bio::EnsEMBL::Compara::ConservationScore;
00075 
00076 use strict;
00077 
00078 use Bio::EnsEMBL::Utils::Argument qw(rearrange);
00079 use Bio::EnsEMBL::Utils::Exception qw(warning deprecate throw);
00080 
00081 #store as 4 byte float
00082 my $pack_size = 4;
00083 my $pack_type = "f";
00084 
00085 =head2 new (CONSTRUCTOR)
00086 
00087     Arg [-ADAPTOR] 
00088         : Bio::EnsEMBL::Compara::DBSQL::ConservationScore $adaptor
00089                 (the adaptor for connecting to the database)
00090     Arg [-GENOMIC_ALIGN_BLOCK] (opt)
00091         : Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlock $genomic_align_block
00092         (the Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlock of the multiple
00093          alignment)
00094     Arg [-GENOMIC_ALIGN_BLOCK_ID] (opt) 
00095          : int $genomic_align_block_id
00096          (the database internal ID of the $genomic_align_block)
00097     Arg [-WINDOW_SIZE] (opt)
00098          : int $window_size
00099          (window size used to average the scores over)
00100     Arg [-POSITION] (opt)
00101         : int $position
00102         (position of the first score in alignment coordinates)
00103     Arg [-SEQ_REGION_POS] (opt)
00104         : int $seq_region_pos
00105         (position of the first score in species coordinates)
00106     Arg [-EXPECTED_SCORE]
00107         : string $expected_score
00108         (packed or unpacked string of expected scores)
00109     Arg [-DIFF_SCORE]
00110         : string $diff_score
00111         (packed or unpacked string of the difference between the observed and
00112      expected scores)
00113     Arg [-PACKED] (opt)
00114         : boolean $packed
00115         (whether the scores are packed (1) or unpacked (0))
00116     Arg [Y_AXIS_MIN] (opt)
00117     : float $y_axis_min
00118     (minimum score value used for display)
00119     Arg [Y_AXIS_MAX] (opt)
00120     : float $y_axis_max
00121     (maximum score value used for display)
00122     Example :
00123     my $conservation_score = new Bio::EnsEMBL::Compara::ConservationScore(
00124                      -genomic_align_block => $gab, 
00125                      -window_size => $win_size, 
00126                                      -position => $pos, 
00127                                      -expected_score => $exp_scores, 
00128                                      -diff_score => $diff_scores);
00129        Description: Creates a new ConservationScore object
00130        Returntype : Bio::EnsEMBL::Compara::ConservationScore
00131        Exceptions : none
00132        Caller     : general
00133        Status     : At risk
00134 
00135 =cut
00136 
00137 sub new {
00138 
00139     my($class, @args) = @_;
00140   
00141     my $self = {};
00142     bless $self,$class;
00143     
00144     my ($adaptor, $genomic_align_block, $genomic_align_block_id,
00145     $window_size, $position, $seq_region_pos, 
00146     $expected_score, $diff_score, $packed, $y_axis_min, $y_axis_max) = 
00147         rearrange([qw(
00148               ADAPTOR GENOMIC_ALIGN_BLOCK GENOMIC_ALIGN_BLOCK_ID
00149               WINDOW_SIZE POSITION SEQ_REGION_POS 
00150               EXPECTED_SCORE DIFF_SCORE PACKED Y_AXIS_MIN 
00151               Y_AXIS_MAX)],
00152               @args);
00153 
00154     $self->adaptor($adaptor) if (defined($adaptor));
00155     $self->genomic_align_block($genomic_align_block) if (defined($genomic_align_block));
00156     $self->genomic_align_block_id($genomic_align_block_id) if (defined($genomic_align_block_id));
00157     $self->window_size($window_size) if (defined($window_size));
00158     $self->position($position) if (defined($position));
00159     $self->seq_region_pos($seq_region_pos) if (defined($seq_region_pos));
00160 
00161     $self->expected_score($expected_score) if (defined($expected_score));
00162     $self->diff_score($diff_score) if (defined($diff_score));
00163 
00164     $self->y_axis_min($y_axis_min) if (defined($y_axis_min));
00165     $self->y_axis_max($y_axis_max) if (defined($y_axis_max));
00166 
00167     if (defined($packed)) {
00168     $self->packed($packed);
00169     } else {
00170     $self->packed(0);
00171     }
00172     return $self;
00173 }
00174 
00175 =head2 new_fast
00176 
00177   Arg [1]    : hash reference $hashref
00178   Example    : none
00179   Description: This is an ultra fast constructor which requires knowledge of
00180                the objects internals to be used.
00181   Returntype :
00182   Exceptions : none
00183   Caller     :
00184   Status     : At risk
00185 
00186 =cut
00187 
00188 sub new_fast {
00189   my ($class, $hashref) = @_;
00190 
00191   return bless $hashref, $class;
00192 }
00193 
00194 =head2 adaptor
00195 
00196   Arg [1]    : Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor $adaptor
00197   Example    : $conservation_score->adaptor($adaptor);
00198   Description: Getter/Setter for the adaptor this object used for database
00199                interaction
00200   Returntype : Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor object
00201   Exceptions : thrown if the argument is not a
00202                Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor object
00203   Caller     : general
00204   Status     : At risk
00205 
00206 =cut
00207 
00208 sub adaptor {
00209   my ( $self, $adaptor ) = @_;
00210 
00211   if (defined($adaptor)) {
00212     throw("$adaptor is not a Bio::EnsEMBL::Compara::DBSQL::ConservationScoreAdaptor object")
00213         unless ($adaptor->isa("Bio::EnsEMBL::Compara::DBSQL::ConservationScoreAdaptor"));
00214     $self->{'adaptor'} = $adaptor;
00215   }
00216 
00217   return $self->{'adaptor'};
00218 }
00219 
00220 
00221 =head2 genomic_align_block
00222 
00223   Arg [1]    : Bio::EnsEMBL::Compara::GenomicAlignBlock $genomic_align_block 
00224   Example    : my $genomic_align_block = $conservation_score->genomic_align_block();
00225   Example    : $conservation_score->genomic_align_block($genomic_align_block);
00226   Description: Getter/Setter for the genomic_align_block attribute
00227   Returntype : Bio::EnsEMBL::Compara::GenomicAlignBlock object. If no
00228                argument is given, the genomic_align_block is not defined but
00229                if both the genomic_align_block_id and the adaptor are, it tries
00230                to fetch the data using the genomic_align_block_id.
00231   Exceptions : thrown if $genomic_align_block is not a 
00232                Bio::EnsEMBL::Compara::GenomicAlignBlock object or if 
00233                $genomic_align_block does not match a previously defined
00234                genomic_align_block_id
00235   Warning    : warns if getting data from other sources fails.
00236   Caller     : general
00237   Status     : At risk
00238 
00239 =cut
00240 
00241 sub genomic_align_block {
00242     my ($self, $genomic_align_block) = @_;
00243     
00244     if (defined($genomic_align_block)) {
00245     throw("$genomic_align_block is not a Bio::EnsEMBL::Compara::GenomicAlignBlock object")
00246         unless ($genomic_align_block->isa("Bio::EnsEMBL::Compara::GenomicAlignBlock"));
00247 
00248     if ($self->{'genomic_align_block_id'}) {
00249         throw("dbID of genomic_align_block object does not match previously defined".
00250             " genomic_align_block_id. If you want to override a".
00251             " Bio::EnsEMBL::Compara::ConservationScore object, you can reset the ".
00252           "genomic_align_block_id using \$conservation_score->genomic_align_block_id(0)")
00253           if ($self->{'genomic_align_block'}->dbID != $self->{'genomic_align_block_id'});
00254     }
00255     $self->{'genomic_align_block'} = $genomic_align_block;
00256     } elsif (!defined($self->{'genomic_align_block'})) {
00257     # Try to get the genomic_align_block from other sources...
00258     if (defined($self->genomic_align_block_id) and defined($self->{'adaptor'})) {
00259         # ...from the genomic_align_block_id. Uses genomic_align_block_id function
00260         # and not the attribute in the <if> clause because the attribute can be retrieved from other
00261         # sources if it has not been set before.
00262         my $genomic_align_block_adaptor = $self->{'adaptor'}->db->get_GenomicAlignBlockAdaptor;
00263         $self->{'genomic_align_block'} = $genomic_align_block_adaptor->fetch_by_dbID(
00264                                              $self->{'genomic_align_block_id'});
00265     } else {
00266         warning("Fail to get data from other sources in Bio::EnsEMBL::Compara::GenomicAlign->genomic_align_block".
00267             " You either have to specify more information (see perldoc for".
00268             " Bio::EnsEMBL::Compara::GenomicAlign) or to set it up directly");
00269     }
00270     }
00271     
00272     return $self->{'genomic_align_block'};
00273 }
00274 
00275 =head2 genomic_align_block_id
00276 
00277   Arg [1]    : (opt) integer genomic_align_block_id 
00278   Example    : my $genomic_align_block_id = $conservation_score->genomic_align_block_id();
00279   Example    : $conservation_score->genomic_align_block_id($genomic_align_block_id);
00280   Description: Getter/Setter for the genomic_align_block_id attribute. If no
00281                argument is given and the genomic_align_block_id is not defined,
00282                it tries to get the data from other sources like the 
00283                corresponding Bio::EnsEMBL::Compara::GenomicAlignBlock object or
00284                the database using the dbID of the Bio::EnsEMBL::Compara::GenomicAlign object.
00285   Returntype : integer
00286   Exceptions : thrown if $genomic_align_block_id does not match a previously 
00287                defined genomic_align_block 
00288   Warning    : warns if getting data from other sources fails.
00289   Caller     : general
00290   Status     : At risk
00291 
00292 =cut
00293 
00294 sub genomic_align_block_id {
00295     my ($self, $genomic_align_block_id) = @_;
00296     
00297     if (defined($genomic_align_block_id)) {
00298     $self->{'genomic_align_block_id'} = ($genomic_align_block_id or undef);
00299     if (defined($self->{'genomic_align_block'}) and $self->{'genomic_align_block_id'}) {
00300         warning("Defining both genomic_align_block_id and genomic_align_block");
00301         throw("genomic_align_block_id does not match previously defined genomic_align_block object")
00302         if ($self->{'genomic_align_block'} and
00303             $self->{'genomic_align_block'}->dbID != $self->{'genomic_align_block_id'});
00304     }
00305     } elsif (!($self->{'genomic_align_block_id'})) {
00306     # Try to get the ID from other sources...
00307     if (defined($self->{'genomic_align_block'}) and defined($self->{'genomic_align_block'}->dbID)) {
00308         # ...from the corresponding Bio::EnsEMBL::Compara::GenomicAlignBlock object
00309         $self->{'genomic_align_block_id'} = $self->{'genomic_align_block'}->dbID;
00310     } elsif (defined($self->{'adaptor'}) and defined($self->{'dbID'})) {
00311         # ...from the database using the dbID of the Bio::EnsEMBL::Compara::GenomicAlign object
00312         $self->adaptor->retrieve_all_direct_attributes($self);
00313     } else {
00314         warning("Fail to get data from other sources in Bio::EnsEMBL::Compara::GenomicAlign->genomic_align_block_id".
00315             " You either have to specify more information (see perldoc for".
00316             " Bio::EnsEMBL::Compara::GenomicAlign) or to set it up directly");
00317     }
00318     }
00319     return $self->{'genomic_align_block_id'};
00320 }
00321 
00322 
00323 
00324 =head2 window_size
00325 
00326   Arg [1]    : (opt) integer window_size
00327   Example    : my $window_size = $conservation_score->window_size();
00328   Example    : $conservation_score->window_size(1);
00329   Description: Getter/Setter for the window_size of this conservation score
00330   Returntype : integer, Returns 1 if value not defined
00331   Exceptions : none
00332   Caller     : general
00333   Status     : At risk
00334 
00335 =cut
00336 
00337 sub window_size {
00338     my ($self, $window_size) = @_;
00339 
00340     if(defined $window_size) {
00341     $self->{'window_size'} = $window_size;
00342     }
00343     $self->{'window_size'}='1' unless(defined($self->{'window_size'}));
00344     return $self->{'window_size'};
00345 }
00346 
00347 =head2 position
00348 
00349   Arg [1]    : (opt) integer
00350   Example    : $conservation_score->position(1);
00351   Description: Getter/Setter for the alignment position of the first score
00352   Returntype : integer. Return 1 if value not defined
00353   Exceptions : none
00354   Caller     : general
00355   Status     : At risk
00356 
00357 =cut
00358 
00359 sub position {
00360     my ($self, $position) = @_;
00361 
00362     if(defined $position) {
00363     $self->{'position'} = $position;
00364     }
00365 
00366   $self->{'position'}='1' unless(defined($self->{'position'}));
00367   return $self->{'position'};
00368 }
00369 
00370 =head2 start
00371 
00372   Example    : $conservation_score->start();
00373   Description: Wrapper round position call 
00374   Returntype : integer. Return 1 if value not defined
00375   Exceptions : none
00376   Caller     : general
00377   Status     : At risk
00378 
00379 =cut
00380 
00381 sub start {
00382     my $self = shift;
00383    return $self->position; 
00384 }
00385 
00386 =head2 end
00387 
00388   Example    : $conservation_score->end();
00389   Description: wrapper around position
00390   Returntype : integer. Return 1 if value not defined
00391   Exceptions : none
00392   Caller     : general
00393   Status     : At risk
00394 
00395 =cut
00396 
00397 sub end {
00398     my $self = shift;
00399    return $self->position; 
00400 }
00401 =head2 seq_region_pos
00402 
00403   Arg [1]    : (opt) integer
00404   Example    : $conservation_score->seq_region_pos(1);
00405   Description: Getter/Setter for the species position of the first score
00406   Returntype : integer.
00407   Exceptions : none
00408   Caller     : general
00409   Status     : At risk
00410 
00411 =cut
00412 
00413 sub seq_region_pos {
00414     my ($self, $seq_region_pos) = @_;
00415 
00416     if(defined $seq_region_pos) {
00417     $self->{'seq_region_pos'} = $seq_region_pos;
00418     }
00419 
00420     return $self->{'seq_region_pos'};
00421 }
00422 
00423 
00424 =head2 observed_score
00425 
00426   Example    : my $obs_score = $conservation_score->observed_score();
00427   Description: Getter for the observed score string (no setter functionality)
00428   Returntype : double
00429   Exceptions : none
00430   Caller     : general
00431   Status     : At risk
00432 
00433 =cut
00434 
00435 sub observed_score {
00436     my ($self) = @_;
00437     return ($self->expected_score - $self->diff_score);
00438 }
00439 
00440 
00441 =head2 expected_score
00442 
00443   Arg [1]    : (opt) string of expected scores (can be either packed or space 
00444                             delimited)
00445   Example    : $conservation_score->expected_score("3.85 2.54 1.56");
00446   Example    : my $exp_score = $conservation_score->expected_score();
00447   Description: Getter/Setter for the expected score string
00448   Returntype : string (either packed or space delimited)
00449   Exceptions : none
00450   Caller     : general
00451   Status     : At risk
00452 
00453 =cut
00454 
00455 sub expected_score {
00456     my ($self, $expected_score) = @_;
00457 
00458     if (defined $expected_score) {
00459     $self->{'expected_score'} = $expected_score;
00460     }
00461     return $self->{'expected_score'};
00462 }
00463 
00464 =head2 diff_score
00465 
00466   Arg [1]    : (opt) string of difference scores (expected - observed)
00467                (can be either packed or space delimited)
00468   Example    : $conservation_score->diff_score("1.85 -2.54 1.56");
00469   Example    : my $diff_score = $conservation_score->diff_score();
00470   Description: Getter/Setter for the difference score string
00471   Returntype : string (either packed or space delimited)
00472   Exceptions : none
00473   Caller     : general
00474   Status     : At risk
00475 
00476 =cut
00477 
00478 sub diff_score {
00479     my ($self, $diff_score) = @_;
00480 
00481     if (defined $diff_score) {
00482     $self->{'diff_score'} = $diff_score;
00483     }
00484     return $self->{'diff_score'};
00485 }
00486 
00487 =head2 score
00488 
00489   Arg [1]    : (opt) string of difference scores (expected - observed)
00490                (can be either packed or space delimited)
00491   Example    : $conservation_score->diff_score("1.85 -2.54 1.56");
00492   Example    : my $diff_score = $conservation_score->diff_score();
00493   Description: alias for diff score 
00494   Returntype : string (either packed or space delimited)
00495   Exceptions : none
00496   Caller     : general
00497   Status     : At risk
00498 
00499 =cut
00500 
00501 sub score {
00502     my ($self, $diff_score) = @_;
00503     return $self->diff_score($diff_score);
00504 }
00505 
00506 =head2 y_axis_min
00507 
00508   Arg [1]    : (opt) float
00509   Example    : $conservation_score->y_axis_min(-0.5);
00510   Example    : $y_axis_min = $conservation_score->y_axis_min;
00511   Description: Getter/Setter for the minimum score
00512   Returntype : float
00513   Exceptions : none
00514   Caller     : general
00515   Status     : At risk
00516 
00517 =cut
00518 
00519 sub y_axis_min {
00520     my ($self, $y_axis_min) = @_;
00521 
00522     if (defined $y_axis_min) {
00523     $self->{'y_axis_min'} = $y_axis_min;
00524     }
00525     return $self->{'y_axis_min'};
00526 }
00527 
00528 =head2 y_axis_max
00529 
00530   Arg [1]    : (opt) float
00531   Example    : $conservation_score->y_axis_max(2.45);
00532   Example    : $y_axis_max = $conservation_score->y_axis_min;
00533   Description: Getter/Setter for the maximum score
00534   Returntype : float
00535   Exceptions : none
00536   Caller     : general
00537   Status     : At risk
00538 
00539 =cut
00540 
00541 sub y_axis_max {
00542     my ($self, $y_axis_max) = @_;
00543 
00544     if (defined $y_axis_max) {
00545     $self->{'y_axis_max'} = $y_axis_max;
00546     }
00547     return $self->{'y_axis_max'};
00548 }
00549 
00550 =head2 packed
00551 
00552   Arg [1]    : (opt) boolean 
00553   Example    : $conservation_score->packed(1);
00554   Example    : $packed = $conservation_score->packed;
00555   Description: Getter/Setter for the whether the scores are packed or space
00556                delimited
00557   Returntype : boolean
00558   Exceptions : none
00559   Caller     : general
00560   Status     : At risk
00561 
00562 =cut
00563 
00564 sub packed {
00565     my ($self, $packed) = @_;
00566 
00567     if($packed) {
00568     $self->{'packed'} = $packed;
00569     }
00570     return $self->{'packed'};
00571 }
00572 
00573 =head2 reverse
00574 
00575   Example    : $conservation_score->reverse;
00576   Description: reverse scores and position in the ConservationScore object
00577   Returntype : none
00578   Exceptions : none
00579   Caller     : general
00580   Status     : At risk
00581 
00582 =cut
00583 
00584 sub reverse {
00585     my ($self, $genomic_align_block_length) = @_;
00586     my $num_scores = 0;
00587     return if (!defined($self->score));
00588     if ($self->packed) { 
00589     $num_scores = length($self->score)/$pack_size;
00590     } else {
00591     my @scores = split ' ', $self->score;
00592     $num_scores = scalar(@scores);
00593     } 
00594     
00595     #swap position orientation and reverse position in alignment
00596     my $end = $self->position + (($num_scores - 1) * $self->window_size);
00597     #10.10.06 +1 so position starts at 1 not 0
00598     #$self->position($self->genomic_align_block->length - $end);
00599     if (!defined($genomic_align_block_length)) {
00600       $genomic_align_block_length = $self->genomic_align_block->length;
00601     }
00602     $self->position($genomic_align_block_length - $end + 1);
00603 
00604     #swap position orientation and reverse seq_region_pos in alignment
00605     if (defined $self->seq_region_pos) {
00606     $end = $self->seq_region_pos + (($num_scores - 1) * $self->window_size);
00607     #10.10.06 +1 so position starts at 1 not 0
00608     #$self->seq_region_pos($self->genomic_align_block->length - $end);
00609     $self->seq_region_pos($self->genomic_align_block->length - $end + 1);
00610     }
00611 
00612     #reverse score strings
00613     $self->expected_score(_reverse_score($self->expected_score, $num_scores, $self->packed));
00614     $self->diff_score(_reverse_score($self->diff_score, $num_scores, $self->packed));
00615 }
00616 
00617 =head2 _reverse_score
00618 
00619   Arg [1]    : string $score_str (string of scores)
00620   Arg [2]    : int $num_scores (number of scores in the string)
00621   Arg [3]    : boolean $packed (whether the scores are packed or not)
00622 
00623   Example    : _reverse_score($self->expected_score, $num_scores, $self->packed)
00624   Description: internal method used by reverse to reverse the score strings
00625   Returntype : string
00626   Exceptions : none
00627   Caller     : general
00628   Status     : At risk
00629 
00630 =cut
00631 
00632 sub _reverse_score {
00633     my ($score_str, $num_scores, $packed) = @_;
00634 
00635     my $rev_str;
00636     if ($packed) { 
00637     for (my $i = $num_scores-1; $i >=0; $i--) {
00638         my $value = substr $score_str, $i*$pack_size, $pack_size;
00639         $rev_str .= $value;
00640     }
00641     } else {
00642     my @scores = split ' ', $score_str;
00643     my $rev_str;
00644     for (my $i = $num_scores-1; $i >= 0; $i--) {
00645         $rev_str .= $scores[$i];    
00646     } 
00647     }
00648     return $rev_str;
00649 }
00650 
00651 =head2 _print
00652 
00653   Example    : $conservation_score->_print;
00654   Description: print the contents of the ConservationScore object
00655   Returntype : none
00656   Exceptions : none
00657   Caller     : general
00658   Status     : At risk
00659 
00660 =cut
00661 
00662 sub _print {
00663   my ($self, $FILEH) = @_;
00664 
00665 #  my $verbose = verbose;
00666 #  verbose(0);
00667   my $exp_score = 0;
00668   if ($self->expected_score) {
00669       $exp_score = $self->expected_score;
00670   }
00671   
00672   $FILEH ||= \*STDOUT;
00673   
00674   print $FILEH
00675 
00676 "Bio::EnsEMBL::Compara::GenomicAlignBlock object ($self)
00677   genomic_align_block = " . ($self->genomic_align_block) . "
00678   genomic_align_block_id = " . ($self->genomic_align_block_id) . "
00679   window_size = " . ($self->window_size) . "
00680   position = " . ($self->position) . "
00681   seq_region_pos = " . ($self->seq_region_pos) . "
00682   diff_score = " . ($self->diff_score) . "
00683   expected_score = $exp_score \n";
00684 
00685 }
00686 
00687 1;