Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  BIO::PHYLO::MATRICES::DATUM (3)

.ds Aq ’


Bio::Phylo::Matrices::Datum - Character state sequence



 use Bio::Phylo::Factory;
 my $fac = Bio::Phylo::Factory->new;

 # instantiating a datum object...
 my $datum = $fac->create_datum(
    -name   => Tooth comb size,
    -type   => STANDARD,
    -desc   => number of teeth in lower jaw comb,
    -pos    => 1,
    -weight => 2,
    -char   => [ 6 ],

 # ...and linking it to a taxon object
 my $taxon = $fac->create_taxon(
     -name => Lemur_catta
 $datum->set_taxon( $taxon );

 # instantiating a matrix...
 my $matrix = $fac->create_matrix;

 # ...and insert datum in matrix


The datum object models a single observation or a sequence of observations, which can be linked to a taxon object. This package contains the getters and setters that alter the internal state of the datum object. Additional (stateless) behaviours are defined in the Bio::Phylo::Matrices::DatumRole package.



set_weight() Sets invocant weight.

 Type    : Mutator
 Title   : set_weight
 Usage   : $datum->set_weight($weight);
 Function: Assigns a datums weight.
 Returns : Modified object.
 Args    : The $weight argument must be a
           number in any of Perls number

set_position() Set invocant starting position.

 Type    : Mutator
 Title   : set_position
 Usage   : $datum->set_position($pos);
 Function: Assigns a datums position.
 Returns : Modified object.
 Args    : $pos must be an integer.

set_annotation() Sets single annotation.

 Type    : Mutator
 Title   : set_annotation
 Usage   : $datum->set_annotation(
               -char       => 1,
               -annotation => { -codonpos => 1 }
 Function: Assigns an annotation to a
           character in the datum.
 Returns : Modified object.
 Args    : Required: -char       => $int
           Optional: -annotation => $hashref
 Comments: Use this method to annotate
           a single character. To annotate
           multiple characters, use
           set_annotations (see below).

set_annotations() Sets list of annotations.

 Type    : Mutator
 Title   : set_annotations
 Usage   : $datum->set_annotations(
               { -codonpos => 1 },
               { -codonpos => 2 },
               { -codonpos => 3 },
 Function: Assign annotations to
           characters in the datum.
 Returns : Modified object.
 Args    : Hash references, where
           position in the argument
           list matches that of the
           specified characters in
           the character list. If no
           argument given, annotations
           are reset.
 Comments: Use this method to annotate
           multiple characters. To
           annotate a single character,
           use set_annotation (see


get_weight() Gets invocant weight.

 Type    : Accessor
 Title   : get_weight
 Usage   : my $weight = $datum->get_weight;
 Function: Retrieves a datums weight.
 Returns : FLOAT
 Args    : NONE

get_position() Gets invocant starting position.

 Type    : Accessor
 Title   : get_position
 Usage   : my $pos = $datum->get_position;
 Function: Retrieves a datums position.
 Returns : a SCALAR integer.
 Args    : NONE

get_annotation() Retrieves character annotation (hashref).

 Type    : Accessor
 Title   : get_annotation
 Usage   : $datum->get_annotation(
               -char => 1,
               -key  => -codonpos,
 Function: Retrieves an annotation to
           a character in the datum.
 Returns : SCALAR or HASH
 Args    : Optional: -char => $int
           Optional: -key => $key

get_annotations() Retrieves character annotations (array ref).

 Type    : Accessor
 Title   : get_annotations
 Usage   : my @anno = @{ $datum->get_annotation() };
 Function: Retrieves annotations
 Returns : ARRAY
 Args    : NONE


There is a mailing list at <!forum/bio-phylo> for any user or developer questions and discussions.
Bio::Phylo::Matrices::DatumRole This object inherits from Bio::Phylo::Matrices::DatumRole, so the methods defined therein are also applicable to Bio::Phylo::Matrices::Datum objects.
Bio::Phylo::Manual Also see the manual: Bio::Phylo::Manual and <>.


If you use Bio::Phylo in published research, please cite it:

<B>Rutger A VosB>, <B>Jason CaravasB>, <B>Klaas HartmannB>, <B>Mark A JensenB> and <B>Chase MillerB>, 2011. Bio::Phylo - phyloinformatic analysis using Perl. BMC Bioinformatics <B>12B>:63. <>

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 BIO::PHYLO::MATRICES::DATUM (3) 2014-02-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.