NAME
Bio::RNA::Treekin::PopulationDataRecord - Parse, query, and manipulate a single data line from a Treekin file.
SYNOPSIS
use Bio::RNA::Treekin;
my $pop_data = Bio::RNA::Treekin::PopulationDataRecord->new(
'<single population data line from Treekin file>');
print "Populations at time", $pop_data->time, ":\n";
print " min $_: ", $pop_data->of_min($_), "\n"
for 1..$pop_data->min_count;
my @big_pops = grep {$pop_data->of_min($_) > 0.1} 1..$pop_data->min_count;
print 'Minima ', join(q{, }, @big_pops), ' have a population greater 0.1\n';
DESCRIPTION
This class provides a population data record that stores the information from a single data line of a Treekin file.
METHODS
Bio::RNA::Treekin::PopulationDataRecord->new($treekin_file_line)
Construct a new population data record from a single data line of a Treekin file.
Bio::RNA::Treekin::PopulationDataRecord->new(arg => $argval, ...)
Construct a new population data record.
- Required arguments:
-
- time
-
The point in time that the population data describes.
- populations
-
Array ref of the population values for all minima.
$pop_data->min_count
Return the number of minima in this data record. This count is not stored explicitely, but inferred from the number of populations supplied during construction.
$pop_data->time
Return the point in time (in arbitrary time units) that the population data describes.
$pop_data->clone
Return a deep copy of this data record.
$pop_data->set_min_count($new_min_count)
Increase the number of minima to $new_min_count
. The newly added minima will have population values of 0.
Currently, the number of minima cannot be decreased to avoid data loss.
$pop_data->populations
Return a list of all population values for minima 1, 2, ..., n in this ordner.
$pop_data->of_min($minimum)
Return the population value of the given $minimum
at the time
of this record.
$pop_data->transform($maps_to_min_ref, $new_min_count)
Transform (reorder and resize) the population data according to a given mapping ($maps_to_min_ref
) and resize to a given number of minima ($new_min_count
). All minima that are not mapped to a new position are discarded (replaced by zero).
NOTE: Ensure that no two minima are mapped to the same position or crap will happen.
$pop_data->stringify
"$pop_data"
Convert this data record into a string representation, corresponding to a single line as found in a Treekin file.
AUTHOR
Felix Kuehnl, <felix@bioinf.uni-leipzig.de>
BUGS
Please report any bugs or feature requests by raising an issue at https://github.com/xileF1337/Bio-RNA-Treekin/issues.
You can also do so by mailing to bug-bio-rna-treekin at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-RNA-Treekin. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Bio::RNA::Treekin
You can also look for information at:
Github: the official repository
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2019-2021 Felix Kuehnl.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.