Bio::ViennaNGS::FeatureChain - Generic Moose wrapper class for combined/linked genomic intervals, eg BED12 elements
use Bio::ViennaNGS::Feature; use Bio::ViennaNGS::FeatureChain; # get some new sequence features as instances of Bio::ViennaNGS::Feature my $start1 = 1100; my $start2 = 2345; my $start3 = 2987; my $end1 = 1346; my $end2 = 2544; my $end3 = 3076; my $name1 = "feat1"; my $name2 = "feat2"; my $name3 = "feat3"; my $strand = "+"; my $chr = "chr1"; my $feat1 = Bio::ViennaNGS::Feature->(chromosome => $chr, start => $start1, end => $end1, name => $name1, strand => $strand, ); my $feat2 = Bio::ViennaNGS::Feature->(chromosome => $chr, start => $start2, end => $end2, name => $name2, strand => $strand, ); my $feat3 = Bio::ViennaNGS::Feature->(chromosome => $chr, start => $start3, end => $end3, name => $name3, strand => $strand, ); # initialize a FeatureChain for two of these intervals my $fc = Bio::ViennaNGS::FeatureChain->new(type => "exon", chain => [$feat1,$feat3], ); # append a genomic intervald to the chain $fc->add($feat2); # sort the chain in ascending order by start coordinates $fc->sort_chain_ascending(); # get the number of elements in the chain $fc->count_entries();
Michael T. Wolfinger <firstname.lastname@example.org>
Copyright (C) 2014-2017 Michael T. Wolfinger <email@example.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
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.