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 <http://lists.ensembl.org/mailman/listinfo/dev>.
Questions may also be sent to the Ensembl help desk at
<http://www.ensembl.org/Help/Contact>.
NAME
Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor
SYNOPSIS
$mfa = $database_adaptor->get_MiscFeatureAdaptor();
# retrieve a misc feature by its dbID
my $misc_feat = $mfa->fetch_by_dbID(1234);
# retrieve all misc features in a given region
my @misc_feats = @{ $mfa->fetch_all_by_Slice($slice) };
# retrieve all misc features in a given region with a given set code
my @misc_clones =
@{ $mfa->fetch_all_by_Slice_and_set_code('cloneset') };
# store some misc features in the database
$mfa->store(@misc_features);
DESCRIPTION
This is an adaptor for the retrieval and storage of MiscFeatures. Misc Features are extremely generic features that can be added with minimal effort to the database. Currently misc features are used to describe the locations of clone sets and tiling path information, but arbitrary features can be stored. Misc features are grouped into sets and can be fetched according to their grouping using the fetch_all_by_Slice_and_set_code and fetch_all_by_set_code methods. MiscFeatures may belong to more than one set.
METHODS
fetch_all_by_Slice_and_set_code
Arg [1] : Bio::EnsEMBL::Slice $slice
A slice representing the region to fetch from
Arg [2...] : string $set_code
The code of the set to retrieve features from
Example : @feats = @{$mfa->fetch_all_by_Slice_and_set_code('cloneset')};
Description: Retrieves a set of MiscFeatures which have a particular set code
and which lie in a particular region. All features with the
provide set code and which overlap the given slice are returned.
Returntype : listref of Bio::EnsEMBL::MiscFeatures
Exceptions : throw if set_code is not provided
warning if no set for provided set code exists
Caller : general
Status : Stable
fetch_all_by_attribute_type_value
Arg [1] : string $attrib_type_code
The code of the attribute type to fetch features for
Arg [2] : (optional) string $attrib_value
The value of the attribute to fetch features for
Example :
#get all misc features that have an embl accession
@feats = @{$mfa->fetch_all_by_attrib_type_value('embl_acc')};
#get the misc feature with synonym 'AL014121'
($feat)=@{$mfa->fetch_all_by_attrib_type_value('synonym','AL014121');
Description: Retrieves MiscFeatures which have a particular attribute.
If the attribute value argument is also provided only
features which have the attribute AND a particular value
are returned. The features are returned in their native
coordinate system (i.e. the coordinate system that they
are stored in).
Returntype : listref of Bio::EnsEMBL::MiscFeatures
Exceptions : throw if attrib_type code arg is not provided
Caller : general
Status : Stable
fetch_by_attribute_set_value
Arg [1] : string $attrib_type_code
The code of the attribute type to fetch features for
Arg [2] : (optional) string $attrib_value
The value of the attribute to fetch features for
Arg [3] : (optional) string $misc_set
The name of the set to which the feature belongs
Example :
$feat = $mfa->fetch_by_attribute_set_value('clone', 'RP11-411G9', 'tilepath');
# Get the clone belonging to the tilepath
Description: Retrieves MiscFeatures which have a particular attribute.
If the attribute value argument is also provided only
features which have the attribute AND a particular value
are returned. The features are returned in their native
coordinate system (i.e. the coordinate system that they
are stored in).
Returntype : listref of Bio::EnsEMBL::MiscFeatures
Exceptions : throw if attrib_type code arg is not provided
Caller : general
Status : Stable
list_dbIDs
Arg [1] : none
Example : @feature_ids = @{$misc_feature_adaptor->list_dbIDs()};
Description: Gets an array of internal ids for all misc_features in the
current db
Arg[1] : <optional> int. not 0 for the ids to be sorted by the seq_region.
Returntype : list of ints
Exceptions : none
Caller : ?
Status : Stable
store
Arg [1] : list of Bio::EnsEMBL::MiscFeatures @misc_features
Example : $misc_feature_adaptor->store(@misc_features);
Description: Stores a list of MiscFeatures in this database. The stored
features will have their
Returntype : none
Exceptions : throw on invalid arguments
warning if misc feature is already stored in this database
throw if start/end/strand attribs are not valid
Caller : general
Status : Stable