Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Translation Class Reference
Inheritance diagram for Bio::EnsEMBL::Translation:

List of all members.


Class Summary

Synopsis

  my $translation = Bio::EnsEMBL::Translation-\>new(
    -START_EXON =\> $exon1,
    -END_EXON   =\> $exon2,
    -SEQ_START  =\> 98,
    -SEQ_END    =\> 39
  );

  # stable ID setter
  $translation-\>stable_id('ENSP00053458');

  # get start and end position in start/end exons
  my $start = $translation-\>start;
  my $end   = $translation-\>end;

Description

A Translation object defines the CDS and UTR regions of a Transcript
through the use of start_Exon/end_Exon, and start/end attributes.
 

Definition at line 32 of file Translation.pm.

Available Methods

public
Bio::EnsEMBL::DBSQL::BaseAdaptor 
adaptor ()
public void add_Attributes ()
public void add_DBEntry ()
public void add_ProteinFeature ()
public Int cdna_end ()
public Int cdna_start ()
public String created_date ()
public Int dbID ()
public String display_id ()
public Int end ()
public Bio::EnsEMBL::Exon end_Exon ()
public Int genomic_end ()
public Int genomic_start ()
public Listref get_all_Attributes ()
public Hashref get_all_DAS_Features ()
public Listref get_all_DASFactories ()
public Listref get_all_DBEntries ()
public Listref get_all_DBLinks ()
public Listref get_all_DomainFeatures ()
public Listref get_all_object_xrefs ()
public Bio::EnsEMBL::ProteinFeature get_all_ProteinFeatures ()
public Bio::EnsEMBL::SeqEdit get_all_SeqEdits ()
public Listref get_all_xrefs ()
public Boolean is_stored ()
public Int length ()
public void load ()
public String modified_date ()
public Bio::Seq modify_translation ()
public Bio::EnsEMBL::Translation new ()
public Bio::EnsEMBL::Translation new_fast ()
public String seq ()
public String stable_id ()
public Int start ()
public Bio::EnsEMBL::Exon start_Exon ()
public Hashref summary_as_hash ()
public temporary_id ()
public Bio::EnsEMBL::Transcript transcript ()
public void transform ()
public String version ()

Method Documentation

public Bio::EnsEMBL::DBSQL::BaseAdaptor Bio::EnsEMBL::Storable::adaptor ( ) [inherited]
  Arg [1]    : Bio::EnsEMBL::DBSQL::BaseAdaptor $adaptor
  Example    : none
  Description: get/set for this objects Adaptor
  Returntype : Bio::EnsEMBL::DBSQL::BaseAdaptor
  Exceptions : none
  Caller     : general, set from adaptor on store
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Translation::add_Attributes ( )
  Arg [1..N] : Bio::EnsEMBL::Attribute $attribute
               Attributes to add.
  Example    : $translation->add_Attributes($selenocysteine_attribute);
  Description: Adds an Attribute to the Translation. Usefull to 
               do _selenocysteine.
               If you add an attribute before you retrieve any from database, 
               lazy load will be disabled.
  Returntype : none
  Exceptions : throw on incorrect arguments
  Caller     : general
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Translation::add_DBEntry ( )
  Arg [1]    : Bio::EnsEMBL::DBEntry $dbe
               The dbEntry to be added
  Example    : $translation->add_DBEntry($xref);
  Description: Associates a DBEntry with this translation. Note that adding
               DBEntries will prevent future lazy-loading of DBEntries for this
               translation (see get_all_DBEntries).
  Returntype : none
  Exceptions : thrown on incorrect argument type
  Caller     : general
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Translation::add_ProteinFeature ( )
  Arg [1]    : Bio::EnsEMBL::ProteinFeature $pf
               The ProteinFeature to be added
  Example    : $translation->add_ProteinFeature($pf);
  Description: Associates a ProteinFeature with this translation. Note that
               adding ProteinFeatures will prevent future lazy-loading of
               ProteinFeatures for this translation (see
               get_all_ProteinFeatures).
  Returntype : none
  Exceptions : thrown on incorrect argument type
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::cdna_end ( )
    Arg  [1]    : (optional) Bio::EnsEMBL::Transcript $transcript
                  The transcript which this is a translation of.
    Example     : $translation_cdna_end = $translation->cdna_end();
    Description : Returns the end position of the translation in cDNA
                  coordinates.
                  If no transcript is given, the method will use
                  TranscriptAdaptor->fetch_by_translation_id() to locate
                  the correct transcript.
    Return type : Integer
    Exceptions  : Throws if the given (optional) argument is not a
                  transcript.
    Caller      : General
    Status      : At Risk (Under Development)
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::cdna_start ( )
    Arg  [1]    : (optional) Bio::EnsEMBL::Transcript $transcript
                  The transcript which this is a translation of.
    Example     : $translation_cdna_start = $translation->cdna_start();
    Description : Returns the start position of the translation in cDNA
                  coordinates.
                  If no transcript is given, the method will use
                  TranscriptAdaptor->fetch_by_translation_id() to locate
                  the correct transcript.
    Return type : Integer
    Exceptions  : Throws if the given (optional) argument is not a
                  transcript.
    Caller      : General
    Status      : At Risk (Under Development)
 
