{ "cells": [ { "cell_type": "markdown", "metadata": { "vscode": { "languageId": "raw" } }, "source": [ "Alignment plots\n", "===============\n", "\n", "Alignment plots are a quick way to visualize how RNAvigate is positionally\n", "aligning two data sets. The two sequences will be displayed along the x-axis,\n", "with dashes inserted where there are insertions/deletions. A simplified\n", "visualization of the alignment appears between the sequences, with grey bars\n", "indicating the sequence agreement. The x-axes show the positional alignment\n", "used by RNAvigate to compare sequences.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import rnavigate as rnav\n", "from rnavigate.examples import rnasep_1, rmrp\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "These two structure models differ only in that one contains structure cassettes\n", "on the 5' and 3' ends.\n", "\n", "This is what a good alignment looks like:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot = rnav.plot_alignment(\n", " data1=(rnasep_1, \"ss_ct\"),\n", " data2=(rnasep_1, \"ss_pdb\"),\n", ")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "RNAse P and RNAse MRP have structural conservation, but their sequences diverge substantially.\n", "\n", "Positions will be aligned even though there is very little sequence similarity\n", "\n", "This is what a bad alignment looks like:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plot = rnav.plot_alignment(\n", " data1=(rmrp, \"ss\"),\n", " data2=(rnasep_1, \"ss_pdb\"),\n", ")\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "help(rnav.plot_alignment)" ] } ], "metadata": { "kernelspec": { "display_name": "RNAvigate", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.2" } }, "nbformat": 4, "nbformat_minor": 2 }