☼ 林永忠 ☼

NAME

Bio::Tools::Prepeat - Finding repeats in protein sequences

SYNOPSIS

    use Bio::Tools::Prepeat;
    my $p = Bio::Tools::Prepeat->new( wd => './working_directory' );
    $p->feed(@seq);
    $p->buildidx();
    $result = $p->query();

DESCRIPTION

This is a module for locating repeats in protein sequences. Usage is as follows: feed the sequences, build index files, perform queries, and then it will return a reference to the repeat data.

INTERFACE

new

  my $p = Bio::Tools::Prepeat->new( wd => './working_directory' );

Contructor. You need to specify a directory's name for storing index files and other information.

feed

  $p->feed($seq1, $seq2);

Use this to feed protein sequences into the object. NOTE, the module does not do character checking for your input data.

reset

  $p->reset();

It resets the object. Sequences will be freed from memory, and you may need to use 'loadidx' to load index files that are previously built before you perform another query.

buildidx

  $p->buildidx();

It builds bigram index for sequences. Bigram index is used to pick up possible candidates.

loadidx

  $p->loadidx();

It loads previously built bigram index files.

query

    $p->query(10);

It returns a reference to repeat sequences of length 10 with sequence ids they belong to and their positions in sequences.

You can also give it a range, say

    $p->query([4..10]);

It returns a reference to repeat sequences from length 4 to length 10 with sequence ids they belong to and their positions in sequences.

random_sequence

   $p->random_sequence(100000);

or you may use it as a plain function.

    use Bio::Tools::Prepeat qw(random_sequence);
    print random_sequence(100000);

It generates a random protein sequence, and you may use this for testing.

NOTE

It is all written in Perl for now, and parts of the code will be translated into XS for better performance in next versions.

COPRYRIGHT

xern <xern@cpan.org>

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.