[Bioperl-l] Search for sequence inside sequence

Carnë Draug carandraug+dev at gmail.com
Mon Feb 20 19:44:16 EST 2012


Hi everyone

is there a method to check if a sequence exists inside another one? I
have a sequence object and a small string of a sequence. I'd like to
know if it's present? Currently I only have

say "Found on $file" if $seq->seq =~ /$string/i;

It solves my problem but this doesn't look very smart to me. Is there
a better way? Maybe even something that would also accept S to match
against [G|C] for example?

Thanks in advance,
Carnë



More information about the Bioperl-l mailing list