Finding patterns in lung cancer protein sequences for drug repurposing
Fig 7
The pseudocode outlines the proposed method for scoring the similarity between two protein sequences.
The Needleman-Wunsch (NW) alignment algorithm was adapted to allow custom values for each character pair in the alphabet, stored in a matrix-like structure. The process begins by setting up the scores for all amino acid pairs between lines 2 and 11, where values are assigned according to specified rules (pair_scores, line 5). Additionally, values for matches, mismatches, and gaps are also defined. Lines 12 to 18 describe the initialization of the score matrix. Initially, all rows and columns are set to 0, followed by the assignment of gap penalties to column 0 and row 0. The scoring algorithm is then implemented starting at line 19. This method uses a dynamic programming approach to compute the optimal alignment score between the two sequences. During the iteration, the maximum value is selected from among match, delete, and insert operations (lines 21, 22, and 23). The final output is a score that quantifies the similarity between the two input sequences (line 25).