NAME

Bio::Grep::Backend::Agrep - Agrep back-end

SYNOPSIS

use Bio::Grep;

my $sbe = Bio::Grep->new('Agrep');

$sbe->settings->datapath('data');

# generate a database. you have to do this only once. 
$sbe->generate_database('ATH1.cdna', 'AGI Transcripts (- introns, + UTRs)');

# search for the reverse complement and allow 2 mismatches 
# Don't calculate Alignments with EMBOSS
$sbe->search({
  query   => 'GAGCCCTT',
  reverse_complement => 1, 
  mismatches         => 2,
  no_alignments      => 1,
  database           => 'ATH1.cdna',
});

my @internal_ids;

# output the searchresults with nice alignments
while ( my $res = $sbe->next_res) {
   print $res->sequence->id . "\n";
   print $res->mark_subject_uppercase() . "\n";
   # print $res->alignment_string() . "\n\n";
   push @internal_ids, $res->sequence_id;
}

# get the complete sequences as Bio::SeqIO object
my $seq_io = $sbe->get_sequences(\@internal_ids);

DESCRIPTION

Bio::Grep::Backend::Agrep searches for a query with agrep.

Note: Bio::Grep::Backend::Agrep databases are compatible with Bio::Grep::Backend::RE databases.

METHODS

See Bio::Grep::Backend::BackendI for inherited methods.

Bio::Grep::Backend::Agrep->new()

This function constructs an agrep back-end object

my $sbe = Bio::Grep::Backend::Agrep->new();
$sbe->available_sort_modes()

Returns all available sort modes as hash. keys are sort modes, values a short description.

Available sortmodes in Agrep:

    currently none.

DIAGNOSTICS

See Bio::Grep::Backend::BackendI for other diagnostics.

Agrep call failed. Command was: ...

It was not possible to run agrep in function search(). Check the search settings. Agrep returns also exit(1) whenever no hit is found! If you want to reproduce the system() call, you can set the environment variable BIOGREPDEBUG. If this variable is set, then the temporary files won't get deleted. Bio::Root::SystemException.

SEE ALSO

Bio::Grep::Backend::BackendI Bio::Grep::SearchSettings Bio::SeqIO Bio::Index::Fasta

AUTHOR

Markus Riester, <mriester@gmx.de>

LICENCE AND COPYRIGHT

Based on Weigel::Search v0.13

Copyright (C) 2005-2006 by Max Planck Institute for Developmental Biology, Tuebingen.

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

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.