ensembl-hive  2.7.0
Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor Class Reference
+ Inheritance diagram for Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor:

Public Member Functions

public new ()
 
public fetch_by_Slice_start_end_strand ()
 
public faindex ()
 
public can_access_Slice ()
 
public store ()
 
protected _fetch_raw_seq ()
 
- Public Member Functions inherited from Bio::EnsEMBL::DBSQL::BaseSequenceAdaptor
public StringRef fetch_by_Slice_start_end_strand ()
 
public Boolean can_access_Slice ()
 
public Bio::EnsEMBL::Slice expand_Slice ()
 
public Bio::EnsEMBL::DBSQL::SequenceAdaptor new ()
 
protected _init_seq_instance ()
 
public void clear_cache ()
 
public chunk_power ()
 
public cache_size ()
 
public seq_cache_max ()
 
protected ScalarRef _fetch_raw_seq ()
 
protected ScalarRef _fetch_seq ()
 

Detailed Description

Description

This sequence adaptor extends the BaseSequenceAdaptor code to provide an 
implementation of the .fai index lookup as defined by samtools. The code uses
this indexing system to access portions of sequence and translates Slice requests
into sensible locations for our FASTA query layer.

The adaptor must be initalised with access to a Faidx compatible object and the FASTA
file backing must use the same seq_region_name as the querying slices otherwise
we cannot return the required data.

Definition at line 20 of file FastaSequenceAdaptor.pm.

Member Function Documentation

◆ _fetch_raw_seq()

protected Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::_fetch_raw_seq ( )

Undocumented method

Code:
click to view

◆ can_access_Slice()

public Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::can_access_Slice ( )
  Description : Checks the lookup to see if we have access to the Slice given (using 
                seq region name as the ID). We reject any Circular Slice
 
Code:
click to view

◆ faindex()

public Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::faindex ( )
  Description : Holds a reference to the Faindex object to use for sequence access
 
Code:
click to view

◆ fetch_by_Slice_start_end_strand()

public Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::fetch_by_Slice_start_end_strand ( )
  
  Arg [1]     : Bio::EnsEMBL::Slice; $slice. Slice to fetch sequence for
  Arg [2]     : Integer; $start. Start of region to retrieve relative to the Slice (defaults to 1)
  Arg [3]     : Integer; $end. End of region to retreive relative to the Slice (defaults to length)
  Arg [4]     : Integer; $strand. Strand to fetch (defaults to 1)
  Description : Fetches sequence for the given slice. Unlike the normal SequenceAdaptor we assume
                Sequence is held in a FASTA file under the Slice's seq_region_name.
  Exception   : Thrown if we are given a circular slice
 


Code:
click to view

◆ new()

public Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::new ( )
  
  Arg [1]     : FileFaidx; $faindex. A FileFaidx object or a compatible version
  Arg [2]     : Integer; $chunk_power. Size of the region to cache
  Arg [3]     : Integer; $cache_size. Number of regions to cache
  Description : Builds an instance of the FastaSequenceAdaptor
 


Code:
click to view

◆ store()

public Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::store ( )
  
  Description : Unsupported operation. Please use a FASTA serialiser
 


Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::can_access_Slice
public can_access_Slice()
Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::faindex
public faindex()
Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::_fetch_raw_seq
protected _fetch_raw_seq()
Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::store
public store()
Bio::EnsEMBL::DBSQL::FastaSequenceAdaptor::fetch_by_Slice_start_end_strand
public fetch_by_Slice_start_end_strand()