Bio::Polloc::RuleI - Generic rules interface
Use this interface to initialize the Bio::Polloc::Rule::* objects. Any rule inherits from this Interface. Usually, rules are initialized in sets (via the Bio::Polloc::RuleIO package).
Email lmrodriguezr at gmail dot com
Bio::Polloc::Polloc::Root
Methods provided by the package
Attempts to initialize a Bio::Polloc::Rule::* object
Bio::Polloc::Rule::*
Arguments
The type of rule
The value of the rule (depends on the type of rule)
The context of the rule. See Bio::Polloc::RuleI->context.
Returns
The Bio::Polloc::Rule::* object
Throws
Bio::Polloc::Polloc::Error if unable to initialize the proper object
Gets/sets the type of rule
Value (str). Can be: pattern, profile, repeat, tandemrepeat, similarity, coding, boolean, composition, crispr. See the corresponding Bio::Polloc::Rule::* objects for further details.
Some variations can be introduced, like case variations or short versions like patt or rep.
Return
Value (str). The type of the rule, or undef if undefined. The value returned is undef or a string from the above list, regardless of the input variations.
undef
Bio::Polloc::Polloc::Error if an unsupported type is received.
Gets/sets the context of the rule.
The context is a reference to an array of two elements (int or str), the first being: 1 => with respect to the start of the sequence 0 => somewhere within the sequence (ignores the second) -1 => with respect to the end of the sequence
And the second being the number of residues from the reference point. The second value can be positive, negative, or zero.
Three integers, or one integer equal to zero. Please note that this function is extremely tolerant, and tries to guess the context regardless of the input.
A reference to the array described above.
Gets/sets the value of the rule
Value (mix)
Note
This function relies on _qualify_value
_qualify_value
Bio::Polloc::Polloc:Error if unsupported value is received
Sets/gets the executable property. A rule can be executed even if this property is false, if the Bio::Polloc::RuleI::execute method is called directly ($rule->execute) or by other rule. This property is provided only for Bio::Polloc::RuleIO objects.
executable
$rule->execute
Boolean (0 or 1; optional)
1 if expicilty executable, 0 otherwise
It is advisable to have only few (ideally one) executable rules, handling all the others with the rule type operation
Sets/gets the name of the rule
Name (str), the name to set
The name (str or undef)
Sets/gets the ID of the rule
Purpose
Provide a somewhat unique but human-readable identifier
The supposedly unique ID of the rule (str), any dot (.) will be changed to _
The ID (str or undef)
Provides an easy method for the (str) description of any Bio::Polloc::RuleI object.
The stringified object (str, off course)
Dummy function to be overriten if non-string value like in Bio::Polloc::Rule::repeat
The value as string
Gets/sets the parent ruleset of the rule
The ruleset to set (a Bio::Polloc::RuleIO object).
A Bio::Polloc::RuleIO object or undef.
Evaluates the rule in a given sequence.
A Bio::Seq object.
An array of Bio::Polloc::LocusI objects
A Bio::Polloc::Polloc::NotImplementedException if not implemented
Sets/gets a parameter of arbitrary name and value
To provide a safe interface for setting values from the parsed file
The parameter's name (case insensitive)
The value of the parameter (optional)
The value of the parameter or undef
Sets/gets the source of the annotation
The source (str)
The source (str or undef)
Methods intended to be used only witin the scope of Bio::Polloc::*
Returns the supported parameters for value.
The supported value keys (arrayref).
arrayref
Takes the different possible values and returns them the way they must be saved (usually a hashref). Bio::Polloc::Rule::* modules must reimplement either _qualify_value or _parameters.
Attempts to find the executable
An alternative path to search at str.
The key (str)
The value (mix) or undef
Gets the ID for the next child.
Provide support for children identification
The ID (str) or undef if the ID of the current Rule is not set.
36 POD Errors
The following errors were encountered while parsing the POD:
Expected '=item *'
To install Bio::Polloc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Polloc
CPAN shell
perl -MCPAN -e shell install Bio::Polloc
For more information on module installation, please visit the detailed CPAN module installation guide.