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 <dev@ensembl.org>.

Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.

NAME

Bio::EnsEMBL::DBSQL::SequenceAdaptor - produce sequence strings from locations

SYNOPSIS

my $sa = $registry->get_adaptor( 'Human', 'Core', 'Sequence' );

my $dna =
  ${ $sa->fetch_by_Slice_start_end_strand( $slice, 1, 1000, -1 ) };

DESCRIPTION

An adaptor for the retrieval of DNA sequence from the EnsEMBL database

METHODS

new

Arg [1]    : none
Example    : my $sa = $db_adaptor->get_SequenceAdaptor();
Description: Constructor. Calls superclass constructor and initialises
             internal cache structure.
Returntype : Bio::EnsEMBL::DBSQL::SequenceAdaptor
Exceptions : none
Caller     : DBAdaptor::get_SequenceAdaptor
Status     : Stable

fetch_by_Slice_start_end_strand

Arg  [1]   : Bio::EnsEMBL::Slice slice
             The slice from which you want the sequence
Arg  [2]   : (optional) int startBasePair 
             The start base pair relative to the start of the slice. Negative
             values or values greater than the length of the slice are fine.
             default = 1
Arg  [3]   : (optional) int endBasePair
             The end base pair relative to the start of the slice. Negative
             values or values greater than the length of the slice are fine,
             but the end must be greater than or equal to the start
             count from 1
             default = the length of the slice
Arg  [4]   : (optional) int strand 
             1, -1
             default = 1
Example    : $dna = $seq_adptr->fetch_by_Slice_start_end_strand($slice, 1, 
                                                                1000, -1);
Description: Retrieves from db the sequence for this slice
             uses AssemblyMapper to find the assembly
Returntype : string 
Exceptions : endBasePair should be less or equal to length of slice 
Caller     : Bio::EnsEMBL::Slice::seq(), Slice::subseq() 
Status     : Stable

can_access_Slice

Description : Returns 1 since we can access any Slice's data

_rna_edit

Description : Performs within sequence region editting when 
              the underlying sequence is incorrect. Used by LRGs.

_fetch_raw_seq

Description : Communicates with the database to fetch back sequence

store

Arg [1]    : int $seq_region_id the id of the sequence region this dna
             will be associated with.
Arg [2]    : string $sequence the dna sequence to be stored 
             in the database.  Note that the sequence passed in will be
             converted to uppercase.
Example    : $seq_adaptor->store(11, 'ACTGGGTACCAAACAAACACAACA');
Description: stores a dna sequence in the databases dna table and returns the
             database identifier for the new record.
Returntype : none
Exceptions : throw if the database insert fails
Caller     : sequence loading scripts
Status     : Stable

remove

Arg [1]    : int $seq_region_id the id of the sequence region this dna   
             is associated with.   
Example    : $seq_adaptor->remove(11);   
Description: removes a dna sequence for a given seq_region_id    
Returntype : none    
Exceptions : throw if the database delete fails    
Caller     : Internal    
Status     : Stable    
 

_populate_seq_region_edits

Description:  Query the database for any _rna_edit attributes attached to a seq region