Skip to main content

pylabeledrf

pylabeledrf is a package to compute an extension of the Robinson Foulds tree topological distance between labeled topologies, where inner nodes are labeled with speciation or duplication events.

From version 0.2 onwards, pylabeledrf includes two functions:

  • computeLRF(), which computes exactly and efficiently the Labeled Robinson Foulds (LRF).
  • computeELRF(), which is a heuristic to compute the edge-based Labeled Robinson Foulds (ELRF).

Citation

If you use our package in your work, please consider citing:

  • For LRF: Samuel Briand, Christophe Dessimoz, Nadia El-Mabrouk, Yannis Nevers, A linear time solution to the Labeled Robinson-Foulds distance problem, Systematic Biology 71(6):1391–1403 2022
  • For ELRF: Samuel Briand, Christophe Dessimoz, Nadia El-Mabrouk, Manuel Lafond, Gabriela Lobinska, Extending the Robinson-Foulds distance to reconciled trees, APBC 2020 and BMC Genomics, 21(S10) 2020

Installation

The package requires Python 3 (>=3.6). The easiest way to install is using pip, to install the package from PyPI.

pip install pylabeledrf

Documentation

Documentation is available here.

Example

from pylabeledrf.computeLRF import *
import dendropy
taxa = dendropy.TaxonNamespace()

# retrieve the test TP53 reconciled tree (from Ensembl compara 96)
p53 = dendropy.Tree.get_from_url(
    'https://raw.githubusercontent.com/DessimozLab/pylabeledrf/master/test/p53.nhx', 
    'newick', taxon_namespace=taxa)
t1 = parseEnsemblLabels(p53)

# introduce 5 random edits and compute the distance
t2 = mutateLabeledTree(t1, 5)
computeLRF(t1,t2)

# randomise the labels and compute the distance
t3 = randomLabels(t1)
computeLRF(t1,t3)

License

Copyright 2019-2020 Christophe Dessimoz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for pylabeledrf 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylabeledrf 0.3.2
File Size Uploaded
pylabeledrf-0.3.2.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylabeledrf 0.3.2
File Interpreter ABI Platform
pylabeledrf-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / pylabeledrf-0.3.2.tar.gz

Download URL pylabeledrf-0.3.2.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e8d32b152a82421f43fb3c2690c435daf94c03aa66afb391806ec1ab37ab0d2e
BLAKE2b-256 checksum
How to use checksums
0e4e4d2b7c49de6437b8d2c935e09d0372b055474512e7b75b171e2d849a8f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2024.

Transparency log

Release files / pylabeledrf-0.3.2-py3-none-any.whl

Download URL pylabeledrf-0.3.2-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a40693c7b3dde9551b182b7b69078c1e3d996cac1993273e8b295be89236d43
BLAKE2b-256 checksum
How to use checksums
45914cd6c7e155b7d8a075ebbff9dfc1300934118aee6f4e1e8418a015e72713
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.2.2

1 release file

0.2.1

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page