Code:
click to view
public String Bio::EnsEMBL::Translation::created_date ( )
  Arg [1]    : (optional) string $created_date - created date to set
  Example    : $translation->created_date('2007-01-10 20:52:00');
  Description: Getter/setter for attribute created date
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Storable::dbID ( ) [inherited]
  Arg [1]    : int $dbID
  Example    : none
  Description: getter/setter for the database internal id
  Returntype : int
  Exceptions : none
  Caller     : general, set from adaptor on store
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Map::Ditag, and Bio::EnsEMBL::Map::DitagFeature.

public String Bio::EnsEMBL::Translation::display_id ( )
  Example    : print $translation->display_id();
  Description: This method returns a string that is considered to be
               the 'display' identifier. For translations this is (depending on
               availability and in this order) the stable Id, the dbID or an
               empty string.
  Returntype : string
  Exceptions : none
  Caller     : web drawing code
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::end ( )
  Arg [1]    : (optional) int $end - end position to set
  Example    : $translation->end(8);
  Description: Getter/setter for the value of end, which is a position within
               the exon given by end_Exon.
               If you need genomic coordinates, use the genomic_end()
               method.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Exon Bio::EnsEMBL::Translation::end_Exon ( )
  Arg [1]    : (optional) Bio::EnsEMBL::Exon - start exon to assign
  Example    : $translation->start_Exon($exon1);
  Description: Getter/setter for the value of end_Exon, which denotes the
               exon at which translation ends (and within this exon, at the
               position indicated by end, see above).
  Returntype : Bio::EnsEMBL::Exon
  Exceptions : thrown on wrong argument type
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::genomic_end ( )
    Args        : None
    Example     : $translation_genomic_end = $translation->genomic_end();
    Description : Returns the end position of the translation in genomic
                  coordinates on the forward strand.
    Return type : Integer
    Exceptions  : None
    Caller      : General
    Status      : At Risk (Under Development)
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::genomic_start ( )
    Args        : None
    Example     : $translation_genomic_start =
                      $translation->genomic_start();
    Description : Returns the start position of the translation in
                  genomic coordinates on the forward strand.
    Return type : Integer
    Exceptions  : None
    Caller      : General
    Status      : At Risk (Under Development)
 
Code:
click to view
public Listref Bio::EnsEMBL::Translation::get_all_Attributes ( )
  Arg [1]    : optional string $attrib_code
               The code of the attribute type to retrieve values for.
  Example    : ($sc_attr) = @{$tl->get_all_Attributes('_selenocysteine')};
               @tl_attributes = @{$translation->get_all_Attributes()};
  Description: Gets a list of Attributes of this translation.
               Optionally just get Attrubutes for given code.
               Recognized attribute "_selenocysteine"
  Returntype : listref Bio::EnsEMBL::Attribute
  Exceptions : warning if translation does not have attached adaptor and 
               attempts lazy load.
  Caller     : general, modify_translation
  Status     : Stable
 
