NAME
Bio::RNA::Barriers::Results - Parse, query and manipulate results of a Barriers run
SYNOPSIS
use Bio::RNA::Barriers;
# Read in a Barriers output file.
open my $barriers_handle, '<', $barriers_file;
my $bardat = Bio::RNA::Barriers::Results->new($barriers_handle);
# Or, even simpler, pass file name directly:
$bardat = Bio::RNA::Barriers::Results->new($barriers_file );
# Print some info
print "There are ", $bardat->min_count, " minima.";
my $min3 = $bardat->get_min(3);
print $min3->grad_struct_count,
" structures lead to basin 3 via a gradient walk.\n"
if $min3->has_bsize;
print "Min ", $min3->index, " is ", ($min3->is_connected ? "" : "NOT"),
" connected to the mfe structure.\n";
# Print the mfe basin line as in the results file
my $mfe_min = $bardat->get_global_min();
print "$mfe_min\n";
DESCRIPTION
This is what you usually want to use. Pass a file name or a handle to the constructor and you're golden. When querying a specific minimum by index, a Bio::RNA::Barriers::Minimum object is returned. For more details on its methods, please refer to its documentation.
METHODS
Bio::RNA::Barriers::Results->new()
Constructs the results object from a Barriers results file.
- Supported argument list types:
-
- new($barriers_file_path):
-
Open handle and read data from the passed path, set file name accordingly.
- new($barriers_handle):
-
A file handle to read data from,
file_name()
will return undef. - new($barriers_handle, $barriers_file_path):
-
Read data from handle and set file name from a given path.
- new($hash_ref):
-
Manual construction from required attributes. Only for experts.
$res->seq()
Returns the RNA sequence for which the minima have been computed.
$res->file_name()
Name of the file from which the minima have been read. May be undef
.
$res->mins()
Returns a list of all minima. Useful for iteration in for
loops.
$res->get_min($index)
Return the single minimum given by a 1-based $index
(as used in the results file).
$res->get_mins(@indices)
Return a list of minima given by a 1-based list of @indices
(as used in the results file).
$res->get_global_min()
Returns the basin represented by the (global) mfe structure (i.e. basin 1).
$res->mfe()
Get the global minimum free energy.
$res->delta_energy()
Get the delta_E of the landscape, i. e. the energy difference between the (global) minimum free energy and and the highest energy encountered.
$res->max_energy()
Get the maximum energy of any structure in the landscape.
$res->min_count()
Returns the total number of basins.
$res->connected_mins()
Returns a list of all minima connected to the mfe minimum (min 1).
$res->connected_indices()
Returns a list of indices of all connected minima (cf. connected_mins()
).
$res->keep_connected()
Keep only connected minima and remove all others. The indices are remapped to 1..k for k kept minima. Returns (old) indices of all kept minima.
$res->update_connected(@connected_mins)
Given an ordered list of indices of all connected minima (as returned by RateMatrix::keep_connected()
), delete all other minima and update their ancesters' basin size information accordingly.
$res->keep_first_mins($min_count)
Keep only the first $min_count
mins. (If there are only that many or less minima in total, do nothing.)
WARNING: THIS CAN DISCONNECT THE LANDSCAPE! The bar file will still look connected, however, modifying the rate matrix accordingly can lead to non-ergodicity (e.g. when basin 3 merged to 2, 2/3 merged to 1 because of a possible transition from 3 to 1, and basin 3 is then removed). Returns a list of all removed mins (may be empty).
$res->has_bsize()
Check whether the stored minima contain information about the basin sizes as computed by Barriers' --bsize switch. Checks only the mfe basin (since all or neither min should have this information).
$res->path()
Construct the file path to this Barriers file. Works only if it was actually parsed from a file (of course...). Returns the path as a string.
$res->stringify()
Convert back to Barriers file. Also supports stringification overloading, i. e. "$res"
is equivalent to $res->stringify()
.
AUTHOR
Felix Kuehnl, <felix at bioinf.uni-leipzig.de>
BUGS
Please report any bugs or feature requests by raising an issue at https://github.com/xileF1337/Bio-RNA-Barriers/issues.
You can also do so by mailing to bug-bio-rna-barmap at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-RNA-BarMap. 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::Barriers
You can also look for information at the official Barriers website:
https://www.tbi.univie.ac.at/RNA/Barriers/
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/.