GSP
Quick Navigator

Search Site

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

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


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

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



 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
 $matrix->insert($datum);



DESCRIPTION

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.

METHODS

    MUTATORS

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
           formats.



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
           above).



    ACCESSORS

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



SEE ALSO

There is a mailing list at <https://groups.google.com/forum/#!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 <http://rutgervos.blogspot.com>.

CITATION

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. <http://dx.doi.org/10.1186/1471-2105-12-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.