Commit f9288d66 authored by Emmanuel Mongin's avatar Emmanuel Mongin
Browse files

Added family stuff to protein object

parent 12a6ff12
......@@ -439,6 +439,10 @@ sub fetch_Family_by_dbid{
my $family = $self->_familyAdaptor->get_Family_of_Ensembl_pep_id($protein_id);
if( !$family->isa('Bio::EnsEMBL::ExternalData::Family::Family') ) {
$self->throw(" $family is not a family object");
}
return $family;
}
......
......@@ -271,8 +271,8 @@ sub each_snps_feature{
sub add_Protein_feature{
my ($self,$value) = @_;
if (!defined $value) {
$self->throw("The Protein Feature added is not defined!!!");
if ((!defined $value) || (!$value->isa('Bio::EnsEMBL::Protein_FeaturePair'))) {
$self->throw("The Protein Feature added is not defined or is not a protein feature object");
}
push(@{$self->{'_prot_feat'}},$value);
......@@ -536,6 +536,25 @@ sub checksum{
}
=head2 get_family
Title : get_family
Usage :
Function:
Example :
Returns :
Args :
=cut
sub get_family{
my ($self) = @_;
my $proteinid = $self->id();
my $family = $self->adaptor->fetch_Family_by_dbid($proteinid);
return $family;
}
=head2 adaptor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment