Skip to main content

JplaceParser

Python tools to parse and manipulate JPlace files, the format of Evolutionary Placement results.

JplaceParser allows not only reading Jplace files as python dictionaries but also manipulating field values and exporting back to jplace files. It contains a number of filters to remove placements that do not satisfy quality criteria. Currently, placements can be filtered by three criteria involving the pendant and distal placement length as well as the phylogenetic tree diameter:

  • Filter by maximum pendant length
  • Filter by maximum pendant to distal length ratio
  • Filter by maximum pendant to tree diameter ratio

This is an ongoing project!

Installation

  1. pip install jplaceparser

or

  1. Git clone project to local directory.

    In terminal navigate to directory and enter: python setup.py install

from jplaceparser import JplaceParser


jplace = JplaceParser.fromJplaceFile("examples/example.jplace")
jplace
Number of Placements19
Fieldsedge_num, likelihood, like_weight_ratio, distal_length, pendant_length
JplaceParser version0.0.1
AuthorSemidán Robaina Estévez, 2022
filtered_jplace = jplace.filterByMaxPendantToTreeDiameterRatio(
    max_pendant_ratio=0.001
)

filtered_jplace.writeToFile("examples/filtered_example.jplace")

filtered_jplace
Filtering placements for tree diameter: 4.519636416
Number of Placements9
Fieldsedge_num, likelihood, like_weight_ratio, distal_length, pendant_length
JplaceParser version0.0.1
AuthorSemidán Robaina Estévez, 2022

Metadata

Release files for jplaceparser 0.0.2

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

Built distribution (wheel)

Table of built distributions (wheels) for jplaceparser 0.0.2
File Interpreter ABI Platform Actions
jplaceparser-0.0.2-py3.10.egg Legacy Egg format - - Details for jplaceparser-0.0.2-py3.10.egg

Release files / jplaceparser-0.0.2-py3.10.egg

Download URL jplaceparser-0.0.2-py3.10.egg
Size 8.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
b9ce1b466faac51f95c01d01ff76a30b471d77ed5ab67d490fbb9faafc8ef82c
BLAKE2b-256 checksum
How to use checksums
990d4171524c6a6bce97056926233451bd0d9c29ec69651afd44074a02527896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for jplaceparser 0.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

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