1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Rep Power

    Comparing 2 different-sized strings in Perl


    I'm kind of new to Perl and I am comparing 2 strings of different size containing DNA nucleotides. I want the script to take the smaller string and locate it in the much larger string allowing for mismatches and providing me with the sequence it found in the larger string plus adjacent 5 nucleotides on either side.

    So for example if I have 2 strings:


    I want the script to take #1 and find the same sequence in #2 which is present but with 2 mismatches, along with 5 nucleotides on either side.

    Thank you so much!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Paris area, France
    Rep Power
    This is crossposted on Perlmonks (http://www.perlmonks.org/?node_id=1048594) and on Stackoverflow (http://stackoverflow.com/questions/18130000/comparing-2-different-sized-strings) and possibly other sites. There were some apparently useful answers on Perlmonks.

    Just to quote one of the answers you got on Perlmonks:
    It is considered polite to inform about crossposting so people not attending both sites do not waste their time hacking a solution to a problem already solved at the other end of the Internet.

IMN logo majestic logo threadwatch logo seochat tools logo