Bio::EnsEMBL::Funcgen FeatureType
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Funcgen::FeatureType - A module to represent a FeatureType. i.e. the target of an experiment.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Storable
Synopsis
use Bio::EnsEMBL::Funcgen::FeatureType;
Description
This is a simple class to represent information about a FeatureType, containing the name i.e Brno nomenclature or other controlled/validated name relevant to the class (HISTONE, PROMOTER etc), and description. This module is part of the Ensembl project: /
Methods
classDescriptionCode
descriptionDescriptionCode
nameDescriptionCode
newDescriptionCode
Methods description
classcode    nextTop
  Arg [1]    : (optional) string - class
Example : $ft->class('HISTONE');
Description: Getter and setter of description attribute for FeatureType
objects.
Returntype : string
Exceptions : None
Caller : General
Status : Low Risk
descriptioncodeprevnextTop
  Arg [1]    : (optional) string - description
Example : my $desc = $ft->description();
Description: Getter and setter of description attribute for FeatureType
objects.
Returntype : string
Exceptions : None
Caller : General
Status : Low Risk
namecodeprevnextTop
  Arg [1]    : string - name
Example : my $name = $ft->name();
Description: Getter and setter of name attribute for FeatureType
objects
Returntype : string
Exceptions : None
Caller : General
Status : Low Risk
newcodeprevnextTop
  Arg [-name]: string - name of FeatureType
Arg [-class]: string - class of FeatureType
Arg [-description]: string - descriptiom of FeatureType
Example : my $ft = Bio::EnsEMBL::Funcgen::FeatureType->new(
-name => "H3K9Me",
-class => "HISTONE",
-description => "Generalised methylation of Histone 3 Lysine 9",
);
Description: Constructor method for FeatureType class
Returntype : Bio::EnsEMBL::Funcgen::FeatureType
Exceptions : Throws if name not defined ? and class
Caller : General
Status : Medium risk
Methods code
classdescriptionprevnextTop
sub class {
  my $self = shift;
  $self->{'class'} = shift if @_;
  return $self->{'class'};
}
1;
}
descriptiondescriptionprevnextTop
sub description {
    my $self = shift;
    $self->{'description'} = shift if @_;
    return $self->{'description'};
}
namedescriptionprevnextTop
sub name {
    my $self = shift;
    $self->{'name'} = shift if @_;
    return $self->{'name'};
}
newdescriptionprevnextTop
sub new {
  my $caller = shift;

  my $obj_class = ref($caller) || $caller;
  my $self = $obj_class->SUPER::new(@_);
  
  my (
      $name,
      $desc,
      $class,
     ) = rearrange([
		    'NAME', 'DESCRIPTION', 'CLASS',
		   ], @_);
  
  
  if($name){
    $self->name($name);
  }else{
    throw("Must supply a FeatureType name\n");
  }


  #add test for class and enum? Validate names against Brno etc?
$self->class($class) if $class; $self->description($desc) if $desc; return $self;
}
General documentation
AUTHORTop
This module was written by Nathan Johnson.
CONTACTTop
Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk