ensembl-hive  2.7.0
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor Class Reference
+ Inheritance diagram for Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor:

Public Member Functions

public Bio::EnsEMBL::ArchiveStableId fetch_by_stable_id ()
 
protected Bio::EnsEMBL::ArchiveStableId _fetch_by_stable_id ()
 
public Bio::EnsEMBL::ArchiveStableId fetch_by_stable_id_version ()
 
public Bio::EnsEMBL::ArchiveStableId fetch_by_stable_id_dbname ()
 
protected _fetch_archive_id ()
 
public Listref fetch_all_by_archive_id ()
 
public Listref fetch_associated_archived ()
 
public Listref fetch_predecessors_by_archive_id ()
 
public Listref fetch_successors_by_archive_id ()
 
public Bio::EnsEMBL::StableIdHistoryTree fetch_history_tree_by_stable_id ()
 
public void add_all_current_to_history ()
 
public Listref fetch_successor_history ()
 
public Listref fetch_predecessor_history ()
 
public Bio::EnsEMBL::StableIdEvent fetch_stable_id_event ()
 
public Listref list_dbnames ()
 
public String previous_dbname ()
 
public String next_dbname ()
 
protected _dbname_index ()
 
public String get_peptide ()
 
public Int get_current_release ()
 
public String get_current_assembly ()
 
public Boolean lookup_current ()
 
protected _resolve_type ()
 
- 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

Synopsis

my $registry = "Bio::EnsEMBL::Registry";
my $archiveStableIdAdaptor =
$registry->get_adaptor( 'Human', 'Core', 'ArchiveStableId' );
my $stable_id = 'ENSG00000068990';
my $arch_id = $archiveStableIdAdaptor->fetch_by_stable_id($stable_id);
print("Latest incarnation of this stable ID:\n");
printf( " Stable ID: %s.%d\n",
$arch_id->stable_id(), $arch_id->version() );
print(" Release: "
. $arch_id->release() . " ("
. $arch_id->assembly() . ", "
. $arch_id->db_name()
. ")\n" );
print "\nStable ID history:\n\n";
my $history =
$archiveStableIdAdaptor->fetch_history_tree_by_stable_id(
$stable_id);
foreach my $a ( @{ $history->get_all_ArchiveStableIds } ) {
printf( " Stable ID: %s.%d\n", $a->stable_id(), $a->version() );
print(" Release: "
. $a->release() . " ("
. $a->assembly() . ", "
. $a->db_name()
. ")\n\n" );
}

Description

ArchiveStableIdAdaptor does all SQL to create ArchiveStableIds and works
of

  stable_id_event
  mapping_session
  peptite_archive
  gene_archive

tables inside the core database.

This whole module has a status of At Risk as it is under development.

Definition at line 63 of file ArchiveStableIdAdaptor.pm.

Member Function Documentation

◆ _dbname_index()

protected Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_dbname_index ( )

Undocumented method

Code:
click to view

◆ _fetch_archive_id()

protected Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_fetch_archive_id ( )

Undocumented method

Code:
click to view

◆ _fetch_by_stable_id()

protected Bio::EnsEMBL::ArchiveStableId Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_fetch_by_stable_id ( )
  Arg [1]     : string $stable_id
  Arg [2]     : (optional) string $type
  Example     :
none
  Description : Retrives an ArchiveStableId that is the latest incarnation of
                given stable_id. Helper function to fetch_by_stable_id, should
                not be directly called.
  Returntype  : Bio::EnsEMBL::ArchiveStableId or undef if not in database
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ _resolve_type()

protected Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_resolve_type ( )

Undocumented method

Code:
click to view

◆ add_all_current_to_history()

public void Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::add_all_current_to_history ( )
  Arg[1]      : Bio::EnsEMBL::StableIdHistoryTree $history -
                the StableIdHistoryTree object to add the current IDs to
  Description : This method adds the current versions of all stable IDs found
                in a StableIdHistoryTree object to the tree, by creating
                appropriate Events for the stable IDs found in the *_stable_id
                tables. This is a helper method for
                fetch_history_tree_by_stable_id(), see there for more
                documentation.
  Return type : none (passed-in object is manipulated)
  Exceptions  : thrown on missing or wrong argument
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_all_by_archive_id()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_all_by_archive_id ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId $archive_id
  Arg [2]     : String $return_type - type of ArchiveStableId to fetch
  Example     :
