NAME

Bio::RNA::BarMap::Mapping::Type - Represents the type of a BarMap mapping (exact or approximate)

SYNOPSIS

    use v5.12;                                              # for 'say'
    use Bio::RNA::BarMap;

    # Get a new mapping type object ... from arrow string:
    my $type = Bio::RNA::BarMap::Mapping::Type->new('->');  # exact
       $type = Bio::RNA::BarMap::Mapping::Type->new('~>');  # approx

    # ... or programmatically:
    $type = Bio::RNA::BarMap::Mapping::Type->exact;         # exact
    $type = Bio::RNA::BarMap::Mapping::Type->approx;        # approx

    # Verify mapping type.
    say 'Mapping is ', $type->is_exact  ? 'exact' : 'approximate';
    say 'Mapping arrow: ', $type->arrow;

DESCRIPTION

The objects of this class are used to represent the two possible types of a mapping, either exact or approximate, and to easily convert between these two values and their respective arrow representation. In BarMap files, -> denotes an exact mapping, and ~> an approximate one. The object is constructed from the arrow string via the constructor new(), or using the methods exact() and approx() to get a new object of the respective type.

METHODS

Bio::RNA::BarMap::Mapping::Type->new($arrow_string)

Constructs a new type object from its arrow string representation, i. e. -> for the exact and ~> for the approximate variant.

Bio::RNA::BarMap::Mapping::Type->exact()

Class method. Returns a new mapping type object of exact type.

Bio::RNA::BarMap::Mapping::Type->approx()

Class method. Returns a new mapping type object of approximate type.

$type->is_exact()

Returns true iff the current object is of exact type.

$type->is_approx()

Returns true iff the current object is of approximate type.

$type->arrow()

Returns the type of this object in its arrow string representation, i. e. -> for the exact and ~> for the approximate.

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-BarMap/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::BarMap

You can also look for information at the official BarMap website:

https://www.tbi.univie.ac.at/RNA/bar_map/

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2019 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/.