in reply to Per residue sequence alignment - per character string comparison?

I was thinking of using substr initially, but was having difficulty with the presence of gaps in the alignment throwing off the numbering. Thus I was going through the string counting non-gap characters, and figured it would be faster and easier to read in the strings and generate a lookup hash.

The expected output for T281 would be a gap without a position number, or just return false. Based on how the alignments are done, it would be highly unlikely for a desired residue in the query strand to align with a gap in the subject strand. Likewise, K280 would return Q137, and I282 would return F138.

  • Comment on Re: Per residue sequence alignment - per character string comparison?

Replies are listed 'Best First'.
Re^2: Per residue sequence alignment - per character string comparison?
by perldigious (Priest) on Aug 10, 2016 at 13:04 UTC

    It looks like choroba has provided you with a working solution to your problem.

    Just a tip for this type of forum for asking questions, it's usually helpful if you reply directly to each node where a follow up question is asked with the answer to that question. In the case here of your node I'm replying directly to, your first paragraph would fit more logically as a response to my question and your second would fit more logically as a response to choroba's question. That way questions and answers "stick" together and make it easier for other monks to read and understand what's going on, which in turn makes it easier for them to help you :-).

    Not using direct replies this way means your node here may not necessarily stay near to the follow up questions that were asked, which can be confusing. It's not a big deal here because there were not very many nodes in the thread anyway, but if the thread gets larger the sequence of the conversation can quickly be lost.

    I love it when things get difficult; after all, difficult pays the mortgage. - Dr. Keith Whites
    I hate it when things get difficult, so I'll just sell my house and rent cheap instead. - perldigious
      Thank you for the tip. I didn't realize the nodes floated around by replies instead of being in a traditional threaded format.