NAME
Bio::Phylo::Matrices::TypeSafeData - Superclass for objects that hold character data.
SYNOPSIS
# No direct usage
DESCRIPTION
This is a superclass for objects holding character data. Objects that inherit from this class (typically matrices and datum objects) yield functionality to handle datatype objects and use them to validate data such as DNA sequences, continuous data etc.
METHODS
CONSTRUCTOR
- new()
-
Type : Constructor Title : new Usage : No direct usage, is called by child class; Function: Instantiates a Bio::Phylo::Matrices::TypeSafeData Returns : a Bio::Phylo::Matrices::TypeSafeData child class Args : -type => (data type - required) Optional: -missing => (the symbol for missing data) -gap => (the symbol for gaps) -lookup => (a character state lookup hash) -type_object => (a datatype object)
MUTATORS
- set_type()
-
Type : Mutator Title : set_type Usage : $obj->set_type($type); Function: Sets the object's datatype. Returns : Modified object. Args : Argument must be a string, one of continuous, custom, dna, mixed, protein, restriction, rna, standard
- set_missing()
-
Type : Mutator Title : set_missing Usage : $obj->set_missing('?'); Function: Sets the symbol for missing data Returns : Modified object. Args : Argument must be a single character, default is '?'
- set_gap()
-
Type : Mutator Title : set_gap Usage : $obj->set_gap('-'); Function: Sets the symbol for gaps Returns : Modified object. Args : Argument must be a single character, default is '-'
- set_lookup()
-
Type : Mutator Title : set_lookup Usage : $obj->set_gap($hashref); Function: Sets the symbol for gaps Returns : Modified object. Args : Argument must be a hash reference that maps allowed single character symbols (including ambiguity symbols) onto the equivalent set of non-ambiguous symbols
- set_type_object()
-
Type : Mutator Title : set_type_object Usage : $obj->set_gap($obj); Function: Sets the datatype object Returns : Modified object. Args : Argument must be a subclass of Bio::Phylo::Matrices::Datatype
ACCESSORS
- get_type()
-
Type : Accessor Title : get_type Usage : my $type = $obj->get_type; Function: Returns the object's datatype Returns : A string Args : None
- get_missing()
-
Type : Accessor Title : get_missing Usage : my $missing = $obj->get_missing; Function: Returns the object's missing data symbol Returns : A string Args : None
- get_gap()
-
Type : Accessor Title : get_gap Usage : my $gap = $obj->get_gap; Function: Returns the object's gap symbol Returns : A string Args : None
- get_lookup()
-
Type : Accessor Title : get_lookup Usage : my $lookup = $obj->get_lookup; Function: Returns the object's lookup hash Returns : A hash reference Args : None
- get_type_object()
-
Type : Accessor Title : get_type_object Usage : my $obj = $obj->get_type_object; Function: Returns the object's linked datatype object Returns : A subclass of Bio::Phylo::Matrices::Datatype Args : None
INTERFACE METHODS
- validate()
-
Type : Interface method Title : validate Usage : $obj->validate Function: Validates the object's contents Returns : True or throws Bio::Phylo::Util::Exceptions::InvalidData Args : None Comments: This is an interface method, i.e. this class doesn't implement the method, child classes have to
SEE ALSO
- Bio::Phylo
-
This object inherits from Bio::Phylo, so the methods defined therein are also applicable to Bio::Phylo::Matrices::TypeSafeData objects.
- Bio::Phylo::Manual
-
Also see the manual: Bio::Phylo::Manual.
FORUM
CPAN hosts a discussion forum for Bio::Phylo. If you have trouble using this module the discussion forum is a good place to start posting questions (NOT bug reports, see below): http://www.cpanforum.com/dist/Bio-Phylo
BUGS
Please report any bugs or feature requests to bug-bio-phylo@rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-Phylo. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. Be sure to include the following in your request or comment, so that I know what version you're using:
$Id: TypeSafeData.pm 4158 2007-07-11 01:34:44Z rvosa $
AUTHOR
Rutger A. Vos,
- email:
rvosa@sfu.ca
- web page: http://www.sfu.ca/~rvosa/
ACKNOWLEDGEMENTS
The author would like to thank Jason Stajich for many ideas borrowed from BioPerl http://www.bioperl.org, and CIPRES http://www.phylo.org and FAB* http://www.sfu.ca/~fabstar for comments and requests.
COPYRIGHT & LICENSE
Copyright 2005 Rutger A. Vos, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.