Skip to content

ncezid-biome/pulsenet2.0-trees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PulseNet 2.0 Trees

Introduction

This repo includes code for the calculation of distance matrices from allele profiles or sequence alignment and distance-based tree inference.

The code in this repo is provided as is and with no warranty or support.

Running the code

An example script (example.py) is included to demonstrate usage by generating a distance matrix and tree from allele profile data. The DistanceMatrix.from_json and DistanceMatrix.from_seqs classmethods in distance_matrix.py are the primary entrypoints.

Other entrypoints are present without example code. The Tree class in tree_model.py provides two entry-points for non-distance matrix tree operations. In PulseNet2.0 the Tree.from_allele_codes classmethod builds a quick tree from the allele code assignments generated in the PulseNet2.0 application. Allele codes are numerical identifiers which are assigned based on whole genome MLST similarity to existing samples in the database. They consist of up to six numerical IDs separated by periods. The first number in the allele code represents the coarsest grouping based on low allele profile similarity. The second number represents a finer clustering level and so forth. Allele code numeric IDs are scoped such that the same numeric ID only corresponds to a match if all IDs left of that one also match. i.e., A.B.C three of the IDs in A.B.C but none in X.B.C.

Implemented distance metrics and tree/clustering algorithms

Available distance metrics are:

  • absolute_allele_differences - a raw count of the positions at which a pair of samples differ (missing data is not counted as a difference)
  • normalized_allele_differences - The number of positions at which two samples differ divided by the number of positions for which both have an data

Available algorithms are:

  • upgma
  • single_linkage
  • complete_linkage
  • neighbor_joining - using a dynamic neighbor joining algorithm
  • minimum_spanning - an implementation intended to reproduce the behavior of the BioNumerics algorithm

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages