ensembl-hive  2.8.1
Bio::EnsEMBL::DBSQL::TranslationAdaptor Class Reference
+ Inheritance diagram for Bio::EnsEMBL::DBSQL::TranslationAdaptor:

Public Member Functions

public Listref fetch_all_alternative_by_Transcript ()
 
public Bio::EnsEMBL::Translation fetch_by_Transcript ()
 
public Reference fetch_all_by_external_name ()
 
public Listref fetch_all_by_GOTerm ()
 
public Listref fetch_all_by_GOTerm_accession ()
 
public Int store ()
 
public void remove ()
 
public List list_dbIDs ()
 
public Reference list_stable_ids ()
 
protected ArrayRef _list_dbIDs ()
 
public Bio::EnsEMBL::Translation fetch_by_dbID ()
 
public Bio::EnsEMBL::Translation fetch_by_stable_id ()
 
public Bio::EnsEMBL::Gene fetch_by_stable_id_version ()
 
public Reference fetch_all_by_Transcript_list ()
 
public Listref fetch_all ()
 
protected _tables ()
 
- Public Member Functions inherited from Bio::EnsEMBL::DBSQL::BaseAdaptor
public Bio::EnsEMBL::DBSQL::BaseAdaptor new ()
 
public DBI::StatementHandle prepare ()
 
public Bio::EnsEMBL::DBSQL::DBAdaptor db ()
 
public Bio::EnsEMBL::DBSQL::DBConnection dbc ()
 
public Boolean is_multispecies ()
 
public Int species_id ()
 
protected _list_dbIDs ()
 
protected _straight_join ()
 
protected _can_straight_join ()
 
public Listref bind_param_generic_fetch ()
 
protected _bind_param_generic_fetch ()
 
public String generate_in_constraint ()
 
public Listref generic_fetch ()
 
public Int generic_count ()
 
protected _generate_sql ()
 
public Bio::EnsEMBL::Feature fetch_by_dbID ()
 
protected _uncached_fetch_by_dbID ()
 
public Listref fetch_all_by_dbID_list ()
 
protected _uncached_fetch_all_by_dbID_list ()
 
protected ArrayRef _uncached_fetch_all_by_id_list ()
 
public fetch_all ()
 
public Scalar last_insert_id ()
 
public insert_ignore_clause ()
 
protected Bio::EnsEMBL::DBSQL::Support::BaseCache _id_cache ()
 
protected Boolean _no_id_cache ()
 
public Boolean ignore_cache_override ()
 
public Int schema_version ()
 
protected _tables ()
 
protected _columns ()
 
protected _default_where_clause ()
 
protected _left_join ()
 
protected _final_clause ()
 
protected _objs_from_sth ()
 
protected _build_id_cache ()
 
protected _logic_name_to_constraint ()
 

Detailed Description

Description

This adaptor provides a means to retrieve and store
Bio::EnsEMBL::Translation objects from/in a database.

Translation objects only truly make sense in the context of their
transcripts so the recommended means to retrieve Translations is
by retrieving the Transcript object first, and then fetching the
Translation.

Synopsis

-host => 'ensembldb.ensembl.org',
-user => 'anonymous'
);
$transcript_adaptor =
"transcript" );
$translation_adaptor =
"translation" );
my $transcript = $transcript_adaptor->fetch_by_dbID(131243);
my $translation =
$translation_adaptor->fetch_by_Transcript($transcript);
print("Translation Start Site: "
. $translation->start_Exon()->stable_id() . " "
. $translation->start()
. "\n" );
print("Translation Stop: "
. $translation->end_Exon()->stable_id() . " "
. $translation->end() );

Definition at line 50 of file TranslationAdaptor.pm.

Member Function Documentation

◆ _list_dbIDs()

protected ArrayRef Bio::EnsEMBL::DBSQL::TranslationAdaptor::_list_dbIDs ( )
  Arg[1]      : String $table
  Arg[2]      : String $column
  Example     :
$transl_adaptor->_list_dbIDs('translation','translation_id');
  Description : Local reimplementation to ensure multi-species translations
                are limited to their species alone
  Returntype  : ArrayRef of specified IDs
  Caller      : Internal
  Status      : Unstable
 
Code:
click to view

◆ _tables()

protected Bio::EnsEMBL::DBSQL::TranslationAdaptor::_tables ( )

Undocumented method

Code:
click to view

◆ fetch_all()

public Listref Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all ( )
  Example     :
$translations = $translation_adaptor->fetch_all();
  Description : Retrieves all canonical and alternative translations 
                stored in the database.
  Returntype  : listref of Bio::EnsEMBL::Translation
  Caller      : general
  Status      : At Risk
 
Code:
click to view

◆ fetch_all_alternative_by_Transcript()

public Listref Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_alternative_by_Transcript ( )
  Arg [1]    : Bio::EnsEMBL::Transcript $transcript
  Example    :
