sub fetch_all_by_domain { my ($self, $domain) = @_; throw("domain argument is required") unless ($domain); my $sth = $self->prepare(qq( SELECT tr.gene_id FROM interpro i, protein_feature pf, transcript tr, translation tl, seq_region sr, coord_system cs WHERE cs.species_id = ? AND cs.coord_system_id = sr.coord_system_id AND sr.seq_region_id = tr.seq_region_id AND tr.is_current = 1 AND tr.transcript_id = tl.transcript_id AND tl.translation_id = pf.translation_id AND pf.hit_name = i.id AND i.interpro_ac = ? GROUP BY tr.gene_id)); $sth->bind_param( 1, $self->species_id(), SQL_VARCHAR ); $sth->bind_param( 2, $domain, SQL_VARCHAR ); $sth->execute(); my @array = @{$sth->fetchall_arrayref()}; $sth->finish(); my @gene_ids = map {$_->[0]} @array; return $self->fetch_all_by_dbID_list(\@gene_ids); }

Class Summary
Synopsis
use Bio::EnsEMBL::Registry; Bio::EnsEMBL::Registry-\>load_registry_from_db( -host =\> 'ensembldb.ensembl.org', -user =\> 'anonymous', ); $gene_adaptor = Bio::EnsEMBL::Registry-\>get_adaptor( "human", "core", "gene" ); $gene = $gene_adaptor-\>fetch_by_dbID(1234); $gene = $gene_adaptor-\>fetch_by_stable_id('ENSG00000184129'); @genes = @{ $gene_adaptor-\>fetch_all_by_external_name('BRCA2') }; $slice_adaptor = Bio::EnsEMBL::Registry-\>get_adaptor( "human", "core", "slice" ); $slice = $slice_adaptor-\>fetch_by_region( 'chromosome', '1', 1, 1000000 ); @genes = @{ $gene_adaptor-\>fetch_all_by_Slice($slice) };
Description
This is a database aware adaptor for the retrieval and storage of gene objects.
Definition at line 44 of file GeneAdaptor.pm.
Method Documentation
protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_check_start_end_strand | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::GeneAdaptor::_columns | ( | ) |
protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_create_feature | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_create_feature_fast | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_default_where_clause | ( | ) | [inherited] |
Undocumented method

Reimplemented in Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor, Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor, Bio::EnsEMBL::Map::DBSQL::MarkerFeatureAdaptor, and Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor.
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_final_clause | ( | ) | [inherited] |
Undocumented method

Reimplemented in Bio::EnsEMBL::DBSQL::ExonAdaptor, Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor, and Bio::EnsEMBL::DBSQL::PredictionExonAdaptor.
protected Bio::EnsEMBL::DBSQL::GeneAdaptor::_left_join | ( | ) |
protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_list_dbIDs | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_list_seq_region_ids | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_logic_name_to_constraint | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_max_feature_length | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::GeneAdaptor::_objs_from_sth | ( | ) |
protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_pre_store | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_pre_store_userdata | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_remap | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::Utils::Cache Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_slice_feature_cache | ( | ) | [inherited] |
Description : Returns the feature cache if we are allowed to cache and will build it if we need to. We will never return a reference to the hash to avoid unintentional auto-vivfying caching Returntype : Bio::EnsEMBL::Utils::Cache Exceptions : None Caller : Internal

protected Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::_slice_fetch | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::BaseAdaptor::_straight_join | ( | ) | [inherited] |
Undocumented method

protected Bio::EnsEMBL::DBSQL::GeneAdaptor::_tables | ( | ) |
public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::bind_param_generic_fetch | ( | ) | [inherited] |
Arg [1] : (optional) scalar $param This is the parameter to bind Arg [2] : (optional) int $sql_type Type of the parameter (from DBI (:sql_types)) Example : $adaptor->bind_param_generic_fetch($stable_id,SQL_VARCHAR); $adaptor->generic_fetch(); Description: When using parameters for the query, will call the bind_param to avoid some security issues. If there are no arguments, will return the bind_parameters ReturnType : listref Exceptions: if called with one argument

public void Bio::EnsEMBL::DBSQL::GeneAdaptor::cache_gene_seq_mappings | ( | ) |
Example : $gene_adaptor->cache_gene_seq_mappings(); Description: caches all the assembly mappings needed for genes Returntype : None Exceptions : None Caller : general Status : At Risk : New experimental code

