Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Compara::ConservationScore Class Reference

List of all members.


Class Summary

Synopsis

use Bio::EnsEMBL::Compara::ConservationScore;
my $conservation_score = new Bio::EnsEMBL::Compara::ConservationScore(
    -genomic_align_block =\> $gab, 
    -window_size =\> $win_size, 
    -position =\> $pos, 
    -observed_score =\> $obs_scores, 
    -expected_score =\> $exp_scores, 
    -diff_score =\> $diff_scores);

SET VALUES
    $conservation_score-\>genomic_align_block($gab);
    $conservation_score-\>window_size(10);
    $conservation_score-\>position(1);
    $conservation_score-\>observed_score($observed_scores);
    $conservation_score-\>expected_score($expected_scores);
    $conservation_score-\>diff_score($diff_scores);
    $conservation_score-\>y_axis_min(0);
    $conservation_score-\>y_axis_max(100);


GET VALUES
    $gab = $conservation_score-\>genomic_align_block;
    $win_size = $conservation_score-\>window_size;
    $pos = $conservation_score-\>position;
    $obs_scores = $conservation_score-\>observed_score;
    $exp_scores = $conservation_score-\>expected_score;
    $diff_scores = $conservation_score-\>diff_score;
    $y_axis_min = $conservation_score-\>y_axis_min;
    $y_axis_max = $conservation_score-\>y_axis_max;

Description

Object for storing conservation scores. The scores are averaged over different
window sizes to speed up drawing over large regions. The scores are packed as 
floats and stored in a string. The scores can be stored and retrieved in 
either a packed or unpacked format. The unpacked format is as a space delimited
string eg ("0.123 0.456 0.789"). The packed format is a single precision float 
(4 bytes). It is recommended to use the unpacked format.
 

Definition at line 50 of file ConservationScore.pm.

Available Methods

protected void _print ()
protected String _reverse_score ()
public
Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor 
adaptor ()
public String diff_score ()
public Int end ()
public String expected_score ()
public
Bio::EnsEMBL::Compara::GenomicAlignBlock 
genomic_align_block ()
public Int genomic_align_block_id ()
public
Bio::EnsEMBL::Compara::ConservationScore 
new ()
public new_fast ()
public Double observed_score ()
public Boolean packed ()
public Int position ()
public void reverse ()
public String score ()
public Int seq_region_pos ()
public Int start ()
public Int window_size ()
public Float y_axis_max ()
public Float y_axis_min ()

Method Documentation

protected void Bio::EnsEMBL::Compara::ConservationScore::_print ( )
  Example    : $conservation_score->_print;
  Description: print the contents of the ConservationScore object
  Returntype : none
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
protected String Bio::EnsEMBL::Compara::ConservationScore::_reverse_score ( )
  Arg [1]    : string $score_str (string of scores)
  Arg [2]    : int $num_scores (number of scores in the string)
  Arg [3]    : boolean $packed (whether the scores are packed or not)
  Example    : _reverse_score($self->expected_score, $num_scores, $self->packed)
  Description: internal method used by reverse to reverse the score strings
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor Bio::EnsEMBL::Compara::ConservationScore::adaptor ( )
  Arg [1]    : Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor $adaptor
  Example    : $conservation_score->adaptor($adaptor);
  Description: Getter/Setter for the adaptor this object used for database
               interaction
  Returntype : Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor object
  Exceptions : thrown if the argument is not a
               Bio::EnsEMBL::DBSQL::ConservationScoreAdaptor object
  Caller     : general
  Status     : At risk
 