@tl = @{
$translation_adaptor->fetch_all_alternative_by_Transcript(
$transcript)
};
  Description: Retrieves all alternative translations associated with a
               particular transcript.  If no alternative translation is
               found, a reference to an empty list is returned.
  Returntype : listref of Bio::EnsEMBL::Translation
  Exceptions : throw on incorrect argument
  Caller     : Transcript
  Status     : Stable
 
Code:
click to view

◆ fetch_all_by_external_name()

public Reference Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_external_name ( )
  Arg [1]    : string $external_name
               The external identifier for the translation(s) to be
               obtained.
  Arg [2]    : (optional) string $external_db_name
               The name of the external database from which the
               identifier originates.
  Arg [3]    : Boolean override. Force SQL regex matching for users
               who really do want to find all 'NM'
  Example    :
my @translations =
@{ $trl_adaptor->fetch_all_by_external_name('BRCA2') };
my @many_translations =
@{ $trl_adaptor->fetch_all_by_external_name('BRCA%') };
  Description: Retrieves a list of translations fetched via an
               external identifier.  Note that this may not be a
               particularly useful method, because translations
               do not make much sense out of the context of
               their transcript.  It may be better to use the
               TranscriptAdaptor::fetch_all_by_external_name instead.
               SQL wildcards % and _ are supported in the $external_name
               but their use is somewhat restricted for performance reasons.
               Users that really do want % and _ in the first three characters
               should use argument 3 to prevent optimisations
  Returntype : reference to a list of Translations
  Exceptions : none
  Caller     : general
  Status     : Medium Risk
 
Code:
click to view

◆ fetch_all_by_GOTerm()

public Listref Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_GOTerm ( )
  Arg [1]   : Bio::EnsEMBL::OntologyTerm
              The GO term for which translations should be fetched.
  Example:  @translations =
              $translation_adaptor->fetch_all_by_GOTerm(
                $go_adaptor->fetch_by_accession('GO:0030326') ) };
  Description   : Retrieves a list of translations that are
                  associated with the given GO term, or with any of
                  its descendent GO terms.
  Return type   : listref of Bio::EnsEMBL::Translation
  Exceptions    : Throws of argument is not a GO term
  Caller        : general
  Status        : Stable
 
Code:
click to view

◆ fetch_all_by_GOTerm_accession()

public Listref Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_GOTerm_accession ( )
  Arg [1]   : String
              The GO term accession for which genes should be
              fetched.
  Example   :
@genes =
 $gene_adaptor->fetch_all_by_GOTerm_accession('GO:0030326') };
  Description   : Retrieves a list of genes that are associated with
                  the given GO term, or with any of its descendent
                  GO terms.  The genes returned are in their native
                  coordinate system, i.e. in the coordinate system
                  in which they are stored in the database.  If
                  another coordinate system is required then the
                  Gene::transfer or Gene::transform method can be
                  used.
  Return type   : listref of Bio::EnsEMBL::Gene
  Exceptions    : Throws of argument is not a GO term accession
  Caller        : general
  Status        : Stable
 
Code:
click to view

◆ fetch_all_by_Transcript_list()

public Reference Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_Transcript_list ( )
  Arg [1]    : reference to list of Bio::EnsEMBL::Transcripts $transcripts
               The list of $transcripts to obtain Translation object for.
  Example    :
