# Bacterial phylodynamics

Bacterial phylodynamics is the study of immunology, epidemiology, and phylogenetics of bacterial pathogens to better understand the evolutionary role of these pathogens. Phylodynamic analysis includes analyzing genetic diversity, natural selection, and population dynamics of infectious disease pathogen phylogenies during pandemics and studying intra-host evolution of viruses. Phylodynamics combines the study of phylogenetic analysis, ecological, and evolutionary processes to better understand of the mechanisms that drive spatiotemporal incidence and phylogenetic patterns of bacterial pathogens. Bacterial phylodynamics uses genome-wide single-nucleotide polymorphisms (SNP) in order to better understand the evolutionary mechanism of bacterial pathogens. Many phylodynamic studies have been performed on viruses, specifically RNA viruses (see Viral phylodynamics) which have high mutation rates. The field of bacterial phylodynamics has increased substantially due to the advancement of next-generation sequencing and the amount of data available.

## Methods
### Novel hypothesis (study design)

Studies can be designed to observe intra-host or inter-host interactions. Bacterial phylodynamic studies usually focus on inter-host interactions with samples from many different hosts in a specific geographical location or several different geographical locations. The most important part of a study design is how to organize the sampling strategy. For example, the number of sampled time points, the sampling interval, and the number of sequences per time point are crucial to phylodynamic analysis. Sampling bias causes problems when looking at a diverse taxological samples. For example, sampling from a limited geographical location may impact effective population size.

### Generating data
#### Experimental settings

Sequencing of the genome or genomic regions and what sequencing technique to use is an important experimental setting to phylodynamic analysis. Whole genome sequencing is often performed on bacterial genomes, although depending on the design of the study, many different methods can be utilized for phylodynamic analysis. Bacterial genomes are much larger and have a slower evolutionary rate than RNA viruses, limiting studies on the bacterial phylodynamics. The advancement of sequencing technology has made bacterial phylodynamics possible but proper preparation of the whole bacterial genomes is mandatory.

##### Alignment

When a new dataset with samples for phylodynamic analysis are obtained, the sequences in the new data set are aligned. A BLAST search is frequently executed to find similar strains of the pathogen of interest. Sequences collected from BLAST for an alignment will need the proper information to be added to a data set, such as sample collection date and geographical location of the sample. Multiple sequence alignment algorithms (e.g., MUSCLE, MAFFT, and CLUSAL W) will align the data set with all selected sequences. After the running a multiple sequence alignment algorithm, manual editing the alignment is highly recommended. Multiple sequence alignment algorithms can leave a large amount of indels in the sequence alignment when the indels do not exist. Manually editing the indels in the data set will allow a more accurate phylogenetic tree.

##### Quality control

In order to have an accurate phylodynamic analysis, quality control methods must be performed. This includes checking the samples in the data set for possible contamination, measuring phylogenetic signal of the sequences, and checking the sequences for possible signs of recombinant strains. Contamination of samples in the data set can be excluded with by various laboratory methods and by proper DNA/RNA extraction methods. There are several way to check for phylogenetic signal in an alignment, such as likelihood mapping, transition/transversions versus divergence plots, and the Xia test for saturation. If phylogenetic signal of an alignment is too low then a longer alignment or an alignment of another gene in the organism may be necessary to perform phylogenetic analysis. Typically substitution saturation is only in issue in data sets with viral sequences. Most algorithms used for phylogenetic analysis do not take into recombination into account, which can alter the molecular clock and coalescent estimates of a multiple sequence alignment. Strains that show signs of recombination should either be excluded from the data set or analyzed on their own.

### Data analysis
#### Evolutionary model

The best fitting nucleotide or amino acid substitution model for a multiple sequence alignment is the first step in phylodynamic analysis. This can be accomplished with several different algorithms (e.g., IQTREE, MEGA).

#### Phylogeny inference

There are several different methods to infer phylogenies. These include methods include tree building algorithms such as UPGMA, neighbor joining, maximum parsimony, maximum likelihood, and Bayesian analysis.

### Hypothesis testing
#### Assessing phylogenetic support

Testing the reliability of the tree after inferring its phylogeny, is a crucial step in the phylodynamic pipeline. Methods to test the reliability of a tree include bootstrapping, maximum likelihood estimation, and posterior probabilities in Bayesian analysis.

#### Phylodynamics inference

Several methods are used to assess phylodynamic reliability of a data set. These methods include estimating the data set's molecular clock, demographic history, population structure, gene flow, and selection analysis. Phylodynamic results of a data set can also influence better study designs in future experiments.

## Examples
### Phylodynamics of cholera

Cholera is a diarrheal disease that is caused by the bacterium Vibrio cholerae. V. cholerae has been a popular bacterium for phylodynamic analysis after the 2010 cholera outbreak in Haiti. The cholera outbreak happened right after the 2010 earthquake in Haiti, which caused critical infrastructure damage, leading to the conclusion that the outbreak was most likely due to the V. cholerae bacterium being introduced naturally to the waters in Haiti from the earthquake. Soon after the earthquake, the UN sent MINUSTAH troops from Nepal to Haiti. Rumors started circulating about terrible conditions of the MINUSTAH camp, as well as people claiming that the MINUSTAH troops were deposing of their waste in the Artibonite River, which is the major water source in the surrounding area. Soon after the MINUSTAH troops arrival, the first cholera case was reported near the location of the MINUSTAH camp. Phylodynamic analysis was used to look into the source of the Haiti cholera outbreak. Whole genome sequencing of V. cholerae revealed that there was one single point source of the cholera outbreak in Haiti and it was similar to O1 strains circulating in South Asia. Before the MINUSTAH troops from Nepal were sent to Haiti, a cholera outbreak had just occurred in Nepal. In the original research to trace the origin of the outbreak, the Nepal strains were not available. Phylodynamic analyses were performed on the Haitian strain and the Nepalese strain when it became available and affirmed that the Haitian cholera strain was the most similar to the Nepalese cholera strain. This outbreak strain of cholera in Haiti showed signs of an altered or hybrid strain of V. cholerae associated with high virulence. Typically high quality single-nucleotide polymorphisms (hqSNP) from whole genome V. cholerae sequences are used for phylodynamic analysis. Using phylodynamic analysis to study cholera helps prediction and understanding of V. cholerae evolution during bacterial epidemics.