Code:
click to view
public Hashref Bio::EnsEMBL::Translation::get_all_DAS_Features ( )
  Example    : $features = $prot->get_all_DAS_Features;
  Description: Retreives a hash reference to a hash of DAS feature
               sets, keyed by the DNS, NOTE the values of this hash
               are an anonymous array containing:
                (1) a pointer to an array of features;
                (2) a pointer to the DAS stylesheet
  Returntype : hashref of Bio::SeqFeatures
  Exceptions : none
  Caller     : webcode
  Status     : Stable
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::Storable.

public Listref Bio::EnsEMBL::Translation::get_all_DASFactories ( )
  Function  : Retrieves a listref of registered DAS objects
  Returntype: Listref of DAS Objects
  Exceptions: none
  Caller    : webcode
  Example   : $dasref = $prot->get_all_DASFactories;
  Status    : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Translation::get_all_DBEntries ( )
  Arg [1]    : (optional) String, external database name
  Arg [2]    : (optional) String, external_db type
  Example    : @dbentries = @{ $translation->get_all_DBEntries() };
  Description: Retrieves DBEntries (xrefs) for this translation.
               This method will attempt to lazy-load DBEntries
               from a database if an adaptor is available and no
               DBEntries are present on the translation (i.e. they
               have not already been added or loaded).
  Returntype : Listref to Bio::EnsEMBL::DBEntry objects
  Exceptions : none
  Caller     : TranslationAdaptor::store
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Translation::get_all_DBLinks ( )
  Arg [1]    : String database name (optional)
               SQL wildcard characters (_ and %) can be used to
               specify patterns.
  Example    :  my @dblinks = @{ $translation->get_all_DBLinks() };
                my @dblinks = @{ $translation->get_all_DBLinks('Uniprot%') };
  Description: This is here for consistancy with the Transcript
               and Gene classes.  It is a synonym for the
               get_all_DBEntries() method.
  Return type: Listref to Bio::EnsEMBL::DBEntry objects
  Exceptions : none
  Caller     : general
  Status     : Stable
 
public Listref Bio::EnsEMBL::Translation::get_all_DomainFeatures ( )
  Example    : @domain_feats = @{$translation->get_all_DomainFeatures};
  Description: A convenience method which retrieves all protein features
               that are considered to be 'Domain' features.  Features which
               are 'domain' features are those with analysis logic names:
               'pfscan', 'scanprosite', 'superfamily', 'pfam', 'prints',
               'smart', 'pirsf', 'tigrfam'.
  Returntype : listref of Bio::EnsEMBL::ProteinFeatures
  Exceptions : none
  Caller     : webcode (protview)
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Translation::get_all_object_xrefs ( )
  Arg [1]    : (optional) String, external database name
  Arg [2]    : (optional) String, external_db type
  Example    : @oxrefs = @{ $translation->get_all_object_xrefs() };
  Description: Retrieves xrefs for this translation.
               This method will attempt to lazy-load xrefs from a
               database if an adaptor is available and no xrefs
               are present on the translation (i.e. they have not
               already been added or loaded).
                NB: This method is an alias for the
                    get_all_DBentries() method.
  Return type: Listref of Bio::EnsEMBL::DBEntry objects
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::ProteinFeature Bio::EnsEMBL::Translation::get_all_ProteinFeatures ( )
  Arg [1]    : (optional) string $logic_name
               The analysis logic_name of the features to retrieve.  If not
               specified, all features are retrieved instead.
  Example    : $features = $self->get_all_ProteinFeatures('PFam');
  Description: Retrieves all ProteinFeatures associated with this 
               Translation. If a logic_name is specified, only features with 
               that logic_name are returned.  If no logic_name is provided all
               associated protein_features are returned.
               ProteinFeatures are lazy-loaded from the database unless they
               added manually to the Translation or had already been loaded.
  Returntype : Bio::EnsEMBL::ProteinFeature
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::SeqEdit Bio::EnsEMBL::Translation::get_all_SeqEdits ( )
  Example    : my @seqeds = @{$transcript->get_all_SeqEdits()};
  Description: Retrieves all post transcriptional sequence modifications for
               this transcript.
  Returntype : Bio::EnsEMBL::SeqEdit
  Exceptions : none
  Caller     : spliced_seq()
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Translation::get_all_xrefs ( )
  Arg [1]    : String database name (optional)
               SQL wildcard characters (_ and %) can be used to
               specify patterns.
  Example    : @xrefs = @{ $translation->get_all_xrefs() };
               @xrefs = @{ $translation->get_all_xrefs('Uniprot%') };
  Description: This method is here for consistancy with the Gene
               and Transcript classes.  It is an alias for the
               get_all_DBLinks() method, which in turn directly
               calls get_all_DBEntries().
  Return type: Listref of Bio::EnsEMBL::DBEntry objects
  Status     : Stable
 
