roopa has asked for the wisdom of the Perl Monks concerning the following question:
Here $inputsubs$x{'sequence'} gives the input string and this is compared with the strings in @querysubs. Ex:-If the input string isfor($x=0;$x<$r;$x++){ @b = sort_by_similarity( \@querysubs,$inputsubs[$x]{'sequence'}); $y=\@b; #@array=@$y; #print $y->[0]; #$m=\@array; #print $m; $h=\($y->[0]); print $$h; #%hash=%\($y->[0]); foreach my $key(keys %hash){ #print "$key:$hash{$key}\n"; } }
It gets divided into abc bcd cde def according to 3 as the windowsize. If the query sequence is abcefg It even gets divided into abc bce cef efgabcdef
I need to compare each of the strings in the inputsubs with the querysubs and get the best matching string for each of these strings using the function sort_by_similarity(),but I am unable to understand the value returned by the function and unable to access the values and print them.
Please help me in solving out this problem.20091109 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string similarity by using a function sort_by_similarity()
by shmem (Chancellor) on Nov 08, 2009 at 12:20 UTC | |
by roopa (Initiate) on Nov 09, 2009 at 11:15 UTC | |
|
Re: string similarity by using a function sort_by_similarity()
by bobf (Monsignor) on Nov 08, 2009 at 15:26 UTC | |
|
Re: string similarity by using a function sort_by_similarity()
by gmargo (Hermit) on Nov 08, 2009 at 10:33 UTC |