The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2024] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <http://www.ensembl.org/Help/Contact>.

NAME

Bio::EnsEMBL::DBSQL::RNAProductAdaptor - Provides a means to fetch and store RNAProduct objects from a database.

DESCRIPTION

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

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

SYNOPSIS

  use Bio::EnsEMBL::Registry;

  Bio::EnsEMBL::Registry->load_registry_from_db(
    -host => 'ensembldb.ensembl.org',
    -user => 'anonymous'
  );

  $rnaproduct_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor( "human", "core",
    "rnaproduct" );

  ...

METHODS

fetch_all_by_Transcript

  Arg [1]    : Bio::EnsEMBL::Transcript $transcript
  Example    : $rps = $rnaproduct_adaptor->fetch_by_Transcript($transcript);
  Description: Retrieves RNAProducts via their associated transcript.
               If no RNAProducts are found, an empty list is returned.
  Returntype : arrayref of Bio::EnsEMBL::RNAProducts
  Exceptions : throw on incorrect argument
  Caller     : Transcript
  Status     : Stable

fetch_all_by_external_name

  Arg [1]    : String $external_name
               An external identifier of the RNAProduct 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 @rnaproducts =
                  @{ $rp_a->fetch_all_by_external_name('MIMAT0000416') };
               my @more_rnaproducts =
                  @{ $rp_a->fetch_all_by_external_name('hsa-miR-1-__') };
  Description: Retrieves all RNAProducts which are associated with
               an external identifier such as a GO term, miRBase
               identifer, etc. Usually there will only be a single
               RNAProduct returned in the list reference, but not
               always. If no RNAProducts with the external identifier
               are found, a reference to an empty list is returned.
               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 : listref of Bio::EnsEMBL::RNAProduct
  Exceptions : none
  Caller     : general
  Status     : Stable

fetch_all_by_type

  Arg [1]    : string $type_code
  Example    : $rps = $rp_a->fetch_all_by_type('miRNA');
  Description: Retrieves RNAProducts via their type (e.g. miRNA, circRNA).
               If no matching RNAProducts are found, an empty list is
               returned.
  Returntype : arrayref of Bio::EnsEMBL::RNAProducts
  Exceptions : throws if type code is undefined
  Caller     : ?
  Status     : In Development

fetch_by_dbID

  Arg [1]    : int $dbID
               The internal identifier of the RNAProduct to obtain
  Example    : $rnaproduct = $rnaproduct_adaptor->fetch_by_dbID(1234);
  Description: This fetches a RNAProduct object via its internal id.
               This is only debatably useful since RNAProducts do
               not make much sense outside of the context of their
               Transcript.  Consider using fetch_by_Transcript instead.
  Returntype : Bio::EnsEMBL::RNAProduct, or undef if the RNAProduct is not
               found.
  Caller     : ?
  Status     : Stable

fetch_by_stable_id

  Arg [1]    : string $stable_id
               The stable identifier of the RNAProduct to obtain
  Example    : $rnaproduct = $rnaproduct_adaptor->fetch_by_stable_id("ENSS00001");
  Description: This fetches a RNAProduct object via its stable id.
  Returntype : Bio::EnsEMBL::RNAProduct, or undef if the RNAProduct is not
               found.
  Caller     : ?
  Status     : Stable

list_dbIDs

  Arg [1]    : none
  Example    : @rnaproduct_ids = @{$rnaproduct_adaptor->list_dbIDs()};
  Description: Gets an array of internal ids for all RNAProducts in the current db
  Returntype : list of ints
  Exceptions : none
  Caller     : ?
  Status     : Stable

remove

  Arg [1]    : Bio::EnsEMBL::RNAProduct $rnaproduct
               The RNAProduct to be removed from the database
  Example    : $rpID = $rp_adaptor->remove($rnaproduct, $transcript->dbID());
  Description: Removes a RNAProduct, along with all associated information
               from the database.
  Returntype : none
  Exceptions : throw on incorrect arguments
  Caller     : ?
  Status     : Stable

store

  Arg [1]    : Bio::EnsEMBL::RNAProduct $rnaproduct
               The RNAProduct to be written to the database
  Arg [2]    : Int $transcript_dbID
               The identifier of the transcript that this RNAProduct is
               associated with
  Example    : $rpID = $rp_adaptor->store($rnaproduct, $transcript->dbID());
  Description: Stores a RNAProduct in the database and returns the new
               internal identifier for the stored RNAProduct.
  Returntype : Int
  Exceptions : throw on incorrect arguments
  Caller     : general
  Status     : Stable

_list_dbIDs

  Arg[1]      : String $table
  Arg[2]      : String $column
  Example     : $rnaproduct_adaptor->_list_dbIDs('rnaproduct', 'rnaproduct_id');
  Description : Local reimplementation to ensure multi-species RNAProducts
                are limited to their species alone
  Returntype  : ArrayRef of specified IDs
  Caller      : Internal
  Status      : Unstable

_fetch_direct_query Arg [1] : reference to an array consisting of: - the name of the column to use in the WHERE clause, - the value fields from that column are to be equal to, - the data type of that column (e.g. SQL_INTEGER) Description: PRIVATE internal method shared between public fetch methods in order to avoid duplication of SQL-query logic. NOT SAFE to be handed directly to users because in its current form it can be trivially exploited to inject arbitrary SQL. Returntype : ArrayRef of either Bio::EnsEMBL::RNAProducts or undefs Exceptions : throws if RNAProduct type is absent or unknown Caller : internal Status : At Risk (In Development)

_obj_from_sth Arg [1] : DBI statement handle Description: PRIVATE internal method shared between public SQL-query methods in order to avoid duplication of object-creation logic. Returntype : ArrayRef of either Bio::EnsEMBL::RNAProducts or undefs Exceptions : throws if RNAProduct type is absent or unknown Caller : internal Status : At Risk (In Development)

_tables

  Arg [1]    : none
  Description: PROTECTED implementation of superclass abstract method.
               Returns the names, aliases of the tables to use for queries.
  Returntype : list of listrefs of strings
  Exceptions : none
  Caller     : internal
  Status     : Stable