# metadata_db is an instance of MetaDataDBAdaptor my $adaptor = $metadata_db->get_GenomeInfoAdaptor(); my $md = $gdba->fetch_by_name("homo_sapiens");
Adaptor for storing and retrieving GenomeInfo objects from MySQL ensembl_metadata database To start working with an adaptor: # getting an adaptor ## adaptor for latest public Ensembl release my $gdba = Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor->build_ensembl_adaptor(); ## adaptor for specified public Ensembl release my $gdba = Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor->build_ensembl_adaptor(83); ## adaptor for latest public EG release my $gdba = Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor->build_ensembl_genomes_adaptor(); ## adaptor for specified public EG release my $gdba = Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor->build_ensembl_genome_adaptor(30); ## manually specify a given database my $gdba = Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor->new(-USER=>'anonymous', -PORT=>4157, -HOST=>'mysql-eg-publicsql.ebi.ac.uk', -DBNAME=>'ensembl_metadata'); To find genomes, use the fetch methods. These will work with the release set on the adaptor which is the latest Ensembl release by default. # find a genome by name my $genome = $gdba->fetch_by_name('homo_sapiens'); # find and iterate over all genomes for my $genome (\@{$gdba->fetch_all()}) { print $genome->name()."\n"; } # find and iterate over all genomes with variation for my $genome (\@{$gdba->fetch_all_with_variation()}) { print $genome->name()."\n"; } # to change the release $gdba->set_ensembl_release(82); $gdba->set_ensembl_genomes_release(82); my $genome = $gdba->fetch_by_name('arabidopsis_thaliana'); # find and iterate over all genomes from plants for my $genome (\@{$gdba->fetch_all_by_division('EnsemblPlants')}) { print $genome->name()."\n"; } # find all comparas for the division of interest my $comparas = $gdba->fetch_all_compara_by_division('EnsemblPlants'); # find the peptide compara my ($compara) = grep {$_->is_peptide_compara()} \@$comparas; print $compara->division()." ".$compara->method()."(".$compara->dbname().")\n"; # print out all the genomes in this compara for my $genome (\@{$compara->genomes()}) { print $genome->name()."\n"; }
Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::GenomeComparaInfo Bio::EnsEMBL::MetaData::GenomeAssemblyInfo Bio::EnsEMBL::MetaData::GenomeOrganismInfo
Definition at line 89 of file GenomeInfoAdaptor.pm.
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_args_to_sql | ( | ) |
Undocumented method
Reimplemented from Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor.
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_assembly_adaptor | ( | ) |
Undocumented method
protected void Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_cache | ( | ) | [inherited] |
Arg : type of object for cache Description: Return internal cache for given type Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_clear_cache | ( | ) | [inherited] |
Arg : (optional) type of object to clear Description: Clear internal cache (optionally just one type) Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_annotations | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add annotations to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_assembly | ( | ) |
Undocumented method
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_children | ( | ) |
Arg : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Description: Fetch all children of specified genome info object Returntype : none Exceptions : none Caller : internal Status : Stable
Reimplemented from Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor.
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_comparas | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add compara info to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_data_release | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add data release to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_databases | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add databases to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_features | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add features to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected Arrayref Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_fetch_generic | ( | ) | [inherited] |
Arg : SQL to use to fetch object Arg : arrayref of bind parameters Arg : (optional) if set to 1, all children will be fetched Description: Instantiate a GenomeInfo from the database using the specified SQL Returntype : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : internal Status : Stable
protected Arrayref Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_fetch_generic_with_args | ( | ) | [inherited] |
Arg : hashref of arguments by column Arg : (optional) if set to 1, all children will be fetched Description: Instantiate a GenomeInfo from the database using a generic method, with the supplied arguments Returntype : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_other_alignments | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add other_alignments to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_fetch_variations | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Add variations to supplied object Returntype : none Exceptions : none Caller : internal Status : Stable
protected Arrayref Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_first_element | ( | ) | [inherited] |
Arg : arrayref Description: Utility method to return the first element in a list, undef if empty Returntype : arrayref element Exceptions : none Caller : internal Status : Stable
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_get_base_sql | ( | ) |
Undocumented method
Reimplemented from Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor.
protected Object Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_get_cached_obj | ( | ) | [inherited] |
Arg : type of object to retrieve Arg : ID of object to retrieve Description: Retrieve object from internal cache Returntype : object Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_get_division_id | ( | ) | [inherited] |
Arg : division name Description: Return ID for division, storing if required Returntype : none Exceptions : none Caller : internal Status : Stable
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_get_id_field | ( | ) |
Undocumented method
Reimplemented from Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor.
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_get_obj_class | ( | ) |
Undocumented method
Reimplemented from Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor.
protected Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_organism_adaptor | ( | ) |
Undocumented method
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_store_alignments | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the alignments for the supplied object Returntype : None Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_store_annotations | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the annotations for the supplied object Returntype : None Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::_store_cached_obj | ( | ) | [inherited] |
Arg : type of object to store Arg : object to store Description: Store object in internal cache Returntype : none Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_store_compara | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the compara analyses for the supplied object Returntype : None Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_store_databases | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the databases for the supplied object Returntype : None Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_store_features | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the features for the supplied object Returntype : None Exceptions : none Caller : internal Status : Stable
protected void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::_store_variations | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the variations for the supplied object Returntype : None Exceptions : none Caller : internal Status : Stable
public Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::build_ensembl_adaptor | ( | ) |
Undocumented method
public Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::build_ensembl_genomes_adaptor | ( | ) |
Arg : (optional) EG release number - default is latest Description: Build an adaptor for the public Ensembl Genomes metadata database Returntype : Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor Exceptions : none Caller : general Status : Stable
public void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::data_release | ( | ) |
Arg : Bio::EnsEMBL::MetaData::DataReleaseInfo Description: Default release to use when querying Returntype : None Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::fetch_all | ( | ) | [inherited] |
Undocumented method
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_assemblies | ( | ) |
Arg : array of Bio::EnsEMBL::MetaData::GenomeAssemblyInfo Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified assembly Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_assembly_set_chain | ( | ) |
Arg : INSDC assembly set chain (unversioned accession) Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified assembly set chain Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_dbname | ( | ) |
Arg : Name of database Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified database Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_division | ( | ) |
Arg : Name of division Arg : (optional) if 1, expand children of genome info Description: Fetch genome infos for specified division Returntype : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_name_pattern | ( | ) |
Arg : Regular expression matching of genome Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified species Returntype : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_organisms | ( | ) |
Arg : Array ref of Bio::EnsEMBL::MetaData::GenomeOrganismInfo Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified organisms Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_sequence_accession | ( | ) |
Arg : INSDC sequence accession e.g. U00096.1 or U00096 Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified sequence accession Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_sequence_accession_unversioned | ( | ) |
Arg : INSDC sequence accession e.g. U00096 Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified sequence accession Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_sequence_accession_versioned | ( | ) |
Arg : INSDC sequence accession e.g. U00096.1 Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified sequence accession Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_taxonomy_branch | ( | ) |
Arg : Bio::EnsEMBL::TaxonomyNode Description: Fetch organism info for specified taxonomy node and its children Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeOrganismInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_taxonomy_id | ( | ) |
Undocumented method
public Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_by_taxonomy_ids | ( | ) |
Undocumented method
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_with_compara | ( | ) |
Arg : (optional) if 1, expand children of genome info Description: Fetch all genome info that have any compara or whole genome alignment data Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_with_genome_alignments | ( | ) |
Arg : (optional) if 1, expand children of genome info Description: Fetch all genome info that have whole genome alignment data Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_with_other_alignments | ( | ) |
Undocumented method
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_with_pan_compara | ( | ) |
Arg : (optional) if 1, expand children of genome info Description: Fetch all genome info that have pan comapra data Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_with_peptide_compara | ( | ) |
Arg : (optional) if 1, expand children of genome info Description: Fetch all genome info that have peptide compara data Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_all_with_variation | ( | ) |
Arg : (optional) if 1, expand children of genome info Description: Fetch all genome info that have variation data Returntype : arrayref of Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_alias | ( | ) |
Arg : Alias of genome Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified species Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_any_name | ( | ) |
Arg : Name of genome (display, species, alias etc) Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified species Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_assembly | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeAssemblyInfo Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified assembly Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_assembly_accession | ( | ) |
Arg : INSDC assembly accession Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified assembly ID (versioned or unversioned) Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::fetch_by_dbID | ( | ) | [inherited] |
Arg : ID of genome info Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified ID Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : internal Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::BaseInfoAdaptor::fetch_by_dbIDs | ( | ) | [inherited] |
Arg : IDs of genome info Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified ID Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : internal Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_display_name | ( | ) |
Arg : Production name of genome Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified species Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_name | ( | ) |
Arg : Display name of genome Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified species Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::GenomeInfo Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_by_organism | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeOrganismInfo Arg : (optional) if 1, expand children of genome info Description: Fetch genome info for specified organism Returntype : Bio::EnsEMBL::MetaData::GenomeInfo Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_databases | ( | ) |
Arg : release (optional) Description: Fetch all genome-associated databases for the specified release Returntype : Arrayref of strings Exceptions : none Caller : general Status : Stable
public Arrayref Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::fetch_division_databases | ( | ) |
Arg : division Arg : release (optional) Description: Fetch all genome-associated databases for the specified release Returntype : Arrayref of strings Exceptions : none Caller : general Status : Stable
public void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::set_ensembl_genomes_release | ( | ) |
Arg : Ensembl Genomes release number Description: Set release to use when querying Returntype : None Exceptions : none Caller : general Status : Stable
public Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::set_ensembl_release | ( | ) |
Undocumented method
public void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::store | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Stores the supplied object and all associated child objects (includes other genomes attached by compara if not already stored) Returntype : None Exceptions : none Caller : general Status : Stable
public void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::update | ( | ) |
Arg : Bio::EnsEMBL::MetaData::GenomeInfo Description: Updates the supplied object and all associated child objects (includes other genomes attached by compara if not already stored) Returntype : None Exceptions : none Caller : general Status : Stable
public void Bio::EnsEMBL::MetaData::DBSQL::GenomeInfoAdaptor::update_booleans | ( | ) |
Description: Updates boolean genome attributes for all genomes Returntype : None Exceptions : none Caller : internal Status : Stable