@translations = @{$tla->fetch_all_by_Transcript_list([$t1,$t2]);
  Description: Fetches all translations associated with the list of transcripts
               passed to this method.  The passed transcripts will also have
               their translation set by this method.
  Returntype : Reference to list of Bio::EnsEMBL::Translations
  Exceptions : None
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ fetch_by_dbID()

public Bio::EnsEMBL::Translation Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_dbID ( )
  Arg [1]    : int $dbID
               The internal identifier of the Translation to obtain
  Example    :
$translation = $translation_adaptor->fetch_by_dbID(1234);
  Description: This fetches a Translation object via its internal id.
               This is only debatably useful since translations do
               not make much sense outside of the context of their
               Transcript.  Consider using fetch_by_Transcript instead.
  Returntype : Bio::EnsEMBL::Translation, or undef if the translation is not
               found.
  Exceptions : warning if an additional (old style) Transcript argument is
               provided
  Caller     : ?
  Status     : Stable
 
Code:
click to view

◆ fetch_by_stable_id()

public Bio::EnsEMBL::Translation Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_stable_id ( )
  Arg [1]    : string $stable_id
               The stable identifier of the Translation to obtain
  Example    :
$translation = $translation_adaptor->fetch_by_stable_id("ENSP00001");
  Description: This fetches a Translation object via its stable id.
               This is only debatably useful since translations do
               not make much sense outside of the context of their
               Transcript.  Consider using fetch_by_Transcript instead.
  Returntype : Bio::EnsEMBL::Translation or undef if the translation is not
               found.
  Exceptions : warning if an additional (old style) Transcript argument is
               provided
  Caller     : ?
  Status     : Stable
 
Code:
click to view

◆ fetch_by_stable_id_version()

public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_stable_id_version ( )
  Arg [1]    : String $id 
               The stable ID of the gene to retrieve
  Arg [2]    : Integer $version
               The version of the stable_id to retrieve
  Example    :
$gene = $gene_adaptor->fetch_by_stable_id('ENSG00000148944', 14);
  Description: Retrieves a gene object from the database via its stable id and version.
               The gene will be retrieved in its native coordinate system (i.e.
               in the coordinate system it is stored in the database). It may
               be converted to a different coordinate system through a call to
               transform() or transfer(). If the gene or exon is not found
               undef is returned instead.
  Returntype : Bio::EnsEMBL::Gene or undef
  Exceptions : if we cant get the gene in given coord system
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ fetch_by_Transcript()

public Bio::EnsEMBL::Translation Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_Transcript ( )
  Arg [1]    : Bio::EnsEMBL::Transcript $transcript
  Example    :
$tl = $translation_adaptor->fetch_by_Transcript($transcript);
  Description: Retrieves a Translation via its associated transcript.
               If the Translation is not found, undef is returned.
  Returntype : Bio::EnsEMBL::Translation
  Exceptions : throw on incorrect argument
  Caller     : Transcript
  Status     : Stable
 
Code:
click to view

◆ list_dbIDs()

public List Bio::EnsEMBL::DBSQL::TranslationAdaptor::list_dbIDs ( )
  Arg [1]    : none
  Example    :
@translation_ids = @{$translation_adaptor->list_dbIDs()};
  Description: Gets an array of internal ids for all translations in the current db
  Returntype : list of ints
  Exceptions : none
  Caller     : ?
  Status     : Stable
 
Code:
click to view

◆ list_stable_ids()

public Reference Bio::EnsEMBL::DBSQL::TranslationAdaptor::list_stable_ids ( )
  Arg [1]    : none
  Example    :
@transl_stable_ids = @{$transl_adaptor->list_stable_dbIDs()};
  Description: Gets an array of stable ids for all translations in the current 
               db
  Returntype : reference to a list of strings
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ remove()

public void Bio::EnsEMBL::DBSQL::TranslationAdaptor::remove ( )
  Arg [1]    : Bio::EnsEMBL::Translation $translation
  Example    :
$translation_adaptor->remove($translation);
  Description: Removes a translation completely from the database, and all
               associated information including protein features etc.
  Returntype : none
  Exceptions : throw on incorrect arguments
               warning if translation is not in this database
  Caller     : TranscriptAdaptor::remove
  Status     : Stable
 
Code:
click to view

◆ store()

public Int Bio::EnsEMBL::DBSQL::TranslationAdaptor::store ( )
  Arg [1]    : Bio::EnsEMBL::Translation $translation
               The translation object to be stored in the database 
  Example    :
$transl_id = $translation_adaptor->store($translation);
  Description: Stores a translation object in the database
  Returntype : int - the new dbID of the stored translation
  Exceptions : thrown if the dbID of the start_Exon or end_Exon is not 
               defined.
               thrown if only partial stable id information is present (e.g.
               identifier but not version number)
  Caller     : Transcript::store
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file:
transcript
public transcript()
Bio::EnsEMBL::Translation
Definition: Translation.pm:32
Bio::EnsEMBL::Registry::get_adaptor
public Adaptor get_adaptor()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::remove
public void remove()
map
public map()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all
public Listref fetch_all()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::list_stable_ids
public Reference list_stable_ids()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_GOTerm_accession
public Listref fetch_all_by_GOTerm_accession()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::list_dbIDs
public List list_dbIDs()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_dbID
public Bio::EnsEMBL::Translation fetch_by_dbID()
Bio::EnsEMBL::Registry
Definition: Registry.pm:113
Bio::EnsEMBL::DBSQL::TranslationAdaptor::_tables
protected _tables()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_Transcript
public Bio::EnsEMBL::Translation fetch_by_Transcript()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_Transcript_list
public Reference fetch_all_by_Transcript_list()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_GOTerm
public Listref fetch_all_by_GOTerm()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_alternative_by_Transcript
public Listref fetch_all_alternative_by_Transcript()
Bio::EnsEMBL::Registry::load_registry_from_db
public Int load_registry_from_db()
Bio::EnsEMBL::Translation::new
public Bio::EnsEMBL::Translation new()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_all_by_external_name
public Reference fetch_all_by_external_name()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_stable_id
public Bio::EnsEMBL::Translation fetch_by_stable_id()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::store
public Int store()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::fetch_by_stable_id_version
public Bio::EnsEMBL::Gene fetch_by_stable_id_version()
Bio::EnsEMBL::Storable::new_fast
public Instance new_fast()
Bio::EnsEMBL::DBSQL::TranslationAdaptor::_list_dbIDs
protected ArrayRef _list_dbIDs()
Bio::EnsEMBL::Storable::adaptor
public Bio::EnsEMBL::DBSQL::BaseAdaptor adaptor()