{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "ShapeMapper2 quality control plots\n", "==================================\n", "\n", "Known issue: RNAvigate currently does not correctly parse log.txt files from \n", "ShapeMapper2 >= v2.2\n", "\n", "ShapeMapper2 quality control plots display useful quality control metrics:\n", "mutations per read distributions, read length histograms, and modified vs.\n", "untreated per-nucleotide reactivity distributions as a violin plot. These\n", "metrics are contained in the shapemapper_log.txt files output by ShapeMapper2\n", "if the `--per-read-histogram` flag is used.\n", "\n", "First, Mutations per read is an important metric to determine if reads in the\n", "modified sample contain more mutations than reads from the untreated sample.\n", "The shift in distribution varies depending on many factors, such as read\n", "length, intrinsic reactivity of the RNA and the probe, cell permeability, \n", "enzyme fidelity, etc. For single-molecule correlated chemical probing\n", "experiments, the shift in distribution should be dramatic, with modified\n", "samples typically containing 4-10 mutations per read. A bimodal distribution\n", "can be indicative of DNA contamination or compartmental differences in reagent\n", "permeability, as sometimes happens with clumped cells.\n", "\n", "Read length distributions for amplicon data should be punctate. Large numbers\n", "of shorter reads indicate poor read merging, possibly due to short overlaps or\n", "low NGS base-calling quality scores.\n", "\n", "Per-nucleotide reactivity distributions should show an upward shift in modified\n", "mutation rate compared to untreated rate. This will depend on reagent\n", "reactivity, RNA structuredness, enzyme fidelity, etc." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import rnavigate as rnav\n", "from rnavigate.examples import rnasep_1, rnasep_2, rnasep_3, rnasep_4\n", "\n", "plot = rnav.plot_qc(\n", " samples=[rnasep_1, rnasep_2, rnasep_3, rnasep_4],\n", " profile=\"shapemap\",\n", ")\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "help(rnav.plot_qc)\n" ] } ], "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 }