{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Class 25: Needleman-Wunsch\n", "**April 28, 2020**\n", "\n", "In this class, our goal is to implement the Needleman-Wunsch algorithm in Python. You can read more about the Needleman-Wunsch algorithm on [Wikipedia](https://en.wikipedia.org/wiki/Needleman–Wunsch_algorithm). The Wikipedia page contains pseudo-code which you might find helpful.\n", "\n", "Since the Needleman-Wunsch algorithm works on a matrix of scores, it is helpful to discuss how to represent a matrix in Python. We can do so by creating a list of lists. Let's say we want to make a matrix that looks like this:\n", "\n", "
1 | \n", "3 | \n", "5 | \n", "7 | \n", "
2 | \n", "3 | \n", "4 | \n", "5 | \n", "
5 | \n", "2 | \n", "20 | \n", "3 | \n", "