my $arch_id = $arch_adaptor->fetch_by_stable_id('ENSG0001');
my @archived_transcripts =
$arch_adaptor->fetch_all_by_archive_id($arch_id, 'Transcript');
  Description : Given a ArchiveStableId it retrieves associated ArchiveStableIds
                of specified type (e.g. retrieve transcripts for genes or vice
                versa).
                See also fetch_associated_archived() for a different approach to
                retrieve this data.
  Returntype  : listref Bio::EnsEMBL::ArchiveStableId
  Exceptions  : none
  Caller      : Bio::EnsEMBL::ArchiveStableId->get_all_gene_archive_ids,
                get_all_transcript_archive_ids, get_all_translation_archive_ids
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_associated_archived()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_associated_archived ( )
  Arg[1]      : Bio::EnsEMBL::ArchiveStableId $arch_id -
                the ArchiveStableId to fetch associated archived IDs for
  Example     :
my ($arch_gene, $arch_tr, $arch_tl, $pep_seq) =
@{ $archive_adaptor->fetch_associated_archived($arch_id) };
  Description : Fetches associated archived stable IDs from the db for a given
                ArchiveStableId (version is taken into account).
  Return type : Listref of
                  ArchiveStableId archived gene
                  ArchiveStableId archived transcript
                  (optional) ArchiveStableId archived translation
                  (optional) peptide sequence
  Exceptions  : thrown on missing or wrong argument
                thrown if ArchiveStableID has no type
  Caller      : Bio::EnsEMBL::ArchiveStableId->get_all_associated_archived()
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_by_stable_id()

public Bio::EnsEMBL::ArchiveStableId Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_by_stable_id ( )
  Arg [1]     : string $stable_id
  Arg [2]     : (optional) string $type
  Example     :
none
  Description : Retrives an ArchiveStableId that is the latest incarnation of
                given stable_id. If the lookup fails, attempts to check for a
                version id delimited by a period (.) and lookup again using the
                version id.
  Returntype  : Bio::EnsEMBL::ArchiveStableId or undef if not in database
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_by_stable_id_dbname()

public Bio::EnsEMBL::ArchiveStableId Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_by_stable_id_dbname ( )
  Arg [1]     : string $stable_id
  Arg [2]     : string $db_name
  Example     :
none
  Description : Create an ArchiveStableId from given arguments.
  Returntype  : Bio::EnsEMBL::ArchiveStableId or undef if not in database
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_by_stable_id_version()

public Bio::EnsEMBL::ArchiveStableId Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_by_stable_id_version ( )
  Arg [1]     : string $stable_id
  Arg [2]     : int $version
  Example     :
none
  Description : Retrieve an ArchiveStableId with given version and stable ID.
  Returntype  : Bio::EnsEMBL::ArchiveStableId 
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_history_tree_by_stable_id()

public Bio::EnsEMBL::StableIdHistoryTree Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_history_tree_by_stable_id ( )
  Arg [1]     : String $stable_id - the stable ID to fetch the history tree for
  Arg [2]     : (optional) Int $num_high_scorers
                number of mappings per stable ID allowed when filtering
  Arg [3]     : (optional) Int $max_rows
                maximum number of stable IDs in history tree (used for
                filtering)
  Arg [4]     : (optional) Float $time_limit
                Optimise tree normally runs until it hits a minimised state
                but this can take a very long time. Therefore you can
                opt to bail out of the optimisation early. Specify the
                time in seconds. Floating point values are supported should you
                require sub-second limits
  Example     :
