.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/comparison/compute_mp3.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_comparison_compute_mp3.py: Comparing two trees by MP3 -------------------------- This example shows how to compare/measure two inferred genotype data (trees). .. GENERATED FROM PYTHON SOURCE LINES 7-12 .. code-block:: Python import scphylo as scp # sphinx_gallery_thumbnail_path = "_static/thumbnails/mp3.png" .. GENERATED FROM PYTHON SOURCE LINES 13-14 First, we load two binary test single-cell genotype data. .. GENERATED FROM PYTHON SOURCE LINES 14-21 .. code-block:: Python grnd = scp.io.read( scp.ul.get_file("scphylo.datasets/test/fp_0-fn_0-na_0.ground.CFMatrix") ) sol = scp.io.read( scp.ul.get_file("scphylo.datasets/test/fp_1-fn_0.1-na_0.bnb.CFMatrix") ) .. GENERATED FROM PYTHON SOURCE LINES 22-23 Calculating the Triplet-based similarity score (MP3). .. GENERATED FROM PYTHON SOURCE LINES 23-24 .. code-block:: Python scp.tl.mp3(grnd, sol) .. rst-class:: sphx-glr-script-out .. code-block:: none 0.6582958295829583 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 6.511 seconds) **Estimated memory usage:** 9 MB .. _sphx_glr_download_auto_examples_comparison_compute_mp3.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: compute_mp3.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: compute_mp3.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_