in reply to match and mismatch
And here is the output which shows the difference at each position if any. So on '25th' position, you have 'G' in one, and 'T' in the other.use Algorithm::Diff qw(diff sdiff LCS traverse_sequences); + my @seq1= split //,"1 AGCTGATCGAGCTAGTACCCTAGCTC 26"; my @seq2 =split //,"15 AGCTGATCGAGCTAGTACCCTATCTC 40"; my @diffs = diff( \@seq1, \@seq2 ); foreach (@diffs) { foreach (@{$_}) { print join " " => @{$_},"\n"; } print "\n"; }
+ 1 5 - 2 - 25 G + 25 T - 30 2 + 30 4 - 31 6 + 31 0
--Artist
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: match and mismatch
by lima1 (Curate) on Nov 14, 2008 at 17:49 UTC |
In Section
Seekers of Perl Wisdom