public void Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::clear_cache | ( | ) | [inherited] |
Args : None Example : my $sa = $registry->get_adaptor( 'Mus musculus', 'Core', 'Slice' ); my $ga = $registry->get_adaptor( 'Mus musculus', 'Core', 'Gene' );
my $slice = $sa->fetch_by_region( 'Chromosome', '1', 1e8, 1.05e8 );
my $genes = $ga->fetch_all_by_Slice($slice);
$ga->clear_cache();
Description : Empties the feature cache associated with this feature adaptor. Return type : None Exceptions : None Caller : General Status : At risk (under development)

public Bio::EnsEMBL::DBSQL::DBAdaptor Bio::EnsEMBL::DBSQL::BaseAdaptor::db | ( | ) | [inherited] |
Arg [1] : (optional) Bio::EnsEMBL::DBSQL::DBAdaptor $obj the database this adaptor is using. Example : $db = $adaptor->db(); Description: Getter/Setter for the DatabaseConnection that this adaptor is using. Returntype : Bio::EnsEMBL::DBSQL::DBAdaptor Exceptions : none Caller : Adaptors inherited from BaseAdaptor Status : Stable

public Bio::EnsEMBL::DBSQL::DBConnection Bio::EnsEMBL::DBSQL::BaseAdaptor::dbc | ( | ) | [inherited] |
Arg [1] : (optional) Bio::EnsEMBL::DBSQL::DBConnection $obj the database this adaptor is using. Example : $db = $adaptor->db(); Description: Getter/Setter for the DatabaseConnection that this adaptor is using. Returntype : Bio::EnsEMBL::DBSQL::DBConnection Exceptions : none Caller : Adaptors inherited from BaseAdaptor Status : Stable

public Bio::EnsEMBL::DBSQL::BaseAdaptor::dump_data | ( | ) | [inherited] |
Undocumented method

public Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all | ( | ) |
public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_alt_alleles | ( | ) |
Arg [1] : Bio::EnsEMBL::Gene $gene The gene to fetch alternative alleles for Example : my @alt_genes = @{ $gene_adaptor->fetch_all_alt_alleles($gene) }; foreach my $alt_gene (@alt_genes) { print "Alternate allele: " . $alt_gene->stable_id() . "\\n"; } Description: Retrieves genes which are alternate alleles to a provided gene. Alternate alleles in Ensembl are genes which are similar and are on an alternative haplotype of the same region. There are not currently very many of these. This method will return a reference to an empty list if no alternative alleles are found. Returntype : listref of Bio::EnsEMBL::Genes Exceptions : throw if incorrect arg provided warning if gene arg does not have dbID Caller : Gene::get_all_alt_alleles Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_biotype | ( | ) |
Arg [1] : String $biotype listref of $biotypes The biotype of the gene to retrieve. You can have as an argument a reference to a list of biotypes Example : $gene = $gene_adaptor->fetch_all_by_biotype('protein_coding'); $gene = $gene_adaptor->fetch_all_by_biotypes(['protein_coding', 'sRNA', 'miRNA']); Description: Retrieves an array reference of gene objects from the database via its biotype or biotypes. The genes 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 : listref of Bio::EnsEMBL::Gene Exceptions : if we cant get the gene in given coord system Caller : general Status : Stable

public Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_DBEntry | ( | ) |
public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::fetch_all_by_dbID_list | ( | ) | [inherited] |
Arg [1] : listref of integers $id_list The unique database identifiers for the features to be obtained. Arg [2] : optional - Bio::EnsEMBL::Slice to map features onto. Example : @feats = @{$adaptor->fetch_all_by_dbID_list([1234, 2131, 982]))}; Description: Returns the features created from the database defined by the the IDs in contained in the provided ID list $id_list. The features will be returned in their native coordinate system. That is, the coordinate system in which they are stored in the database. In order to convert the features to a particular coordinate system use the transfer() or transform() method. If none of the features are found in the database a reference to an empty list is returned. Returntype : listref of Bio::EnsEMBL::Features Exceptions : thrown if $id arg is not provided does not exist Caller : general Status : Stable

