Bio::Polloc::GroupCriteria - Rules to group loci
Takes loci and returns groups of loci based on certain rules. If created via .bme (.cfg) files, it is defined in the [ RuleGroup ] and [ GroupExtension ] namespaces.
[ RuleGroup ]
[ GroupExtension ]
Email lmrodriguezr at gmail dot com
This package is licensed under the Artistic License - see LICENSE.txt
Bio::Polloc::Polloc::Root
Methods provided by the package
Generic initialization method
Arguments
See source
See target
Alias of -loci
-loci
See locigroup
Returns
The Bio::Polloc::GroupCriteria object
Bio::Polloc::GroupCriteria
Sets/gets the type of source loci (see Bio::Polloc::LocusI->family
Sets/gets the type of target loci (see Bio::Polloc::LocusI->family
Gets/sets the input Bio::Polloc::LociGroup object containing all the loci to evaluate.
Sets/gets the conditions set to evaluate.
Compares two loci based on the defined conditions
The first locus (a Bio::Polloc::LocusI object)
The second locus (a Bio::Polloc::LocusI object)
Boolean
Throws
Bio::Polloc::Polloc::Error if unexpected input or undefined condition, source or target
Gets the stored loci
Note
The stored loci can also be obtained with $object->locigroup->loci, but this function ensures a consistent order in the loci for its evaluation.
$object->locigroup->loci
Get the locus with the specified index.
The index (int, mandatory).
A Bio::Polloc::LocusI object or undef.
This is a lazzy method, and should be used ONLY after get_loci() were called at least once. Otherwise, the order might not be the expected, and weird results would appear.
get_loci()
Sets the conditions for group extensions.
Array, hash or string with -key => value pairs. Supported values are:
-key => value
context
Searches the flanking regions in the target sequence.
Extension in number of residues upstream the feature.
Extension in number of residues downstream the feature.
Should I detect the proper strand? Otherwise, the stored strand is trusted. This is useful for non-directed features like repeats, which context is actually directed.
Include all detected features (even these overlapping with input features).
Should I include the feature region in the search? 0 by default.
Number of Standar Deviations (SD) tolerated as half of the range of lengths for a feature. The average (Avg) and the standard deviation of the length are calculated based on all the stored features, and the Avg+(SD*lensd) is considered as the largest possible new feature. No minimum length constraint is given, unless explicitly set with -minlen. This argument is ignored if -maxlen is explicitly set. Default is 1.5.
-maxlen
Maximum length of a new feature in number of residues. If zero (0) evaluates -lensd instead. Default is 0.
-lensd
Minimum length of a new feature in number of residues. Default is 0.
Minimum fraction of similarity to include a found region. 0.8 by default.
Should I consider features with only one of the sides? Takes effect only if both -upstream and -downstream are defined. 0 by default.
blast
Use BLAST to search (after multiple alignment and consensus calculation of queries). Default algorithm.
hmmer
Use HMMer to search (after multiple alignment and hmmbuild of query sequences).
hmmbuild
Minimum score for either algorithms blast and hmmer. 20 by default.
Minimum percentage a residue must appear in order to include it in the consensus used as query. 60 by default. Only if -algorithm blast.
If -algorithm blast, maximum e-value. 0.1 by default.
-algorithm
If -algorithm blast, program used ([t]blast[npx]). blastn by default.
[t]blast[npx]
Bio::Polloc::Polloc::Error if unexpected input,
Extends a group based on the arguments provided by Bio::Polloc::GroupCriteria-extension>.
The Bio::Polloc::LociGroup containing the loci in the group to extend.
A Bio::Polloc::LociGroup object containing the updated group, i.e. the original group PLUS the extended features.
Bio::Polloc::Polloc::Error if unexpected input or weird extension definition.
Compares all the included loci and returns the identity matrix
If true, calculates the complete matrix instead of only the bottom-left triangle.
A reference to a boolean 2-dimensional array (only left-down triangle)
WARNING! The order of the output is not allways the same of the input. Please use get_loci() instead, as source features MUST be after target features in the array. Otherwise, it is not possible to have the full picture without building the full matrix (instead of half).
Builds groups of loci based on a binary matrix
A matrix as returned by Bio::Polloc::GroupCriteria->build_bin
A 2-D arrayref.
This method is intended to build groups providing information on all-vs-all comparisons. If you do not need this information, use the much more efficient Bio::Polloc::GroupCriteria->build_groups method, that relies on transitive property of groups to avoid unnecessary comparisons. Please note that this function also relies on transitivity, but gives you the option to examine all the paired comparisons and even write your own grouping function.
This is the main method, creates groups of loci.
If defined, attempts to distribute the work among the specified number of cores. Warning: This parameter is experimental, and relies on Parallel::ForkManager. It can be used in production with certain confidence, but it is highly probable to NOT work in parallel (to avoid errors, this method ignores the command at ANY possible error).
Parallel::ForkManager
Unimplemented: This argument is currently ignored. Some algorithmic considerations must be addressed before using it. TODO.
A reference to a function to call at every new pair. The function is called with three arguments, the first is the index of the first locus, the second is the index of the second locus and the third is the total number of loci. Note that this function is called BEFORE running the comparison.
An arrayref of Bio::Polloc::LociGroup objects, each containing one consistent group of loci.
This method is faster than combining build_bin() and build_groups_bin(), and it should be used whenever transitivity can be freely assumed and you do not need the all-vs-all matrix for further evaluation (for example, manual inspection).
build_bin()
build_groups_bin()
Gets the genomes of the base group of loci. This function is similar to calling locigroup()->genomes(), but is read-only.
locigroup()->genomes()
Methods intended to be used only within the scope of Bio::Polloc::*
Returns an incremental ID that attempts to identify the group used as basis of extension. Please note that this method DOES NOT check if the group's ID is the right one, and it is basically intended to keep track of how many times the extend function has been called.
extend
All the following arguments are mandatory and must be passed in that order. The strand will be determined by the relative position of from/to:
The sequence (Bio::Seq object).
The from position (int).
The to position (int).
A Bio::Seq object.
This method should be located at a higher hierarchy module (Root?).
This method is static.
Uses an alignment to search in the sequences of the collection of genomes
A Bio::SimpleAlign object
A 2D arrayref, where first key is an incremental and second key preserves the orrder in the structure: ["genome-key:acc", from, to, strand, score]
["genome-key:acc", from, to, strand, score]
Takes an index 2D matrix and returns it as the equivalent Bio::Polloc::LocusI objects
2D matrix of integers (arrayref)
2D matrix of Bio::Polloc::LocusI objects (ref)
27 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.