None available.
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; } |
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;
}
} |