Edward Wijaya wrote:
Hi John and David,
Hello,
I forgot to mentioned another variances of scoring apart from
this two
They are cases where they overlap:
CASE C:
. ... #score 16
GATTACGAGTGGCGCTCGTGTAACGGCA
GATTACG
TTACGAG CGTGTAA
CASE D:
GCTCGTG
Edward Wijaya wrote:
Hi John and David,
Hello,
Don't mean to nitpick.
Just wondering if it's possible to modify Krahn's snippet to accomodate
the overlapping cases?
No, it won't work if they overlap.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
Hi John and David,
Thanks so much for your reply.
I forgot to mentioned another variances of scoring apart from
this two
...... ..
GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21
GATTACGGCGCTCG AACGGCA
CASE B:
.... #Score 4
GATTACGAGTGGCGCTCGTGTAACGGCA
Wagner, David --- Senior Programmer Analyst --- WGO wrote:
John W. Krahn wrote:
Wagner, David --- Senior Programmer Analyst --- WGO wrote:
Since you are not using the offset, and you have the same value
GG twice and index starts over from the first, you are counting the
same GG twice. If you re
John W. Krahn wrote:
> Wagner, David --- Senior Programmer Analyst --- WGO wrote:
>> John W. Krahn wrote:
>>
>>> John W. Krahn wrote:
>>>
It looks like this will do what you want:
>>
>> John,
>> Since you are not using the offset, and you have the same value
>> GG twice and index starts
Wagner, David --- Senior Programmer Analyst --- WGO wrote:
John W. Krahn wrote:
John W. Krahn wrote:
It looks like this will do what you want:
John,
Since you are not using the offset, and you have the same value
GG twice and index starts over from the first, you are counting the
same GG twice.
John W. Krahn wrote:
> John W. Krahn wrote:
>>
>> It looks like this will do what you want:
John,
Since you are not using the offset, and you have the same value
GG twice and index starts over from the first, you are counting the same GG
twice. If you remove the last GG
John W. Krahn wrote:
It looks like this will do what you want:
sub score {
my ( $str, $array ) = @_;
my $total_score = 0;
for my $frag ( @$array ) {
my $len = length $frag;
my $idx = index $str, $frag;
if ( $idx >= 0 and substr $str, $idx, $len, '' ) {
$total_score += $len;
Edward Wijaya wrote:
Hi,
Hello,
I have following code that measure the substring.
It basically the number of positions of substrings
that occur (dotted count)
CASE A:
...... ..
GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21
GATTACGGCGCTCG AACGGCA
CASE B:
...
Edward Wijaya wrote:
> Hi,
>
> I have following code that measure the substring.
> It basically the number of positions of substrings
> that occur (dotted count)
>
> CASE A:
> ...... ..
> GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21
> GATTACGGCGCTCG AACGGCA
>
>
> CASE B:
>
10 matches
Mail list logo