StrepSuis-PhyloTrait

Integrated Phylogenetic and Binary Trait Analysis of Antimicrobial Resistance and Virulence in Streptococcus suis

Back to Tools

Overview

The StrepSuis-PhyloTrait module integrates phylogenetic tree information with binary trait data (antimicrobial resistance and virulence factors) to perform evolutionary-aware analysis of Streptococcus suis. It identifies strain groups that share both genetic ancestry and phenotypic characteristics.

Key Features

  • Tree-Aware Clustering: Multiple algorithms that respect phylogenetic structure
  • Evolutionary Metrics: Faith's Phylogenetic Diversity, pairwise distances
  • UMAP Visualization: Dimensionality reduction preserving evolutionary relationships
  • Binary Trait Analysis: Chi-square tests for trait-cluster associations
  • Bootstrap Validation: Confidence assessment of cluster assignments
  • Interactive Tree: Phylogenetic tree with cluster annotations

When to Use

Use this tool when you want to:

  • Analyze strain relationships in evolutionary context
  • Find phylogenetically coherent strain groups
  • Test trait associations with phylogenetic structure
  • Combine tree-based and trait-based clustering

Input Files Required

  • tree.newick or tree.nwk - Phylogenetic tree (Newick format)
  • MIC.csv - Minimum Inhibitory Concentrations
  • AMR_genes.csv - Antimicrobial resistance genes
  • Virulence.csv - Virulence factors

Optional: MLST.csv, Serotype.csv for additional metadata

Output Files

  • HTML Report: Interactive phylogenetic tree, UMAP plots, trait associations
  • Excel Workbook: Cluster assignments, phylogenetic metrics, trait profiles
  • PNG Charts: Annotated trees, UMAP projections, heatmaps

Statistical Methods

  • Multiple tree-aware clustering algorithms
  • Faith's Phylogenetic Diversity (PD)
  • Patristic distance calculations
  • UMAP with custom phylogenetic distance metrics
  • Chi-square tests with FDR correction
  • Bootstrap consensus clustering

Quick Start

Option 1: Google Colab (Recommended)

Run in Colab

Option 2: Local Installation

git clone https://github.com/MK-vet/MKrep.git
cd MKrep
pip install -r requirements.txt
python Phylgenetic_clustering_2025_03_21.py

Option 3: CLI

mkrep-phylo --tree tree.newick --data-dir ./data --output ./results

Parameters

UMAP Components 2
Bootstrap 500
FDR Alpha 0.05
Random Seed 42

Runtime

15-30 minutes

Depends on tree size and number of features

Documentation