Bio::Grep::Backend::RE - Perl Regular Expression back-end
use Bio::Grep::Backend::RE; # configure our search back-end, in this case RE my $sbe = Bio::Grep::Backend::RE->new(); $sbe->settings->datapath('data'); # generate a database. you have to do this only once. $sbe->generate_database('ATH1.cdna', 'AGI Transcripts (- introns, + UTRs)'); $sbe->settings->database('ATH1.cdna'); # search for the reverse complement $sbe->settings->query('TGAACAGAAAGCTCATGAGCC'); $sbe->settings->reverse_complement(1); $sbe->search(); # 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"; } # sequences with at least 10 As $sbe->search({ query => '[A]{10,}' }); # some SNPs $sbe->search({query => '[CG]TGC[AT]CTCTTCT[CG]TCA'});
Bio::Grep::Backend::RE searches for a query with a Perl Regular Expression.
Note 1: ALPHA RELEASE!
Note 2: reverse_complement (and direct_and_rev_com ) are supported, but are only available for DNA/RNA queries, not for regular expressions.
See Bio::Grep::Backend::BackendI for other methods.
Bio::Grep::Backend::RE->new()
This function constructs an RE back-end object
my $sbe = Bio::Grep::Backend::StringApprox->new();
$sbe->available_sort_modes()
Returns all available sort modes as hash. keys are sort modes, values a short description.
$sbe->sort('ga');
Available sortmodes in GUUGle:
ga : 'ascending order of dG' gd : 'descending order of dG'
Note that 'ga' and 'gd' require that search results have dG set. Bio::Grep::RNA ships with filters for free energy calculation. Also note that these two sort options require that we load all results in memory.
See Bio::Grep::Backend::BackendI for other diagnostics.
Query not defined.
You forgot to define $sbe->settings->query.
$sbe->settings->query
Class: Bio::Root::BadParameter.
Bio::Root::BadParameter
Query does not look like a DNA/RNA sequence.
Either reverse_complement or direct_and_rev_com is set and the query does not match the regular expression m{\A [gactu]+ \z}xmsi.
reverse_complement
direct_and_rev_com
Bio::Root::IOException
It was not possible to write the database in generate_database(). Check free diskspace.
Bio::Grep::Backend::BackendI Bio::Grep::Container::SearchSettings Bio::SeqIO Bio::Index::Fasta
Markus Riester, <mriester@gmx.de>
Copyright (C) 2007 by M. Riester. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
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.
To install Bio::Grep, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Grep
CPAN shell
perl -MCPAN -e shell install Bio::Grep
For more information on module installation, please visit the detailed CPAN module installation guide.