ensembl-hive  2.8.1
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor Class Reference
+ Inheritance diagram for Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor:

Public Member Functions

public Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor new ()
 
public Bio::EnsEMBL::DensityFeature fetch_all_by_Slice ()
 
public fetch_all ()
 
public Listref fetch_all_by_Slice_constraint ()
 
protected _tables ()
 
protected _columns ()
 
protected _objs_from_sth ()
 
public List list_dbIDs ()
 
public void store ()
 
public Bio::EnsEMBL::DensityFeatureSet fetch_Featureset_by_Slice ()
 
- Public Member Functions inherited from Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor
public Bio::EnsEMBL::BaseFeatureAdaptor new ()
 
public Boolean start_equals_end ()
 
public void clear_cache ()
 
protected _clear_slice_feature_cache ()
 
protected Bio::EnsEMBL::Utils::Cache _slice_feature_cache ()
 
public Listref fetch_all_by_Slice ()
 
public Bio::EnsEMBL::Utils::Iterator fetch_Iterator_by_Slice_method ()
 
public Bio::EnsEMBL::Utils::Iterator fetch_Iterator_by_Slice ()
 
public Listref fetch_all_by_Slice_and_score ()
 
public Listref fetch_all_by_Slice_constraint ()
 
public Listref fetch_all_by_logic_name ()
 
public Listref fetch_all_by_stable_id_list ()
 
protected _create_feature ()
 
protected _create_feature_fast ()
 
public Int count_by_Slice_constraint ()
 
protected ArrayRef _get_and_filter_Slice_projections ()
 
protected ArrayRef _generate_feature_bounds ()
 
protected Listref _get_by_Slice ()
 
protected _slice_fetch ()
 
public get_seq_region_id_external ()
 
public get_seq_region_id_internal ()
 
protected _pre_store ()
 
protected _pre_store_userdata ()
 
protected _check_start_end_strand ()
 
protected _remap ()
 
protected _seq_region_boundary_from_db ()
 
public void store ()
 
public void remove ()
 
public void remove_by_Slice ()
 
protected _max_feature_length ()
 
protected _list_seq_region_ids ()
 
public remove_by_analysis_id ()
 
public remove_by_feature_id ()
 
public Bio::EnsEMBL::Feature fetch_nearest_by_Feature ()
 
public Listref fetch_all_by_outward_search ()
 
public Listref fetch_all_nearest_by_Feature ()
 
public Listref select_nearest ()
 
protected Int _compute_nearest_end ()
 
protected Int _compute_prime_distance ()
 
protected Int _compute_midpoint ()
 
protected _discard_excess_features_from_matrix ()
 
- Public Member Functions inherited from Bio::EnsEMBL::DBSQL::BaseAdaptor
public Bio::EnsEMBL::DBSQL::BaseAdaptor new ()
 
public DBI::StatementHandle prepare ()
 
public Bio::EnsEMBL::DBSQL::DBAdaptor db ()
 
public Bio::EnsEMBL::DBSQL::DBConnection dbc ()
 
public Boolean is_multispecies ()
 
public Int species_id ()
 
protected _list_dbIDs ()
 
protected _straight_join ()
 
protected _can_straight_join ()
 
public Listref bind_param_generic_fetch ()
 
protected _bind_param_generic_fetch ()
 
public String generate_in_constraint ()
 
public Listref generic_fetch ()
 
public Int generic_count ()
 
protected _generate_sql ()
 
public Bio::EnsEMBL::Feature fetch_by_dbID ()
 
protected _uncached_fetch_by_dbID ()
 
public Listref fetch_all_by_dbID_list ()
 
protected _uncached_fetch_all_by_dbID_list ()
 
protected ArrayRef _uncached_fetch_all_by_id_list ()
 
public fetch_all ()
 
public Scalar last_insert_id ()
 
public insert_ignore_clause ()
 
protected Bio::EnsEMBL::DBSQL::Support::BaseCache _id_cache ()
 
protected Boolean _no_id_cache ()
 
public Boolean ignore_cache_override ()
 
public Int schema_version ()
 
protected _tables ()
 
protected _columns ()
 
protected _default_where_clause ()
 
protected _left_join ()
 
protected _final_clause ()
 
protected _objs_from_sth ()
 
protected _build_id_cache ()
 
protected _logic_name_to_constraint ()
 

Detailed Description

Synopsis

my $dfa = $database_adaptor->get_DensityFeatureAdaptor();
my $interpolate = 1;
my $blocks_wanted = 50;
@dense_feats = @{
$dfa->fetch_all_by_Slice( $slice, 'SNPDensity', $blocks_wanted,
$interpolate );
}

Description

Density Feature Adaptor - An adaptor responsible for the creation of density
features from the database.

Definition at line 31 of file DensityFeatureAdaptor.pm.

Member Function Documentation

◆ _columns()

protected Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::_columns ( )

Undocumented method

Code:
click to view

◆ _objs_from_sth()

protected Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::_objs_from_sth ( )

Undocumented method

Code:
click to view

◆ _tables()

protected Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::_tables ( )

Undocumented method

Code:
click to view

◆ fetch_all()

public Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all ( )

Undocumented method

Code:
click to view

◆ fetch_all_by_Slice()