Reimplemented in Bio::EnsEMBL::DBSQL::OntologyTermAdaptor.
public List Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_domain | ( | ) |
Arg [1] : String $domain The domain to fetch genes from Example : my @genes = @{ $gene_adaptor->fetch_all_by_domain($domain) }; Description: Retrieves a listref of genes whose translation contain interpro domain $domain. The genes are returned in their native coord system (i.e. the coord_system they are stored in). If the coord system needs to be changed, then tranform or transfer should be called on the individual objects returned. Returntype : list of Bio::EnsEMBL::Genes Exceptions : none Caller : domainview Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_exon_supporting_evidence | ( | ) |
Arg [1] : String $hit_name Name of supporting feature Arg [2] : String $feature_type one of "dna_align_feature" or "protein_align_feature" Arg [3] : (optional) Bio::Ensembl::Analysis Example : $genes = $gene_adaptor->fetch_all_by_exon_supporting_evidence( 'XYZ', 'dna_align_feature'); Description: Gets all the genes with transcripts with exons which have a specified hit on a particular type of feature. Optionally filter by analysis. Returntype : Listref of Bio::EnsEMBL::Gene Exceptions : If feature_type is not of correct type. Caller : general Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_external_name | ( | ) |
Arg [1] : String $external_name The external identifier for the gene to be obtained Arg [2] : (optional) String $external_db_name The name of the external database from which the identifier originates. Example : @genes = @{$gene_adaptor->fetch_all_by_external_name('BRCA2')} @many_genes = @{$gene_adaptor->fetch_all_by_external_name('BRCA%')} Description: Retrieves a list of genes with an external database identifier $external_name. The genes returned are in their native coordinate system, i.e. in the coordinate system they are stored in the database in. If another coordinate system is required then the Gene::transfer or Gene::transform method can be used. SQL wildcards % and _ are supported in the $external_name Returntype : listref of Bio::EnsEMBL::Gene Exceptions : none Caller : goview, general Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_GOTerm | ( | ) |
Arg [1] : Bio::EnsEMBL::OntologyTerm The GO term for which genes should be fetched.
Example: @genes = @{ $gene_adaptor->fetch_all_by_GOTerm( $go_adaptor->fetch_by_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 Caller : general Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::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

public Listref Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_logic_name | ( | ) | [inherited] |
Arg [3] : string $logic_name the logic name of the type of features to obtain Example : $fs = $a->fetch_all_by_logic_name('foobar'); Description: Returns a listref of features created from the database. only features with an analysis of type $logic_name will be returned. If the logic name is invalid (not in the analysis table), a reference to an empty list will be returned. Returntype : listref of Bio::EnsEMBL::SeqFeatures Exceptions : thrown if no $logic_name Caller : General Status : Stable

public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_RawContig | ( | ) | [inherited] |
public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_RawContig_and_score | ( | ) | [inherited] |
public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_RawContig_constraint | ( | ) | [inherited] |
public Reference Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_Slice | ( | ) |
Arg [1] : Bio::EnsEMBL::Slice $slice The slice to fetch genes on. Arg [2] : (optional) string $logic_name the logic name of the type of features to obtain Arg [3] : (optional) boolean $load_transcripts if true, transcripts will be loaded immediately rather than lazy loaded later. Arg [4] : (optional) string $source the source name of the features to obtain. Arg [5] : (optional) string biotype the biotype of the features to obtain. Example : @genes = @{$gene_adaptor->fetch_all_by_Slice()}; Description: Overrides superclass method to optionally load transcripts immediately rather than lazy-loading them later. This is more efficient when there are a lot of genes whose transcripts are going to be used. Returntype : reference to list of genes Exceptions : thrown if exon cannot be placed on transcript slice Caller : Slice::get_all_Genes Status : Stable

Reimplemented from Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor.
public Reference Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_Slice_and_external_dbname_link | ( | ) |
Arg [1] : Bio::EnsEMBL::Slice $slice The slice to fetch genes on. Arg [2] : (optional) string $logic_name the logic name of the type of features to obtain Arg [3] : (optional) boolean $load_transcripts if true, transcripts will be loaded immediately rather than lazy loaded later. Arg [4] : Name of the external database Example : @genes = @{ $ga->fetch_all_by_Slice_and_external_dbname_link( $slice, undef, undef, "HUGO" ) }; Description: Overrides superclass method to optionally load transcripts immediately rather than lazy-loading them later. This is more efficient when there are a lot of genes whose transcripts are going to be used. The genes are then filtered to return only those with external database links of the type specified Returntype : reference to list of genes Exceptions : thrown if exon cannot be placed on transcript slice Caller : Status : Stable

public Listref Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_Slice_and_score | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Slice $slice the slice from which to obtain features Arg [2] : (optional) float $score lower bound of the the score of the features retrieved Arg [3] : (optional) string $logic_name the logic name of the type of features to obtain Example : $fts = $a->fetch_all_by_Slice_and_score($slice,90,'Swall'); Description: Returns a list of features created from the database which are are on the Slice defined by $slice and which have a score greater than $score. If $logic_name is defined, only features with an analysis of type $logic_name will be returned. Returntype : listref of Bio::EnsEMBL::SeqFeatures in Slice coordinates Exceptions : none Caller : Bio::EnsEMBL::Slice Status : Stable

Reimplemented in Bio::EnsEMBL::Map::DBSQL::MarkerFeatureAdaptor.
public Listref Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_all_by_Slice_constraint | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Slice $slice the slice from which to obtain features Arg [2] : (optional) string $constraint An SQL query constraint (i.e. part of the WHERE clause) Arg [3] : (optional) string $logic_name the logic name of the type of features to obtain Example : $fs = $a->fetch_all_by_Slice_constraint($slc, 'perc_ident > 5'); Description: Returns a listref of features created from the database which are on the Slice defined by $slice and fulfill the SQL constraint defined by $constraint. If logic name is defined, only features with an analysis of type $logic_name will be returned. Returntype : listref of Bio::EnsEMBL::SeqFeatures in Slice coordinates Exceptions : thrown if $slice is not defined Caller : Bio::EnsEMBL::Slice Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_transcript_supporting_evidence | ( | ) |
Arg [1] : String $hit_name Name of supporting feature Arg [2] : String $feature_type one of "dna_align_feature" or "protein_align_feature" Arg [3] : (optional) Bio::Ensembl::Analysis Example : $genes = $gene_adaptor->fetch_all_by_transcript_supporting_evidence('XYZ', 'dna_align_feature'); Description: Gets all the genes with transcripts with evidence for a specified hit on a particular type of feature. Optionally filter by analysis. Returntype : Listref of Bio::EnsEMBL::Gene. Exceptions : If feature_type is not of correct type. Caller : general Status : Stable

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_versions_by_stable_id | ( | ) |
Arg [1] : String $stable_id The stable ID of the gene to retrieve Example : $gene = $gene_adaptor->fetch_all_versions_by_stable_id ('ENSG00000148944'); Description : Similar to fetch_by_stable_id, but retrieves all versions of a gene stored in the database. Returntype : listref of Bio::EnsEMBL::Gene Exceptions : if we cant get the gene in given coord system Caller : general Status : At Risk

public Bio::EnsEMBL::Feature Bio::EnsEMBL::DBSQL::BaseAdaptor::fetch_by_dbID | ( | ) | [inherited] |
Arg [1] : int $id The unique database identifier for the feature to be obtained Example : $feat = $adaptor->fetch_by_dbID(1234)); $feat = $feat->transform('contig'); Description: Returns the feature created from the database defined by the the id $id. The feature will be returned in its native coordinate system. That is, the coordinate system in which it is stored in the database. In order to convert it to a particular coordinate system use the transfer() or transform() method. If the feature is not found in the database then undef is returned instead Returntype : Bio::EnsEMBL::Feature or undef Exceptions : thrown if $id arg is not provided does not exist Caller : general Status : Stable

Reimplemented in Bio::EnsEMBL::DBSQL::AnalysisAdaptor, Bio::EnsEMBL::DBSQL::AssemblyExceptionFeatureAdaptor, Bio::EnsEMBL::DBSQL::CoordSystemAdaptor, Bio::EnsEMBL::DBSQL::DBEntryAdaptor, Bio::EnsEMBL::DBSQL::DensityTypeAdaptor, Bio::EnsEMBL::DBSQL::MiscSetAdaptor, Bio::EnsEMBL::DBSQL::OntologyTermAdaptor, Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor, Bio::EnsEMBL::DBSQL::RepeatConsensusAdaptor, Bio::EnsEMBL::DBSQL::TranslationAdaptor, Bio::EnsEMBL::Map::DBSQL::DitagAdaptor, Bio::EnsEMBL::Map::DBSQL::DitagFeatureAdaptor, Bio::EnsEMBL::Map::DBSQL::MarkerAdaptor, and Bio::EnsEMBL::Map::DBSQL::QtlAdaptor.
public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_display_label | ( | ) |
Arg [1] : String $label - display label of gene to fetch Example : my $gene = $geneAdaptor->fetch_by_display_label("BRCA2"); Description: Returns the gene which has the given display label or undef if there is none. If there are more than 1, only the first is reported. Returntype : Bio::EnsEMBL::Gene Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_exon_stable_id | ( | ) |
Arg [1] : String $id The stable id of an exon of the gene to retrieve Example : $gene = $gene_adptr->fetch_by_exon_stable_id('ENSE00000148944'); Description: Retrieves a gene object from the database via an exon stable id. 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 : none Caller : general Status : Stable

public Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_maximum_DBLink | ( | ) |
public Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_Peptide_id | ( | ) |
public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_stable_id | ( | ) |
Arg [1] : String $id The stable ID of the gene to retrieve Example : $gene = $gene_adaptor->fetch_by_stable_id('ENSG00000148944'); Description: Retrieves a gene object from the database via its stable id. 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

public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_transcript_id | ( | ) |
Arg [1] : Int $trans_id Unique database identifier for the transcript whose gene should be retrieved. The gene is returned in its native coord system (i.e. the coord_system it is stored in). If the coord system needs to be changed, then tranform or transfer should be called on the returned object. undef is returned if the gene or transcript is not found in the database. Example : $gene = $gene_adaptor->fetch_by_transcript_id(1241); Description: Retrieves a gene from the database via the database identifier of one of its transcripts. Returntype : Bio::EnsEMBL::Gene Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_transcript_stable_id | ( | ) |
Arg [1] : string $trans_stable_id transcript stable ID whose gene should be retrieved Example : my $gene = $gene_adaptor->fetch_by_transcript_stable_id ('ENST0000234'); Description: Retrieves a gene from the database via the stable ID of one of its transcripts Returntype : Bio::EnsEMBL::Gene Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::Gene Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_by_translation_stable_id | ( | ) |
Arg [1] : String $translation_stable_id The stable id of a translation of the gene to be obtained Example : my $gene = $gene_adaptor->fetch_by_translation_stable_id ('ENSP00000278194'); Description: Retrieves a gene via the stable id of one of its translations. Returntype : Bio::EnsEMBL::Gene Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::Utils::Iterator Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_Iterator_by_Slice | ( | ) | [inherited] |
Arg [1] : Bio::EnsEMBL::Slice Arg [2] : Optional string: logic name of analysis Arg [3] : Optional int: Chunk size to iterate over. Default is 500000 Example : my $slice_iter = $feature_adaptor->fetch_Iterator_by_Slice($slice);
while(my $feature = $slice_iter->next && defined $feature){ #Do something here }
Description: Creates an Iterator which chunks the query Slice to facilitate large Slice queries which would have previously run out of memory Returntype : Bio::EnsEMBL::Utils::Iterator Exceptions : None Caller : general Status : at risk

public Bio::EnsEMBL::Utils::Iterator Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::fetch_Iterator_by_Slice_method | ( | ) | [inherited] |
Arg [1] : CODE ref of Slice fetch method Arg [2] : ARRAY ref of parameters for Slice fetch method Arg [3] : Optional int: Slice index in parameters array Arg [4] : Optional int: Slice chunk size. Default=500000 Example : my $slice_iter = $feature_adaptor->fetch_Iterator_by_Slice_method ($feature_adaptor->can('fetch_all_by_Slice_Arrays'), \@fetch_method_params, 0,#Slice idx );
while(my $feature = $slice_iter->next && defined $feature){ #Do something here }
Description: Creates an Iterator which chunks the query Slice to facilitate large Slice queries which would have previously run out of memory Returntype : Bio::EnsEMBL::Utils::Iterator Exceptions : Throws if mandatory params not valid Caller : general Status : at risk

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_nearest_Gene_by_Feature | ( | ) |
Arg [1] : Feature object Example : $genes = $gene_adaptor->fetch_nearest_Gene_by_Feature($feat); Description: Gets the nearest gene to the feature Returntype : Listref of Bio::EnsEMBL::Gene, EMPTY list if no nearest Caller : general Status : UnStable

public Listref Bio::EnsEMBL::DBSQL::BaseAdaptor::generic_fetch | ( | ) | [inherited] |
Arg [1] : (optional) string $constraint An SQL query constraint (i.e. part of the WHERE clause) Arg [2] : (optional) Bio::EnsEMBL::AssemblyMapper $mapper A mapper object used to remap features as they are retrieved from the database Arg [3] : (optional) Bio::EnsEMBL::Slice $slice A slice that features should be remapped to Example : $fts = $a->generic_fetch('contig_id in (1234, 1235)', 'Swall'); Description: Performs a database fetch and returns feature objects in contig coordinates. Returntype : listref of Bio::EnsEMBL::SeqFeature in contig coordinates Exceptions : none Caller : BaseFeatureAdaptor, ProxyDnaAlignFeatureAdaptor::generic_fetch Status : Stable

Reimplemented in Bio::EnsEMBL::DBSQL::DataFileAdaptor.
public Bio::EnsEMBL::DBSQL::GeneAdaptor::get_description | ( | ) |
public Bio::EnsEMBL::DBSQL::GeneAdaptor::get_display_xref | ( | ) |
public Bio::EnsEMBL::DBSQL::BaseAdaptor::get_dumped_data | ( | ) | [inherited] |
Undocumented method

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::get_Interpro_by_geneid | ( | ) |
Arg [1] : String $gene_stable_id The stable ID of the gene to obtain Example : @i = @{ $gene_adaptor->get_Interpro_by_geneid( $gene->stable_id() ) }; Description: Gets interpro accession numbers by gene stable id. A hack really
- we should have a much more structured system than this. Returntype : listref of strings (Interpro_acc:description) Exceptions : none Caller : domainview Status : Stable

public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::get_seq_region_id_external | ( | ) | [inherited] |
Undocumented method

public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::get_seq_region_id_internal | ( | ) | [inherited] |
Undocumented method

public Bio::EnsEMBL::DBSQL::GeneAdaptor::get_stable_entry_info | ( | ) |
public Boolean Bio::EnsEMBL::DBSQL::BaseAdaptor::is_multispecies | ( | ) | [inherited] |
Arg [1] : (optional) boolean $arg Example : if ($adaptor->is_multispecies()) { } Description: Getter/Setter for the is_multispecies boolean of to use for this adaptor. Returntype : boolean Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::DBSQL::GeneAdaptor::is_ref | ( | ) |
Undocumented method

public Scalar Bio::EnsEMBL::DBSQL::BaseAdaptor::last_insert_id | ( | ) | [inherited] |
Arg [1] : (optional) $field the name of the field the inserted ID was pushed into Arg [2] : (optional) HashRef used to pass extra attributes through to the DBD driver Description : Delegating method which uses DBI to extract the last inserted identifier. If using MySQL we just call the DBI method DBI::last_insert_id() since MySQL ignores any extra arguments. See DBI for more information about this delegated method. Example : my $id = $self->last_insert_id('my_id'); my $other_id = $self->last_insert_id(); Returntype : Scalar or undef

public Listref Bio::EnsEMBL::DBSQL::GeneAdaptor::list_dbIDs | ( | ) |
Example : @gene_ids = @{$gene_adaptor->list_dbIDs()}; Description: Gets an array of internal ids for all genes in the current db Arg[1] : <optional> int. not 0 for the ids to be sorted by the seq_region. Returntype : Listref of Ints Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::DBSQL::GeneAdaptor::list_seq_region_ids | ( | ) |
Undocumented method

public Reference Bio::EnsEMBL::DBSQL::GeneAdaptor::list_stable_ids | ( | ) |
Example : @stable_gene_ids = @{$gene_adaptor->list_stable_ids()}; Description: Gets an listref of stable ids for all genes in the current db Returntype : reference to a list of strings Exceptions : none Caller : general Status : Stable

public Bio::EnsEMBL::BaseFeatureAdaptor Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::new | ( | ) | [inherited] |
Arg [1] : list of args @args Superclass constructor arguments Example : none Description: Constructor which warns if caching has been switched off Returntype : Bio::EnsEMBL::BaseFeatureAdaptor Exceptions : none Caller : implementing subclass constructors Status : Stable

Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.
Reimplemented in Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor, and Bio::EnsEMBL::DBSQL::UnmappedObjectAdaptor.
public DBI::StatementHandle Bio::EnsEMBL::DBSQL::BaseAdaptor::prepare | ( | ) | [inherited] |
Arg [1] : string $string a SQL query to be prepared by this adaptors database Example : $sth = $adaptor->prepare("select yadda from blabla") Description: provides a DBI statement handle from the adaptor. A convenience function so you dont have to write $adaptor->db->prepare all the time Returntype : DBI::StatementHandle Exceptions : none Caller : Adaptors inherited from BaseAdaptor Status : Stable

Reimplemented in Bio::EnsEMBL::DBSQL::SliceAdaptor, and Bio::EnsEMBL::External::BlastAdaptor.
public void Bio::EnsEMBL::DBSQL::GeneAdaptor::remove | ( | ) |
Arg [1] : Bio::EnsEMBL::Gene $gene the gene to remove from the database Example : $gene_adaptor->remove($gene); Description: Removes a gene completely from the database. All associated transcripts, exons, stable_identifiers, descriptions, etc. are removed as well. Use with caution! Returntype : none Exceptions : throw on incorrect arguments warning if gene is not stored in this database Caller : general Status : Stable

Reimplemented from Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor.
public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::remove_by_analysis_id | ( | ) | [inherited] |
Undocumented method

public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::remove_by_feature_id | ( | ) | [inherited] |
Undocumented method

public Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::remove_by_RawContig | ( | ) | [inherited] |
public void Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::remove_by_Slice | ( | ) | [inherited] |
Arg [1] : Bio::Ensembl::Slice $slice Example : $feature_adaptor->remove_by_Slice($slice); Description: This removes features from the database which lie on a region represented by the passed in slice. Only features which are fully contained by the slice are deleted; features which overlap the edge of the slice are not removed. The table the features are removed from is defined by the abstract method_tablename. Returntype : none Exceptions : thrown if no slice is supplied Caller : general Status : Stable

public Int Bio::EnsEMBL::DBSQL::BaseAdaptor::species_id | ( | ) | [inherited] |
Arg [1] : (optional) int $species_id The internal ID of the species in a multi-species database. Example : $db = $adaptor->db(); Description: Getter/Setter for the internal ID of the species in a multi-species database. The default species ID is 1. Returntype : Integer Exceptions : none Caller : Adaptors inherited from BaseAdaptor Status : Stable

public Boolean Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor::start_equals_end | ( | ) | [inherited] |
Arg [1] : (optional) boolean $newval Example : $bfa->start_equals_end(1); Description: Getter/Setter for the start_equals_end flag. If set to true sub _slice_fetch will use a simplified sql to retrieve 1bp slices. Returntype : boolean Exceptions : none Caller : EnsemblGenomes variation DB build Status : Stable

public The Bio::EnsEMBL::DBSQL::GeneAdaptor::store | ( | ) |
Arg [1] : Bio::EnsEMBL::Gene $gene The gene to store in the database Arg [2] : ignore_release in xrefs [default 1] set to 0 to use release info in external database references Example : $gene_adaptor->store($gene); Description: Stores a gene in the database. Returntype : the database identifier (dbID) of the newly stored gene Exceptions : thrown if the $gene is not a Bio::EnsEMBL::Gene or if $gene does not have an analysis object Caller : general Status : Stable

Reimplemented from Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor.
public void Bio::EnsEMBL::DBSQL::GeneAdaptor::store_alt_alleles | ( | ) |
Arg [1] : reference to list of Bio::EnsEMBL::Genes $genes Example : $gene_adaptor->store_alt_alleles([$gene1, $gene2, $gene3]); Description: This method creates a group of alternative alleles (i.e. locus) from a set of genes. The genes should be genes from alternate haplotypes which are similar. The genes must already be stored in this database. At least 2 genes must be in the list reference provided. Returntype : none Exceptions : throw on incorrect arguments throw on sql error (e.g. duplicate unique id) Caller : general Status : Stable

public void Bio::EnsEMBL::DBSQL::GeneAdaptor::update | ( | ) |
Arg [1] : Bio::EnsEMBL::Gene $gene The gene to update Example : $gene_adaptor->update($gene); Description: Updates the type, analysis, display_xref, status, is_current and description of a gene in the database. Returntype : None Exceptions : thrown if the $gene is not a Bio::EnsEMBL::Gene Caller : general Status : Stable

The documentation for this class was generated from the following file:
- Bio/EnsEMBL/DBSQL/GeneAdaptor.pm