my $history = $archive_adaptor->fetch_history_tree_by_stable_id(
'ENSG00023747897');
  Description : Returns the history tree for a given stable ID. This will
                include a network of all stable IDs it is related to. The
                method will try to return a minimal (sparse) set of nodes
                (ArchiveStableIds) and links (StableIdEvents) by removing any
                redundant entries and consolidating mapping events so that only
                changes are recorded.
  Return type : Bio::EnsEMBL::StableIdHistoryTree
  Exceptions  : thrown on missing argument
  Caller      : Bio::EnsEMBL::ArchiveStableId::get_history_tree, general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_predecessor_history()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_predecessor_history ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId $arch_id
  Example     :
none
  Description : Gives back a list of archive stable ids which are predecessors
                in the stable_id_event tree of the given stable_id. Might well
                be empty.
                This method is valid, but in most cases you will rather
                want to use fetch_history_tree_by_stable_id().
  Returntype  : listref Bio::EnsEMBL::ArchiveStableId
                Since every ArchiveStableId knows about it's successors, this is
                a linked tree.
  Exceptions  : none
  Caller      : webcode for archive
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_predecessors_by_archive_id()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_predecessors_by_archive_id ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId
  Example     :
none
  Description : Retrieve a list of ArchiveStableIds that were mapped to the 
                given one. This method goes back only one level, to retrieve
                a full predecessor history use fetch_predecessor_history, or 
                ideally fetch_history_tree_by_stable_id for the complete
                history network.
  Returntype  : listref Bio::EnsEMBL::ArchiveStableId
  Exceptions  : none
  Caller      : Bio::EnsEMBL::ArchiveStableId->get_all_predecessors
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_stable_id_event()

public Bio::EnsEMBL::StableIdEvent Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_stable_id_event ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId $arch_id
  Arg [2]     : stable_id
  Example     :
my $archive = $archive_stable_id_adaptor->fetch_by_stable_id($id);
my $event = $archive_stable_id_adaptor($archive, $id2);
  Description : Gives back the event that links an archive stable id
                to a specific stable id
  Returntype  : Bio::EnsEMBL::StableIdEvent
                Undef if no event was found
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_successor_history()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_successor_history ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId $arch_id
  Example     :
none
  Description : Gives back a list of archive stable ids which are successors in
                the stable_id_event tree of the given stable_id. Might well be
                empty.
                This method is valid, but in most cases you will rather
                want to use fetch_history_tree_by_stable_id().
  Returntype  : listref Bio::EnsEMBL::ArchiveStableId
                Since every ArchiveStableId knows about it's successors, this is
                a linked tree.
  Exceptions  : none
  Caller      : webcode for archive
  Status      : At Risk
              : under development
 
Code:
click to view

◆ fetch_successors_by_archive_id()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_successors_by_archive_id ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId
  Example     :
none
  Description : Retrieve a list of ArchiveStableIds that the given one was 
                mapped to. This method goes forward only one level, to retrieve
                a full successor history use fetch_successor_history, or 
                ideally fetch_history_tree_by_stable_id for the complete
                history network.
  Returntype  : listref Bio::EnsEMBL::ArchiveStableId
  Exceptions  : none
  Caller      : Bio::EnsEMBL::ArchiveStableId->get_all_successors
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_current_assembly()

public String Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::get_current_assembly ( )
  Example     :
my $current_assembly = $archive_adaptor->get_current_assembly;
  Description : Returns the current assembly version (as found in the meta
                table).
  Return type : String
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_current_release()

public Int Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::get_current_release ( )
  Example     :
my $current_release = $archive_adaptor->get_current_release;
  Description : Returns the current release number (as found in the meta table).
  Return type : Int
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_peptide()

public String Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::get_peptide ( )
  Arg [1]     : Bio::EnsEMBL::ArchiveStableId $arch_id
  Example     :
none
  Description : Retrieves the peptide string for given ArchiveStableId. If its
                not a peptide or not in the database returns undef.
  Returntype  : string or undef
  Exceptions  : none
  Caller      : Bio::EnsEMBL::ArchiveStableId->get_peptide, general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ list_dbnames()

public Listref Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::list_dbnames ( )
  Args        : none
  Example     :
none
  Description : A list of available database names from the latest (current) to
                the oldest (ordered).
  Returntype  : listref of strings
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ lookup_current()

