Generate phylofunc to incorporate microbiome phylogeny to inform on metaproteomic functional distance.
Project description
phylofunc
'phylofunc' is a Python package for generating phylofunc to incorporate microbiome phylogeny to inform on metaproteomic functional distance. It enables efficient calculation of functional beta-diversity distances between sample pairs and generates comprehensive distance metrics across multiple samples.
Installation of package
You can install this package via pip:
pip install phylofunc
Usage
Once installed, you can use the phylofunc package in a Python script or an interactive environment.
Quick Start
Import package
from phylofunc import PhyloFunc_distance
from phylofunc import PhyloFunc_matrix
Script
Two input parameters are required. The first is a phylogenetic tree (default: bac120_iqtree_v2.0.1.nwk). The second is a phylogeny-informed Taxon-Function table, which includes columns labeled Taxon, Function, and the names of samples (default: Taxon_Function_distance.csvor Taxon_Function_matrix.csv).
1. Calculate phylofunc distance between sample pairs
PhyloFunc_distance(tree_file='bac120_iqtree_v2.0.1.nwk', sample_file='Taxon_Function_distance.csv')
2. Calculate phylofunc distance matrix across multiple samples
PhyloFunc_matrix(tree_file='bac120_iqtree_v2.0.1.nwk', sample_file='Taxon_Function_matrix.csv')
Output
phylofunc distance or phylofunc distance matrix can be output.
Performance optimization
This package improves performance by reducing disk I/O operations and processing data in memory. This enables faster computations with large datasets.
Project structure
phylofunc/
├── __init__.py
├── phylofunc.py
│ └── The main function code.
├── data/
│ ├── Taxon_Function_distance.csv
│ │ └── Data file for calculating the distance between two samples.
│ ├── Taxon_Function_matrix.csv
│ │ └── Data file for calculating distances matrix across multiple samples.
│ └── bac120_iqtree_v2.0.1.nwk
│ └── Phylogenetic tree file.
└── Phylofunc_Package_Tutorial.ipynb
└── Demonstrates the specific application of this package.
Contribution
Welcome code contributions and improvement suggestions! Feel free to submit an issue or a pull request on GitHub.
License
This project uses an MIT license. For details, see the LICENSE file.
Application
For more detailed usage instructions, please refer to the paper: Wang and Li et al., PhyloFunc: Phylogeny-informed Functional Distance as a New Ecological Metric for Metaproteomic Data Analysis doi: https://doi.org/10.1101/2024.05.28.596184
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file phylofunc-1.0.8.tar.gz
.
File metadata
- Download URL: phylofunc-1.0.8.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a32e835ceb9a10ed37589df9d1309f76da2160fdf8304411235c273074c38cd6 |
|
MD5 | 3fc86e3e0f765e48669ebec58835e91a |
|
BLAKE2b-256 | 7254c9d1854b398c43d5d5fa780d514d7d5117c895742e28b7e82df098bef683 |
File details
Details for the file phylofunc-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: phylofunc-1.0.8-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d96f13dc6b7d8c58e708844a8691ba4fec08d2f1287a93679c48e0873a40d6e9 |
|
MD5 | 285c82b7ce8a1aeae99fcabf71fe24df |
|
BLAKE2b-256 | 90a3b57d466ee80cd1e58ea767c6bb3801eed78afa616266a59eaa0cab58982a |