Code:
click to view
public String Bio::EnsEMBL::Compara::ConservationScore::diff_score ( )
  Arg [1]    : (opt) string of difference scores (expected - observed)
               (can be either packed or space delimited)
  Example    : $conservation_score->diff_score("1.85 -2.54 1.56");
  Example    : my $diff_score = $conservation_score->diff_score();
  Description: Getter/Setter for the difference score string
  Returntype : string (either packed or space delimited)
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::ConservationScore::end ( )
  Example    : $conservation_score->end();
  Description: wrapper around position
  Returntype : integer. Return 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public String Bio::EnsEMBL::Compara::ConservationScore::expected_score ( )
  Arg [1]    : (opt) string of expected scores (can be either packed or space 
					        delimited)
  Example    : $conservation_score->expected_score("3.85 2.54 1.56");
  Example    : my $exp_score = $conservation_score->expected_score();
  Description: Getter/Setter for the expected score string
  Returntype : string (either packed or space delimited)
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomicAlignBlock Bio::EnsEMBL::Compara::ConservationScore::genomic_align_block ( )
  Arg [1]    : Bio::EnsEMBL::Compara::GenomicAlignBlock $genomic_align_block 
  Example    : my $genomic_align_block = $conservation_score->genomic_align_block();
  Example    : $conservation_score->genomic_align_block($genomic_align_block);
  Description: Getter/Setter for the genomic_align_block attribute
  Returntype : Bio::EnsEMBL::Compara::GenomicAlignBlock object. If no
               argument is given, the genomic_align_block is not defined but
               if both the genomic_align_block_id and the adaptor are, it tries
               to fetch the data using the genomic_align_block_id.
  Exceptions : thrown if $genomic_align_block is not a 
               Bio::EnsEMBL::Compara::GenomicAlignBlock object or if 
               $genomic_align_block does not match a previously defined
               genomic_align_block_id
  Warning    : warns if getting data from other sources fails.
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::ConservationScore::genomic_align_block_id ( )
  Arg [1]    : (opt) integer genomic_align_block_id 
  Example    : my $genomic_align_block_id = $conservation_score->genomic_align_block_id();
  Example    : $conservation_score->genomic_align_block_id($genomic_align_block_id);
  Description: Getter/Setter for the genomic_align_block_id attribute. If no
               argument is given and the genomic_align_block_id is not defined,
               it tries to get the data from other sources like the 
               corresponding Bio::EnsEMBL::Compara::GenomicAlignBlock object or
               the database using the dbID of the Bio::EnsEMBL::Compara::GenomicAlign object.
  Returntype : integer
  Exceptions : thrown if $genomic_align_block_id does not match a previously 
               defined genomic_align_block 
  Warning    : warns if getting data from other sources fails.
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Bio::EnsEMBL::Compara::ConservationScore Bio::EnsEMBL::Compara::ConservationScore::new ( )
    Arg [-ADAPTOR] 
        : Bio::EnsEMBL::Compara::DBSQL::ConservationScore $adaptor
                (the adaptor for connecting to the database)
    Arg [-GENOMIC_ALIGN_BLOCK] (opt)
        : Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlock $genomic_align_block
        (the Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlock of the multiple
         alignment)
    Arg [-GENOMIC_ALIGN_BLOCK_ID] (opt) 
         : int $genomic_align_block_id
         (the database internal ID of the $genomic_align_block)
    Arg [-WINDOW_SIZE] (opt)
         : int $window_size
         (window size used to average the scores over)
    Arg [-POSITION] (opt)
        : int $position
        (position of the first score in alignment coordinates)
    Arg [-SEQ_REGION_POS] (opt)
        : int $seq_region_pos
        (position of the first score in species coordinates)
    Arg [-EXPECTED_SCORE]
        : string $expected_score
        (packed or unpacked string of expected scores)
    Arg [-DIFF_SCORE]
        : string $diff_score
        (packed or unpacked string of the difference between the observed and
	 expected scores)
    Arg [-PACKED] (opt)
        : boolean $packed
        (whether the scores are packed (1) or unpacked (0))
    Arg [Y_AXIS_MIN] (opt)
	: float $y_axis_min
	(minimum score value used for display)
    Arg [Y_AXIS_MAX] (opt)
	: float $y_axis_max
	(maximum score value used for display)
    Example :
	my $conservation_score = new Bio::EnsEMBL::Compara::ConservationScore(
				     -genomic_align_block => $gab, 
				     -window_size => $win_size, 
                                     -position => $pos, 
                                     -expected_score => $exp_scores, 
                                     -diff_score => $diff_scores);
       Description: Creates a new ConservationScore object
       Returntype : Bio::EnsEMBL::Compara::ConservationScore
       Exceptions : none
       Caller     : general
       Status     : At risk
 
Code:
click to view
public Bio::EnsEMBL::Compara::ConservationScore::new_fast ( )
  Arg [1]    : hash reference $hashref
  Example    : none
  Description: This is an ultra fast constructor which requires knowledge of
               the objects internals to be used.
  Returntype :
  Exceptions : none
  Caller     :
  Status     : At risk
 
Code:
click to view
public Double Bio::EnsEMBL::Compara::ConservationScore::observed_score ( )
  Example    : my $obs_score = $conservation_score->observed_score();
  Description: Getter for the observed score string (no setter functionality)
  Returntype : double
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Boolean Bio::EnsEMBL::Compara::ConservationScore::packed ( )
  Arg [1]    : (opt) boolean 
  Example    : $conservation_score->packed(1);
  Example    : $packed = $conservation_score->packed;
  Description: Getter/Setter for the whether the scores are packed or space
               delimited
  Returntype : boolean
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::ConservationScore::position ( )
  Arg [1]    : (opt) integer
  Example    : $conservation_score->position(1);
  Description: Getter/Setter for the alignment position of the first score
  Returntype : integer. Return 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public void Bio::EnsEMBL::Compara::ConservationScore::reverse ( )
  Example    : $conservation_score->reverse;
  Description: reverse scores and position in the ConservationScore object
  Returntype : none
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public String Bio::EnsEMBL::Compara::ConservationScore::score ( )
  Arg [1]    : (opt) string of difference scores (expected - observed)
               (can be either packed or space delimited)
  Example    : $conservation_score->diff_score("1.85 -2.54 1.56");
  Example    : my $diff_score = $conservation_score->diff_score();
  Description: alias for diff score 
  Returntype : string (either packed or space delimited)
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::ConservationScore::seq_region_pos ( )
  Arg [1]    : (opt) integer
  Example    : $conservation_score->seq_region_pos(1);
  Description: Getter/Setter for the species position of the first score
  Returntype : integer.
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::ConservationScore::start ( )
  Example    : $conservation_score->start();
  Description: Wrapper round position call 
  Returntype : integer. Return 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::ConservationScore::window_size ( )
  Arg [1]    : (opt) integer window_size
  Example    : my $window_size = $conservation_score->window_size();
  Example    : $conservation_score->window_size(1);
  Description: Getter/Setter for the window_size of this conservation score
  Returntype : integer, Returns 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Float Bio::EnsEMBL::Compara::ConservationScore::y_axis_max ( )
  Arg [1]    : (opt) float
  Example    : $conservation_score->y_axis_max(2.45);
  Example    : $y_axis_max = $conservation_score->y_axis_min;
  Description: Getter/Setter for the maximum score
  Returntype : float
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view
public Float Bio::EnsEMBL::Compara::ConservationScore::y_axis_min ( )
  Arg [1]    : (opt) float
  Example    : $conservation_score->y_axis_min(-0.5);
  Example    : $y_axis_min = $conservation_score->y_axis_min;
  Description: Getter/Setter for the minimum score
  Returntype : float
  Exceptions : none
  Caller     : general
  Status     : At risk
 
Code:
click to view

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