Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::DBFile::FileAdaptor Class Reference
Inheritance diagram for Bio::EnsEMBL::DBFile::FileAdaptor:

List of all members.


Class Summary

Synopsis

Description

Basic wrapper class to provide access to file based data.
This is primarily aimed at indexed Collection(.col) files which are optimised for Slice 
based queries. Collections store fixed width width/windowed data as BLOBS.  This makes 
it possible to seek to the a required location given slice coordinate and read the only 
the required amount of data covering the slice.
Currently only works as hybrid DBAdaptor e.g. ResultFeatureAdaptor which inherits both from 
here and BaseFeatureAdaptor.
 

Definition at line 24 of file FileAdaptor.pm.

Available Methods

public GLOB get_filehandle ()
public initialise_filehandle ()
public GLOB open_file ()
public void validate_file_length ()

Method Documentation

public GLOB Bio::EnsEMBL::DBFile::FileAdaptor::get_filehandle ( )
  Arg[1]     : string     - filepath
  Arg[2]     : HASHREF    - Optional params, see open_file
  Example    : my $fh     = $self->get_filehandle($filepath, 1);
  Description: Gets and caches a simple file handle.
  Returntype : GLOB/undef - filehandle
  Exceptions : warns if cache entry exists but is not defined 
  Caller     : general
  Status     : at risk
 
Code:
click to view
public Bio::EnsEMBL::DBFile::FileAdaptor::initialise_filehandle ( )

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::DBFile::CollectionAdaptor.

public GLOB Bio::EnsEMBL::DBFile::FileAdaptor::open_file ( )
  Arg[1]     : string     - filepath
  Arg[2]     : HASHREF    - Optional params:
                                 -binmode       => 0|1,   # Boolean i.e. treat file as binary
                                 -file_operator => '>'    # Default is '<'
                                #-perms_octal   =>  # Requires FileHandle
  Example    : my $fh     = $self->open_file($filepath, {-binmode = > 1, -file_operator => '>'});
  Description: Opens a file for reading or writing.
  Returntype : GLOB/undef - filehandle
  Exceptions : warns if file open fails
               warns if file operator unsupported
               warns if failed to set binmode
  Caller     : general
  Status     : at risk
 
Code:
click to view
public void Bio::EnsEMBL::DBFile::FileAdaptor::validate_file_length ( )
  Arg[1]     : string  - filepath
  Arg[2]     : int     - expected length in bytes
  Example    : $self->validate_file_length($filepath, $expected_length);
  Description: Utility method which can be used during file creation
  Returntype : None
  Exceptions : warns if file open fails
               throws if file is not expected length
  Caller     : general
  Status     : at risk - change to seek to accounts for 'logical characters'
 
Code:
click to view

The documentation for this class was generated from the following file: