Bio::EnsEMBL::ExternalData::DAS FeatureGroup
SummaryPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::ExternalData::DAS::FeatureGroup
Package variables
No package variables defined.
Synopsis
  my $g = Bio::EnsEMBL::ExternalData::DAS::FeatureGroup->new( {
'group_id' => 'group1',
'group_label' => 'Group 1',
'group_type' => 'transcript',
'note' => [ 'Something interesting' ],
'link' => [
{ 'href' => 'http://...',
'txt' => 'Group Link' }
],
'target' => [
{ 'target_id' => 'Seq 1',
'target_start' => '400',
'target_stop' => '800' }
]
} );

printf "Group ID: %s\n", $g->display_id();
printf "Group Label: %s\n", $g->display_label();
printf "Group Type: %s\n", $g->type_label();

for my $l ( @{ $g->links() } ) {
printf "Group Link: %s -> %s\n", $l->{'href'}, $l->{'txt'};
}

for my $n ( @{ $g->notes() } ) {
printf "Group Note: %s\n", $n;
}

for my $t ( @{ $g->targets() } ) {
printf "Group Target: %s:%s,%s\n", $t->{'target_id'},
$t->{'target_start'},
$t->{'target_stop'};
}
Description
An object representation of a DAS feature group.
The constructor is designed to work with the output of the DAS features command,
as obtained from the Bio::Das::Lite module.
See http://www.biodas.org/documents/spec.html for more information about DAS
and its data types.
Methods
display_idDescriptionCode
display_labelDescriptionCode
linksDescriptionCode
newDescriptionCode
notesDescriptionCode
targetsDescriptionCode
type_labelDescriptionCode
Methods description
display_idcode    nextTop
  Arg [1]    : none
Example : print $g->display_id();
Description: This method returns the DAS group identifier.
Returntype : string
Exceptions : none
Caller : web drawing code
Status : Stable
display_labelcodeprevnextTop
  Arg [1]    : none
Example : print $g->display_label();
Description: This method returns the DAS group label.
Returntype : string
Exceptions : none
Caller : web drawing code
Status : Stable
linkscodeprevnextTop
  Arg [1]    : none
Example : @links = @{ $g->links() };
Description: This method returns the DAS group external links.
Returntype : arrayref of { href=>$, txt=>$ } hashes
Exceptions : none
Caller : web drawing code
Status : Stable
newcodeprevnextTop
  Arg [1]    : Hash reference (see SYNOPSIS for details and example)
Description: Constructs a new Bio::EnsEMBL::ExternalData::DAS::FeatureGroup.
Returntype : Bio::EnsEMBL::ExternalData::DAS::FeatureGroup
Exceptions : none
Caller : Bio::EnsEMBL::ExternalData::DAS::Feature
Status : Stable
notescodeprevnextTop
  Arg [1]    : none
Example : @notes = @{ $g->notes() };
Description: This method returns the DAS group notes.
Returntype : arrayref of strings
Exceptions : none
Caller : web drawing code
Status : Stable
targetscodeprevnextTop
  Arg [1]    : none
Example : @targets = @{ $g->targets() };
Description: This method returns the DAS group targets.
Returntype : arrayref of { target_id=>$, target_start=>$, target_stop=>$ } hashes
Exceptions : none
Caller : web drawing code
Status : Stable
type_labelcodeprevnextTop
  Arg [1]    : none
Example : print $g->type_label();
Description: This method returns the DAS group type label.
Returntype : string
Exceptions : none
Caller : web drawing code
Status : Stable
Methods code
display_iddescriptionprevnextTop
sub display_id {
  my $self = shift;
  return $self->{'group_id'};
}
display_labeldescriptionprevnextTop
sub display_label {
  my $self = shift;
  return $self->{'group_label'} || $self->display_id;
}
linksdescriptionprevnextTop
sub links {
  my $self = shift;
  return $self->{'link'} || [];
}
newdescriptionprevnextTop
sub new {
  my $proto = shift;
  my $class = ref $proto || $proto;
  my $raw   = shift;
  
  my $self = {};
  for my $key qw( group_id group_label
                  group_type
                  note link target ) {
    $self->{$key} = $raw->{$key} if exists $raw->{$key};
  }
  
  bless $self, $class;
  return $self;
}
notesdescriptionprevnextTop
sub notes {
  my $self = shift;
  return $self->{'note'} || [];
}
targetsdescriptionprevnextTop
sub targets {
  my $self = shift;
  return $self->{'target'} || [];
}

1;
}
type_labeldescriptionprevnextTop
sub type_label {
  my $self = shift;
  return $self->{'group_type'};
}

# The following are zero-to-many, thus return arrayrefs:
}
General documentation
AUTHORTop
Andy Jenkinson
CONTACTTop
Post questions to the EnsEMBL development list ensembl-dev@ebi.ac.uk