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

Public Member Functions

public Listref fetch_all_by_name ()
 
public Bio::EnsEMBL::OntologyTerm fetch_by_accession ()
 
public Bio::EnsEMBL::OntologyTerm fetch_by_alt_id ()
 
public Listref fetch_all_by_parent_term ()
 
public Listref fetch_all_by_ancestor_term ()
 
public Listref fetch_all_by_child_term ()
 
public Listref fetch_all_by_descendant_term ()
 
protected _fetch_synonyms_by_dbID ()
 
protected A _fetch_ancestor_chart ()
 
public fetch_by_dbID ()
 
public fetch_all_by_dbID_list ()
 
public Listref fetch_all_alt_ids ()
 
public Listref fetch_all_roots ()
 
public fetch_all ()
 
- 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 $goa =
$registry->get_adaptor( 'Multi', 'Ontology', 'OntologyTerm' );
my $term = $goa->fetch_by_accession('GO:0010885');
my @children = @{ $goa->fetch_all_by_parent_term($term) };
my @descendants = @{ $goa->fetch_all_by_ancestor_term($term) };
my @parents = @{ $goa->fetch_all_by_child_term($term) };
my @ancestors = @{ $goa->fetch_all_by_descendant_term($term) };
my %ancestor_chart = %{ $goa->_fetch_ancestor_chart($term) };

Description

An abstract adaptor class for fetching ontology
terms, creates Bio::EnsEMBL::OntologyTerm objects.

Definition at line 31 of file OntologyTermAdaptor.pm.

Member Function Documentation

◆ _fetch_ancestor_chart()

protected A Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::_fetch_ancestor_chart ( )
  Arg [1]       : Bio::EnsEMBL::OntologyTerm
                  The term whose ancestor terms should be fetched.
  Description   : Given a child ontology term, returns a hash
                  structure containing its ancestor terms, up to and
                  including any root term.  Relations of the type
                  'is_a' and 'part_of' are included.
  Example       :
my %chart = %{ $ot_adaptor->_fetch_ancestor_chart($term) };
  Return type   : A reference to a hash structure like this:
    {
      'GO:XXXXXXX' => {
        'term' =>           # ref to Bio::EnsEMBL::OntologyTerm object
        'is_a'    => [...], # listref of Bio::EnsEMBL::OntologyTerm
        'part_of' => [...], # listref of Bio::EnsEMBL::OntologyTerm
      },
      'GO:YYYYYYY' => {
        # Similarly for all ancestors,
        # and including the query term itself.
      }
    }
 
Code:
click to view

◆ _fetch_synonyms_by_dbID()

protected Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::_fetch_synonyms_by_dbID ( )

Undocumented method

Code:
click to view

◆ fetch_all()

public Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all ( )

Undocumented method

Code:
click to view

◆ fetch_all_alt_ids()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_alt_ids ( )
  Arg [1]       : String
  Description   : Fetches all alt_ids for a given ontology term
  Example       :
my ($accessions) =
 $ot_adaptor->fetch_all_alt_ids( 'GO:0000003' ) };
  Return type   : listref of accessions
 
Code:
click to view

◆ fetch_all_by_ancestor_term()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_ancestor_term ( )
  Arg [1]       : Bio::EnsEMBL::OntologyTerm
                  The term whose descendant terms should be fetched.
  Description   : Given a parent ontology term, returns a list of
                  all its descendant terms, down to and including
                  any leaf terms.  Relations of the type 'is_a' and
                  'part_of' are followed.
  Example       :
my @descendants =
@{ $ot_adaptor->fetch_all_by_ancestor_term($term) };
  Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_all_by_child_term()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_child_term ( )
  Arg [1]       : Bio::EnsEMBL::OntologyTerm
                  The term whose parent terms should be fetched.
  Description   : Given a child ontology term, returns a list of
                  its immediate parent terms.
  Example       :
my @parents = @{ $ot_adaptor->fetch_all_by_child_term($term) };
  Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_all_by_dbID_list()

public Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_dbID_list ( )

Undocumented method

Code:
click to view

