{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Multiple Sequence Alignment to HMM" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pyhmmer\n", "pyhmmer.__version__" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "alphabet = pyhmmer.easel.Alphabet.amino()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Loading the alignment" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A new HMM can be built from a single sequence, or from a multiple sequence alignment. Let's load an alignment in digital mode so that we can build our HMM:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "with pyhmmer.easel.MSAFile(\"data/msa/LuxC.sto\") as msa_file:\n", " msa_file.set_digital(alphabet)\n", " msa = next(msa_file)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "