Python Interface to collect treespace metrics
Project description
Treespace_REU_2017
Installation
This code has been tested on Ubuntu 22 LTS.
Upon downloading the repository, run the installation script to obtain all the required packages.
When you download the repository, run the following command bash install.sh
Documentation
You can run commands to create python documentation as follows:
pip install pdoc
# will create an html folder with all generated documentation in .html format
pdoc3 --html treespace_metrics
# If you want it to run on local-host
pdoc --http localhost:8080 treespace_metrics
To access documentation, you can find it here. You can also download the package via pip.
Usage — Metrics on Adjacency Lists/Newick Graphs
I would like to thank Professor van Iersel for this link containing phylogenetic networks we used to test the code in the Phylo directory. The name of the text file will identify the paper it came from to cite if you use these as well. Please note, I had to use the newick format with internal node names, so I can easily convert this into a DAG in networkx to be compatible with the algorithms.
Run the test cases to ensure the metrics work on pre-defined graphs, run:
pytest test
Add the following arguments as needed:
- --dir, the input directory that has text files containing newick graphs or adjacency lists of phylogenetic networks
- -n, the input directory has text files that has newick formatted phylogenetic trees
- -d, draw the trees, bipartite graphs, etc.
After filling out the networks you want to get metrics for, here is how to execute the code:
python3 run_treespace.py --dir <directory> -d
Usage — Testing on Generated Networks
Louxin Zhang has provided me the source code to generate random binary phylogenetic networks, located in the phylo_generator. Feel free to see his original code here
After compiling the C code, run the following example to run generating 12 graphs with 3 leaves and 15
reticulation nodes. After generating the graphs, compute the metrics and store it with images into a directory for further analysis.
python3 run_treespace.py --generate -l 3 -r 15 -g 12 -d
Authors and Acknowledgment
Code Author: Andrew Quijano
This work was funded by a Research Experience for Undergraduates (REU) grant from the U.S. National Science Foundation (#1461094 to St. John and Owen).
Please cite the papers from which the algorithms are derived from if you use this library.
Jettan and van Iersal's Algorithm (jettan.py):
Laura Jetten and Leo van Iersel.
Nonbinary tree-based phylogenetic networks.
IEEE/ACM Transactions on Computational Biology and Bioinformatics, 1:205–217, 2018. On-line publication: October 2016.
Francis et al.'s Spanning Tree Algorithm (francis.py):
Andrew Francis, Charles Semple, and Mike Steel.
New characterisations of tree-based networks and proximity measures.
Advances in Applied Mathematics, 93:93–107, 2018.
Maximum Covering Subtrees for Phylogenetic Networks (max-cst.py):
Davidov, N., Hernandez, A., Mckenna, P., Medlin, K., Jian, J., Mojumder, R., Owen, M., Quijano, A., Rodriguez, A., John, K.S. and Thai, K., 2020.
Maximum Covering Subtrees for Phylogenetic Networks.
IEEE/ACM Transactions on Computational Biology and Bioinformatics.
License
Project status
The project is currently fully tested and functional for rooted phylogenetic networks. If you want to extend this for unrooted networks and have funding, please feel free to reach out.
Currently, I am working on the following:
- Solve the other problem about minimum number of trees spanning a network N, see
create_trees.py - Use OOP to create a PyPi package for this library
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file treespace_metrics-1.0.3-py3-none-any.whl.
File metadata
- Download URL: treespace_metrics-1.0.3-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28c136c4312874451e546379386abb6dce098561fc9db78d7177098909e34e5a
|
|
| MD5 |
d1e7e54c60004bae24eac75684d71096
|
|
| BLAKE2b-256 |
df64bc597ece5297b374e15f311e0c1c9a58f99401392288496a888737d7b7d2
|
Provenance
The following attestation bundles were made for treespace_metrics-1.0.3-py3-none-any.whl:
Publisher:
deploy_wheel.yml on AndrewQuijano/Treespace_REU_2017
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
treespace_metrics-1.0.3-py3-none-any.whl -
Subject digest:
28c136c4312874451e546379386abb6dce098561fc9db78d7177098909e34e5a - Sigstore transparency entry: 214243675
- Sigstore integration time:
-
Permalink:
AndrewQuijano/Treespace_REU_2017@b82ca1b55ce91bf7591b29f709a25d99fe1f362c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AndrewQuijano
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy_wheel.yml@b82ca1b55ce91bf7591b29f709a25d99fe1f362c -
Trigger Event:
push
-
Statement type: