ensembl Utils
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Utils::Exception qw ( info )
Exporter
Inherit
Exporter
Synopsis
No synopsis!
Description
No description!
Methods
print_coords
No description
Code
print_exon
No description
Code
print_three_phase_translation
No description
Code
print_translation
No description
Code
Methods description
None available.
Methods code
print_coordsdescriptionprevnextTop
sub print_coords {
  my $cs = shift;

  foreach my $c (@$cs) {
    if($c->isa('Bio::EnsEMBL::Mapper::Gap')) {
      info("  GAP ". $c->length());
    } else {
      info("  ". $c->start. '-'. $c->end. ' ('.$c->strand.")");
    }
  }
}
print_exondescriptionprevnextTop
sub print_exon {
  my $exon = shift;
  my $tr = shift;

  if (!$exon) {
    throw("Exon undefined");
  }

  info(" ".$exon->stable_id());

  info("  cdna_start = ".$exon->cdna_start())
    if(defined($exon->cdna_start()));

  info("  cdna_end   = ". $exon->cdna_end())
    if(defined($exon->cdna_end()));

  info("  start             = ". $exon->start())
    if(defined($exon->start()));

  info("  end               = ". $exon->end())
    if(defined($exon->end()));

  info("  strand            = ". $exon->strand())
    if(defined($exon->strand()));

  if($exon->fail) {
    info("  FAILED");
  }

  if($tr) {
    info(" TRANSCRIPT:");
    info("  cdna_coding_start = ". $tr->cdna_coding_start());
    info("  cdna_coding_end   = ". $tr->cdna_coding_end(). "\n");
  }

  return;
}
print_three_phase_translationdescriptionprevnextTop
sub print_three_phase_translation {
  my $transcript = shift;

  return if(!$transcript->translation());

  my $orig_phase = $transcript->start_Exon->phase();

  foreach my $phase (0,1,2) {
    info("======== Phase $phase translation: ");
    $transcript->start_Exon->phase($phase);
    info("Peptide: " . $transcript->translate->seq() . "\n\n===============");
  }

  $transcript->start_Exon->phase($orig_phase);

  return;
}



1;
}
print_translationdescriptionprevnextTop
sub print_translation {
  my $tl = shift;

  info("TRANSLATION");

  if(!$tl) {
    info("  undef");
    return;
  }

  if($tl->start_Exon()) {
    info("  start exon = ", $tl->start_Exon->stable_id());
  } else {
    info("  start exon = undef");
  }

  if($tl->end_Exon()) {
    info("  end exon = ", $tl->end_Exon->stable_id);
  } else {
    info("  end exon = undef");
  }

  if(defined($tl->start())) {
    info("  start = ", $tl->start());
  } else {
    info("  start = undef");
  }

  if(defined($tl->end())) {
    info("  end = ", $tl->end());
  } else {
    info("  end = undef");
  }

  return;
}
General documentation
No general documentation available.