ensembl-hive  2.6
Bio::EnsEMBL::DB::ExternalFeatureFactoryI Class Reference
+ Inheritance diagram for Bio::EnsEMBL::DB::ExternalFeatureFactoryI:

Public Member Functions

public void coordinate_systems ()
 
public void fetch_all_by_contig_name ()
 
public get_Ensembl_SeqFeatures_contig ()
 
public get_Ensembl_SeqFeatures_clone ()
 
public An get_Ensembl_Genes_clone ()
 
public get_SeqFeature_by_id ()
 
- Public Member Functions inherited from Bio::EnsEMBL::External::ExternalFeatureAdaptor
public Bio::EnsEMBL::External::ExternalFeatureAdaptor new ()
 
public Bio::EnsEMBL::DBSQL::DBAdaptor ensembl_db ()
 
public List coordinate_systems ()
 
public String track_name ()
 
public String feature_type ()
 
public Reference fetch_all_by_Slice ()
 
protected _guess_slice_setter ()
 
public Reference fetch_all_by_contig_name ()
 
public Reference fetch_all_by_supercontig_name ()
 
public Reference fetch_all_by_clone_accession ()
 
public Reference fetch_all_by_chr_start_end ()
 
protected void _no_valid_coord_system ()
 
protected Boolean _supported ()
 

Detailed Description

Synopsis

$external_ff = new ImplementingExternalFeatureFactoryClass;
$database_adaptor = new Bio::EnsEMBL::DBSQL::DBAdaptor(
-host => 'blah',
-dbname => 'other',
-pass => 'pass'
);
# alternatively, you can add external databases to an obj once made
$database_adaptor->add_ExternalFeatureFactory($external_ff);
# now the ExternalFeatureFactory has been added, Ensembl RawContigs
# and Slices will now have ExternalFeatures on them
$contig =
$db_adaptor->get_RawContigAdaptor->fetch_by_name('AC00056.00001');
@external = @{ $contig->get_all_ExternalFeatures() };
# this works on Slices as well
$slice =
$db_adaptor->get_SliceAdaptor->fetch_by_chr_start_end( '12', 10000,
30000 );
@external = @{ $slice->get_all_ExternalFeatures() };

Description

This is a legacy class.  It is included only for backwards
compatibility with ExternalFeatureFactories which are presumably
still used to place data into ensembl.  It is recommended that if
you wish to create EnsEMBL features externally that you use the
Bio::EnsEMBL::External::ExternalFeatureAdaptor instead.

This object defines the abstract interface for External Database access
inside Ensembl. The aim is that one can attach an External Database
which will generate Sequence Features and these Sequence Features will
be accessible along side all the internal Ensembl sequence features, for
drawing, EMBL dumping etc. In particular, the external database does not
have to worry about the transformation of the Sequence Feature objects
into VirtualContigs.

Sequence Features have to be defined in one of two coordinate systems:
Original EMBL/GenBank coordinates of a particular sequnence version or
the Ensembl contig coordinates. This means you have to calculate your
sequence features in one these two coordinate systems

The methods that have to be implemented are:

  get_External_SeqFeatures_contig( $ensembl_contig_identifier,
    $sequence_version, $start, $end );

  get_External_SeqFeatures_clone( $embl_accession_number,
    $sequence_version, $start, $end );

The semantics of this method is as follows:

  $ensembl_contig_identifier - the ensembl contig id (external id).
  $sequence_version - embl/genbank sequence version
  $embl_accession_number - the embl/genbank accession number

The $start/$end can be ignored, but methods can take advantage of it.
This is so that ensembl can ask for features only on a region of DNA,
and if desired, the external database can respond with features only in
this region, rather than the entire sequence.

The hope is that the second method could potentially have a very complex
set of mappings of other embl_accession numbers to one embl_accession
number and provide the complex mapping.

The methods should return Sequence Features with the following spec:

  a) must implement the Bio::SeqFeatureI interface.

  b) must accept "set" calls on 

  start,end,strand

  to provide coordinate transformation of the feature.

  c) must be unique in-memory objects, ie, the implementation is not
  allowed to cache the sequence feature in its entirity. Two separate
  calls to get_External_SeqFeatures_contig must be able to separately
  set start,end,strand information without clobbering each other. The
  other information, if so wished, can be cached by each SeqFeature
  holding onto another object, but this is left to the implementor to
  decide on the correct strategy.

  d) must return an unique identifier when called with method id.

You must implement both functions. In most cases, one function will
always return an empty list, whereas the other function will actually
query the external database.

The second way of accessing the External Database from Ensembl is using
unique internal identifiers in that database. The method is:

  get_SeqFeature_by_id($id);

It should return exactly one Sequence Feature object of the same type as
above.

Definition at line 109 of file ExternalFeatureFactoryI.pm.

Member Function Documentation

◆ coordinate_systems()

public void Bio::EnsEMBL::DB::ExternalFeatureFactoryI::coordinate_systems ( )
  Arg [1]    : none
  Example    :
none
  Description: This method is present to make the ExternalFeatureFactory 
               interface behave as an ExternalFeatureAdaptor. It is for
               backwards compatibility.
  Returntype : none
  Exceptions : none
  Caller     : internal
 
Code:
click to view

◆ fetch_all_by_contig_name()

public void Bio::EnsEMBL::DB::ExternalFeatureFactoryI::fetch_all_by_contig_name ( )
  Arg [1]    : none
  Example    :
none
  Description: This method is present to make the ExternalFeatureFactory 
               interface behave as an ExternalFeatureAdaptor. It is for
               backwards compatibility.
  Returntype : none
  Exceptions : none
  Caller     : internal
 
Code:
click to view

◆ get_Ensembl_Genes_clone()

public An Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_Ensembl_Genes_clone ( )
 Title   : get_Ensembl_Genes_clone
 Function: returns Gene objects in clone coordinates from a gene id
 Returns : An array of Gene objects
 Args    : clone id
 
Code:
click to view

◆ get_Ensembl_SeqFeatures_clone()

public Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_Ensembl_SeqFeatures_clone ( )
 Title   : get_Ensembl_SeqFeatures_clone (Abstract)
 Usage   :
 Function:
 Example :
 Returns : 
 Args    :
 
Code:
click to view

◆ get_Ensembl_SeqFeatures_contig()

public Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_Ensembl_SeqFeatures_contig ( )
 Title   : get_Ensembl_SeqFeatures_contig (Abstract)
 Usage   :
 Function:
 Example :
 Returns : 
 Args    :
 
Code:
click to view

◆ get_SeqFeature_by_id()

public Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_SeqFeature_by_id ( )
 Title   : get_SeqFeature_by_id (Abstract)
 Usage   : 
 Function: Return SeqFeature object for any valid unique id  
 Example :
 Returns : 
 Args    : id as determined by the External Database
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::DBSQL::DBAdaptor
Definition: DBAdaptor.pm:40
Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_Ensembl_SeqFeatures_contig
public get_Ensembl_SeqFeatures_contig()
Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_SeqFeature_by_id
public get_SeqFeature_by_id()
Bio::EnsEMBL::DB::ExternalFeatureFactoryI::fetch_all_by_contig_name
public void fetch_all_by_contig_name()
Bio::EnsEMBL::DB::ExternalFeatureFactoryI::coordinate_systems
public void coordinate_systems()
Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_Ensembl_Genes_clone
public An get_Ensembl_Genes_clone()
Bio::EnsEMBL::DB::ExternalFeatureFactoryI::get_Ensembl_SeqFeatures_clone
public get_Ensembl_SeqFeatures_clone()