[Bioperl-l] approximate regular expression
Adam Witney
awitney at sgul.ac.uk
Thu Mar 22 21:25:40 UTC 2012
Hi Jose,
I've never tried it but also have a look at this module:
http://search.cpan.org/~limaone/Bio-Grep-v0.10.6/lib/Bio/Grep.pm
Adam
On 22 Mar 2012, at 20:47, José Ramón Blas Pastor wrote:
> I want to find all the matches of a given pattern in a string but doing
> fuzzy (approximate) pattern matching. I want to allow small variations (1
> or 2 positions substituted) in the match. I have tried String::approx
> module, but I do not know how to manage syntax
>
> ...
> use String::approx 'amatch';
> my $pattern = "JEJE";
> my $string = "EJKJUJHJDJEJEJEDEJOJOJJJAHJHJSHJEFEJUJEJUJKIJS";
> while (?=/$pattern/) {
> ...
> [download] <http://perlmonks.org/index.pl?abspart=1;displaytype=displaycode;node_id=961099;part=1>
>
> How could I achieve that this 'while' allow 1 substitution from $pattern?
> That is that "JEFE", "JUJE","JEDE",... would be true matches.
>
> Thanks a lot in advance. JR
>
> --
> José Ramón Blas - PhD
> Dept. Biochemistry - Medicine School
> University of Castilla-La Mancha
> C Almansa, 14
> 02006 Albacete (Spain)
>
> Phone: +34 967599200 ext. 2958
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list