The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::Phylo::Util::CONSTANT - This package defines global constants and utility functions that operate on them.

DESCRIPTION

This package defines globals used in the Bio::Phylo libraries. The constants are called internally by the other packages. There is no direct usage.

PUBLIC CONSTANTS

INT_SCORE_TYPE()
 Type    : CIPRES constant
 Title   : INT_SCORE_TYPE
 Usage   : my $scoretype = INT_SCORE_TYPE;
 Function: A constant subroutine to indicate tree score is an integer value.
 Returns : INT
 Args    : NONE
DOUBLE_SCORE_TYPE()
 Type    : CIPRES constant
 Title   : DOUBLE_SCORE_TYPE
 Usage   : my $scoretype = DOUBLE_SCORE_TYPE;
 Function: A constant subroutine to indicate tree score is a double value.
 Returns : INT
 Args    : NONE
NO_SCORE_TYPE()
 Type    : CIPRES constant
 Title   : NO_SCORE_TYPE
 Usage   : my $scoretype = NO_SCORE_TYPE;
 Function: A constant subroutine to indicate tree has no score.
 Returns : INT
 Args    : NONE
IUPAC ()
 Type    : constant
 Title   : IUPAC
 Usage   : no direct usage
 Function: no direct usage
 Returns : INT
 Args    : NONE
AMBIG ()
 Type    : constant
 Title   : IUPAC
 Usage   : no direct usage
 Function: no direct usage
 Returns : INT
 Args    : NONE

SUBROUTINES

symbol_ok()
 Type    : Type checker
 Title   : symbol_ok
 Usage   : if ( symbol_ok( -type => $type, -char => $sym ) ) {
               # do something
           }
 Function: Checks whether $sym is a valid symbol for $type data
 Returns : BOOLEAN
 Args    : -type => one of [DNA|RNA|STANDARD|PROTEIN|NUCLEOTIDE|CONTINUOUS]
           -char => a symbol, e.g. 'ACGT', '0.242 0.4353 0.324', etc.
type_ok()
 Type    : Type checker
 Title   : type_ok
 Usage   : if ( type_ok( $type ) ) {
               # do something
           }
 Function: Checks whether $type is a recognized data type
 Returns : BOOLEAN
 Args    : one of [DNA|RNA|STANDARD|PROTEIN|NUCLEOTIDE|CONTINUOUS]
infer_type()
 Type    : Type checker
 Title   : infer_type
 Usage   : my $type = infer_type( $chars );
 Function: Attempts to identify what type $chars holds.
 Returns : one of DNA|STANDARD|PROTEIN|CONTINUOUS, or error if not found
 Args    : A string of characters.
cipres_type()
 Type    : Type convertor
 Title   : cipres_type
 Usage   : my $cipres_type = cipres_type($type)
 Function: Returns the cipres constant for $type
 Returns : CONSTANT
 Args    : one of [DNA|RNA|STANDARD|PROTEIN|NUCLEOTIDE|CONTINUOUS]
sym2ambig()
 Type    : Type convertor
 Title   : sym2ambig
 Usage   : my @ambig = @{ sym2ambig( -type => 'DNA', -char => 'N' ) };
 Function: Returns the set of symbols defined by the ambiguity symbol
 Returns : ARRAY
 Args    : -type => one of [DNA|RNA|PROTEIN|NUCLEOTIDE]
           -char => an IUPAC ambiguity symbol
ambig2sym()
 Type    : Type convertor
 Title   : ambig2sym
 Usage   : my $sym = ambig2sym( -type => 'DNA', -char => [ 'A', 'C' ] );
 Function: Returns the iupac ambiguity symbol for a set of symbols
 Returns : SCALAR
 Args    : -type => one of [DNA|RNA|PROTEIN|NUCLEOTIDE]
           -char => an array of symbols
nuc_symbols()
 Type    : Constant
 Title   : nuc_symbols
 Usage   : my @symbols = @{ nuc_symbols };
 Function: Returns the iupac ambiguity symbols for nucleotide data
 Returns : ARRAY
 Args    : NONE
prot_symbols()
 Type    : Constant
 Title   : prot_symbols
 Usage   : my @symbols = @{ prot_symbols };
 Function: Returns the iupac ambiguity symbols for protein data
 Returns : ARRAY
 Args    : NONE
looks_like_number()
 Type    : Constant
 Title   : looks_like_number
 Usage   : do 'something' if looks_like_number $var;
 Function: Tests whether $var looks like a number.
 Returns : TRUE or undef
 Args    : $var = a variable to test

SEE ALSO

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: CONSTANT.pm 2189 2006-09-07 08:06:13Z 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.