use Bio::Gonzales::Seq::Util qw( pairwise_identity_l pairwise_identity_s pairwise_identity_gaps_l pairwise_identity_gaps_s pairwise_identities map_seqids seqid_mapper overlaps cluster_overlapping_ranges );
Maps all sequence ids of $seqs in situ. If $pattern is not given, s%9d is taken as default.
$seqs
$pattern
s%9d
This function takes some ranges and clusters them by overlap.
@ranges = ( [ $start, $stop, $some, $custom, $elements ], [ ... ], ... ); $clustered_ranges = [ # first cluster [ [ $start, $stop, $some, $custom, $elements ], ... ], # next cluster [ [ $start, $stop, $some, $custom, $elements ], ... ], ... ];
Wrapper around seqid_mapper(), maps the ids of @seqs and returns the map. This function works directly on the sequences.
seqid_mapper()
Create a mapper that maps given sequences to new ids generated by the argument given. A hash as argument will be used as mapping base, taking the key as old and the value as new id. In case the sequence id is non-existent in the hash, an artificial id following the pattern unknown_$i with $i running from 0 onwards will be generated..
unknown_$i
$i
Create a mapper that maps given sequences to new ids generated by successive calls to the handler. The handler will get the existing/original id as argument and shall return a new id. A simple mapper would be:
my $i = 1; my $mapper = seqid_mapper(sub { sprintf "id%d", $i++ }); or my $mapper = seqid_mapper(sub { my $id = shift; $id =~ s/pep/cds/; return $id}); my ($old_id, $new_id) = $mapper->($sequence_object);
The sequence object WILL BE ALTERED IN SITU.
Use pattern as basis for sequence id mapping, "%s" or "%d" must be included ONLY ONCE and will be substituted by a couter, running from 0 to INF.
Same as $mapper = seqid_mapper("s%9d")
$mapper = seqid_mapper("s%9d")
Returns true if a overlaps with b, false otherwise.
jw bargsten, <joachim.bargsten at wur.nl>
<joachim.bargsten at wur.nl>
To install Bio::Gonzales, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Gonzales
CPAN shell
perl -MCPAN -e shell install Bio::Gonzales
For more information on module installation, please visit the detailed CPAN module installation guide.