{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# SarcGraphTools - Analysis\n", "\n", "All demos are availble on GitHub at https://github.com/Sarc-Graph/sarcgraph/tree/main/tutorials.\n", "\n", "To run demos with `jupyter notebook` check [Installation Guide](https://sarc-graph.readthedocs.io/en/latest/installation.html).\n", "\n", "SarcGraph includes the tools which enable the recovery of basic sarcomere characteristics and the ability to run further high level analysis.\n", "\n", "In this notebook we provide a tutorial on how to use the SarcGraph package using demos and examples. The focus is on the ``SarcGraphTools.Analysis`` class in the ``sg_tools`` module." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Initialization" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Methods in the ``SarcGraphTools`` class need the information that will be saved by running ``SarcGraph.sarcomere_detection()``.\n", "\n", "To showcase this we use ``samples/sample_1.avi``." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Frame 79: 91 trajectories present.\n" ] }, { "data": { "text/html": [ "
| \n", " | frame | \n", "sarc_id | \n", "x | \n", "y | \n", "length | \n", "width | \n", "angle | \n", "zdiscs | \n", "
|---|---|---|---|---|---|---|---|---|
| 783 | \n", "63 | \n", "9 | \n", "100.959195 | \n", "106.775141 | \n", "24.390126 | \n", "21.496951 | \n", "0.622702 | \n", "-35,-28 | \n", "
| 82 | \n", "2 | \n", "1 | \n", "153.784835 | \n", "64.936307 | \n", "21.563298 | \n", "25.762765 | \n", "1.102697 | \n", "-40,-22 | \n", "
| 5732 | \n", "52 | \n", "71 | \n", "149.771889 | \n", "188.185834 | \n", "12.032297 | \n", "10.872591 | \n", "2.306348 | \n", "68,89 | \n", "
| 3356 | \n", "76 | \n", "41 | \n", "242.743014 | \n", "250.967316 | \n", "11.967362 | \n", "9.383441 | \n", "2.095774 | \n", "2,6 | \n", "
| 5361 | \n", "1 | \n", "67 | \n", "144.302499 | \n", "178.563181 | \n", "13.959253 | \n", "8.317837 | \n", "2.684629 | \n", "49,68 | \n", "