NAME
Bio::Polloc::LociGroup - A group of loci
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
add_locus
Alias of add_loci()
add_loci
Adds loci to the collection on the specified genome's space
Throws
A Bio::Polloc::Polloc::Error if an argument is not a Bio::Polloc::LocusI object.
Arguments
The first argument can be the identifier of the genome's space (int). All the following are expected to be Bio::Polloc::LocusI objects.
loci
Gets the loci
structured_loci
Returns a two-dimensional array where the first key corresponds to the number of the genome space and the second key is an incremental for each locus.
Note
This function is provided for convenience in some output formating, but its use should be avoided as it causes a huge processing time penalty.
Warning
Loci without defined genome will not be included in the output.
locus
Get a locus by ID
Arguments
The ID of the locus (str).
name
Gets/sets the name of the group. This is supposed to be unique!
Note
Future implementations could assume unique naming for getting/setting/initializing groups of loci by name.
genomes
Gets/sets the genomes to be used as analysis base.
Arguments
A reference to an array of Bio::Polloc::Genome objects.
featurename
Gets/Sets the name of the feature common to all the loci in the group.
avg_length
Gets the average length of the stored loci.
Returns
The average length (float) or an array containing the average length (float) and the standard deviation (float), depending on the expected output.
Syntax
my $len = $locigroup->length;
Or,
my($len, $sd) = $locigroup->length;
align_context
Arguments
Arguments work in the same way Bio::Polloc::LocusI->context_seq() arguments do.
Ref: Int, reference position.
From: Int, the from position.
To: Int, the to position.
fix_strands
Fixes the strand of the loci based on the flanking regions, to have all the loci in the group with the same orientation.
Arguments
- -size int
-
Context size (500 by default)
- -force bool (int)
-
Force the detection, even if it was previously detected.
INTERNAL METHODS
Methods intended to be used only within the scope of Bio::Polloc::*