Code:
click to view
public Boolean Bio::EnsEMBL::Storable::is_stored ( ) [inherited]
  Arg [1]    : Bio::EnsEMBL::DBSQL::DBConnection 
             : or Bio::EnsEMBL::DBSQL::DBAdaptor
  Example    : do_something if($object->is_stored($db));
  Description: Returns true if this object is stored in the provided database.
               This works under the assumption that if the adaptor and dbID are
               set and the database of the adaptor shares the port, dbname and
               hostname with the provided database, this object is stored in
               that database.
  Returntype : 1 or 0
  Exceptions : throw if dbID is set but adaptor is not
               throw if adaptor is set but dbID is not
               throw if incorrect argument is passed
  Caller     : store methods
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::length ( )
  Example    : print "Peptide length =", $translation->length();
  Description: Retrieves the length of the peptide sequence (i.e. number of
               amino acids) represented by this Translation object.
  Returntype : int
  Exceptions : none
  Caller     : webcode (protview etc.)
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Translation::load ( )
  Arg [1]       : Boolean $load_xrefs
                  Load (or don't load) xrefs.  Default is to load xrefs.
  Example       : $translation->load();
  Description   : The Ensembl API makes extensive use of
                  lazy-loading.  Under some circumstances (e.g.,
                  when copying genes between databases), all data of
                  an object needs to be fully loaded.  This method
                  loads the parts of the object that are usually
                  lazy-loaded.
  Returns       : none
 
Code:
click to view
public String Bio::EnsEMBL::Translation::modified_date ( )
  Arg [1]    : (optional) string $modified_date - modification date to set
  Example    : $translation->modified_date('2007-01-10 20:52:00');
  Description: Getter/setter for attribute modified date
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::Seq Bio::EnsEMBL::Translation::modify_translation ( )
  Arg [1]    : Bio::Seq $peptide 
  Example    : my $seq = Bio::Seq->new(-SEQ => $dna)->translate();
               $translation->modify_translation($seq);
  Description: Applies sequence edits such as selenocysteines to the Bio::Seq 
               peptide thats passed in
  Returntype : Bio::Seq
  Exceptions : none
  Caller     : Bio::EnsEMBL::Transcript->translate
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Translation Bio::EnsEMBL::Translation::new ( )
  Arg [-START_EXON] : The Exon object in which the translation (CDS) starts
  Arg [-END_EXON]   : The Exon object in which the translation (CDS) ends
  Arg [-SEQ_START]  : The offset in the start_Exon indicating the start
                      position of the CDS.
  Arg [-SEQ_END]    : The offset in the end_Exon indicating the end
                      position of the CDS.
  Arg [-STABLE_ID]  : The stable identifier for this Translation
  Arg [-VERSION]    : The version of the stable identifier
  Arg [-DBID]       : The internal identifier of this Translation
  Arg [-ADAPTOR]    : The TranslationAdaptor for this Translation
  Arg [-SEQ]        : Manually sets the peptide sequence of this translation.
                      May be useful if this translation is not stored in
                      a database.
  Arg [-CREATED_DATE]: the date the translation was created
  Arg [-MODIFIED_DATE]: the date the translation was modified
  Example    : my $tl = Bio::EnsEMBL::Translation->new
                   (-START_EXON => $ex1,
                    -END_EXON   => $ex2,
                    -SEQ_START  => 98,
                    -SEQ_END    => 39);
  Description: Constructor.  Creates a new Translation object
  Returntype : Bio::EnsEMBL::Translation
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::Storable.

public Bio::EnsEMBL::Translation Bio::EnsEMBL::Translation::new_fast ( )
  Arg [1]    : hashref to be blessed
  Description: Construct a new Bio::EnsEMBL::Translation using the hashref.
  Exceptions : none
  Returntype : Bio::EnsEMBL::Translation
  Caller     : general, subclass constructors
  Status     : Stable
 
Code:
click to view
public String Bio::EnsEMBL::Translation::seq ( )
  Example    : print $translation->seq();
  Description: Retrieves a string representation of the peptide sequence
               of this Translation.  This retrieves the transcript from the
               database and gets its sequence, or retrieves the sequence which
               was set via the constructor.
  Returntype : string
  Exceptions : warning if the sequence is not set and cannot be retrieved from
               the database.
  Caller     : webcode (protview etc.)
  Status     : Stable
 
Code:
click to view
public String Bio::EnsEMBL::Translation::stable_id ( )
  Arg [1]    : (optional) string $stable_id - stable ID to set
  Example    : $translation->stable_id('ENSP0059890');
  Description: Getter/setter for attribute stable_id
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Translation::start ( )
  Arg [1]    : (optional) int $start - start position to set
  Example    : $translation->start(17);
  Description: Getter/setter for the value of start, which is a position within
               the exon given by start_Exon.
               If you need genomic coordinates, use the genomic_start()
               method.
  Returntype : int
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Exon Bio::EnsEMBL::Translation::start_Exon ( )
  Arg [1]    : (optional) Bio::EnsEMBL::Exon - start exon to assign
  Example    : $translation->start_Exon($exon1);
  Description: Getter/setter for the value of start_Exon, which denotes the
               exon at which translation starts (and within this exon, at the
               position indicated by start, see above).
  Returntype : Bio::EnsEMBL::Exon
  Exceptions : thrown on wrong argument type
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Hashref Bio::EnsEMBL::Translation::summary_as_hash ( )
  Example       : $translation_summary = $translation->summary_as_hash();
  Description   : Retrieves a textual summary of this Translation.
                  Not inherited from Feature.
  Returns       : hashref of arrays of descriptive strings
  Status        : Intended for internal use
 
Code:
click to view
public Bio::EnsEMBL::Translation::temporary_id ( )
  Description:

Deprecated:
This method should not be needed. Use dbID, stable_id or something else.
 
Code:
click to view
public Bio::EnsEMBL::Transcript Bio::EnsEMBL::Translation::transcript ( )
  Arg [1]       : Transcript object (optional)
  Description   : Sets or retrieves the transcript object associated
                  with this translation object.
  Exceptions    : Throws if there is no adaptor or no dbID defined for
                  the translation object.
  Returntype    : Bio::EnsEMBL::Transcript
 
Code:
click to view
public void Bio::EnsEMBL::Translation::transform ( )
  Arg [1]    : hashref $old_new_exon_map
               a hash that maps old to new exons for a whole gene
  Description: maps start end end exon according to mapping table.
              If an exon is not mapped, just keep the old one.
  Returntype : none
  Exceptions : none
  Caller     : Transcript->transform() 
  Status     : Stable
 
Code:
click to view
public String Bio::EnsEMBL::Translation::version ( )
  Arg [1]    : (optional) string $version - version to set
  Example    : $translation->version(2);
  Description: Getter/setter for attribute version
  Returntype : string
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file: