Bio::EnsEMBL::IdMapping TinyTranscript
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::IdMapping::TinyTranscript - lightweight transcript object
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::IdMapping::TinyFeature
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::IdMapping::TinyFeature
Synopsis
  # fetch a transcript from the db and create a lightweight
# transcript object from it
my $tr = $transcript_adaptor->fetch_by_stable_id('ENST000345437');
my $lightweight_tr =
Bio::EnsEMBL::IdMapping::TinyTranscript->new_fast( [
$tr->dbID, $tr->stable_id,
$tr->version, $tr->created_date,
$tr->modified_date, $tr->start,
$tr->end, $tr->strand,
$tr->length, md5_hex( $tr->spliced_seq ),
( $tr->is_known ? 1 : 0 ),
] );
Description
This is a lightweight transcript object for the stable Id mapping. See
the documentation in TinyFeature for general considerations about its
design.
Methods
add_ExonDescriptionCode
add_TranslationDescriptionCode
endDescriptionCode
get_all_ExonsDescriptionCode
is_knownDescriptionCode
lengthDescriptionCode
seq_md5_sumDescriptionCode
startDescriptionCode
strandDescriptionCode
translationDescriptionCode
Methods description
add_Exoncode    nextTop
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyExon $exon - the exon to add
Example : $tiny_transcript->add_Exon($tiny_exon);
Description : Adds an exon to this transcript.
Return type : none
Exceptions : thrown on wrong or missing argument
Caller : general
Status : At Risk
: under development
add_TranslationcodeprevnextTop
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyTranslation $tl - the translation
to add
Example : $tiny_transcript->add_Translation($tiny_translation);
Description : Adds a translation to this transcript.
Return type : none
Exceptions : thrown on wrong or missing argument
Caller : general
Status : At Risk
: under development
endcodeprevnextTop
  Arg[1]      : (optional) Int - the transcript's end coordinate
Description : Getter/setter for the transcript's end coordinate.
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
get_all_ExonscodeprevnextTop
  Example     : foreach my $exon (@{ $tiny_transcript->get_all_Exons }) {
# do something with exon
}
Description : Returns all exons attached to that transcript.
Return type : Arrayref of Bio::EnsEMBL::IdMapping::TinyExon objects
Exceptions : none
Caller : general
Status : At Risk
: under development
is_knowncodeprevnextTop
  Arg[1]      : (optional) Boolean - the transcript's "known" status
Description : Getter/setter for the transcript's "known" status.
Return type : Boolean
Exceptions : none
Caller : general
Status : At Risk
: under development
lengthcodeprevnextTop
  Arg[1]      : (optional) Int - the transcript's length
Description : Getter/setter for the transcript's length. Note that this is
*not* the distance between start and end, but rather the sum of
the lengths of all exons.
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
seq_md5_sumcodeprevnextTop
  Arg[1]      : (optional) String - the md5 digest of the transcript's sequence
Description : Getter/setter for the md5 digest of the transcript's sequence.
Note that when used as a setter, you are expected to pass a
digest, not the raw sequence (i.e. the digest is not created for
you).
Return type : String
Exceptions : none
Caller : general
Status : At Risk
: under development
startcodeprevnextTop
  Arg[1]      : (optional) Int - the transcript's start coordinate
Description : Getter/setter for the transcript's start coordinate.
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
strandcodeprevnextTop
  Arg[1]      : (optional) Int - the transcript's strand
Description : Getter/setter for the transcript's strand.
Return type : Int
Exceptions : none
Caller : general
Status : At Risk
: under development
translationcodeprevnextTop
  Description : Getter for the transcript's translation.
Return type : Bio::EnsEMBL::IdMapping::TinyTranslation
Exceptions : none
Caller : general
Status : At Risk
: under development
Methods code
add_ExondescriptionprevnextTop
sub add_Exon {
  my $self = shift;
  my $exon = shift;

  unless ($exon && $exon->isa('Bio::EnsEMBL::IdMapping::TinyExon')) {
    throw('Need a Bio::EnsEMBL::IdMapping::TinyExon.');
  }

  push @{ $self->[12] }, $exon;
}
add_TranslationdescriptionprevnextTop
sub add_Translation {
  my $self = shift;
  my $tl = shift;

  unless ($tl && $tl->isa('Bio::EnsEMBL::IdMapping::TinyTranslation')) {
    throw('Need a Bio::EnsEMBL::IdMapping::TinyTranslation.');
  }

  $self->[11] = $tl;
}
enddescriptionprevnextTop
sub end {
  my $self = shift;
  $self->[6] = shift if (@_);
  return $self->[6];
}
get_all_ExonsdescriptionprevnextTop
sub get_all_Exons {
  return $_[0]->[12] || [];
}


1;
}
is_knowndescriptionprevnextTop
sub is_known {
  my $self = shift;
  $self->[10] = shift if (@_);
  return $self->[10];
}
lengthdescriptionprevnextTop
sub length {
  my $self = shift;
  $self->[8] = shift if (@_);
  return $self->[8];
}
seq_md5_sumdescriptionprevnextTop
sub seq_md5_sum {
  my $self = shift;
  $self->[9] = shift if (@_);
  return $self->[9];
}
startdescriptionprevnextTop
sub start {
  my $self = shift;
  $self->[5] = shift if (@_);
  return $self->[5];
}
stranddescriptionprevnextTop
sub strand {
  my $self = shift;
  $self->[7] = shift if (@_);
  return $self->[7];
}
translationdescriptionprevnextTop
sub translation {
  return $_[0]->[11];
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.