NAME
Bio::Polloc::RuleIO - I/O interface for the sets of rules (Bio::Polloc::RuleI)
AUTHOR - Luis M. Rodriguez-R
Email lmrodriguezr at gmail dot com
IMPLEMENTS OR EXTENDS
PUBLIC METHODS
Methods provided by the package
new
The basic initialization method
Arguments
The same arguments of Bio::Polloc::Polloc::IO, plus:
prefix_id
Sets/gets the prefix ID, unique for the RuleSet
Purpose
To allow the identification of children in a unique namespace
Arguments
A string, supposedly unique. Any colon (:) will be changed to '_'
Returns
The prefix ID.
init_id
format
add_rule
Appends rules to the rules set.
Arguments
One or more Bio::Polloc::RuleI objects
Returns
The index of the last rule
Throws
A Bio::Polloc::Polloc::Error exception if some object is not a Bio::Polloc::RuleI
get_rule
Gets the rule at the given index
Arguments
The index (int)
Returns
A Bio::Polloc::RuleI object or undef
get_rules
next_rule
Returns
A Bio::Polloc::RuleI object
groupcriteria
Sets/gets the group criteria objects.
Arguments
A Bio::Polloc::GroupCriteria array ref (optional)
Returns
A Bio::Polloc::GroupCriteria array ref or undef
grouprules
Alias of groupcriteria (for backwards-compatibility).
addgrouprules
Adds a grouprules object
Arguments
A Bio::Polloc::GroupCriteria object
Throws
A Bio::Polloc::Polloc::Error if not a proper object
execute
Executes the executable rules only over the whole list of genomes
Arguments
Any argument supported/required by the rules, plus:
- -advance "sub ref"
-
A reference to a method to be called to report the advance of the execution. The method must accept four arguments, namely:
The number of loci detected so far
The number of genomes scanned so far
The total number of genomes to scan
The ID of the running rule
Returns
A Bio::Polloc::LociGroup object.
safe_value
Sets/gets a parameter of arbitrary name and value
Purpose
To provide a safe interface for setting values from the parsed file
Arguments
Returns
The value of the parameter or undef
parameter
Purpose
Gets/sets some generic parameter. It is intended to provide an interface between Bio::Polloc::RuleIO's general configuration and Bio::Polloc::RuleI, regardless of the format.
Arguments
The key (str) and the value (mix, optional)
Returns
The value (mix or undef)
Throws
A Bio::Polloc::Polloc::NotImplementedException if not implemented
read
genomes
Gets/sets the genomes to be used as analysis base.
Arguments
A reference to an array of Bio::Polloc::Genome objects.
INTERNAL METHODS
Methods intended to be used only within the scope of Bio::Polloc::*