Skip to main content

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

phylofunc-2.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phylofunc-2.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file phylofunc-2.0.tar.gz.

File metadata

  • Download URL: phylofunc-2.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for phylofunc-2.0.tar.gz
Algorithm Hash digest
SHA256 873a8ccb140961a8b2745536ec02344f8f29ade1b3ec4172bc8535ed15c1a98a
MD5 9ca577d8aca94462a8f2cc4eaf06a1c0
BLAKE2b-256 3942f3c4a31566c27da6b1605523b5968b6a7bf18c10d0d72fa1fcef56a0c7a9

See more details on using hashes here.

File details

Details for the file phylofunc-2.0-py3-none-any.whl.

File metadata

  • Download URL: phylofunc-2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for phylofunc-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea3be309c0339ba3d8aa28b40240eae078216b8bc7a58a3b1289017356e025f1
MD5 ef0f77db20844a51e4950b2f7ddec329
BLAKE2b-256 c562d8d863183ea6be0e2d35ad71b6791e2e7e6fd6d6850f73aac3513fc384de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page