◆ fetch_all_by_descendant_term()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_descendant_term ( )
  Arg [1]       : Bio::EnsEMBL::OntologyTerm
                  The term whose ancestor terms should be fetched.
  Arg [2]       : (optional) String
                  The subset within the ontolgy to which the query
                  should be restricted.  The subset may be specified as
                  a SQL pattern, e.g., "%goslim%" (but "goslim%" might
                  not do what you expect), or as a specific subset name,
                  e.g., "goslim_generic".
  Arg [3]       : (optional) Boolean
                  If true (non-zero), only return the closest
                  term(s).  If this argument is true, and the
                  previous argument is left undefined, this method
                  will return the parent(s) of the given term.
  Arg [4]       : (optional) Boolean
                  If true we will allow the retrieval of terms whose distance
                  to the current term is 0. If false then we will only return
                  those which are above the current term in the ontology
  Description   : Given a child ontology term, returns a list of
                  all its ancestor terms, up to and including any
                  root term.  Relations of the type 'is_a' and
                  'part_of' are followed.  Optionally, only terms in
                  a given subset of the ontology may be returned,
                  and additionally one may ask to only get the
                  closest term(s) to the given child term.
  Example       :
my @ancestors =
@{ $ot_adaptor->fetch_all_by_descendant_term($term) };
  Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_all_by_name()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_name ( )
  Arg [1]       : String, name of term, or SQL pattern
  Arg [2]       : (optional) String, name of ontology
  Arg [3]       : (optional) Boolean, search through obsolete terms as well
  Description   : Fetches ontology term(s) given a name, a synonym, or a
                  SQL pattern like "%splice_site%"
  Example       :
my ($term) =
@{ $ot_adaptor->fetch_by_name( 'DNA_binding_site', 'SO' ) };
    # Will find terms in both SO and GO:
    my @terms = $ot_adaptor->fetch_by_name('splice_site') };
  Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_all_by_parent_term()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_parent_term ( )
  Arg [1]       : Bio::EnsEMBL::OntologyTerm
                  The term whose children terms should be fetched.
  Description   : Given a parent ontology term, returns a list of
                  its immediate children terms.
  Example       :
my @children =
@{ $ot_adaptor->fetch_all_by_parent_term($term) };
  Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_all_roots()

public Listref Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_roots ( )
  Arg [1]       : (optional) String, name of ontology
  Description   : Fetches all roots for all ontologies
                  Optionally, can be restricted to a given ontology
  Example       :
my ($terms) =
@{ $ot_adaptor->fetch_all_roots( 'SO' ) };
    # Will find terms in EFO, SO and GO:
    my @terms = $ot_adaptor->fetch_all_roots() };
  Return type   : listref of Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_by_accession()

public Bio::EnsEMBL::OntologyTerm Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_by_accession ( )
  Arg [1]       : String
  Arg [2]       : (optional) Boolean, search through obsolete terms as well
  Description   : Fetches an ontology term given an accession.
  Example       :
    my $term = $ot_adaptor->fetch_by_accession('GO:0030326');
  Return type   : Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_by_alt_id()

public Bio::EnsEMBL::OntologyTerm Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_by_alt_id ( )
  Arg [1]       : String
  Description   : Fetches an ontology term given an alt_id.
  Example       :
    my $term = $ot_adaptor->fetch_by_alt_id('GO:0019952');
  Return type   : Bio::EnsEMBL::OntologyTerm
 
Code:
click to view

◆ fetch_by_dbID()

public Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_by_dbID ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_parent_term
public Listref fetch_all_by_parent_term()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_ancestor_term
public Listref fetch_all_by_ancestor_term()
map
public map()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::_fetch_ancestor_chart
protected A _fetch_ancestor_chart()
Bio::EnsEMBL::DBSQL::BaseAdaptor::dbc
public Bio::EnsEMBL::DBSQL::DBConnection dbc()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_alt_ids
public Listref fetch_all_alt_ids()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_descendant_term
public Listref fetch_all_by_descendant_term()
Bio::EnsEMBL::DBSQL::DBConnection::db_handle
public DBI db_handle()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_by_dbID
public fetch_by_dbID()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_by_accession
public Bio::EnsEMBL::OntologyTerm fetch_by_accession()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all
public fetch_all()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_dbID_list
public fetch_all_by_dbID_list()
Bio::EnsEMBL::DBSQL::BaseAdaptor::prepare
public DBI::StatementHandle prepare()
Bio::EnsEMBL::OntologyTerm::new
public Bio::EnsEMBL::OntologyTerm new()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_child_term
public Listref fetch_all_by_child_term()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_roots
public Listref fetch_all_roots()
Bio::EnsEMBL::OntologyTerm
Definition: OntologyTerm.pm:10
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_by_alt_id
public Bio::EnsEMBL::OntologyTerm fetch_by_alt_id()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::_fetch_synonyms_by_dbID
protected _fetch_synonyms_by_dbID()
Bio::EnsEMBL::DBSQL::OntologyTermAdaptor::fetch_all_by_name
public Listref fetch_all_by_name()