.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/comparison/compute_caset.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_caset.py: Comparing two trees by CASet ---------------------------- 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/caset.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 commonly ancestor sets score (CASet). .. GENERATED FROM PYTHON SOURCE LINES 23-24 .. code-block:: Python scp.tl.caset(grnd, sol) .. rst-class:: sphx-glr-script-out .. code-block:: none 0.784769042405406 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.042 seconds) **Estimated memory usage:** 11 MB .. _sphx_glr_download_auto_examples_comparison_compute_caset.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: compute_caset.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: compute_caset.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_