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::ProteinFeatureAdaptor

SYNOPSIS

use Bio::EnsEMBL::Registry;

Bio::EnsEMBL::Registry->load_registry_from_db(
  -host => 'ensembldb.ensembl.org',
  -user => 'anonymous'
);

$pfa = Bio::EnsEMBL::Registry->get_adaptor( "human", "core",
  "proteinfeature" );

my @prot_feats = @{ $pfa->fetch_all_by_translation_id(1231) };

my $prot_feat = $pfa->fetch_by_dbID(523);

METHODS

fetch_all_by_translation_id

Arg [1]    : int $transl
             the internal id of the translation corresponding to protein 
             whose features are desired 
Example    : @prot_feats =
                @{ $prot_feat_adaptor->fetch_by_translation_id(1234) };
Description: Gets all protein features present on a peptide using the
             translations internal identifier.  This method will return
             an unsorted list of all protein_feature types.  The feature
             types may be distinguished using the logic name attribute of
             the attached analysis objects.   
Returntype : listref of Bio::EnsEMBL::ProteinFeatures
Exceptions : none
Caller     : ?
Status     : Stable

fetch_all_by_logic_name

Arg [1]    : string $logic_name
             the logic name of the type of features to obtain
Example    : $fs = $a->fetch_all_by_logic_name('foobar');
Description: Returns a listref of features created from the database.
             only features with an analysis of type $logic_name will
             be returned.  If the logic name is invalid (not in the
             analysis table), a reference to an empty list will be
             returned.
Returntype : listref of Bio::EnsEMBL::ProteinFeatures
Exceptions : thrown if no $logic_name
Caller     : General
Status     : Stable

fetch_by_dbID

Arg [1]    : int $protfeat_id
             the unique database identifier of the protein feature to obtain
Example    : my $feature = $prot_feat_adaptor->fetch_by_dbID();
Description: Obtains a protein feature object via its unique id
Returntype : Bio::EnsEMBL::ProteinFeauture
Exceptions : none
Caller     : ?
Status     : Stable

store

Arg [1]    : Bio::EnsEMBL::ProteinFeature $feature
             The feature to be stored
Arg [2]    : int $translation_id
          
Example    : $protein_feature_adaptor->store($protein_feature);
Description: Stores a protein feature in the database
Returntype : int - the new internal identifier of the stored protein feature
Exceptions : thrown if arg is not a Bio::EnsEMBL:
Caller     : none
Status     : Stable

fetch_all_by_uniprot_acc

Arg [1]    : string uniprot accession
             The uniprot accession of the features to obtain
Arg [2]    : (optional) string $logic_name
             The analysis logic name of the type of features to
             obtain. Default is 'gifts_import'
Example    : @feats =
               @{ $adaptor->fetch_all_by_uniprot_acc( 'P20366',
                 'gifts_import' ); }
Description: Returns a listref of features created from the
             database which correspond to the given uniprot accession.  If
             logic name is defined, only features with an analysis
             of type $logic_name will be returned. Defaults to 'gifts_import'
Returntype : listref of Bio::EnsEMBL::BaseAlignFeatures
Exceptions : thrown if uniprot_acc is not defined
Caller     : general
Status     : Stable