in reply to Re^2: Finding Neighbours of a String
in thread Finding Neighbours of a String
Ah, thanks for your clarification. That’s easy: change the split line to
my @base = $str =~ /\G ( \[ [^][]+ \] | [^][] ) /xg;
which will parse the string into units of either a single letter or a bracketed sequence, and change the grep line to
[ grep { $base[ $i ] !~ $_ } qw( A T C G ) ];
so that the letter in question will be thrown out if it matches anywhere in a bracketed sequence.
That’s all, you’re done.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Finding Neighbours of a String
by monkfan (Curate) on Mar 02, 2006 at 09:25 UTC | |
by Aristotle (Chancellor) on Mar 03, 2006 at 20:15 UTC |