in reply to formatting output question (use of recursive subroutine?)

ref agctagctagctagcatgctagctagctgatcgatgctagctagctgactgacgacg out1 atctagcat agctagcgatcga gactgacagc out2 tagctagctgctagc out3 agtcgatcgatgctagc
How do you define a match? I wouldn't say any of those strings matched anywhere.

Unless I state otherwise, all my code runs with strict and warnings

Replies are listed 'Best First'.
Re^2: formatting output question (use of recursive subroutine?)
by pc88mxer (Vicar) on Jul 29, 2008 at 15:55 UTC
    I think in this context (DNA sequence matching) allowances are made for a small number of insertions, deletions and changes.
Re^2: formatting output question (use of recursive subroutine?)
by rogerd (Sexton) on Jul 29, 2008 at 22:45 UTC

    Yes, that example doesn't match at all. I just write some atcg letters to put as an example. The matching was done previously, and now I am interested in formatting the results I had previusly.

    The important thing here is that each substring should vertically match with the reference string, in the position that I have previously stored. Each of the substrings is one result: in this example, the line out1 have 3 different substrings, and out2 and out3 have one each (they are in different lines because they are overlapped).