Bio::EnsEMBL::Compara SitewiseOmega
SummaryPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Compara::SitewiseOmega - DESCRIPTION of Object
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( warning deprecate throw )
Synopsis
Give standard usage here
Description
Describe the object here
Methods
adaptorDescriptionCode
aln_positionDescriptionCode
dbID
No description
Code
member_positionDescriptionCode
new_fastDescriptionCode
node_idDescriptionCode
omegaDescriptionCode
omega_lowerDescriptionCode
omega_upperDescriptionCode
optimalDescriptionCode
threshold_on_branch_dsDescriptionCode
tree_node_idDescriptionCode
typeDescriptionCode
Methods description
adaptorcode    nextTop
  Arg [1]    : Bio::EnsEMBL::DBSQL::SitewiseOmegaAdaptor $adaptor
Example : $sitewise_omega->adaptor($adaptor);
Description: Getter/Setter for the adaptor this object used for database
interaction
Returntype : Bio::EnsEMBL::DBSQL::SitewiseOmegaAdaptor object
Exceptions : thrown if the argument is not a
Bio::EnsEMBL::DBSQL::SitewiseOmegaAdaptor object
Caller : general
Status : At risk
aln_positioncodeprevnextTop
  Arg [1]    : (opt) integer
Example : $sitewise_dnds->aln_position(1);
Description: Getter/Setter for the alignment position
Returntype : integer. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
member_positioncodeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Member $member
Arg [2] : Bio::SimpleAlign $aln
Example : $sitewise_omega->member_position($member,$aln);
Description: Obtain the member position for a given sitewise_omega value
Returntype : integer
Exceptions : return undef if member not in the alignment or aln_position not in member
Caller : general
Status : At risk
new_fastcodeprevnextTop
  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 :
node_idcodeprevnextTop
  Arg [1]    : (opt) integer
Example : $sitewise_dnds->node_id(1);
Description: Getter/Setter for the node_id value
Returnnode_id : integer. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
omegacodeprevnextTop
  Arg [1]    : (opt) integer
Example : $sitewise_dnds->omega(1);
Description: Getter/Setter for the omega value
Returntype : integer. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
omega_lowercodeprevnextTop
  Arg [1]    : (opt) float
Example : $sitewise_dnds->omega_lower(1);
Description: Getter/Setter for the omega_lower value
Returntype : float. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
omega_uppercodeprevnextTop
  Arg [1]    : (opt) float
Example : $sitewise_dnds->omega_upper(1);
Description: Getter/Setter for the omega_upper value
Returntype : float. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
optimalcodeprevnextTop
  Arg [1]    : (opt) float
Example : $sitewise_dnds->optimal(1);
Description: Getter/Setter for the optimal value
Returntype : float. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
threshold_on_branch_dscodeprevnextTop
  Arg [1]    : (opt) float
Example : $sitewise_dnds->threshold_on_branch_ds(1);
Description: Getter/Setter for the threshold_on_branch_ds value
Returntype : float. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
tree_node_idcodeprevnextTop
  Arg [1]    : (opt) integer
Example : $sitewise_dnds->tree_node_id(1);
Description: Getter/Setter for the tree_node_id value
Returntree_node_id : integer. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
typecodeprevnextTop
  Arg [1]    : (opt) integer
Example : $sitewise_dnds->type(1);
Description: Getter/Setter for the type value
Returntype : integer. Return 1 if value not defined
Exceptions : none
Caller : general
Status : At risk
Methods code
adaptordescriptionprevnextTop
sub adaptor {
  my ( $self, $adaptor ) = @_;

  if (defined($adaptor)) {
    throw("$adaptor is not a Bio::EnsEMBL::Compara::DBSQL::SitewiseOmegaAdaptor object")
        unless ($adaptor->isa("Bio::EnsEMBL::Compara::DBSQL::SitewiseOmegaAdaptor"));
    $self->{'adaptor'} = $adaptor;
  }

  return $self->{'adaptor'};
}
aln_positiondescriptionprevnextTop
sub aln_position {
    my ($self, $aln_position) = @_;

    if(defined $aln_position) {
	$self->{'aln_position'} = $aln_position;
    }

  $self->{'aln_position'}= undef unless(defined($self->{'aln_position'}));
  return $self->{'aln_position'};
}
dbIDdescriptionprevnextTop
sub dbID {
    my ($self, $dbID) = @_;

    if(defined $dbID) {
	$self->{'_dbID'} = $dbID;
    }

  $self->{'_dbID'}= undef unless(defined($self->{'_dbID'}));
  return $self->{'_dbID'};
}