public Bio::EnsEMBL::DensityFeature Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all_by_Slice ( )
  Arg [1]    : Bio::EnsEMBL::Slice $slice - The slice representing the region
               to retrieve density features from.
  Arg [2]    : string $logic_name - The logic name of the density features to
               retrieve.
  Arg [3]    : int $num_blocks (optional; default = 50) - The number of
               features that are desired. The ratio between the size of these
               features and the size of the features in the database will be
               used to determine which database features will be used.
  Arg [4]    : boolean $interpolate (optional; default = 0) - A flag indicating
               whether the features in the database should be interpolated to
               fit them to the requested number of features.  If true the
               features will be interpolated to provide $num_blocks features.
               This will not guarantee that exactly $num_blocks features are
               returned due to rounding etc. but it will be close.
  Arg [5]    : float $max_ratio - The maximum ratio between the size of the
               requested features (as determined by $num_blocks) and the actual
               size of the features in the database.  If this value is exceeded
               then an empty list will be returned.  This can be used to
               prevent excessive interpolation of the database values.
  Example    :
#interpolate:
$feats = $dfa->fetch_all_by_Slice($slice,'SNPDensity', 10, 1);
               #do not interpoloate, get what is in the database:
               $feats = $dfa->fetch_all_by_Slice($slice,'SNPDensity', 50);
               #interpolate, but not too much
               $feats = $dfa->fetch_all_by_Slice($slice,'SNPDensity',50,1,5.0);
  Description: Retrieves a set of density features which overlap the region
               of this slice. Density features are a discrete representation
               of a continuous value along a sequence, such as a density or
               percent coverage.  Density Features may be stored in chunks of
               different sizes in the database, and interpolated to fit the
               desired size for the requested region.  For example the database
               may store a single density value for each 1KB and also for each
               1MB.  When fetching for an entire chromosome the 1MB density
               chunks will be used if the requested number of blocks is not
               very high.
               Note that features which have been interpolated are not stored
               in the database and as such will have no dbID or adaptor set.
  Returntype : Bio::EnsEMBL::DensityFeature
  Exceptions : warning on invalid $num_blocks argument
               warning if no features with logic_name $logic_name exist
               warning if density_type table has invalid block_size value
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ fetch_all_by_Slice_constraint()

public Listref Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all_by_Slice_constraint ( )
  Arg [1]    : Bio::EnsEMBL::Slice $slice
               the slice from which to obtain features
  Arg [2]    : (optional) string $constraint
               An SQL query constraint (i.e. part of the WHERE clause)
  Example    :
$fs = $a->fetch_all_by_Slice_constraint($slc, 'density_type_id = 88');
  Description: Returns a listref of features created from the database which 
               are on the Slice defined by $slice and fulfill the SQL 
               constraint defined by $constraint. 
               Note that this is a re-implementation of a method with the same name
               in the BaseFeatureAdaptor.
               This was necessary to remove the use of symliked sequences for density features
  Returntype : listref of Bio::EnsEMBL::SeqFeatures in Slice coordinates
  Exceptions : thrown if $slice is not defined
  Caller     : Bio::EnsEMBL::Slice
  Status     : Stable
 
Code:
click to view

◆ fetch_Featureset_by_Slice()

public Bio::EnsEMBL::DensityFeatureSet Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_Featureset_by_Slice ( )
  Arg [1-5]  : see
               Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all_by_Slice()
               for argument documentation
  Example    :
$featureset = $dfa->fetch_FeatureSet_by_Slice($slice,'SNPDensity', 10, 1);
  Description: wrapper around
               Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all_by_Slice()
               which returns a Bio::EnsEMBL::DensityFeatureSet and also caches
               results
  Returntype : Bio::EnsEMBL::DensityFeatureSet
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

◆ list_dbIDs()

public List Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::list_dbIDs ( )
  Arg [1]    : none
  Example    :
@feature_ids = @{$density_feature_adaptor->list_dbIDs()};
  Description: Gets an array of internal ids for all density features in the
               current db
  Arg[1]     : <optional> int. not set to 0 for the ids to be sorted by the seq_region.
  Returntype : list of ints
  Exceptions : none
  Caller     : ?
  Status     : Stable
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::new ( )
  Arg [1]    : list of args @args
               Superclass constructor arguments
  Example    :
none
  Description: Constructor which just initializes internal cache structures
  Returntype : Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor
  Exceptions : none
  Caller     : implementing subclass constructors
  Status     : Stable
 
Code:
click to view

◆ store()

public void Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::store ( )
  Arg [1]    : list of Bio::EnsEMBL::DensityFeatures @df
               the simple features to store in the database
  Example    :
$density_feature_adaptor->store(1234, @density_feats);
  Description: Stores a list of density feature objects in the database
  Returntype : none
  Exceptions : thrown if @df is not defined, if any of the features do not
               have an attached slice.
               or if any elements of @df are not Bio::EnsEMBL::SeqFeatures 
  Caller     : general
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::_objs_from_sth
protected _objs_from_sth()
Bio::EnsEMBL::DensityType
Definition: DensityType.pm:24
map
public map()
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::store
public void store()
Bio::EnsEMBL::DensityFeatureSet
Definition: DensityFeatureSet.pm:25
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_Featureset_by_Slice
public Bio::EnsEMBL::DensityFeatureSet fetch_Featureset_by_Slice()
Bio::EnsEMBL::DensityFeature::new
public Bio::EnsEMBL::DensityFeature new()
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all
public fetch_all()
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all_by_Slice_constraint
public Listref fetch_all_by_Slice_constraint()
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::_columns
protected _columns()
Bio::EnsEMBL::DensityFeature
Definition: DensityFeature.pm:29
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::_tables
protected _tables()
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::list_dbIDs
public List list_dbIDs()
Bio::EnsEMBL::DensityType::new
public Bio::EnsEMBL::DensityType new()
Bio::EnsEMBL::DBSQL::DensityFeatureAdaptor::fetch_all_by_Slice
public Bio::EnsEMBL::DensityFeature fetch_all_by_Slice()