public Boolean Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::lookup_current ( )
  Arg[1]      : Bio::EnsEMBL::ArchiveStableId $arch_id -
                the stalbe ID to find the current version for
  Example     :
if ($self->lookup_version($arch_id) {
$arch_id->version($arch_id->current_version);
$arch_id->db_name($self->dbc->dbname);
  Description : Look in [gene|transcript|translation]_stable_id if you can find
                a current version for this stable ID. Set
                ArchiveStableId->current_version if found.
  Return type : Boolean (TRUE if current version found, else FALSE)
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ next_dbname()

public String Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::next_dbname ( )
  Arg[1]      : String $dbname - focus db name
  Example     :
my $prev_db = $self->next_dbname($curr_db);
  Description : Returns the name of the next newest database which has mapping
                session information.
  Return type : String (or undef if not available)
  Exceptions  : none
  Caller      : general
  Status      : At Risk
 
Code:
click to view

◆ previous_dbname()

public String Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::previous_dbname ( )
  Arg[1]      : String $dbname - focus db name
  Example     :
my $prev_db = $self->previous_dbname($curr_db);
  Description : Returns the name of the next oldest database which has mapping
                session information.
  Return type : String (or undef if not available)
  Exceptions  : none
  Caller      : general
  Status      : At Risk
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::ArchiveStableId
Definition: ArchiveStableId.pm:29
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_dbname_index
protected _dbname_index()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::lookup_current
public Boolean lookup_current()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::previous_dbname
public String previous_dbname()
map
public map()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_fetch_archive_id
protected _fetch_archive_id()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_all_by_archive_id
public Listref fetch_all_by_archive_id()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::get_current_assembly
public String get_current_assembly()
Bio::EnsEMBL::StableIdHistoryTree
Definition: StableIdHistoryTree.pm:73
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_resolve_type
protected _resolve_type()
Bio::EnsEMBL::ArchiveStableId::type
public type()
Bio::EnsEMBL::ArchiveStableId::stable_id
public stable_id()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_predecessor_history
public Listref fetch_predecessor_history()
Bio::EnsEMBL::StableIdEvent
Definition: StableIdEvent.pm:36
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::next_dbname
public String next_dbname()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::_fetch_by_stable_id
protected Bio::EnsEMBL::ArchiveStableId _fetch_by_stable_id()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_history_tree_by_stable_id
public Bio::EnsEMBL::StableIdHistoryTree fetch_history_tree_by_stable_id()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_associated_archived
public Listref fetch_associated_archived()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::get_current_release
public Int get_current_release()
Bio::EnsEMBL::StableIdEvent::old_ArchiveStableId
public Bio::EnsEMBL::ArchiveStableId old_ArchiveStableId()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_predecessors_by_archive_id
public Listref fetch_predecessors_by_archive_id()
Bio::EnsEMBL::StableIdHistoryTree::is_incomplete
public Boolean is_incomplete()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_by_stable_id_version
public Bio::EnsEMBL::ArchiveStableId fetch_by_stable_id_version()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_by_stable_id_dbname
public Bio::EnsEMBL::ArchiveStableId fetch_by_stable_id_dbname()
Bio::EnsEMBL::StableIdEvent::new
public Bio::EnsEMBL::StableIdEvent new()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::add_all_current_to_history
public void add_all_current_to_history()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::list_dbnames
public Listref list_dbnames()
Bio::EnsEMBL::ArchiveStableId::new
public Bio::EnsEMBL::ArchiveStableId new()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_successors_by_archive_id
public Listref fetch_successors_by_archive_id()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_stable_id_event
public Bio::EnsEMBL::StableIdEvent fetch_stable_id_event()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_successor_history
public Listref fetch_successor_history()
Bio::EnsEMBL::StableIdHistoryTree::new
public Bio::EnsEMBL::StableIdHistoryTree new()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::get_peptide
public String get_peptide()
Bio::EnsEMBL::DBSQL::ArchiveStableIdAdaptor::fetch_by_stable_id
public Bio::EnsEMBL::ArchiveStableId fetch_by_stable_id()