1;
}
member_positiondescriptionprevnextTop
sub member_position {
  my ($self, $member, $aln) = @_;

  throw("$member is not a Bio::EnsEMBL::Compara::Member object")
    unless ($member->isa("Bio::EnsEMBL::Compara::Member"));

  throw("$aln is not a Bio::SimpleAlign object")
    unless ($aln->isa("Bio::SimpleAlign"));

  my @seqs = $aln->each_seq_with_id($member->stable_id);
  my $seq = $seqs[0];

  my $seq_location;
  eval { $seq_location = $seq->location_from_column($self->aln_position);};
  return undef if ($@);
  my $location_type;
  eval { $location_type = $seq_location->location_type;};
  return undef if ($@);
  if ($seq_location->location_type eq 'EXACT') {
    my $member_position = $seq_location->start;
    return $member_position;
  }

  return undef;
}
new_fastdescriptionprevnextTop
sub new_fast {
  my ($class, $hashref) = @_;

  return bless $hashref, $class;
}
node_iddescriptionprevnextTop
sub node_id {
    my ($self, $node_id) = @_;

    if(defined $node_id) {
	$self->{'node_id'} = $node_id;
    }

  $self->{'node_id'}= undef unless(defined($self->{'node_id'}));
  return $self->{'node_id'};
}
omegadescriptionprevnextTop
sub omega {
    my ($self, $omega) = @_;

    if(defined $omega) {
	$self->{'omega'} = $omega;
    }

  $self->{'omega'}= undef unless(defined($self->{'omega'}));
  return $self->{'omega'};
}
omega_lowerdescriptionprevnextTop
sub omega_lower {
    my ($self, $omega_lower) = @_;

    if(defined $omega_lower) {
	$self->{'omega_lower'} = $omega_lower;
    }

  $self->{'omega_lower'}= undef unless(defined($self->{'omega_lower'}));
  return $self->{'omega_lower'};
}
omega_upperdescriptionprevnextTop
sub omega_upper {
    my ($self, $omega_upper) = @_;

    if(defined $omega_upper) {
	$self->{'omega_upper'} = $omega_upper;
    }

  $self->{'omega_upper'}= undef unless(defined($self->{'omega_upper'}));
  return $self->{'omega_upper'};
}
optimaldescriptionprevnextTop
sub optimal {
    my ($self, $optimal) = @_;

    if(defined $optimal) {
	$self->{'optimal'} = $optimal;
    }

  $self->{'optimal'}= undef unless(defined($self->{'optimal'}));
  return $self->{'optimal'};
}
threshold_on_branch_dsdescriptionprevnextTop
sub threshold_on_branch_ds {
    my ($self, $threshold_on_branch_ds) = @_;

    if(defined $threshold_on_branch_ds) {
	$self->{'threshold_on_branch_ds'} = $threshold_on_branch_ds;
    }

  $self->{'threshold_on_branch_ds'}= undef unless(defined($self->{'threshold_on_branch_ds'}));
  return $self->{'threshold_on_branch_ds'};
}
tree_node_iddescriptionprevnextTop
sub tree_node_id {
    my ($self, $tree_node_id) = @_;

    if(defined $tree_node_id) {
	$self->{'tree_node_id'} = $tree_node_id;
    }

  $self->{'tree_node_id'}= undef unless(defined($self->{'tree_node_id'}));
  return $self->{'tree_node_id'};
}
typedescriptionprevnextTop
sub type {
    my ($self, $type) = @_;

    if(defined $type) {
	$self->{'type'} = $type;
    }

  $self->{'type'}= undef unless(defined($self->{'type'}));
  return $self->{'type'};
}
General documentation
AUTHOR - Albert VilellaTop
This modules is part of the Ensembl project
Email avilella@ebi.ac.uk
Describe contact details here
APPENDIXTop
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _