ensembl StatMsg
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Exporter
Inherit
Exporter
Synopsis
No synopsis!
Description
No description!
Methods
code
No description
Code
code2str
No description
Code
code_str
No description
Code
id
No description
Code
new
No description
Code
set_logger
No description
Code
Methods description
None available.
Methods code
codedescriptionprevnextTop
sub code {
  my $self = shift;
  return $self->{'code'};
}

#
# Returns a human readible version of what the code of this statmsg means.
#
}
code2strdescriptionprevnextTop
sub code2str {
  my $code = shift;

  my $str = "StatCode $code:";

  if(!$code) {
    $str .= '  OK';
  }
  if($code & ENTIRE) {
    $str .= ' entire';
  }
  if($code & PARTIAL) {
    $str .= ' partial';
  }
  if($code & LONG) {
    $str .= ' long';
  }
  if($code & MEDIUM) {
    $str .= ' medium';
  }
  if($code & SHORT) {
    $str .= ' short';
  }
  if($code & FRAMESHIFT) {
    $str .= ' frameshifting';
  }
  if($code & EXON) {
    $str .=  ' exon';
  }
  if($code & TRANSCRIPT) {
    $str .=  ' transcript';
  }
  if($code & DELETE) {
    $str .= ' deletion';
  }
  if($code & INSERT) {
    $str .= ' insertion';
  }
  if($code & CDS) {
    $str .= ' in CDS';
  }
  if($code & UTR) {
    $str .= ' in UTR';
  }
  if($code & FIVE_PRIME) {
    $str .= " at 5' end";
  }
  if($code & THREE_PRIME) {
    $str .= " at 3' end";
  }
  if($code & MIDDLE) {
    $str .= " in middle";
  }
  if($code & DOESNT_TRANSLATE) {
    $str .= " does not translate";
  }
  if($code & SCAFFOLD_SPAN) {
    $str .= " spans multiple scaffolds";
  }
  if($code & INVERT) {
    $str .= " inversion";
  }
  if($code & STRAND_FLIP) {
    $str .= " flips strands";
  }
  if($code & NO_CDS_LEFT) {
    $str .= " all CDS deleted";
  }
  if($code & CONFUSED) {
    $str .= " confused";
  }
  if($code & ALL_INTRON) {
    $str .= " consumed by frameshift intron";
  }
  if($code & TRANSLATES) {
    $str .= " translates";
  }
  if($code & SPLIT) {
    $str .= " split";
  }
  if($code & NO_SEQUENCE_LEFT) {
    $str .= " no sequence left";
  }


  return "$str\n";
}




1;
}
code_strdescriptionprevnextTop
sub code_str {
  my $self = shift;
  return code2str($self->{'code'});
}

#
# converts a code to a string
#
}
iddescriptionprevnextTop
sub id {
  my $self = shift;
  return $self->{'id'};
}

#
# The code is a bitvector - a combination of bitwise or'd constants.
#
}
newdescriptionprevnextTop
sub new {
  my $class = shift;
  my $code  = shift;

  if(!defined($code)) {
    die("Status Code Argument is required.\n");
  }

  my $sm = bless {'code' => $code, 'id' => $CUR_ID++}, $class;

  if($LOGGER) {
    $LOGGER->add_StatMsg($sm);
  }

  return $sm;
}


#
# Sets a logger for stat msg logging
# If set, every created StatMsg will be logged to a file
# if undef, nothing will be logged.
#
}
set_loggerdescriptionprevnextTop
sub set_logger {
  my $logger = shift;
  $LOGGER = $logger;
}


#
# Unique id is given to each statmsg so that they can be distinguished.
# Sometimes the same statmsg will be given to multiple exons and it is handy
# to be able to tell the messages apart, for example.
#
}
General documentation
No general documentation available.